CNS - 01 - Introduction


Lecture Info


In this lecture we have discussed the objective and the syllabus of the course. We then started by introducing the vernman cipher and some basic aspects of security.

1 Course details

1.1 Objectives

We are here for three main reasons:

  1. Learn how to use encyption. The big problem is not to have good cryptography. The real problem is in how to use it correctly. Indeed, most of real world problems do not occur because crypto is broken, but rather because of some miss-configured cryptography. By learning how mistakes are made we will also gain a deeper insight into how to prevent and fix those mistakes.

  2. Understand Internet Security Protocols. During this course we will mainly focus on the network part of computer part of security.

  3. Modern tools and their exploitation. This part is for 3 extra CFU and can be skipped altogether.

1.2 Syllabyus

We will cover the following arguments:

  • Basic crypto (2 CFU): attacks, countermeasures, secutity services and basic cryptographic constructions.

  • Authentication and network protocol support (1.5 CFU).

  • In-depth analysis of TLS and Ipsec (2.5 CFU): Very deep analysis of the TLS protocol used for web security. We will see a very large number of attacks (BEAST, CRIME, renegotiation, ROBOT, etc...) on this protocol to think and understand why a very well designed protocol might still have some vulnerabilities.

  • Advanced crypto (3 CFU): in this last part we will see how network cryptography has evolved in the last decade.

  • Extras: TESLA, Merkel Trees, Blockchain basics, wireless security and occasional dedicated talks.

1.3 Recommended books

Recommended books for beginners:

  • Serious Cryptography, very good practical treatment of crypto!

  • AAA and Network Security for Mobile Access, plenty of materials on protocols: PPP, Radius, Diameter, EAP, IPsec, PKI, etc.

  • SSL and TLS Essentials, old like hell, but very nice.

Best ever online references

Extra material:

  • Mathematica files

  • Slides

  • Papers

2 Vernman Cipher

The best possible cipher is called the One time pad (also known as the Vernman cipher).

This cipher is based on the following idea: suppose you have a plain text such as \(\text{10111101...}\) that you want to protect. The cipher works by generating a key, which in this case is a random sequence of bits such as \(\text{00110010...}\). The important thing is that the key is as long as the plain text we want to protect. Once we have generated the key we apply the XOR operator the bits of the keys and those of the plaintext. The resulting bits are the encrypted bits.

\[\text{plaintext} \mathbin{\oplus} \text{key} = \text{10111101...} \mathbin{\oplus} \text{00110010...} = \text{10001111...} = \text{encrypted plaintext}\]

It turns out that this is the best encryption mechanism. In this mechanism the decryption is done by applying once again the XOR but with this time to the result of the encryption process and the key. This is because the inverse operation of the XOR operator is the XOR operator itself. Thus, when using the XOR operation the encryption the encryption and decryption is the same.

\[\text{encrypted plaintext} \mathbin{\oplus} \text{key} = \text{10001111...} \mathbin{\oplus} \text{00110010...} = \text{10111101...} = \text{plaintext}\]

The good benefit of this encryption mechanism however are not given for free. Indeed, some critical assumptions have to be met. The Vernman Cipher is perfectly secure (technically called uncoditionally secure) if and only if the following assumptions are held:

In practice these three assumptions are really hard, if not completely impossible, to actually satisfy. This means that this mechanism is actually extremely impractical to use. Indeed, to transfer the private key one would need to have an already secured channel. But the key is as long as the plain text. So why even bother generating the key, when you can directly send the text over the secure channel? The one time pad works in theory, but not in practice.

Observation: With quantum computing the problem of exchanging keys becomes much more practical to solve.

3 Aspects of Security (CIA)

Some people, especially those who do not study the field of security, ask themselves the following question: "How can I secure your system?" This question is fundamentally wrong, because in security you cannot "secure" a system in a general sense. You always need to have defined an adversary, or a threat. You don't just secure your system; you secure it against a specific adversary or threat.

When you talk about encryption, the adversary is the so-called eavesdropper, which is the guy that wants to look at your text to understand what's inside.

The three aspects of security are generally abbreviated as CIA, and are:

Notice that the one-time pad is perfectly secure with respect to confidentialtiy, but it has no integrity. Indeed, an eveasdropper (let's call her eve), can do a man in the middle (MITM) attack to take the message, flip a bit in it, and send it to the receiver of the message. The receiver is not able to tell that the contents of the message has been modified.