modulo P256 arithmetic

This commit is contained in:
NIIBE Yutaka
2011-10-10 22:36:09 +09:00
parent f936269eee
commit 41272c2ab7
2 changed files with 277 additions and 0 deletions

9
src/modp256.h Normal file
View File

@@ -0,0 +1,9 @@
extern bn256 p256;
#define P256 (&p256)
void modp256_add (bn256 *X, const bn256 *A, const bn256 *B);
void modp256_sub (bn256 *X, bn256 *A, bn256 *B);
void modp256_reduce (bn256 *X, bn512 *A);
void modp256_mul (bn256 *X, bn256 *A, bn256 *B);
void modp256_sqr (bn256 *X, bn256 *A);
void modp256_inv (bn256 *C, const bn256 *a);