TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.03k stars 7.1k forks source link

[FEATURE] Addition of S-AES (Simplified AES) cipher in ciphers directiory. #2611

Closed Charuhas10 closed 9 months ago

Charuhas10 commented 11 months ago

Detailed description

Addition of S-AES cipher for a better understanding of AES structure and algorithm. S-AES (Simplified AES) was developed by Professor Edward Schaefer of Santa Clara University and several of his students. It is an educational rather than a secure encryption algorithm. It has similar properties and structure to AES with much smaller parameters. It is intended to be used as a teaching tool for students to learn about AES and block ciphers in general. It is not intended to be used for any other purpose.

Difference between S-AES and AES

S-AES is a simplified version of AES. It has a smaller key size and a smaller number of rounds. It is not secure and should not be used for any purpose other than educational purposes. It is not a replacement for AES.

S-AES Parameters :

Block Size: 64 bits Key Size: 64 bits Number of Rounds: 4 Number of Subkeys: 4 Number of S-Boxes: 4 Number of S-Box Bits: 4 Number of S-Box Inputs: 16 Number of S-Box Outputs: 16

S-AES

S-AES Algorithm

The encryption algorithm takes a 16-bit block of plaintext as input and a 16-bit key and produces a 16-bit block of ciphertext as output. The S-AES decryption algorithm takes a 16-bit block of ciphertext and the same 16-bit key used to produce that ciphertext as input and produces the original 16-bit block of plaintext as output. The encryption algorithm involves the use of four different functions, or transformations: add key, nibble substitution (NS), shift row (SR), and mix column (MC), whose operation is explained subsequently. We can concisely express the encryption algorithm as a composition of functions: image Each function operates on a 16-bit state, treated as a matrix of nibbles, where one nibble is a 4-bit number. The initial state matrix is the 16-bit plaintext, State is modified by each subsequent function in the encryption process, producing after the last function the 16-bit ciphertext.

Context

I am raising this issue to propose the addition of the S-AES (Simplified Advanced Encryption Standard) cipher to the ciphers directory as a simpler demonstration model for AES, making it easier to understand and implement for beginners. By incorporating S-AES into this repository, it would serve as a valuable resource for students, educators, and enthusiasts venturing into the realm of encryption. Its simplicity against the full-fledged AES offers a gradual learning curve, making cryptographic concepts more accessible to a broader audience.

Possible implementation

No response

Additional information

No response

Charuhas10 commented 11 months ago

Please assign the task of implementing S-AES to this repository.

github-actions[bot] commented 10 months ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 9 months ago

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!