ARM Shanghai IoT Team (Internal) / newMiniTLS-GPL

Fork of MiniTLS-GPL by Donatien Garnier

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers fp_mulmod.c Source File

fp_mulmod.c

00001 /* TomsFastMath, a fast ISO C bignum library.
00002  * 
00003  * This project is meant to fill in where LibTomMath
00004  * falls short.  That is speed ;-)
00005  *
00006  * This project is public domain and free for all purposes.
00007  * 
00008  * Tom St Denis, tomstdenis@gmail.com
00009  */
00010 #include <tfm.h>
00011 /* d = a * b (mod c) */
00012 int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d)
00013 {
00014   fp_int tmp;
00015   fp_zero(&tmp);
00016   fp_mul(a, b, &tmp);
00017   return fp_mod(&tmp, c, d);
00018 }
00019 
00020 /* $Source: /cvs/libtom/tomsfastmath/src/mul/fp_mulmod.c,v $ */
00021 /* $Revision: 1.1 $ */
00022 /* $Date: 2006/12/31 21:25:53 $ */