Data Security
- B. R. Chandavarkar
- Asst. Prof., CSE Dept.,
Data Security B. R. Chandavarkar Asst. Prof., CSE Dept., NITK, - - PowerPoint PPT Presentation
Data Security B. R. Chandavarkar Asst. Prof., CSE Dept., NITK, Surathkal. brcnitk@gmail.com brc.nitk.ac.in 1 Contents Data Security Introduction 2 4 3 Substitution Transposition Classification Techniques Techniques 9 12
Data Security Introduction Transposition Techniques Substitution Techniques Classification Data Encryption Standard (DES) Advanced Encryption Standard (AES) Symmetric Crypto System Asymmetric Crypto System RSA LINUX Implementation MATLAB Implementation OpenSSL SSL/TLS
5 2 6 8 3 9 1 10 4 12 13 14 11
Advanced DES
7
be a wide range of information from personal files and intellectual property to market analytics and details intended to top secret. Data could be anything of interest that can be read or otherwise interpreted in human form.
corruption and unauthorized access. The focus behind data security is to ensure privacy while protecting personal or corporate data. - www.spamlaws.com
are applied to prevent unauthorized access to computers, databases and websites. Data security also protects data from
every size and genre. Data security is also known as information security (IS) or computer security. – www.techopedia.com
Back
ciphertext. All encryption algorithms are based on two general principles: substitution, in which each element in the plaintext is mapped into another element, and transposition, in which elements in the plaintext are rearranged. Most systems, referred to as product systems, involve multiple stages of substitutions and transpositions.
to as symmetric (single-key, secret-key,
conventional encryption).
to as asymmetric (two-key, or public-key encryption).
time, producing an output block for each input block.
producing output one element at a time, as it goes along.
Back
Plaintext h (7) e (4) l (11) l (11) o (14) g (6)
d (3) Key 3 3 3 3 3 3 3 3 3
Plaintext H E L L O G O O D
A B C D E F G H I J K L M N O P R T W X A D E G L O S Y B N (a) Key (b) Example Ciphertext k h
m r r j Ciphertext E X S S N D N N W
Plaintext S E C U R I T Y D C
Plaintext
p (15) a (0) y (24) m (12)
r (17) e (4) m (12)
(a) Key (c) Example Ciphertext L I / J E M A K Q D C H Ciphertext r r l m w b k a s M O N A R C H Y B D E F G I/J K L P Q S T U V W X Z (a) Key (b) Example 17 17 5 21 18 21 2 2 19 4 9 15 15 17 6 24 17 (b) Inverse Key
Plaintext h (7) e (4) l (11) l (11) o (14) g (6)
d (3) Key d (3) a (0) t (19) a (0) d (3) a (0) t (19) a (0) d (3)
Plaintext H E L L O G O O D Key S E C U R I T Y D
Ciphertext k e e l r g h
Ciphertext ? ? ? ? ? ? ? ? ? Plaintext 1 1 1 1 1 Key Stream 1 1 1 1 1 Ciphertext 1 1 1 1 1 1
Back
Encryption Decryption Cipher Text Plain Text Plain Text Cipher Text Secrete Key Secrete Key User A (Sender) User B (Receiver) Symmetric (Private) Key Encryption Back
History
cryptography led by Horst Feistel. The project concluded in 1971 with the development of an algorithm with the designation LUCIFER, which was sold to Lloyd's of London for use in a cash-dispensing system, also developed by IBM.
using a key size of 128 bits.
embarked on an effort to develop a marketable commercial encryption product that ideally could be implemented on a single chip. The effort was headed by Walter Tuchman and Carl Meyer, and it involved not only IBM researchers but also outside consultants and technical advice from NSA.
more resistant to cryptanalysis but that had a reduced key size of 56 bits, to fit on a single chip.
Encryption Standard (DES) adopted in 1977 by the National Bureau of Standards (NBS), now the National Institute of Standards and Technology (NIST), as Federal Information Processing Standard 46 (FIPS PUB 46). The algorithm itself is referred to as the Data Encryption Algorithm (DEA).
Initial Permutation Round 1 Round 2 Round 16 32-bit Swap Inverse Initial Permutation
64-bit 64-bit 64-bit 64-bit 64-bit
64-bit Plain Text 64-bit Cipher Text Permuted Choice 1 Left Circular Shift Left Circular Shift Left Circular Shift Permuted Choice 2
56-bit 56-bit 56-bit
Permuted Choice 2 Permuted Choice 2
48-bit 48-bit 48-bit 56-bit 56-bit 56-bit
Key Generation Encryption 64-bit Key
K2 K1 K16
Back
Initial Permutation Inverse of Initial Permutation Back
Expansion / Permutation (E-Table) Substitution / Choice (S-Box) Permutation 32-bit Input 32-bit Input 32-bit Input 32-bit Input 48-bit Key
32-bit 48-bit 32-bit 48-bit 48-bit 32-bit 32-bit
Round Back
Expansion / Permutation (E-Table) Back
32-bit Permutation 32-bit Sub Key 48-bit 48-bit 32-bit Data Round Expansion S1 6-bit 4-bit S2 6-bit 4-bit S3 6-bit 4-bit S4 6-bit 4-bit S5 6-bit 4-bit S6 6-bit 4-bit S7 6-bit 4-bit S8 6-bit 4-bit 32-bit 48-bit Substitution (S-Box) Back
Back
Back
Permuted Choice 1 Left Circular Shift Left Circular Shift Left Circular Shift Permuted Choice 2 Permuted Choice 2 Permuted Choice 2
48-bit 48-bit 48-bit 56-bit 56-bit 56-bit
K2 K1 K16
64-bit Key
56-bit 56-bit 28-bit 28-bit 28-bit 28-bit 28-bit 28-bit 56-bit 56-bit
Back
Before Permutation Choice - 1 Permutation Choice - 1 Permutation Choice - 2 Schedule of Left Shifts Back
Encryption Encryption K1 K2 P C
Decryption Decryption K2 K1 C P (a) Encryption (b) Decryption
Encryption Decryption K1 K2 P C
(a) Encryption (b) Decryption Encryption K1 Decryption Encryption K1 K2 C P Decryption K1
Encryption Decryption K1 K2 P C
(a) Encryption (b) Decryption Encryption K3 Decryption Encryption K3 K2 C P Decryption K1 Back
AES-128 AES-192 AES-256 Key Size (w/B/b) 4/16/128 6/24/192 8/32/256 Block Size (w/B/b) 4/16/128 4/16/128 4/16/128
10 12 14 Round Key Size (w/B/b) 4/16/128 4/16/128 4/16/128 Expanded Key Size (W/B) 44/176 52/208 60/240
Encryption Decryption
1. Electronic Code Book (ECB) 2. Cipher Block Chaining (CBC) Mode 3. Cipher Feedback (CFB) Mode 4. Output Feedback (OFB) Mode 5. Counter (CTR) Mode
Coverts Block Cipher into Stream Cipher
Encrypt
56-bit 64-bit 64-bit
P1 C1 K Encrypt
56-bit 64-bit 64-bit
P2 C2 K Encrypt
56-bit 64-bit 64-bit
Pn Cn K Decrypt
56-bit 64-bit 64-bit
C1 P1 K Decrypt
56-bit 64-bit 64-bit
C2 P2 K Decrypt
56-bit 64-bit 64-bit
Cn Pn K
(a) (b) Decryption Encryption
Encrypt
56-bit 64-bit 64-bit
P1 C1 K Encrypt
56-bit 64-bit 64-bit
P2 C2 K Encrypt
56-bit 64-bit 64-bit
Pn Cn K Decrypt
56-bit 64-bit 64-bit
C1 P1 K Decrypt
56-bit 64-bit 64-bit
C2 P2 K Decrypt
56-bit 64-bit 64-bit
Cn Pn K
IV IV (a) (b) Decryption Encryption Back
Encryption Decryption Cipher Text Plain Text Plain Text Cipher Text Receiver Public Key Receiver Private Key User A (Sender) User B (Receiver)
Entities:
keys, in contrast to symmetric encryption, which uses only one key.
recipient’s public key.
message or to a small block of data that is a function of the message.
Several different approaches are possible, involving the private key(s)
Algorithm Enc /Dec Digital Sign. Key Exchange RSA Yes Yes Yes Elliptic-Curve Yes Yes Yes Diffie-Hellman No No Yes DSS No Yes No Back
use of an expression with exponentials.
are integers between 0 and n-1 for some n.
than 21024.
less than some number n. That is, the block size must be less than or equal to log2(n);
Step 1: Select two primes p1 and q1 (p1 ≠ q1) Step 2: Calculate n1 = p1 X q1 Step 3: Calculate Ø (n1) = (p1-1)(q1-1) Step 4: Select integer e1 [gcd (Ø (n1), e1) = 1 and 1 < e1 < Ø (n1)] Step 5: Calculate d1 ≡ e1-1 (mod Ø (n1)) Step 1: Select two primes p2 and q2 (p2 ≠ q2) Step 2: Calculate n2 = p2 X q2 Step 3: Calculate Ø (n2) = (p2-1)(q2-1) Step 4: Select integer e2 [gcd (Ø (n2), e2) = 1 and 1 < e2 < Ø (n2)] Step 5: Calculate d2 ≡ e2-1 (mod Ø (n2)) User A User B (e1, n1) (e2, n2) C = Me2 (mod n2) M = Cd2 (mod n2) M M C C
Back