(B + key) mod 26 .... Z = (Z + key) mod 26 or: m = m + k mod 26 Message: L A M E Ciphertext (key=1): M B N F ‣ CAESAREAN CIPHER Encryption history (2) Friday, May 20, 2011
(B + key) mod 26 .... Z = (Z + key) mod 26 or: m = m + k mod 26 Message: L A M E Ciphertext (key=1): M B N F Ciphertext (key=-1): K Z L D ‣ CAESAREAN CIPHER Encryption history (2) Friday, May 20, 2011
(B + key) mod 26 .... Z = (Z + key) mod 26 or: m = m + k mod 26 Message: L A M E Ciphertext (key=1): M B N F Ciphertext (key=-1): K Z L D Ciphertext (key=26): L A M E ‣ CAESAREAN CIPHER Encryption history (2) Friday, May 20, 2011
(B + key) mod 26 .... Z = (Z + key) mod 26 or: m = m + k mod 26 Message: L A M E Ciphertext (key=1): M B N F Ciphertext (key=-1): K Z L D Ciphertext (key=26): L A M E Ciphertext (key=0): L A M E ‣ CAESAREAN CIPHER Encryption history (2) Friday, May 20, 2011
(B + key) mod 26 .... Z = (Z + key) mod 26 or: m = m + k mod 26 Message: L A M E Ciphertext (key=1): M B N F Ciphertext (key=-1): K Z L D Ciphertext (key=26): L A M E Ciphertext (key=0): L A M E Ciphertext (key=13): Y N Z R (ROT13) ‣ CAESAREAN CIPHER Encryption history (2) Friday, May 20, 2011
the English (or any other language) can be represented by a percentage. ‣ ‘E’ is used 12.7% of the times in english texts, the ‘Z’ only 0.074%. Friday, May 20, 2011
I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore— While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping—rapping at my chamber door. "'Tis some visitor," I muttered, "tapping at my chamber door— Only this and nothing more." Ah, distinctly I remember, it was in the bleak December, And each separate dying ember wrought its ghost upon the floor. Eagerly I wished the morrow;—vainly I had sought to borrow From my books surcease of sorrow—sorrow for the lost Lenore— For the rare and radiant maiden whom the angels name Lenore— Nameless here for evermore. And the silken sad uncertain rustling of each purple curtain Thrilled me—filled me with fantastic terrors never felt before; So that now, to still the beating of my heart, I stood repeating "'Tis some visitor entreating entrance at my chamber door— Some late visitor entreating entrance at my chamber door;— This it is and nothing more." ‣ EDGAR ALLAN POE: THE RAVEN Friday, May 20, 2011
Same key is used for both encryption and decryption. ‣ Good symmetrical encryptions: AES, Blowfish, (3)DES ‣ SYMMETRICAL ALGORITHMS Friday, May 20, 2011
intensive. ✓ useful for small and large messages. ✗ need to send over the key to the other side. Asymmetrical ✓ no need to send over the (whole) key. ✓ can be used for encryption and validation (signing). ✗ very resource intensive. ✗ only useful for small messages. Friday, May 20, 2011
the premise that it is practically impossible to refactor a large number back into 2 separate prime numbers. Prime number is only divisible by 1 and itself: 2, 3, 5, 7, 11, 13, 17, 19 etc... Friday, May 20, 2011
that it’s impossible to refactor quickly (all tough it doesn’t look plausible) ‣ Brute-force decrypting is always lurking around (quicker machines, better algorithms). Friday, May 20, 2011
that it’s impossible to refactor quickly (all tough it doesn’t look plausible) ‣ Brute-force decrypting is always lurking around (quicker machines, better algorithms). ‣ Good enough today != good enough tomorrow. Friday, May 20, 2011
= (large) prime number (but not too close to p) ‣ n = p . q (= bit length of the rsa-key) ‣ φ = (p-1) . (q-1) (the φ thingie is called phi) ‣ e = gcd(e, φ) = 1 ‣ d = e^-1 mod φ ‣ public key = tuple (n, e) ‣ private key = tuple (n, d) Friday, May 20, 2011
data. ‣ A message must be between 2 and n-1. ‣ Deterministic, so we must use a padding scheme to make it non-deterministic. Encrypting & decrypting (3) Friday, May 20, 2011
(random) bytes up to n bits in length (v1.5 or OAEP/v2.x). ‣ Got it flaws and weaknesses too. Always use the latest available version (v2.1) Encrypting & decrypting (4) ‣ http://www.rsa.com/rsalabs/node.asp?id=2125 Friday, May 20, 2011
message block, EMB, after encoding but before encryption, with random padding bytes shown in green: 0002257F48FD1F1793B7E5E02306F2D3228F5C95ADF5F31566729F132AA12009 E3FC9B2B475CD6944EF191E3F59545E671E474B555799FE3756099F044964038 B16B2148E9A2F9C6F44BB5C52E3C6C8061CF694145FAFDB24402AD1819EACEDF 4A36C6E4D2CD8FC1D62E5A1268F496004E636AF98E40F3ADCFCCB698F4E80B9F After RSA encryption, the output is: 3D2AB25B1EB667A40F504CC4D778EC399A899C8790EDECEF062CD739492C9CE5 8B92B9ECF32AF4AAC7A61EAEC346449891F49A722378E008EFF0B0A8DBC6E621 EDC90CEC64CF34C640F5B36C48EE9322808AF8F4A0212B28715C76F3CB99AC7E 609787ADCE055839829E0142C44B676D218111FFE69F9D41424E177CBA3A435B http://www.di-mgt.com.au/rsa_alg.html#pkcs1schemes Encrypting & decrypting (5) Friday, May 20, 2011
never use my credit card for internet purchases. It’s not safe. Instead, I gave it to the waiter who walked away with it into the kitchen for 5 minutes..) Friday, May 20, 2011
the browser and the server (highest possible encryption used). ‣ Symmetric encryption (AES-256, others) ‣ But both sides needs the same key, so we have the same problem as before: how do we send over the key? Friday, May 20, 2011
over its encryption methods. ‣ Server decides which one to use. ‣ Server send certificate(s). ‣ Client sends “session key” encrypted by the public key found in the server certificate. Friday, May 20, 2011
over its encryption methods. ‣ Server decides which one to use. ‣ Server send certificate(s). ‣ Client sends “session key” encrypted by the public key found in the server certificate. ‣ Server and client uses the “session key” for symmetrical encryption. Friday, May 20, 2011
in establishing a secondary (better!?) encryption. ‣ SSL/TLS is a separate talk (it’s way more complex as this) ‣ http://www.moserware.com/2009/06/first-few- milliseconds-of-https.html Friday, May 20, 2011
‣ Do we know for sure that nobody has read this email (before it came to us?) ‣ Do we know for sure that the contents of the message isn’t tampered with? Friday, May 20, 2011
‣ Do we know for sure that nobody has read this email (before it came to us?) ‣ Do we know for sure that the contents of the message isn’t tampered with? ‣ We use signing! Friday, May 20, 2011
that authenticates the validity of a message. ‣ Like md5 or sha1, so when the message changes, so will the signature. ‣ This works on the premise that Alice and only Alice has the private key that can create the signature. Friday, May 20, 2011
encrypting data (or emails). ‣ Try it yourself with Thunderbird’s Enigmail extension. ‣ Public keys can be send / found on PGP- servers so you don’t need to send your keys to everybody all the time. Friday, May 20, 2011
Everybody can send emails that ONLY YOU can read. ‣ Everybody can verify that YOU have send the email and that it is authentic. ‣ Why is this not the standard? Friday, May 20, 2011
Everybody can send emails that ONLY YOU can read. ‣ Everybody can verify that YOU have send the email and that it is authentic. ‣ Why is this not the standard? ‣ No really, why isn’t it the standard? Friday, May 20, 2011