perfect block ciphers with small blocks
play

Perfect Block Ciphers With Small Blocks Louis Granboulan 1 , 2 Thomas - PowerPoint PPT Presentation

Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Perfect Block Ciphers With Small Blocks Louis Granboulan 1 , 2 Thomas Pornin 3 1


  1. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Perfect Block Ciphers With Small Blocks Louis Granboulan 1 , 2 Thomas Pornin 3 1 École Normale Supérieure 2 EADS 3 Cryptolog International March 28 th , 2007 Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  2. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Outline Block ciphers with non-standard sizes 1 Choosing uniformly a random permutation 2 3 P ERMUTATOR Sampling following the Hypergeometric Distribution 4 Security Analysis 5 Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  3. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Small blocks Usual block ciphers operate over blocks of 64 bits or more. Some applications need shorter blocks (e.g. generation of unique pseudo-random numbers in a short range). Security issues with block size Usual block cipher designs (e.g. Feistel scheme) build ciphers from a restricted subset of the permutations over the message space (a Feistel scheme can only be an even permutation). This is tolerated thanks to the huge block size. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  4. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Non-binary alphabets Usual block ciphers use messages consisting of bits. Some applications need messages using another alphabet (e.g. generation of unique decimal pseudo-random numbers). 10 is more complex than 2 Decimal alphabets are challenging: Several ring structures can be applied to a set of size 10. There is no field of size 10. There are several types of differentials. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  5. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis What this paper is about We describe P ERMUTATOR , which is an algorithm for selecting randomly and uniformly a permutation over a set of n elements: n is arbitrary; the algorithm input is a seekable stream of random bits; if the stream is truly random, then all the n ! permutations have an equal chance of being selected; the permutation and its inverse can be “efficiently” evaluated. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  6. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Knuth Shuffle random selection 0 1 2 3 4 5 4 5 2 3 0 1 4 1 2 3 0 5 4 5 2 1 0 3 4 5 2 3 0 1 4 5 2 1 3 0 Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  7. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Knuth Shuffle The permutation is defined by an array of size n . We need n − 1 random selections of integers between 0 and r , where r goes down from n − 1 to 1. Cost: O ( n log n ) space O ( n log n ) CPU ( n selections of integers of size log n ) for init, then O ( log n ) (array lookup) for each evaluation Applicability The “Knuth shuffle” solves our problem only for very small values of n (e.g. n ≤ 10000). Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  8. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Partial evaluation Idea Use a shuffle algorithm, but apply it partially : for a given input x , compute only the parts which may have an influence over φ ( x ) . The Knuth shuffle is not adequate for partial evaluation: on average, n / 2 random selection events may affect φ ( x ) . Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  9. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Overview “P ERMUTATOR ” is a shuffle expressed as a binary tree of “S PLITTER ” operations. To evaluate φ ( x ) , one needs follow only one path from the root in that tree (log n nodes). “S PLITTER ” is implemented as a binary tree of “R EPARTITOR ” operations. For a given x , we need follow only one path in that tree, for each for the considered S PLITTER nodes. (at most log n sub-nodes). “R EPARTITOR ” is a random selection event, using the hypergeometric distribution, which has cost O ( log n ) . Cost: O ( log n ) space (tree walking, no backtrack needed) O (( log n ) 3 ) CPU for each evaluation Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  10. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis P ERMUTATOR : a tree of S PLITTER Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  11. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis S PLITTER S PLITTER is an elementary permutation which splits elements into two groups: each of the n elements goes either into the left half (size ⌊ n / 2 ⌋ ) or the right half (size ⌈ n / 2 ⌉ ). Within each half, the element ordering is preserved. S PLITTER selects ⌊ n / 2 ⌋ “white” elements, which go into the left half; the remaining (black) elements go into the right half. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  12. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis S PLITTER Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  13. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis S PLITTER Each S PLITTER works over n elements, and must “extract” p white elements. It invokes R EPARTITOR , which tells how many of these white elements come from the left half. S PLITTER then invokes itself recursively on both halves. For partial evaluation, only one half is considered. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  14. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis S PLITTER : a tree of R EPARTITOR 8 3 5 2 1 3 2 1 1 1 0 2 1 1 1 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 1 Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  15. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis R EPARTITOR R EPARTITOR is given n elements, among which p are white (and n − p are black). R EPARTITOR chooses how many of those p white elements come from the ⌊ n / 2 ⌋ first elements. R EPARTITOR , when used in P ERMUTATOR , selects a uniform permutation if it returns the value u following the hypergeometric distribution: �� n − a � a � k p − k P ( u = k ) = � n � p where a = ⌊ n / 2 ⌋ . Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  16. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Direct sampling For small values of p , R EPARTITOR uses a direct sampling algorithm: the p white elements are directly selected: 1 n 1 ← a , n 2 ← n − a 2 if p = 0, then return a − n 1 3 select randomly r between 0 and n 1 + n 2 − 1 (inclusive) 4 if r < n 1 , then n 1 ← n 1 − 1, else n 2 ← n 2 − 1 5 p ← p − 1 6 go to step 2 Limitations Cost is linear in p . We use this method for p ≤ 10. Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  17. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Rejection sampling Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

  18. Block ciphers with non-standard sizes Choosing uniformly a random permutation P ERMUTATOR Sampling following the Hypergeometric Distribution Security Analysis Rejection sampling Principle We select random points until we find one which lies below the target distribution. The process is hastened by using a carefully chosen area for random point selection (a scaled “easy” distribution). For R EPARTITOR , we use the Cauchy-Lorentz distribution: � ν � � 1 CL µ , ν ( x ) = ( x − µ ) 2 + ν π where α = ⌊ n / 2 ⌋ / n , µ = α p and ν = 2 α ( 1 − α ) p . Louis Granboulan, Thomas Pornin Perfect Block Ciphers With Small Blocks

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend