05c7bb4565
C is still kind of unsure about the whole two's complement thing and leaves left-shifting of negative numbers undefined. Sadly, some sanitizers believe in teaching the controversy and complain when code relies on the theory of two's complement. Shushing these sanitizers in this case is easier than fighting with build configuration, so replace the shifts with masks. (This is equivalent as the left-shift was of a value right-shifted by the same amount. Instead, we store the unshifted value in carry0, etc., and mask off the bottom bits.) A few other places get casts to unsigned types which, by some miracle, C compilers are forbidden from miscompiling. This is imported from upstream's b95779846dc876cf959ccf96c49d4c0a48ea3082 and 5b7af0dd6c9315ca76fba16813b66f5792c7fe6e. Change-Id: I6bf8156ba692165940c0c4ea1edd5b3e88ca263e Reviewed-on: https://boringssl-review.googlesource.com/7320 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
asm | ||
CMakeLists.txt | ||
curve25519.c | ||
ed25519_test.cc | ||
ed25519_tests.txt | ||
internal.h | ||
spake25519_test.cc | ||
spake25519.c | ||
x25519_test.cc | ||
x25519-x86_64.c |