# What's 'permutation' in cryptography?

## dE_logics

If you believe the Internet it's long forgotten.

It's some undocumented procedure to juggle around bits of a block (for a block cipher), e.g. -- 

1,2,3,4,5,6,7,8,9,10 will juggle to -- 

3,5,2,7,4,10,1,9,8,6

----------

## John R. Graham

It's not forgotten; it's just trivially weak, falling into the class called substitution ciphers. Any operation that has the property that, if you change one bit of the input, then exactly one bit of the output changes, is useless in cryptography. See also Ceaser Cipher.

- John

----------

## smartass

Formally a permutation is a bijection (one-to-one function) on the elements of {1 .. n } (set of numbers from 1 to n). The numbers 1 to n could be indices of some array of letter, bytes, etc. 

As John has said, it's quite weak, but it's one of the building blocks of discrete mathematics which is used in cryptography, so that's why you might have come across it.

----------

## dE_logics

It's used in DES. That's why I needed it.

I'll see to Ceaser Cipher and revise sets.

But can someone link an article?

----------

## John R. Graham

Not alone, but I think understand the ask a little better. It's because it's a well understood mathematical concept. (What is this "addition" that you speak of? Where is the instructional material?) DES was the first of a class of encryption algorithms called Feistel Ciphers. (An associate of mine was at IBM when Feistel invented it.) Wiki has some good material. In the context of DES, the P-Boxes of each round of the DES algorithm rearrange the bits in an intermediate result block. Any rearrangement is a "permutation" and, in this context, that's all that it means. However, choosing the rearrangement pattern is part of the art of a good cipher, something I don't have the math to fully comprehend myself. (Cryptanalysis is a very narrow speciality and, although I'm a security architect, I'm a neophyte in that field.)

If you've got specific questions, go ahead & ask.  :Wink: 

- John

----------

## dE_logics

 *smartass wrote:*   

> Formally a permutation is a bijection (one-to-one function) on the elements of {1 .. n } (set of numbers from 1 to n). The numbers 1 to n could be indices of some array of letter, bytes, etc. 
> 
> As John has said, it's quite weak, but it's one of the building blocks of discrete mathematics which is used in cryptography, so that's why you might have come across it.

 

But in Simplified DES, what's the relation?

----------

## John R. Graham

I'd never heard of Simplified DES but I imagine it has S-Boxes and P-Boxes, just like standard DES. (See my post just before your last one.)

-  John

----------

## dE_logics

 *John R. Graham wrote:*   

> Not alone, but I think understand the ask a little better. It's because it's a well understood mathematical concept. (What is this "addition" that you speak of? Where is the instructional material?) DES was the first of a class of encryption algorithms called Feistel Ciphers. (An associate of mine was at IBM when Feistel invented it.) Wiki has some good material. In the context of DES, the P-Boxes of each round of the DES algorithm rearrange the bits in an intermediate result block. Any rearrangement is a "permutation" and, in this context, that's all that it means. However, choosing the rearrangement pattern is part of the art of a good cipher, something I don't have the math to fully comprehend myself. (Cryptanalysis is a very narrow speciality and, although I'm a security architect, I'm a neophyte in that field.)
> 
> If you've got specific questions, go ahead & ask. 

 

By now I've just 1 question left.

Taking this into reference -- 

http://elc.cu.edu.eg/elcmoodledata/90/moddata/scorm/288/01.htm

Are all permutation operations user function, or does the user/reader decide what permutations are to be made?

----------

## John R. Graham

In a Feistel cipher, the encryption algorithm designer decides what permutations are to be made. All permutations are fixed (i.e., decided at algorithm definition time). The key doesn't affect these at all. An interesting historical fact about DES is that the initial and final permutations add no security at all. They were intentionally added to make software implementations of DES perform poorly. You see, permutation in hardware is a zero (time and implementation) cost feature: just hook the wires up in the prescribed order.

- John

----------

## dE_logics

Funny facts. It did not improve encryption, but it surly made the concept encrypted.

Thanks a LOT for the clarification. This bit was missing from all text on the Internet. Hope this post will help others.

----------

