mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-04-21 04:49:37 +00:00
[PR #1245] feat: Added affine cipher #1839
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/TheAlgorithms/C/pull/1245
State: closed
Merged: Yes
Description of Change
An affine cipher is a linear transformation where encryption is of the form
E(x)=(ax+b) \text{ mod m }wherexis the character being encrypted andmis the number of characters in the alphabet being used. Decryption is of the formD(x) = a^{-1}(x-b) \text{ mod m}wherea^{-1}is the modular multiplicative inverse ofamodulom, i.e.,a*a^{-1} \equiv 1 \text{ (mod m)}.Checklist
Notes: added affine cipher