Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHacktoberfest: Create a new Encryption Algorithm with AES GCM mode. #1600
Conversation
Create a new Encryption Algorithm with AES GCM mode.
Add redirect to new AES Algorithm
Describe your change:
To perform secure encryption, the modes of operation and the fill scheme are essential and must be used correctly according to the encryption algorithm. Most of the available implementations use algorithms with Electronic Codebook (ECB) and this algorithm has vulnerabilities in the reliability of the generated messages that are known to the community.
This example encourages the use of a more complete encryption method than the standard ones.
For block cipher encryption algorithms (like AES), the GCM (Galois Counter Mode) mode, which works internally with zero / no padding scheme, is recommended. At the opposite, these modes and / or schemes are highly discouraged:
Electronic Codebook (ECB) mode is vulnerable because it doesn't provide serious message confidentiality: under a given key any given plaintext block always gets encrypted to the same ciphertext block.
Cipher Block Chaining (CBC) with PKCS # 5 padding (or PKCS # 7) is susceptible to padding oracle attacks. RSA encryption algorithm should be used with the recommended padding scheme (OAEP)
This issue is describe by SonnarLint in https://community.sonarsource.com/t/java-s5542-has-invalid-compliant-example/21683
References
Galois/Counter Mode - https://en.wikipedia.org/wiki/Galois/Counter_Mode
What's the difference between AES-CBC and AES-GCM? - https://www.privateinternetaccess.com/helpdesk/kb/articles/what-s-the-difference-between-aes-cbc-and-aes-gcm
Java AES/GCM/NoPadding - What is cipher.getIV() giving me? - https://stackoverflow.com/questions/31851612/java-aes-gcm-nopadding-what-is-cipher-getiv-giving-me
Checklist: