By the end of today, you should:
Foundation
Kinds of Encryption:
The weakness of private key encryption is the key distribution problem:
How do you securely transmit the secret key to your interlocutor so that you can securely communicate with them?
How can you
signa document without allowing others to forge your signature or to copy/paste your signature onto another document? Solved!
The trick is to come up with algorithms and key pairs where knowing P doesn't help Eve find S.
One such trick is factoring, which is the basis of the RSA (Rivest-Shamir-Adelman method). If P is the product of two very large prime numbers, and S is related to those prime factors, Eve can only find S by factoring P.
First, digital signatures have nothing to do with privacy and security. Just the opposite. You may want to prove to the world that you signed something. Don't confuse these.
The same idea can be used for Alice to prove her identity! All she has to do is sign a message and anyone can verify that the message was signed by her.
Because digital signatures take significant computing time, in practice Alice doesn't sign M, but rather a message digest. A message digest algorithm puts M through a kind of deterministic cuisinart that reduces it to just a small number of bits, say 128 or 256. However, the digest is (essentially) unique, like fingerprints.
Just as your fingerprint is much smaller than you, but just as unique as you are, message digests are smaller but uniquely identify a message.
Encryption is:
information that cannot be read without special information
the process of converting plaintext into ciphertext
the process of converting ciphertext into plaintext
the process of cracking the code with the use of a computer program
Which of the following codes cannot be used in creating a cipher?
The Caesar Code
The Vigenere Code
The ASCII Code
The Enigma Code
Assuming a Caesar code with rotation 10 and the use of the whole ASCII set of 128 characters for typing a message, which of the following numbers will represent the letter lowercase z (its ASCII is 122) in the ciphertext?
2
4
16
132
Do you see any problem with the setup described in Quiz Question Nr. 3?
Which of the following statements about breaking the Caesar Code is TRUE?
It can be broken only if we figure out the rotation amount.
It can be broken only with the help of a computer to execute many trial-and-error runs.
It can be broken with the help of ASCII encoding and the modulo operator.
It can be broken with the help of statistical functions.
The Vigenere Cipher would work better if:
the codeword is short
the codeword is long
many codewords are used for every message
the codeword has a predefined, fixed length
Systems that use private keys are unbreakable.
True.
False.
Only the ones that don't use polyalphabetic ciphers.
Which of the following statements is TRUE?
Public key encryption is insecure because it needs two keys.
Public key encryption is secure because it needs two keys.
Public key encryption is insecure because everyone knows your public key.
Public key encryption is secure because no one else knows your private key.
Instructions can be found here.
For simplicity, I may just demo this on a single machine, but you can test that I'm not cheating by doing the exercise.
Public key encryption is useful because:
it is used by people who want to keep their communication secret from the government
it is used by websites such as Google, Facebook, Tumblr, etc.
it is used for financial transactions on the web
it is used by users who value private communication
But, of course, the most important thing it does is solve the key distribution problem.
Which of the following is TRUE:
the public key encrypts a message that is decrypted by the private key
the private key encrypts a message that is decrypted by the public key
both A and B
neither A nor B
Which of the following is TRUE about message digests:
it is infeasible to find two different messages with the same digest
it is infeasible to modify a message without changing the digest
it is infeasible to recreate a message knowing its digest
it is easy to compute the digest for any given message
Instructions can be found here.
The purpose of the following is to make encryption less magical by implementing a simple cipher.
caesar
, taking two arguments,
some plaintext (a string) and a rotation amount (an integer).
i
in a string, use the charCodeAt
method.
fromCharCode
method on the String
object.
We hope that after these activities you can:
Will be posted later, visit again after .