add rsa notes

This commit is contained in:
Daniel Bulant 2025-04-02 21:31:45 +02:00
parent f110e7746b
commit 004d08ad18
No known key found for this signature in database

View file

@ -21,4 +21,12 @@ Substition box. Used in diagrams for more advanced ciphers, used for mixing up d
## 3DES
Trides, encrypts, decrypts and encrypts again. If a single key is provided, try it for all 3 (becomes just slower DES).
Trides, encrypts, decrypts and encrypts again. If a single key is provided, try it for all 3 (becomes just slower DES).
## RSA
Key sizes of 128b or less are not enough and are factorable in small time.
`e` must be constant or otherwise not changeable by the attacker, can be forced to make a collision if it can be changed (for example when validating via user provided public key). Usually just set to 65537.
When generating prime numbers, both must be random - if the primes are close enough (for example, generating one random and then the other one by adding +2 until it's a prime again), they can be factored via fermat's theorem.