math-permutation.html
            
                
                    
                        
                        * created: 2025-10-17T16:21
                        
                         
                        * modified: 2025-10-30T17:22
                        
                        
                    
                
                title
                Permutations
                description
                A permutation can be thought of a specific order of a set.
                
                related notes
                
                
             
            Permutation
A permutation can be understood as a specific arrangement of a set. The different ways in which a set can be arranged, is the number of permutations.
A 4 bit value can be in 16 states (0000_{2}..1111_{2}). A 4-bit-permutation (function) p: {0,1}^{4} \to {0,1}^{4} can map to 16 different values. Therefore there are 16 \cdot 15 \cdot \dots \cdot 1 combination, in other words, there are 2^{4}! = 16! = 20.922.789.888.000 different 4 bit permutations.
There are 2^{n}! different n bit permutations.
Factorial: 4! = 4 \cdot 3 \cdot 2 \cdot 1
A way to encrypt a n bit message M would be to generate a n bit permutation p. A attacker would have to guess 2^{n}! permutations, which would take \frac{(2^{n})!}{2} attempts.
To store a random 64 bit permutation we need 2^{64} entries. That would be 2{27}TB = 128EiB
A n bit block ciphers are referring to a n bit permutations.