3 Definitions Plaintext: easy to understand form (original message) Ciphertext: difficult to understand formEncryption: encoding (plaintext -> ciphertext)Decryption: decoding (ciphertext -> plaintext)Cryptology: study of encryptionCryptography: use of encryptionCryptanalysis: breaking encryptionAll traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key, used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
4 Definitions Group of individuals Alice—She is an end user/computer without malicious intentions, one of the main users of cryptography.Bob—He is Alice’s friend and is also a main user of cryptography, without malicious intentions.Cathy—Another user of cryptography; she does not usually have a large roll nor malicious intentions.Eve—A malicious user that does not interfere with communications. She simply wants to eavesdrop on the conversation between two other characters, typically Alice and Bob, but does not actively try to attack the communication.Mallory—The malicious user. Always trying to thwart attempts by other characters to communicate securely.Trent—He is a trusted third party. He only communicates with Alice, Bob, or Cathy when they ask for his help. He can always be trusted to do what he says he will do.All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key, used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
5 Group of individualsHacker – is a general term that has historically been used to describe a computer programming expert. More recently, this term is commonly used in a negative way to describe an individual that attempts to gain unauthorized access to network resources with malicious intent.Cracker – is the term that is generally regarded as the more accurate word that is used to describe an individual that attempts to gain unauthorized access to network resources with malicious intent.
6 Group of individualsPhreaker – is an individual that manipulates the phone network in order to cause it to perform a function that is normally not allowed. A common goal of phreaking is breaking into the phone network, usually through a payphone, to make free long distance calls.Spammer – is an individual that sends large quantities of unsolicited messages. Spammers often use viruses to take control of home computers in order to use these computers to send out their bulk messages.Fisher – uses or other means in an attempt to trick others into providing sensitive information, such as credit card numbers or passwords. The Phisher will masquerade as a trusted party that would have a legitimate need for the sensitive information.
7 Group of individualsWhite hat – is a term used to describe individuals that use their abilities to find vulnerabilities in systems or networks, and then report these vulnerabilities to the owners of the system so that they can be fixed.Black hat – is another term for individuals that use their knowledge of computer systems to break into systems or networks that they are not authorized to use.
8 DefinitionsKey—A random piece of data used with encryption and decryption. Encryption and decryption algorithms require a key and plain text or cipher text to produce cipher text or plain text, respectively.Security Association— A set of information that describes how the communicating entities will utilize security.All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key, used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
10 Types of Cryptographic Systems Symmetric-key cryptosystemsAsymmetric-key or Public-key cryptosystemsHybrid (Symmetric-key and Asymmetric-key) cryptosystems
11 Symmetric Encryption Uses conventional / secret-key / single-key Sender and recipient share a common keyAll classical encryption algorithms are private-keyThe only type prior to invention of public-key in 1970’s
13 Requirements Two requirements for secure use of symmetric encryption: Strong encryption algorithmSecret key known only to sender / receiverY = EK(X)X = DK(Y)Assume encryption algorithm is knownImplies a secure channel to distribute key
14 Block ciphers and Stream ciphers Each secret-key cryptography algorithm or cipher typically works in two phases:key set-up phaseciphering or encrypt and decrypt phase.There are two major classes of these algorithms: block ciphers and stream ciphers.Block ciphers encrypt plaintext in units of blocks and likewise decrypt cipher text in units of blocks.Stream ciphers encrypt plaintext in one stream and decrypt cipher text likewise.
22 Symmetric-key cryptosystems Examples of symmetric key algorithms are as follows:Data Encryption Standard (DES) (56bits)Triple DES (3DES) (168 bits)Advanced Encryption Standard (AES)International Data Encryption Algorithm (IDEA) (128 bits)Rivets Cipher 4 (RC4) (variable length key)
23 DES EncryptionThe basic process in enciphering a 64-bit data block using the DES, shown on the left side, consists of:- an initial permutation (IP)- 16 rounds of a complex key dependent round function involving substitution and permutation functions- a final permutation, being the inverse of IPThe right side shows the handling of the 56-bit key and consists of:- an initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves- 16 stages to generate the subkeys using a left circular shift and a permutation
24 Initial Permutation IP first step of the data computationIP reorders the input data bitseven bits to LH half, odd bits to RH halfquite regular in structure (easy in h/w)The initial permutation and its inverse are defined by tables, as shown in Tables 3.2a and 3.2b, respectively. The tables are to be interpreted as follows. The input to a table consists of 64 bits numbered from 1 to 64. The 64 entries in the permutation table contain a permutation of the numbers from 1 to 64. Each entry in the permutation table indicates the position of a numbered input bit in the output, which also consists of 64 bits.Note that the bit numbering for DES reflects IBM mainframe practice, and is the opposite of what we now mostly use - so be careful! Numbers from Bit 1 (leftmost, most significant) to bit 32/48/64 etc (rightmost, least significant).Note that examples are specified using hexadecimal.
25 DES Round Structure uses two 32-bit L & R halves as for any Feistel cipher can describe as:Li = Ri–1Ri = Li–1 xor F(Ri–1, Ki)takes 32-bit R half and 48-bit subkey and:expands R to 48-bits using perm Eadds to subkeypasses through 8 S-boxes to get 32-bit resultfinally permutes this using 32-bit perm PNote that the s-boxes provide the “confusion” of data and key values, whilst the permutation P then spreads this as widely as possible, so each S-box output affects as many S-box inputs in the next round as possible, giving “diffusion”.
27 Substitution Boxes S have eight S-boxes which map 6 to 4 bits each S-box is actually 4 little 4 bit boxesouter bits 1 & 6 (row bits) select one rowsinner bits 2-5 (col bits) are substitutedresult is 8 lots of 4 bits, or 32 bitsrow selection depends on both data & keyfeature known as autokeyingThe substitution consists of a set of eight S-boxes, each of which accepts 6 bits as input and produces 4 bits as output. These transformations are defined in Table 3.3, which is interpreted as follows: The first and last bits of the input to box Si form a 2-bit binary number to select one of four substitutions defined by the four rows in the table for Si. The middle four bits select one of the sixteen columns. The decimal value in the cell selected by the row and column is then converted to its 4-bit representation to produce the output. For example, in S1, for input , the row is 01 (row 1) and the column is 1100 (column 12). The value in row 1, column 12 is 9, so the output is 1001.
28 Triple DES clear a replacement for DES was needed theoretical attacks that can break itdemonstrated exhaustive key search attacksAES is a new cipher alternativeprior to this alternative was to use multiple encryption with DES implementationsTriple-DES is the chosen form
29 Triple-DES with Two-Keys hence must use 3 encryptionswould seem to need 3 distinct keysbut can use 2 keys with E-D-E sequenceC = EK1[DK2[EK1[P]]]if K1=K2 then can work with single DESstandardized in ANSI X9.17 & ISO8732no current known practical attacksTriple-DES with two keys is a popular alternative to single-DES, but suffers from being 3 times slower to run.Although there are no practical attacks, have some indications of attack approaches.Hence some are now adopting Triple-DES with three keys for greater sucurity.
30 Triple-DES with Three-Keys although are no practical attacks on two-key Triple-DES have some indicationscan use Triple-DES with Three-Keys to avoid even theseC = EK3[DK2[EK1[P]]]has been adopted by some Internet applications, eg PGP, S/MIME
31 Triple DES (3DES)The technique used by 3DES is known as EDE (Encrypt-Decrypt-Encrypt).The plaintext message is encrypted using the first 8 bytes of the 3DES.Then the message is decrypted using the middle 8 bytes of the key.Finally, the message is encrypted using the last 8 bytes of the key to produce an 8-byte block.
33 AES Requirements private key symmetric block cipher 128-bit data, 128/192/256-bit keysstronger & faster than Triple-DESactive life of years (+ archival use)provide full specification & design detailsboth C & Java implementations
34 Rijndael data block of 4 columns of 4 bytes is state key is expanded to array of wordshas 9/11/13 rounds in which state undergoes:byte substitution (1 S-box used on every byte)shift rows (permute bytes between groups/columns)mix columns (subs using matrix multipy of groups)add round key (XOR state with key material)view as alternating XOR key & scramble data bytesinitial XOR key material & incomplete last roundwith fast XOR & table lookup implementation
41 Asymmetric-key or Public Key Encryption Based on mathematical algorithmsAsymmetricUse two separate keysPublic Key issuesPlain textEncryption algorithmPublic and private keyCipher textDecryption algorithm
44 Public Key Encryption - Operation One key made publicUsed for encryptionOther kept privateUsed for decryptionInfeasible to determine decryption key given encryption key and algorithmEither key can be used for encryption, the other for decryption
45 Steps User generates pair of keys User places one key in public domain To send a message to this user, encrypt using public keyUser decrypts using private key
46 Digital Signature Sender encrypts message with their private key Receiver can decrypt using senders public keyThis authenticates sender, who is only person who has the matching keyDoes not give privacy of dataDecrypt key is public
47 Asymmetric-key or Public-key Cryptosystems There are many examples of commonly used public-key systems including:Diffie-HellmanRivest, Shamir, Adleman (RSA)Digital Signature Algorithm (DSA) /Al GamalElliptic Curve Cryptosystem (ECC)
48 Diffie-Hellman Key Exchange first public-key type scheme proposedby Diffie & Hellman in 1976 along with the exposition of public key conceptsnote: now know that James Ellis (UK CESG) secretly proposed the concept in 1970is a practical method for public exchange of a secret keyThe idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1977 by Diffie & Hellman. The concept had been previously described in a classified report in 1970 by James Ellis (UK CESG) - and subsequently declassified in See History of Non-secret Encryption (at CESG).
49 Diffie-Hellman Key Exchange The idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1977 by Diffie & Hellman. The concept had been previously described in a classified report in 1970 by James Ellis (UK CESG) - and subsequently declassified in See History of Non-secret Encryption (at CESG).
50 RSA Algorithm We’re using Big Integers here: Baby example Choose large secret prime numbers p and qCalculate N = p * qChoose exponent e such thatgcd(e, (p-1)(q-1)) = 1Normally choose 3, 17 or 65537Public key is pair N and eChoose d so thate * d = 1 (mod (p-1)(q-1))Private key is d (for efficiency d, p, q)Encryption: c = me (mod N)Decryption: m = cd (mod N)Baby examplep=7, q=11N=7737gcd (37,(7-1)(11-1)) = 177, 371337*13=481=1(mod 60)237 mod 77 = 515113 mod 77 = 2
53 Digital certificates Digital certificates include: A public keyAn individual or organisation’s detailsA digital signature from a certifying authority (CA)This states that the CA has seen proof of identityCommon certifying authorities:VeriSign, Thawte, Equifax Secure, British TelecomCAs are themselves certified by other CAsA few “root” CAs are usually trusted
55 Message Authentication Code Generate authentication code based on shared key and messageCommon key shared between A and BIf only sender and receiver know key and code matches:Receiver assured message has not alteredReceiver assured message is from alleged senderIf message has sequence number, receiver assured of proper sequence
57 Hash Functions Hash Function Constructions H Message M Generate a fixed length “Fingerprint” for an arbitrary length messageNo Key involvedMust be at least One-way to be usefulConstructionsIterated hash functions (MD4-family hash functions): MD5, SHA1, …Hash functions based on block ciphers: MDC(Manipulation Detection Code)HMessage Digest DD = H(M)
58 Message Authentication Codes (MACs) Generate a fixed length MAC for an arbitrary length messageA keyed hash functionMessage origin authenticationMessage integrityEntity authenticationTransaction authenticationShared Secret KeyMACMACSENDMAC
59 Comparison of Hash Function & MAC Arbitrary lengthArbitrary lengthmessagemessageHashfunctionMACfunctionSecret keyHashMACfixed lengthfixed lengthEasy to computeCompression: arbitrary length input to fixed length outputUnkeyed function vs. Keyed function
60 Symmetric Authentication (MAC) BobAliceMessageMACMessageMACtransmitSecret keyalgorithmSecret keyalgorithmKABKABSharedSecret keybetweenAlice and BobSharedSecret keybetweenAlice and BobMACyesno
61 Digital Signature Bob Alice Hash Hash function function Public key MessageSignatureMessageSignaturetransmitHashfunctionHashfunctionHash valueHash value 1Alice’sPublic keyPublic keyalgorithmyesnoHash value 2Alice’sPrivate keyPublic keyalgorithm
62 HashingA hashing algorithm refers to a mathematical function that takes a variable- size string as input and transforms (hashes) it into a fixed-size string, which is called the hash value.One of the most common uses of hashing in network security is to produce condensed representations of messages or “fingerprints,” often known as “message digests,” by applying a hashing algorithm to an arbitrary amount of data — the message.The two most commonly used hashing algorithms are MD5 and SHA1 (part of the secure hash standard [SHS]).
64 Secure Hash Functions Hash function must have following properties: Can be applied to any size data blockProduce fixed length outputEasy to computeNot feasible to reverseNot feasible to find two message that give the same hash
65 SHA-1 Secure Hash Algorithm 1 Input message less than 264 bits Processed in 512 bit blocksOutput 160 bit digest
68 ISAKMPThe Internet Security Association and Key Management Protocol (ISAKMP) is defined primarily as a very comprehensive framework for key management offering maximum flexibilityOAKLEY is defined based on the Diffie–Hellman key-exchange algorithm.IKE, on the other hand, is defined primarily to be the key management for the IPSec Architecture and makes use of parts of the ISAKMP and OAKLEY definitions.
69 ISAKMPISAKMP defines procedures and packet formats to establish, negotiate, modify, and delete SAs.ISAKMP only describes the procedures, i.e., how something is done.ISAKMP is independent of the security protocols, cryptographic algorithms, and key-generation and key-exchange techniques that are actually used.
70 ISAKMP phases ISAKMP offers two phases of negotiation. In the first phase, the two entities agree on how to protect further negotiation traffic between themselves, establishing an ISAKMP SA.The second phase of negotiation is used to establish security associations for other security protocols. The security associations established by ISAKMP during this phase can be used by a security protocol to protect many message or data exchanges.
72 OAKLEYThe OAKLEY protocol allows two authenticated entities to exchange and establish secret keying material.It is designed to be a compatible component of ISAKMP.The two communicating entities negotiate methods for encryption, key derivation, and authentication.The basic mechanism of OAKLEY is the Diffie–Hellman key-exchange algorithm, which establishes a shared key without transmitting this key.
73 OAKLEY Key ExchangeAn OAKLEY key exchange is made up of a sequence of message exchanges.The goal of key-exchange processing is the secure establishment of a common keying information state in the two communicating entities.This state information consists of a key name, secret keying material, the identities of the two parties, and three algorithms for use during authentication:encryptionhashing, andauthentication
74 IKEIKE is the protocol that performs mutual authentication and establishes SAs between two parties for IPSec.IKE uses parts of ISAKMP, OAKLEY, and SKEME to provide management of keys and security associations.
78 Pretty good privacy (PGP) PGP Encryption (Pretty Good Privacy) is a computer program that provides cryptographic privacy and authentication.Public key cryptography, also known as asymmetric cryptography, is a form of cryptography in which a user has a pair of cryptographic keys - a public key and a private keyIt was originally created by Philip Zimmermann in 1991.