top | item 38418561

(no title)

ZephyrP | 2 years ago

Feistel ciphers are a good technique for doing just this but it's also worth noting that if all you are looking for is "produce a pseudorandom permutation of 1..N without actually shuffling a list of numbers" you can also use an LFSR as well.

discuss

order

wslh|2 years ago

The difference is that the method is more secure than an LFSR.

ZephyrP|2 years ago

of course, but an LFSR is going to be faster (provided you have a reasonable number of rounds in your Feistel cipher), have some situationally desirable statistical properties and is easier to adapt than a format-preserving encryption technique like a Feistel network.