optimisticninja / caencryption

Elementary CA-based encryption algorithm based on paper in references

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caencryption

Elementary CA-based encryption algorithm based on paper in references. Reference paper has errors, this is my identification and fixing of errata.

Output of implementation

PLAINTEXT: deadbeefcafebabe
KEY      : f6c78663f3578746
ENCRYPTED: ce09bfd34be8a898
DECRYPTED: deadbeefcafebabe

Rules used

Key Scheduling

Rule 60 rule 60

Rule 102 rule 102

Encryption

Rule 15 rule 15

Rule 170 rule 170

Decryption

Rule 85 rule 85

Rule 24 rule 240

Common (encryption and decryption)

In encryption/decryption round rule chains

Rule 204 rule 204

For diffusion

Rule 29 rule 29

Rule 51 rule 51

Errata from paper

  • There are unspecified CA boundaries
  • Selected rule 204 is essentially a NOP
  • 16x4 bit split in decryption should be 4x6
    • Correct in diagram (figure 3), not algorithm listing (figure 3 in paper, which is 4x16)
  • Decryption needs to invert the even/odd segment check
  • Rule 153 does not work for the diffusion as it is not reversible, linear rule 29 has been used instead.

References

About

Elementary CA-based encryption algorithm based on paper in references


Languages

Language:C++ 94.1%Language:CMake 5.3%Language:Shell 0.7%