**The Kerchoff Principle**states that all crypto relies on algorithms. These algorithms dictate how enciphering and deciphering processes are to take place. The Kerchoff princple is essentially an open-source concept whereas the encryption algorithms are widely available so anyone can examine and test them. The reason these crypto systems using the Kerchoff Principle are secure is because everything but the key to encrypt and decrypt is made available.

Moving on, to fully understand cryptography, the basics of

**binary math**and

**logical operations**need to be understood. Binary math is basically boolean math whereas there's a base 10 system where there is an integer from 0 through 9. This base10 decimal system likely has biological origins as human have 10 fingers for counting. In binary math and ultimately computer science, on

**(or 1) is True**, and off

**( zero) is False**.

Logical operations consists of boolean operators; AND, OR, NOT, XOR.

**AND**, represented by the ^ symbol, checks to see whether two values are both true**OR**, represented by the \/ symbol, checks to see whether at least one value is true**NOT**, represented by - or !, simply reverses the value. "0 is NOT 1. 1 is NOT 0."**XOR**, represented by a circle with a plus sign in it, returns true when only one input value is true "If both are false, or both are true, the output is false

**Modulo Functions**and Modulo math are simply the remainder value left over after division operations are performed.

- 8 mod 6 = 2
- 6 mod 8 =6
- 10 mod 3 = 1
- 10 mod 2 = 0
- 32 mod 8 = 0

**One-way functions**are mathematical operations that produces output values for each possible combination of inputs, but makes it impossible to retrieve the input values. It's like having a huge number like

**10,718,488,075,259**and trying to figure out what three prime numbers were used to obtain that value.

*In this example, the huge number is a product of three prime numbers:*

**17,093**;**22,441**; and**27,943**.A nonce, is a random number that acts as a placeholder variable in mathematical functions. It's like having a variable in the middle of your algorithm that changes each time the algorithm is executed. A common attack in wireless communications is to capture as many Initialization Vector packets as you can to reconstruct the WEP key. IV's are a nonce in that they are supposed to change every time they are initialized. Unfortunately, there was no requirement in WEP that people's keys change over time or that people could have different keys, so the same IV's would be bouncing around a wireless network at all times. Not only that but WEP IV's were only 24 bits long. This was due to the fact that the FCC limited heavy encryption on wireless networks because they wanted to be able to access them. They wound up limiting the inital key sizes to 64 bits. This is is why WEP keys were 40 bits, and their IV's were 24.

The IV attack on WEP was pretty simple. Because IV's weren't encrypted in transmission, attackers would generate a lot of traffic on a WEP network to generate millions of packets with IV's. Those IV's were then stripped from the network content, and compared to the rest of the packets on the network to weed out the key as duplicates IV's were found.

**Vocabulary**Private Key Cryptosystems: all participants in the cryptosystem use a shared key.

Public Key Cryptosystems: all participants use their own pair of keys

Cryptography: the art of creating and implementing secret codes and ciphers

Cryptanalysis: the study of methods to defeat codes and ciphers

Cryptology: the combination of both cryptography and cryptanalysis

**Next Up:**Transposition Ciphers, Substitution Ciphers, Block, Stream, and Running Key Ciphers