cryb-to/lib
Dag-Erling Smørgrav a09cdc6318 Fix equality predicates.
The count we passed to memcmp() in mpi_eq() and mpi_eq_abs() was actually the number of significant words in the MPI, rather than the number of bytes we wanted to compare.  Multiply by 4 to get the correct value.

To make the intent of the code more apparent, introduce a private MPI_MSW() macro which evaluates to the number of significant words (or 1-based index of the most significant word).  This also comes in handy in mpi_{add,sub,mul}_abs().

Add a couple of test cases which not only demonstrate the bug we fixed here but also demonstrate why we must compare whole words: on a big-endian machine, we would be comparing the unused upper bytes of the first and only word instead of the lower bytes which actually hold a value...
2017-04-22 05:32:25 +02:00
..
cipher Remove unused struct member. 2017-04-06 19:51:46 +02:00
core Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
cpe Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
digest Silence compiler warnings about operator precedence. 2017-04-06 19:51:46 +02:00
enc Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
hash Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
mac Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
mpi Fix equality predicates. 2017-04-22 05:32:25 +02:00
oath Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
rand Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
rsaref Centralize most of .gitignore. 2016-09-17 21:38:54 +02:00
test Rename t_verbose*() to t_printv*(). 2017-03-14 14:36:52 +01:00
Makefile.am Fix typo in libcryb-rand's Makefile and ensure that it is built before libcryb-oath, which uses it. 2016-11-21 13:46:49 +01:00