[Cryptography] Exotic Operations in Primitive Construction

Dave Horsfall dave at horsfall.org
Fri Oct 2 05:08:22 EDT 2020


On Wed, 30 Sep 2020, Peter Gutmann wrote:

> If you're referring to an implementation in C, it's not even that any 
> more, any compiler from the last 15-20 years has a rotate recogniser and 
> will translate 'x << y | x >> ( wordsize - y )' into a single rotate 
> instruction.

As another followup (and I'm not trying to turn this into a C forum), but 
can anyone think of a way to flip an n-bit word around i.e. LSB becomes 
MSB etc?

Assume that "n" is not necessarily a power of 2, just for generality; the 
best that I can think of is a 1-bit wide stack.

After much reading, it seems that most (if not all) crypto systems assume 
that powers of 2 are somehow magical, because of today's computers.

Well, I've used a 12-bit box (PDP-8) and 60-bit (CDC), so I was 
wondering...

-- Dave, a crypto newbie


More information about the cryptography mailing list