Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require (a, 26) to be coprime in affine encode #1788

Merged
merged 2 commits into from
Apr 13, 2024
Merged

Conversation

EvieHarv
Copy link
Contributor

The affine multiplier is checked to be coprime to 26 in affine decode, but not encode, so this PR address that. It doesn't make sense to allow non-coprime values in the cipher, as the resulting ciphertext is invalid and unable to be decoded.

@a3957273
Copy link
Member

That's really cool to learn about, thanks for the improvement to the operation!

@a3957273 a3957273 merged commit 6e8c759 into gchq:master Apr 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants