Oregami
Repositories/oxedyne/fe2o3

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/*-------------------------------------------------
2This 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,
6Vadim 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 */
14int verify(const unsigned char *a, const unsigned char *b, size_t len);
15
16/* b = 1 means mov, b = 0 means don't mov*/
17void cmov(unsigned char *r, const unsigned char *x, size_t len, unsigned char b);
18
19#endif