oxedyne/fe2o3/fe2o3_crypto/src/c/verify.h
722 bytes, 1 run
created by r1870400018:226, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | /*------------------------------------------------- |
| 2 | This file has been adapted from the implementation |
| 3 | (available at https://github.com/pq-crystals/kyber) of |
| 4 | "CRYSTALS – Kyber: a CCA-secure module-lattice-based KEM" |
| 5 | by : Joppe Bos, Leo Ducas, Eike Kiltz, Tancrede Lepoint, |
| 6 | Vadim Lyubashevsky, John M. Schanck, Peter Schwabe & Damien stehle |
| 7 | ----------------------------------------------------*/ |
| 8 | #ifndef VERIFY_H |
| 9 | #define VERIFY_H |
| 10 | |
| 11 | #include <stdio.h> |
| 12 | |
| 13 | /* returns 0 for equal strings, 1 for non-equal strings */ |
| 14 | int verify(const unsigned char *a, const unsigned char *b, size_t len); |
| 15 | |
| 16 | /* b = 1 means mov, b = 0 means don't mov*/ |
| 17 | void cmov(unsigned char *r, const unsigned char *x, size_t len, unsigned char b); |
| 18 | |
| 19 | #endif |