X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/d2d862970aaaa9c14201289f2557bcdfec29b3d5..d34decd2b2b88240cf4ca68a2a5feb7bf36de6e7:/mp-const.c diff --git a/mp-const.c b/mp-const.c index 2119470..f98da7c 100644 --- a/mp-const.c +++ b/mp-const.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mp-const.c,v 1.1 1999/11/17 18:02:16 mdw Exp $ + * $Id: mp-const.c,v 1.2 2000/06/17 11:45:09 mdw Exp $ * * Useful multiprecision constants * @@ -30,6 +30,11 @@ /*----- Revision history --------------------------------------------------* * * $Log: mp-const.c,v $ + * Revision 1.2 2000/06/17 11:45:09 mdw + * Major memory management overhaul. Added arena support. Use the secure + * arena for secret integers. Replace and improve the MP management macros + * (e.g., replace MP_MODIFY by MP_DEST). + * * Revision 1.1 1999/11/17 18:02:16 mdw * New multiprecision integer arithmetic suite. * @@ -41,17 +46,19 @@ /*----- Global variables --------------------------------------------------*/ -static mpw mpw_const[] = { 1, 2, 3, 4, 5, 10 }; +static mpw mpw_const[] = { 1, 2, 3, 4, 5, 10, 256 }; mp mp_const[] = { - { &mpw_const[0], &mpw_const[0], 0, MP_CONST, 0 }, - { &mpw_const[0], &mpw_const[0] + 1, 1, MP_CONST, 0 }, - { &mpw_const[1], &mpw_const[1] + 1, 1, MP_CONST, 0 }, - { &mpw_const[2], &mpw_const[2] + 1, 1, MP_CONST, 0 }, - { &mpw_const[3], &mpw_const[3] + 1, 1, MP_CONST, 0 }, - { &mpw_const[4], &mpw_const[4] + 1, 1, MP_CONST, 0 }, - { &mpw_const[5], &mpw_const[5] + 1, 1, MP_CONST, 0 }, - { &mpw_const[0], &mpw_const[0] + 1, 1, MP_CONST | MP_NEG, 0 }, + { &mpw_const[0], &mpw_const[0], 0, 0, MP_CONST, 0 }, + { &mpw_const[0], &mpw_const[0] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[1], &mpw_const[1] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[2], &mpw_const[2] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[3], &mpw_const[3] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[4], &mpw_const[4] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[5], &mpw_const[5] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[6], &mpw_const[6] + 1, 1, 0, MP_CONST, 0 }, + { &mpw_const[0], &mpw_const[0] + 1, 1, 0, MP_CONST | MP_NEG, 0 }, + { 0, mpw_const, 1, 0, MP_CONST | MP_BURN, 0 }, }; /*----- That's all, folks -------------------------------------------------*/