Foundations of Network and Foundations of Network and Computer Security Computer Security
J John Black
Lecture #12 Oct 6th 2005
CSCI 6268/TLEN 5831, Fall 2005
Foundations of Network and Foundations of Network and Computer - - PowerPoint PPT Presentation
Foundations of Network and Foundations of Network and Computer Security Computer Security J ohn Black J Lecture #12 Oct 6 th 2005 CSCI 6268/TLEN 5831, Fall 2005 Announcements Project #0 assigned today Due Oct 18 th in class
CSCI 6268/TLEN 5831, Fall 2005
– All these are modes of operation built on a blockcipher
– Assumes factoring product of large primes is hard
– Usually hash-then-sign
a] [-K key] [-iv IV] [-p] [-P]
– des-ecb (yuk!), des-cbc (hmm), des (same as des-cbc), des-ede3-cbc, des3 (same), aes-128-cbc, bf, cast, idea, rc5 – Can omit the ‘enc’ command if specifying these… kind of hokey
– Looks like garbage, of course
– Why are command-line passwords bad? – You can use environment variables but this is bad too – You can point to a file on disk… less bad
– Password is converted to produce IV and blockcipher key
% openssl aes-128-cbc –P
enter aes-128-cbc encryption password:
make the key and iv different even with the same password
– Begins to get confusing… didn’t we just change the IV before? – Use this mode only when deriving a new key for each encryption
– If key is fixed, we specify it and the iv explicitly
% openssl aes-128-cbc –K FB7D6E2490318E5CFC113751C10402A4 –iv 6ED946AD35158A2BD3E7B5BAFC9A83EA
salt=39A9CF66C733597E key=FB7D6E2490318E5CFC113751C10402A4 iv =6ED946AD35158A2BD3E7B5BAFC9A83EA
repeat
– Use a good random number source or – Use a counter (which you have to maintain… headache!)
along with the IV and AES key
Passphrase hash function AES-128-CBC iv, key (128 bits each) salt salt iv, ciphertext Things to think about:
plaintext
% cat test hi there % openssl aes-128-cbc -in test enter aes-128-cbc encryption password: Verifying - enter aes-128-cbc encryption password: Salted__mTR&Qi¦¹K¯¿Óàg&5&kE
% openssl aes-128-cbc -in test -base64 enter aes-128-cbc encryption password: Verifying - enter aes-128-cbc encryption password: U2FsdGVkX1/tdjfZnPrD+mSjBBO7InU8Mo4ttzTk8eY=
U2FsdGVkX1/tdjfZnPrD+mSjBBO7InU8Mo4ttzTk8eY=
% openssl enc -d -in test.enc U2FsdGVkX18FZENOZFZdYvLoqPdpRTgZw2CZIQs6bMQ=
% openssl aes-128-cbc -d -in test.enc enter aes-128-cbc decryption password: bad magic number
% openssl aes-128-cbc -d -in test.enc -base64 enter aes-128-cbc decryption password: hi there
*
cryptography to help us
hello hello pkS pkA (Kenc, Kmac) under pkA (Kenc, Kmac) under pkS “Welcome” under (Kenc, Kmac) CC# under (Kenc, Kmac) “Welcome” under (Kenc, Kmac) CC# under (Kenc, Kmac)
by C
– Scalability (100,000 public keys in your browser?) – Key freshening (if a key got compromised and it were already embedding in your browser, how would S update?) – New keys (how do you get new keys? A new browser?) – Your crypto is only as reliable as the state of your browser (what if someone gets you to install a bogus browser?)
– Same problem with corrupted browsers as before, but the scaling problem is gone
the .ssh_hosts file; do you wish to continue? Saying yes may allow a man-in-the-middle attack.” (Or something like that)
that to happen, you will get a similar warning
– And you should be suspicious