Presentation is loading. Please wait.

Presentation is loading. Please wait.

Key Wrap Algorithm.

Similar presentations


Presentation on theme: "Key Wrap Algorithm."— Presentation transcript:

1 Key Wrap Algorithm

2 Key wrap algorithm Key wrap algorithm Types of key wrap algorithms
Even when a user encrypts message by using symmetric key algorithm, he has two keys; one is called key encryption key(KEK) which is used for encrypting the content encryption key(CEK) which is use for encrypting message. And then send encrypted CEK and encrypted message. Types of key wrap algorithms AESKW(AES key wrapping algorithm) TDKW (TDES key wrapping algorithm) AKW1 AKW2

3 Simplified AESKW Bob Alice KEKAB KEKAB generate CEKAB
encrypt CEKAB : Ckey=EKEKAB(CEKAB) Message: x encrypt message: c=ECEKAB(x) KEKAB (Ckey, c) decrypt Ckey : CEKAB=EKEKAB(Ckey) decrypt message: x=ECEKAB(c)

4 Purpose of key wrapping
For more security? In my opinion, there is no point of key wrapping for providing more security. If KEK is revealed, so is the message. But there is one advantage: Suppose Bob maintains encrypted data communicated up to now. Even if KEK is revealed, he doesn’t need to change the CEK. Instead, Alice re-encrypts the same CEK with new KEK and sends the newly encrypted CEK to Bob.

5 Random Number Generation (RNG)

6 Types of RNG True RNG Pseudo RNG
Random numbers are generated from physical process in real life. Eg, coin flipping, lottery, thermal noise, mouse movement, etc. Pseudo RNG Random numbers are computed, i.e. they are deterministic. Typical algorithm for computing PRNG S0=seed, Si+1 = F(Si) Eg, RAND() function in ANSI C S0=12345, Si+1 = Si (mod 231)

7 Types of RNG Cryptography PRNG (CPRNG)
CPRNGs are PRNG with one additional property; generated numbers are unpredictable. Given n output bits Si, Si+1, …, Si+n-1 It is computationally infeasible to generate Sn.

8 Uses of Random Numbers Random numbers used to generate keys
Symmetric keys RSA: Prime numbers Diffie Hellman: secret values Random numbers used for nonces Sometimes a sequence is OK But sometimes nonces must be random Random numbers also used in simulations, statistics, etc. Such numbers need to be “statistically” random

9 Case: Misuse of Random Numbers
Online version of Texas Hold ‘em Poker ASF Software, Inc. Random numbers used to shuffle the deck Program did not produce a random shuffle A serious problem or not?

10 Card Shuffle There are 52! > 2225 possible shuffles
The poker program used “random” 32-bit integer to determine the shuffle So, only 232 distinct shuffles could occur Code used Pascal pseudo-random number generator (PRNG): Randomize() Seed value for PRNG was function of number of milliseconds since midnight Less than 227 milliseconds in a day So, less than 227 possible shuffles

11 Card Shuffle Seed based on milliseconds since midnight
PRNG re-seeded with each shuffle By synchronizing clock with server, number of shuffles that need to be tested  218 Could then test all 218 in real time Test each possible shuffle against “up” cards Attacker knows every card after the first of five rounds of betting!

12 Poker Example Poker program is an extreme example
But common PRNGs are predictable Only a question of how many outputs must be observed before determining the sequence Crypto random sequences not predictable For example, keystream from RC4 cipher But “seed” (or key) selection is still an issue! How to generate initial random values? Keys (and, in some cases, seed values)

13 Randomness Sources of randomness via software
Software is (hopefully) deterministic So must rely on external “random” events Mouse movements, keyboard dynamics, network activity, etc., etc. Can get quality random bits by such methods But quantity of bits is very limited Bottom line: “The use of pseudo-random processes to generat e secret quantities can result in pseudo-security”


Download ppt "Key Wrap Algorithm."

Similar presentations


Ads by Google