Major memory management overhaul. Added arena support. Use the secure
[u/mdw/catacomb] / mp-const.c
index 2119470..f98da7c 100644 (file)
@@ -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
  *
 /*----- 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.
  *
 
 /*----- 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 -------------------------------------------------*/