Docsity

Introduction to Cryptography: Lecture Notes, Lecture notes of Computer Security

Partial preview of the text

Download Introduction to Cryptography: Lecture Notes and more Lecture notes Computer Security in PDF only on Docsity!

Intro

LECTURE 1

Bibliography

  1. Wenbo Mao, Modern Cryptography: Theory and Practice , Prentice Hall PTR, 2003.
  2. Douglas Stinson, Cryptography: Theory and Practice, CRC Press, CRC Press LLC, '95.
  3. Federal Information Processing Standards, Web source (https://csrc.nist.gov/publications/fips). 4. National Institute of Standards and Technology. Computer Security Resource Center NIST Special Publications, Web source (https://csrc.nist.gov/publications/sp). 5. Jonathan Katz and Yehuda Lindell, Introduction to Modern Cryptography (2nd edition), ( http://www.cs.umd.edu/~jkatz/imc.html ).
  4. A. Menezes, P. Van Oorschot, S. Vanstone, Handbook of Applied Cryptography , (http://cacr.uwaterloo.ca/hac/). Books can be obtained in electronic format from the instructor! 2

Cryptography – Cryptography provides the following services: – authentication – integrity – non-repudiation – Secrecy – Let’s have a more detailed look at these services.

Cryptography – Authentication allows the recipient of the message to validate the identity of the sender. It prevents an unauthorized entity to masquerade itself as a legitimate sender of the message. – Integrity guarantees that the message sent has not been modified or altered along the communication channel. This is usually accomplished by attaching to the message itself a digest (compressed version) of fixed length of the message, digest which allows verify if the original message was (intentionally or not) altered. – Non-repudiation with proof of origin assures the receiver of the identity of the sender, while nonrepudiation with proof of delivery ensures the sender that the message was delivered. – Secrecy prevents unauthorized entities from accessing the real content of a message.

Symmetric key algorithms – Symmetric key encryption algorithms use a single (secret) key to perform both encryption and decryption of the message. Therefore, preserving the secrecy of this common key is crucial in preserving the security of the communication. – DES – Data Encryption Standard – developed in the mid 70 ’s. It is a standard of NIST (US National Institute of Standards and Technology). DES is a block cipher which uses 64 - bit blocks and a 56 - bit key. The short length of the key makes it susceptible to exhaustion attacks. Specified initially in FIPS 46. The latest variant of DES is called Triple- DES and is based on using DES 3 times, with 3 different, unrelated keys. It is much stronger than DES, but slow compared to the newest algorithms. 3 DES is the object of FIPS 46 - 3 (October 1999 ) – AES – Advanced Encryption Standard – object of FIPS 197 (nov. 2001 ). AES is a block cipher which uses 128 - bit blocks and a key of size 128 bits. Variations using 192 and 256 - bit keys are also specified. What is specific for this algorithm is that it processes data at byte level, as opposed to bit level processing which was used previously. The algorithm is efficient and considered safe.

Secret key distribution – As mentioned before, symmetric key encryption requires a system for secret key exchange between all parties involved in the communication process. Of course, the key itself, being secret, must be encrypted before being sent electronically, or it may be distributed by other means, which make the event of intercepting the key by an unauthorized party unlikely. – There are 2 main standards for automated secret key distribution. The first standard, called X 9. 17 is defined by the American National standards Institute (ANSI) and the second one is the Diffie-Hellman protocol.

Asymmetric key algorithms – Main public algorithms : – RSA – (Rivest-Shamir-Aldeman) is the most used asymmetric (public) key algorithm. Used mainly for private key exchange and digital signatures. All computation are made modulo some big integer n = pq, where n is public, but p and q are secret prime numbers. The message m is used to create a cyphertext c = m^e (mod n). The recipient uses the multiplicative inverse d = e^(- 1 ) (mod (p- 1 )(q- 1 )). Then c^d = m^(e*d) = m (mod n). The private key is (n, p, q, e, d) (or just p, q, d) while the public key is (n, e). The size of n should be greater than 1024 bits (about 10 ^ 300 ). – Rabin – This cryptosystem is proven to be equivalent to factoring. Although is not the subject of a federal standard (as RSA is), it is explained well in several books. Keys of size greater than 1024 bits are deemed safe.

Hash functions – Hash functions take a message of arbitrary length as input and generate a fixed length digest (checksum). The length of the digest depends on the function used, but in general is between 128 and 512 bits. – The hash functions are used in 3 main areas: – assure the integrity of a message (or of a downloaded file) by attaching the generated digest to the message itself. The receiver recomputes the digest using the received message and compares it against the digest generated by the sender. – are part of the creation of the digital signature – password storage – password are (almost) never stored in their original form. What is stored, in general, is a hash of the password. When a user introduces a password, its hash is computed and is compared with the stored hash.

Hash functions – Starting with the newest function, here is a list of hash functions of practical interest. – SHA- 3 uses the Keccak algorithm, a sponge construction in which message blocks are XORed into a subset of the state, which is then transformed as a whole. In the version used in SHA- 3 , the state consists of a 5 × 5 array of 64 - bit words, 1600 bits total. The standardization process is not finished yet as of April 2015. – SHA- 2 includes significant changes from its predecessor, SHA- 1. The SHA- 2 family consists of six hash functions with digests (hash values) that are 224 , 256 , 384 or 512 bits: SHA- 224 , SHA- 256 , SHA- 384 , SHA- 512 , SHA- 512 / 224 , SHA- 512 / 256. – SHA- 1 – Secure Hash Algorithm. Published by the US Government. Its specification is the object of FIPS 180 - 1 (April 1995 ). FIPS stands for Federal Information Processing Standards. Produces a 160 bit digest ( 5 32 - bit words). – RipeMD- 160 – designed as a replacement for the MD series. It produces a digest of 160 bits (or 20 bytes, if you want). – MD 5 – Message Digest Algorithm 5. Developed by RSA Labs. Produces a 128 bit digest. Still in use, especially for message (download) integrity check. – MD 2 , MD 4 – Older hash algorithms from RSA Data Security. Since they have known flaws, they are only of historic interest.

Digital signature – Some public-key algorithms can be used to generate digital signatures. A digital signature is a small amount of data that was created using some private key, and there is a public key that can be used to verify that the signature was really generated using the corresponding private key. The algorithm used to generate the signature must be such that without knowing the private key it is not possible to create a signature that would verify as valid

Digital signature – The trusted party who issues certificates to the identified entities is called a certification authority (CA). Certification authorities can be thought of as being analogous to governments issuing passports for their citizens.

Cryptographic protocols and standards – DNSSEC – Domain Name Server Security. Protocol for secure distributed name services – SSL – Secure Socket Layer – main protocol for secure WWW connections. Increasing importance due to higher sensitive information traffic. The latest version of the protocol is called TLS

  • Transport Security Layer. Was originally developed by Netscape as an open protocol standard. – SHTTP – a newer protocol, more flexible than SSL. Specified by RFC 2660. – PKCS – Public Key Encryption Standards - developed by RSA Data Security and define safe ways to use RSA.

Strength of cryptographic algorithms – In theory, any cryptographic method with a key can be broken by trying all possible keys in sequence. If using brute force to try all keys is the only option, the required computing power increases exponentially with the length of the key. A 32 - bit key takes 2 32 (about 10 9 ) steps. – This is something anyone can do on his/her home computer. A system with 56 - bit keys, such as DES, requires a substantial effort, but using massive distributed systems requires only hours of computing. – In 1999 , a brute-force search using a specially designed supercomputer and a worldwide network of nearly 100 , 000 PCs on the Internet, found a DES key in 22 hours and 15 minutes. It is currently believed that keys with at least 128 bits (as in AES, for example) will be sufficient against brute-force attacks into the foreseeable future.

Strength of cryptographic algorithms – However, key length is not the only relevant issue. Many ciphers can be broken without trying all possible keys. In general, it is very difficult to design ciphers that could not be broken more effectively using other methods. – Unpublished or secret algorithms should generally be regarded with suspicion. Quite often the designer is not sure of the security of the algorithm, or its security depends on the secrecy of the algorithm. Generally, no algorithm that depends on the secrecy of the algorithm is secure. For professionals, it is easy to disassemble and reverse-engineer the algorithm. Experience has shown that the vast majority of secret algorithms that have become public knowledge later have been pitifully weak in reality.