summaryrefslogtreecommitdiff
path: root/beecrypt/dldp.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-09-19 16:16:15 +0000
committerjbj <devnull@localhost>2001-09-19 16:16:15 +0000
commit02c1189d5951c70f632482fc0a674af35e9ea15d (patch)
tree5d8020b8d3fdca7f57d27097cbb6c44aa91e2c70 /beecrypt/dldp.h
parent7aea4d1e958c385d5ecd01638a3f295426ccf15c (diff)
downloadlibrpm-tizen-02c1189d5951c70f632482fc0a674af35e9ea15d.tar.gz
librpm-tizen-02c1189d5951c70f632482fc0a674af35e9ea15d.tar.bz2
librpm-tizen-02c1189d5951c70f632482fc0a674af35e9ea15d.zip
Add autogen.sh et al to build from CVS.
First pass at lclint annotations. CVS patchset: 5062 CVS date: 2001/09/19 16:16:15
Diffstat (limited to 'beecrypt/dldp.h')
-rw-r--r--beecrypt/dldp.h53
1 files changed, 34 insertions, 19 deletions
diff --git a/beecrypt/dldp.h b/beecrypt/dldp.h
index 62a5504d8..8775d1f5d 100644
--- a/beecrypt/dldp.h
+++ b/beecrypt/dldp.h
@@ -5,7 +5,7 @@
*
* <conformance statement for IEEE P1363 needed here>
*
- * Copyright (c) 2000 Virtual Unlimited B.V.
+ * Copyright (c) 2000, 2001 Virtual Unlimited B.V.
*
* Author: Bob Deblier <bob@virtualunlimited.com>
*
@@ -34,11 +34,11 @@
/*
* Discrete Logarithm Domain Parameters - Prime
*
- * Standard definition where p = 2qr+1; in case where p=2q+1, r=1
+ * Standard definition where p = qr+1; in case where p=2q+1, r=2
*
- * IEEE P1363 definition is p = rk+1
+ * In IEEE P1363 naming is p = rk+1
*
- * Hence, IEEE r = q and IEEE cofactor k = 2 or k = 2r
+ * Hence, IEEE prime r = q and cofactor k = r
*
* Make sure q is large enough to foil Pohlig-Hellman attacks
* See: "Handbook of Applied Cryptography", Chapter 3.6.4
@@ -65,55 +65,70 @@ extern "C" {
*/
BEEDLLAPI
-void dldp_pInit(dldp_p*);
+int dldp_pInit(dldp_p* dp)
+ /*@modifies dp */;
BEEDLLAPI
-void dldp_pFree(dldp_p*);
+int dldp_pFree(dldp_p* dp)
+ /*@modifies dp */;
BEEDLLAPI
-void dldp_pCopy(dldp_p*, const dldp_p*);
+int dldp_pCopy(dldp_p* dp, const dldp_p*)
+ /*@modifies dp */;
/*
* Functions for generating keys
*/
BEEDLLAPI
-void dldp_pPrivate(const dldp_p*, randomGeneratorContext*, mp32number*);
+int dldp_pPrivate(const dldp_p* dp, randomGeneratorContext* rgc, mp32number* x)
+ /*@modifies dp, x */;
BEEDLLAPI
-void dldp_pPublic (const dldp_p*, const mp32number*, mp32number*);
+int dldp_pPublic (const dldp_p* dp, const mp32number* x, mp32number* y)
+ /*@modifies y */;
BEEDLLAPI
-void dldp_pPair (const dldp_p*, randomGeneratorContext*, mp32number*, mp32number*);
+int dldp_pPair (const dldp_p* dp, randomGeneratorContext* rgc, mp32number* x, mp32number* y)
+ /*@modifies x, y */;
/*
* Function for comparing domain parameters
*/
BEEDLLAPI
-int dldp_pEqual (const dldp_p*, const dldp_p*);
+int dldp_pEqual (const dldp_p* dp, const dldp_p*)
+ /*@*/;
/*
* Functions for generating and validating dldp_pgoq variant domain parameters
*/
BEEDLLAPI
-void dldp_pgoqMake (dldp_p*, randomGeneratorContext*, uint32, uint32, int);
+int dldp_pgoqMake (dldp_p* dp, randomGeneratorContext* rgc, uint32, uint32, int)
+ /*@modifies dp, rgc */;
BEEDLLAPI
-void dldp_pgoqMakeSafe (dldp_p*, randomGeneratorContext*, uint32);
+int dldp_pgoqMakeSafe (dldp_p* dp, randomGeneratorContext* rgc, uint32)
+ /*@modifies dp, rgc */;
BEEDLLAPI
-void dldp_pgoqGenerator(dldp_p*, randomGeneratorContext*);
+int dldp_pgoqGenerator(dldp_p* dp, randomGeneratorContext* rgc)
+ /*@modifies dp */;
BEEDLLAPI
-int dldp_pgoqValidate (const dldp_p*, randomGeneratorContext*, int);
+int dldp_pgoqValidate (const dldp_p*, randomGeneratorContext* rgc, int)
+ /*@*/;
/*
* Functions for generating and validating dldp_pgon variant domain parameters
*/
BEEDLLAPI
-void dldp_pgonMake (dldp_p*, randomGeneratorContext*, uint32, uint32);
+int dldp_pgonMake (dldp_p* dp, randomGeneratorContext* rgc, uint32, uint32)
+ /*@modifies dp, rgc */;
BEEDLLAPI
-void dldp_pgonMakeSafe (dldp_p*, randomGeneratorContext*, uint32);
+int dldp_pgonMakeSafe (dldp_p* dp, randomGeneratorContext* rgc, uint32)
+ /*@modifies dp, rgc */;
BEEDLLAPI
-void dldp_pgonGenerator(dldp_p*, randomGeneratorContext*);
+int dldp_pgonGenerator(dldp_p* dp, randomGeneratorContext* rgc)
+ /*@modifies dp */;
BEEDLLAPI
-int dldp_pgonValidate (const dldp_p*, randomGeneratorContext*);
+int dldp_pgonValidate (const dldp_p* dp, randomGeneratorContext* rgc)
+ /*@*/;
#ifdef __cplusplus
}