Cryptographic basics Cryptology is divided into cryptography and steganography. Cryptography means ciphering and deciphering text. The goal is not to hide.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
“Advanced Encryption Standard” & “Modes of Operation”
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Cryptography and Network Security Chapter 3
Web Security for Network and System Administrators1 Chapter 4 Encryption.
 Stream ciphers o Encrypt chars/bits one at a time o Assume XOR w the key, need long key to be secure  Keystream generators (pseudo-random key) o Synchronous.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Chapter 5 Cryptography Protecting principals communication in systems.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Lecture 23 Symmetric Encryption
What is Cryptography? Definition: The science or study of the techniques of secret writing, esp. code and cipher systems, methods, and the like Google.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Feb 19, 2002Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
1 Chapter 4 Encryption. 2 Objectives In this chapter, you will: Learn the basics of encryption technology Recognize popular symmetric encryption algorithms.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
Network Security Lecture 14 Presented by: Dr. Munam Ali Shah.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Midterm Review Cryptography & Network Security
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
Feb 17, 2003Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Dr. Reuven Aviv, Nov 2008 Conventional Encryption 1 Conventional Encryption & Message Confidentiality Acknowledgements for slides Henric Johnson Blekinge.
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
Lecture 2: Introduction to Cryptography
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Lecture 23 Symmetric Encryption
Exam 1 Review CS461/ECE422 Fall Exam guidelines A single page of supplementary notes is allowed  8.5x11. Both sides. Write as small as you like.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Network Security. Three tools Hash Function Block Cipher Public Key / Private Key.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
1 CPCS425: Information Security (Topic 5) Topic 5  Symmetrical Cryptography  Understand the principles of modern symmetric (conventional) cryptography.
1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
NET 311 Information Security
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
PART VII Security.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Modern Cryptography.
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

Cryptographic basics Cryptology is divided into cryptography and steganography. Cryptography means ciphering and deciphering text. The goal is not to hide that test is encrypted. It is only difficult to decrypt it. Steganography is a collection of techniques, which hide the text that should be kept secret (like hiding microfilms to a pin point, hiding text into images and so on). Steganography is not necessarily difficult to break, once you know where is the hidden text. It is possible to combine the two techniques and e.g. hide encrypted text into images using steganography. Cryptoanalysis is the art of decrypting cipher text without a key.

Cryptographic basics Encryption is made with an encryption algorithm, usually a hardware or software piece is executing the algorithm. Keyless algorithms where the algorithm is secret are no longer used. One historical keyless algorithm is Caesar’s cipher. encryption key decryption key cipher text clear text clear text decryption encryption

Symmetric and asymmetric cryptoalgorithms Cryptography basics Symmetric and asymmetric cryptoalgorithms a symmetric cryptoalgorithm uses the same key in both sending and receiving side, asymmetric cryptoalgorithms, introduced by Diffie and Hellman 1976, use different keys to encrypt and to decrypt. Stream and block ciphers A stream cipher encrypts data working on each bit or byte separately, a block cipher encrypts a block (like 64 bits, 128 bits etc.) of data in one time. A stream cipher is fast but block ciphers are considered more secure. Modern data communication protocols, like IPsec, use only block ciphers. GSM A5/1 is an example of a stream cipher.

Cryptography basics Symmetric cryptoalgorithms are developed following Shannon’s two principles: confusion and diffusion. Confusion = mix up the clear text so that it is difficult to decipher. Diffusion = every change in clear text should cause many changes in cipher text. Confusion is often made by substitution: a letter or a bit sequences is replaced by another. Diffusion is often made by transposition: change the order of letters or bit sequences in the text. Clearly, with substitution and transposition there are very many alternatives, with 26 letters and text of N letters, the number of possible ciphertexts is Example, N=256, then

Cryptography basics Such a number of combinations can never be tried. Unfortunately real cyptoalgorithms are not completely random and they give much fever alternatives. The problem with letter based cryptoalgorithms is that it is difficult to remove patterns from data. Natural language has very many patterns, like common endings and more popular letters and so on. A cyptoanalysist can try to guess what could be some words in the cipher text and if he guesses some letters, the rest will be easier to guess. Today symmetric algorithms are bit-based and mix up the text so much that ciphertext is statistically as random as possible. Let us look at DES, it makes confusion with substitution boxes and diffusion with transposition boxes and several rounds.

Cryptography basics DES Data Encryptation Standard DES has 56 bit keys (expressed as 64 bit strings because of redundancy) DES is not any more safe, it was broken 1998 in 20 hours with a special Deep Crack DES cracker. First time DES was broken 1997 with 14000 PCs in four months. DES can be broken with linear cryptoanalysis in about steps, but Deep Crack cracks by brute force trying keys. DES is a Feistel network, meaning a special structure splitting a block (64 bits in DES) to two halves and mixing them so, that individual operations can lose information but the whole structure is bijective, so that you can crypt data and use the same Feistel network to decrypt it. IPsec has a mandatory support for DES.

Cryptography basics DES

Cryptography basics In DES the plaintext block is divided into left and right blocks (L0, R0). The algorithms has 16 rounds and on each round the left and right blocks are swapped in the following way: Li = R(i-1) Ri = L(i-1) XOR f(R(i-1), Ki) So new left block is the previous right block and the new right block is obtained by XORing the previous left block with the previous right block encrypted with some function f using a key Ki. An encryptation algorithm satisfying this formula is a Feistel network. It means that f need not be a bijection for this encryptation to work. On each round f is a different function made with permutations and substitutions. The triple DES (3DES) has effective key length at least twice that of DES and is considered strong.

Cryptography basics Other good symmetric block ciphers are IDEA, CAST and Blowfish. IPsec implementations have optional support for these algorithms. A main motivation for creation of a new standard is the ability to use longer block lengths than in DES. The new Advanced Encryptation Standard (AES) is recently elected. It is Rijndael. Rijndael has a flexible key size and flexible block length. 10 rounds on each round the cryptation function is a a simple combination of substitution and permutation. Rijndael is not a Feistel network, therefore on each round the encryptation function is bijective. It is possible to create strong cryptoalgorithms which are impossible to break, unless parallel computing methods like quantum computers are developed, (quite possible) or P=NP will be proved (unlikely, but possible)

and Asymmetric cryptoalgorithms RSA (Rivest-Shamir-Adleman) El-Gamal find two large primes p, q and calculate n=pq Find a number e such that e and Carmichaelin funktio =GCD(p-1)(q-1) are relatively prime (i.e., they have no common divisors). (Here GCD=greatest common divisor) Find some d such that ed=1 mod (this is easy) Then if X is a plaintext block, we get the ciphertext block Y and El-Gamal Uses the discrete logarithm problem, quite similar to Diffie-Hellman key exchange algorithm. Encrypted block 2*plaintext block in length. It is used in DSA (Digital Signature Algorithm)

Asymmetric cryptoalgorithms RSA is based on the difficulty of factoring a modulus of a large number n. In order to be too difficult for modern computers, n must be of the order of or more. Elliptic curve digital signature algorithm (ECDSA) gives the same strength with much shorter keys. (But the method is only suitable for digital signatures, not for encryptation). RSA modulus 1024 2048 4096 ECDSA field size 160 211 296 Elliptic curves are sets of points (x,y) satisfying This looks like a simple third order polynomial, the trick is that the coefficients a and b are not compex numbers or reals, but they are in a finite field. The solving any problems gets very hard.

Cryptography basics Diffie-Hellman key exchange IPsec Internet Key Exchange (IKE) uses Diffie-Hellman. Alice and Bob want to create a symmetric key for communication. So, they want to create a common secret which only they share. Let the generator number g and some prime number p be known to all (not secret). Alice picks up a number a and Bob picks up a number b. Then they calculate numbers A and B as Alice sends to Bob the number A and Bob send to Alice number B. These numbers do not need to be kept secret. Alice and Bob can both count a shared secret S as

Cryptography basics As asymmetric cryptoalgorithms are slow, usually one can only encrypt small data units with them. A common usage is digital signature: a hash value is produced by some one-way function which compresses the data. Then the hash value is crypted with a secret key. A one-way function is a function which is easy to calculate but difficult to invert, so it is easy to count the hash but difficult to find data which hashes to a given hash value. IPsec uses some well-known hash functions: MD5 and SHA. MD5 (Message Digest number 5) has some problems, one has demonstrated that it is possible to find two data values hashing to the same hash value. IPsec uses a strengthened version of the hash values: HMAC-MD5 does not have the problem.

Cryptographic basics, digital signatures Let us look at an early example of a digital signature identifying Nero. Apocalypse gives 666 as the name of the beast. Caesar Nero is written in Hebrew as Nun Vau Resh Nun Resh Samex Koph 50 6 200 50 200 60 100 the sum is 666. We know this is the likely explanation because some Creek versions of Apocalypse give the number as 616 and a similar calculation in Creek gives 616. Unfortunately the signature is not unique to Nero, many people have found other explanations, the Pope being one of the most popular choices for the beast (for crackpots).

Cryptographic basics, digital signatures In order to make a unique digital signature, you need a one-way hash collision-free function and public key cryptoalgorithm. One-way function is a function, which is fast to calculate but the inverse is very slow to calculate. For instance, A hash function is a function which maps a long number into a short number. Naturally, many long numbers map to the same short number. A hash function is called collision-free if it is hard to find any long number which maps to a short number obtained by using the hash function. Now you take the message you want to sign, put it through a one-way collision free hash function and it produces a short number. This number you encrypt with your private key. It is the digital signature.

Cryptographic basics, digital signatures You send both the message and the digital signature. Anybody can check the digital signature by counting the hash value (the short number) from the message since the used one-way collision-free hash function is known to all. Then he can also decrypt the digital signature you gave with your known public key. It must be the same number what the hash produced. Typically, electronic signature is in a data structure indicating the hash algorithm, public key algorithm and known parameters for these algorithms.

Cryptography basics Example: Digital signature algorithms used in IPsec: RSA, suits well to digital signatures DSA (Digital Signature Algorithm), a similar algorithms to El-Gamal, uses SHA (Secure Hash Algorithm) for hashing. Algorithms for message integrity in IPsec: Digital signatures can be used to proof that the message has not changes. There are symmetric and asymmetric algorithms for this. MAC (Message Authentication Code) is a family of symmetric message integrity check algorithms. IPsec uses one special MAC: HMAC. It can be used with different hash functions, so there are HMAC-SHA and HMAC-MD5.

Cryptography basics Modes of symmetric cryptoalgorithms Block ciphers can be used in several modes. Electronic Code Book (ECB), Cipher Block Chaining (CBC), Output Feedback (OFB), Counter mode, ... In ECB blocks are crypted individually, not suitable for communication, but good for storing data as then data can be decrypted without decrypting all previous blocks. In other modes previous plaintext or ciphertext blocks are used to encypt the next block. The feedback modes (CBC, OFB, Counter) differ mostly in error propagation. For links with high error ratio OFB or Counter mode are better than CBC. IPsec uses all block ciphers in the CBC-mode.

Cipher Block Chaining Mode (CBC) Cryptography basics Cipher Block Chaining Mode (CBC) E + plaintext ciphertext ciphertext IV D D D + + + IV plaintext IV = Initialization vector E = Encryption component D = Decryption component