comparison mycrypt_gf.h @ 0:d7da3b1e1540 libtomcrypt

put back the 0.95 makefile which was inadvertently merged over
author Matt Johnston <matt@ucc.asn.au>
date Mon, 31 May 2004 18:21:40 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d7da3b1e1540
1
2 /* ---- GF(2^w) polynomial basis ---- */
3 #ifdef GF
4 #define LSIZE 32 /* handle upto 1024-bit GF numbers */
5
6 typedef unsigned long gf_int[LSIZE];
7 typedef unsigned long *gf_intp;
8
9 extern void gf_copy(gf_intp a, gf_intp b);
10 extern void gf_zero(gf_intp a);
11 extern int gf_iszero(gf_intp a);
12 extern int gf_isone(gf_intp a);
13 extern int gf_deg(gf_intp a);
14
15 extern void gf_shl(gf_intp a, gf_intp b);
16 extern void gf_shr(gf_intp a, gf_intp b);
17 extern void gf_add(gf_intp a, gf_intp b, gf_intp c);
18 extern void gf_mul(gf_intp a, gf_intp b, gf_intp c);
19 extern void gf_div(gf_intp a, gf_intp b, gf_intp q, gf_intp r);
20
21 extern void gf_mod(gf_intp a, gf_intp m, gf_intp b);
22 extern void gf_mulmod(gf_intp a, gf_intp b, gf_intp m, gf_intp c);
23 extern void gf_invmod(gf_intp A, gf_intp M, gf_intp B);
24 extern void gf_sqrt(gf_intp a, gf_intp M, gf_intp b);
25 extern void gf_gcd(gf_intp A, gf_intp B, gf_intp c);
26 extern int gf_is_prime(gf_intp a);
27
28 extern int gf_size(gf_intp a);
29 extern void gf_toraw(gf_intp a, unsigned char *dst);
30 extern void gf_readraw(gf_intp a, unsigned char *str, int len);
31
32 #endif