Originally an attempt to secure TCP/IP traffic using encryptions
Key Agreement Algorithm
A key agreement algorithm takes the private and the public keys of two distinct parties (Apriv + Bpub or Apub + Bpriv) and generates a common shared secret key , which is then used to generate a session key. See the diagram on p.41.
Diffie-Hellman Key Agreement Algorithm: The first ever public key encryption
Allows two parties to independently generate the shared key; The session key is never transmitted.
IETF RFC2631: http://www.ietf.org/rfc/rfc2631.txt
Strength of Encryption Algorithms
The algorithm used +
The size of the key space
See the tables comparing symmetric ciphers (p.42) and asymmetric ciphers (p.43)
Alternative Data-hiding Methods
Steganography: hiding messages inside another message or in a picture.
See “ Steganography : Hidden Data ”. By Deborah Radcliff. ComputerWorld . June 10, 2002.
Elliptic Curve Cryptography (ECC): based on the elliptic curve logarithm problem; a more efficient public key encryption (faster, smaller key size)
An intro: http://world.std.com/~dpj/elliptic.html
Codes, one-time pads, etc.
The process of determining the authenticity of a message or user.
a check value generated from a document, usually generated by a hash function
to prove that the data in the document has not been tampered with.
Commonly used for password authentication (i.e., one-way authentication)
Examples: MD4, MD5, SHA (secure hash algorithm)
Any problem? Man-in-the-middle attack Why?
MAC (Message Authentication Codes)
A message digest created with a key
Typically used for data verification in a context where a secure connection is already available.
Example: SSL uses MACs to verify the data received, using a secret key that is exchanged at the beginning of the session.
HmacMD5 (Hashing MAC using MD5)
HmacSHA1 (Hashing MAC using SHA-1)
Based on public key encryption
Computed with a person’s private key and verified with the person’s public key
An example of creating a digital signature: p.48
The sender applies a message digest algorithm to get a message digest (md) out of the message to be sent.
The message digest is then encrypted by the person’s private key. The ciphertext is the digital signature (ds).
To check the digital signature:
The recipient applies the digest algorithm to get a message digest (md-2).
The recipient decrypts the ds using the sender’s public key.
The output from step 2 is verified against md-2.
Purpose: To authenticate a person’s public key
“ Vouching”: one party certifies that another party’s identity is authentic. e.g., passport, id cards
A digital certificate for A is A’s public key plus some identifying information, signed by the private key of a certification authority (CA) verifying A’s identity.
Other example usage of certificates:
To authenticate a host/server (e.g., SSL certificates)
To sign and encrypt e-mail
Digital Certificates (Cont.)
Certificates are often chained . That is, a CA may be authenticated by a root CA .
The top CA of a certificate chain must be self-signed.
Verisign has been accepted as the top CA.
Example of certificate chaining: Both Internet Explorer and Netscape Communicator include certificates from Verisign in their install. So when the browser makes an SSL connection to a server, if the server presents a certificate that is signed by Verisign, the server’s certificate will be automatically accepted.
The practice of analyzing and breaking cryptography
Brute force attack versus the key space
Common cryptanalytic tools: Frequency distribution, Digram/trigram study, IC, Repeated patterns, Probable letters
4 cryptanalytic cases:
Ciphertext only Ciphertext-only attack
Full or partial plaintext
Known plaintext attack
Probable plaintext analysis
Ciphertext of any plaintext Chosen plaintext attack
Algorithm + Ciphertext Chosen ciphertext attack
Key Management (storage)
A dilemma: Keys must be securely stored while allowing users easy access when necessary.
A typical solution is to encrypt the stored keys with passwords and then protect the storage with the OS access control.
A key storage is an attractive target for attack.
The smart card solution: A smart card stores a private key and a certificate, which can be used to encrypt and/or decrypt information.
An example of smart card solution: See Protection of Keys (RSA vs nCipher)
Cryptographical protocols determine the exact order and way in which each algorithm must be used in order to maximize security.
Examples of protocols:
Distribution of keys,
Certificates, Digital signatures,
oblivious transfer, contract signing,
Java Cryptography Architecture (JCA) is part of the Java 2 run-time environment. java.security.*
JCE (Java Cryptography Extension), on the other hand, is an extension to the JCA. JCE adds encryption and decryption APIs to the JCA. java.crypto.*