security-union / videocall-rs

teleconference system written in rust
https://www.videocall.rs
MIT License
1.38k stars 119 forks source link

Explore using AES-GCM #129

Open darioalessandro opened 1 year ago

darioalessandro commented 1 year ago

AES-GCM (Advanced Encryption Standard with Galois/Counter Mode) is a symmetric encryption algorithm that combines two things: the AES algorithm and the GCM (Galois/Counter Mode) mode of operation. It provides both encryption and authentication, ensuring both the confidentiality and the integrity of the data.

Here's a brief look at the two main components:

AES (Advanced Encryption Standard): This is a widely-used symmetric encryption algorithm. Symmetric means that the same key is used both for encrypting the plaintext and decrypting the ciphertext. AES can use key sizes of 128, 192, or 256 bits.

GCM (Galois/Counter Mode): GCM is a mode of operation that turns a block cipher like AES into a stream cipher. It also provides an authentication tag, which allows the recipient to verify the integrity of the message, ensuring that it hasn't been tampered with.

Why AES-GCM? AES-GCM is popular because it's efficient and secure. The efficiency comes from the use of counter mode, which allows parallelization, meaning that blocks can be encrypted or decrypted simultaneously, taking full advantage of modern multi-core processors.

The authentication part of AES-GCM ensures that if anyone alters a bit of the encrypted message, the decryption will detect this change and reject the message. This is important in many applications to prevent tampering with the encrypted data.

Where is AES-GCM Used? AES-GCM is commonly used in various protocols like TLS (for secure web browsing), IPsec (for VPNs), and many others. It's a widely accepted standard and has been analyzed extensively by the cryptographic community.

Security Considerations While AES-GCM is generally considered secure, it must be used correctly. The initialization vector (IV) must be unique for each encryption performed with the same key; otherwise, it can lead to serious vulnerabilities. Proper implementation and key management practices must be followed to maintain the security guarantees provided by AES-GCM.