Link to this headingRSA
Link to this headingRSA Signing
#Hash the message
=
#"Encrypt" the message with the private exponent
=
Link to this headingRSA Signature Verification
#Hash the message
=
#"Decrypt" the message with the public exponent
=
Link to this headingExample
=
#Public key: (n=0xf51518d30754430e4b89f828fd4f1a8e8f44dd10e0635c0e93b7c01802729a37e1dfc8848d7fbbdf2599830268d544c1ecab4f2b19b6164a4ac29c8b1a4ec6930047397d0bb93aa77ed0c2f5d5c90ff3d458755b2367b46cc5c0d83f8f8673ec85b0575b9d1cea2c35a0b881a6d007d95c1cc94892bec61c2e9ed1599c1e605f, e=0x10001)
#Private key: (n=0xf51518d30754430e4b89f828fd4f1a8e8f44dd10e0635c0e93b7c01802729a37e1dfc8848d7fbbdf2599830268d544c1ecab4f2b19b6164a4ac29c8b1a4ec6930047397d0bb93aa77ed0c2f5d5c90ff3d458755b2367b46cc5c0d83f8f8673ec85b0575b9d1cea2c35a0b881a6d007d95c1cc94892bec61c2e9ed1599c1e605f, d=0x165ecc9b4689fc6ceb9c3658977686f8083fc2e5ed75644bb8540766a9a2884d1d82edac9bb5d312353e63e4ee68b913f264589f98833459a7a547e0b2900a33e71023c4dedb42875b2dfdf412881199a990dfb77c097ce71b9c8b8811480f1637b85900137231ab47a7e0cbecc0b011c2c341b6de2b2e9c24d455ccd1fc0c21)
# RSA sign the message
= b
=
=
#Signature: 0x650c9f2e6701e3fe73d3054904a9a4bbdb96733f1c4c743ef573ad6ac14c5a3bf8a4731f6e6276faea5247303677fb8dbdf24ff78e53c25052cdca87eecfee85476bcb8a05cb9a1efef7cb87dd68223e117ce800ac46177172544757a487be32f5ab8fe0879fa8add78be465ea8f8d5acf977e9f1ae36d4d47816ea6ed41372b
# RSA verify signature
= b
=
=
#Signature valid: True
Link to this headingPKCS1
# Generate 1024-bit RSA key pair (private + public key)
=
=
# Sign the message using the PKCS#1 v1.5 signature scheme (RSASP1)
= b
=
=
=
# Verify valid PKCS#1 v1.5 signature (RSAVP1)
= b
=
=
# Verify invalid PKCS#1 v1.5 signature (RSAVP1)
= b
=
=
Link to this headingVulnerabilities
Link to this headingDuplicate Signature Key Selection
https://www.agwa.name/blog/post/duplicate_signature_key_selection_attack_in_lets_encrypt