agl/curve25519-donna — pull request #21 by nmathewson (2012-12-04 03:09:15+00:00)
Title: Make donna-64 work on big-endian hosts, hosts with alignment rules

There are still some big-endian hosts out there in the wild,
particularly on expensive server hardware. Also, there are a pile
of systems where doing unaligned integer loads and stores either
causes a crash, causes a fault that the kernel needs to work around,
or is just plain slow.

Fortunately, the 64-bit implementation only relied on endianness and
the freedom to do unaligned access in two places: fexpand and
fcontract. Those aren't critical-path functions, so let's just take
the easy approach and replace them with the simplest bytes<->u64
implementation.

This has no appreciable performance impact.