From 004d08ad1879a5846c6081e7fc6920696a016f69 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Wed, 2 Apr 2025 21:31:45 +0200 Subject: [PATCH] add rsa notes --- src/routes/notes/crypto/+page.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/routes/notes/crypto/+page.md b/src/routes/notes/crypto/+page.md index e1c4ea6..200fec0 100644 --- a/src/routes/notes/crypto/+page.md +++ b/src/routes/notes/crypto/+page.md @@ -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). \ No newline at end of file +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. \ No newline at end of file