projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c41d51
)
Give generic random objects separate namespaces for their supported misc
author
mdw
<mdw>
Sat, 3 Feb 2001 16:07:33 +0000
(16:07 +0000)
committer
mdw
<mdw>
Sat, 3 Feb 2001 16:07:33 +0000
(16:07 +0000)
ops.
bbs.h
patch
|
blob
|
blame
|
history
grand.h
patch
|
blob
|
blame
|
history
rand.h
patch
|
blob
|
blame
|
history
diff --git
a/bbs.h
b/bbs.h
index
7217f65
..
b83b87f
100644
(file)
--- a/
bbs.h
+++ b/
bbs.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: bbs.h,v 1.
5 2000/07/01 11:20:24
mdw Exp $
+ * $Id: bbs.h,v 1.
6 2001/02/03 16:07:33
mdw Exp $
*
* The Blum-Blum-Shub random bit generator
*
*
* The Blum-Blum-Shub random bit generator
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: bbs.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: bbs.h,v $
+ * Revision 1.6 2001/02/03 16:07:33 mdw
+ * Give generic random objects separate namespaces for their supported misc
+ * ops.
+ *
* Revision 1.5 2000/07/01 11:20:24 mdw
* New functions for freeing public and private keys. Remove bad type name
* `bbs_param'.
* Revision 1.5 2000/07/01 11:20:24 mdw
* New functions for freeing public and private keys. Remove bad type name
* `bbs_param'.
@@
-305,7
+309,7
@@
extern grand *bbs_rand(mp */*m*/, mp */*x*/);
/* --- Blum-Blum-Shub-specific misc op codes --- */
enum {
/* --- Blum-Blum-Shub-specific misc op codes --- */
enum {
- BBS_SET = GRAND_SPECIFIC /* @mp *x@ */
+ BBS_SET = GRAND_SPECIFIC
('B')
/* @mp *x@ */
};
/*----- That's all, folks -------------------------------------------------*/
};
/*----- That's all, folks -------------------------------------------------*/
diff --git
a/grand.h
b/grand.h
index
54083d2
..
7b6fdbb
100644
(file)
--- a/
grand.h
+++ b/
grand.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: grand.h,v 1.
2 2000/06/17 11:23:11
mdw Exp $
+ * $Id: grand.h,v 1.
3 2001/02/03 16:07:33
mdw Exp $
*
* Generic interface to random number generators
*
*
* Generic interface to random number generators
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: grand.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: grand.h,v $
+ * Revision 1.3 2001/02/03 16:07:33 mdw
+ * Give generic random objects separate namespaces for their supported misc
+ * ops.
+ *
* Revision 1.2 2000/06/17 11:23:11 mdw
* Typesetting fix. Add a flags word to the generic generator.
*
* Revision 1.2 2000/06/17 11:23:11 mdw
* Typesetting fix. Add a flags word to the generic generator.
*
@@
-105,11
+109,11
@@
enum {
GRAND_SEEDUINT32, /* @uint32 i@ */
GRAND_SEEDBLOCK, /* @const void *p, size_t sz@ */
GRAND_SEEDMP, /* @mp *m@ */
GRAND_SEEDUINT32, /* @uint32 i@ */
GRAND_SEEDBLOCK, /* @const void *p, size_t sz@ */
GRAND_SEEDMP, /* @mp *m@ */
- GRAND_SEEDRAND
,
/* @grand *g@ */
+ GRAND_SEEDRAND
/* @grand *g@ */
/* --- Generator-specific operations --- */
/* --- Generator-specific operations --- */
- GRAND_SPECIFIC = 256u
+#define GRAND_SPECIFIC(ch) ((unsigned)(ch) << 8)
};
#define GRAND_BADOP assert(((void)"bad grand_misc op", 0))
};
#define GRAND_BADOP assert(((void)"bad grand_misc op", 0))
diff --git
a/rand.h
b/rand.h
index
6dbd021
..
05721fc
100644
(file)
--- a/
rand.h
+++ b/
rand.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rand.h,v 1.
7 2000/10/08 12:07:18
mdw Exp $
+ * $Id: rand.h,v 1.
8 2001/02/03 16:07:33
mdw Exp $
*
* Secure random number generator
*
*
* Secure random number generator
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: rand.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: rand.h,v $
+ * Revision 1.8 2001/02/03 16:07:33 mdw
+ * Give generic random objects separate namespaces for their supported misc
+ * ops.
+ *
* Revision 1.7 2000/10/08 12:07:18 mdw
* Remove spurious comma in enum.
*
* Revision 1.7 2000/10/08 12:07:18 mdw
* Remove spurious comma in enum.
*
@@
-306,7
+310,7
@@
extern void rand_getgood(rand_pool */*r*/, void */*p*/, size_t /*sz*/);
/* --- Miscellaneous operations --- */
enum {
/* --- Miscellaneous operations --- */
enum {
- RAND_GATE = GRAND_SPECIFIC
,
/* No args */
+ RAND_GATE = GRAND_SPECIFIC
('R'),
/* No args */
RAND_STRETCH, /* No args */
RAND_KEY, /* @const void *k, size_t sz@ */
RAND_NOISESRC, /* @const rand_source *s@ */
RAND_STRETCH, /* No args */
RAND_KEY, /* @const void *k, size_t sz@ */
RAND_NOISESRC, /* @const rand_source *s@ */