projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a new multiplication function from an Ascom white paper to resist
[u/mdw/catacomb]
/
key-binary.c
diff --git
a/key-binary.c
b/key-binary.c
index
4459ff1
..
3e67d96
100644
(file)
--- a/
key-binary.c
+++ b/
key-binary.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: key-binary.c,v 1.
1 2000/02/12 18:21:02
mdw Exp $
+ * $Id: key-binary.c,v 1.
2 2000/06/17 11:25:20
mdw Exp $
*
* Key binary encoding
*
*
* Key binary encoding
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: key-binary.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: key-binary.c,v $
+ * Revision 1.2 2000/06/17 11:25:20 mdw
+ * Use secure memory interface from MP library.
+ *
* Revision 1.1 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
* Revision 1.1 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
@@
-97,9
+100,7
@@
int key_decode(const void *p, size_t sz, key_data *k)
/* --- Multiprecision integer data --- */
case KENC_MP:
/* --- Multiprecision integer data --- */
case KENC_MP:
- k->u.m = mp_loadb(MP_NEW, q + 4, psz);
- if (k->e & KF_BURN)
- mp_burn(k->u.m);
+ k->u.m = mp_loadb(k->e & KF_BURN ? MP_NEWSEC : MP_NEW, q + 4, psz);
break;
/* --- Structured key data --- */
break;
/* --- Structured key data --- */