[Cryptography] Exotic Operations in Primitive Construction

Tom Mitchell mitch at niftyegg.com
Sun Oct 4 02:34:35 EDT 2020

On Sat, Oct 3, 2020 at 6:24 PM Jerry Leichter <leichter at lrw.com> wrote:
> >> 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?
> >>

For completeness... A hardware solution can accelerate operations like this.
If if is sufficiently interesting a memory mapped set of write latches
and read registers
for the operation on a memory mapped device are not very difficult
after the system bus
interface is in place.    Latency to I/O might make multiple registers

FPGA parts open the door to functions expensive on the CPU becoming inexpensive
on the FPGA.

In history the NSA may have had odd opcodes included on some CPUs.
see popcount.  "an instruction called popcount, short for “population
count”. Here’s what it
does: it counts the number of set bits in a machine word. For example
(assuming 8-bit words
for simplicity), popcount(00100110) is 3 and popcount(01100000) is 2."

The point is expensive software on some processors can be accelerated
with special hardware.
Barrel shifting was a win for bit mapped graphics, transistors well spent.

Deep pockets can get microcode changes made on some parts.

          T o m    M i t c h e l l ( o n   N i f t y E g g )

More information about the cryptography mailing list