summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-04-25 20:46:38 +0000
committerjbj <devnull@localhost>2003-04-25 20:46:38 +0000
commita7467cba85c4e0ed6e28aa6f808083398f509974 (patch)
treea1df57f5501d8393cb02f80b54a2dfeb5370b4a3
parent68b7bd7ebafa868590effdcefa97e8be57d64b3b (diff)
downloadrpm-a7467cba85c4e0ed6e28aa6f808083398f509974.tar.gz
beecrypt-3.0.0 merge: grand renaming, mp32barrett et al.
CVS patchset: 6780 CVS date: 2003/04/25 20:46:38
-rw-r--r--rpmio/rpmio_internal.h4
-rw-r--r--rpmio/rpmpgp.c12
-rw-r--r--rpmio/tinv.c18
-rw-r--r--rpmio/tkey.c12
4 files changed, 23 insertions, 23 deletions
diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
index 7ff30fdad..b4ddb8c10 100644
--- a/rpmio/rpmio_internal.h
+++ b/rpmio/rpmio_internal.h
@@ -78,8 +78,8 @@ struct pgpDig_s {
size_t md5len; /*!< (rsa) V3 signature hash length. */
/* DSA parameters. */
- mp32barrett p;
- mp32barrett q;
+ mpbarrett p;
+ mpbarrett q;
mpnumber g;
mpnumber y;
mpnumber hm;
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index 80ce1a85d..2c658746e 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -689,7 +689,7 @@ static const byte * pgpPrtPubkeyParams(byte pubkey_algo,
if (_dig) {
switch (i) {
case 0: /* n */
- mp32bsethex(&_dig->rsa_pk.n, pgpMpiHex(p));
+ mpbsethex(&_dig->rsa_pk.n, pgpMpiHex(p));
/* Get the keyid */
if (_digp) {
uint32* np = _dig->rsa_pk.n.modl;
@@ -722,12 +722,12 @@ fprintf(stderr, "\t e = "), mp32println(stderr, _dig->rsa_pk.e.size, _dig->
if (_dig) {
switch (i) {
case 0: /* p */
- mp32bsethex(&_dig->p, pgpMpiHex(p));
+ mpbsethex(&_dig->p, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t p = "), mp32println(stderr, _dig->p.size, _dig->p.modl);
/*@switchbreak@*/ break;
case 1: /* q */
- mp32bsethex(&_dig->q, pgpMpiHex(p));
+ mpbsethex(&_dig->q, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t q = "), mp32println(stderr, _dig->q.size, _dig->q.modl);
/*@switchbreak@*/ break;
@@ -1073,8 +1073,8 @@ pgpDig pgpFreeDig(/*@only@*/ /*@null@*/ pgpDig dig)
/*@=branchstate@*/
dig->sha1ctx = NULL;
- mp32bfree(&dig->p);
- mp32bfree(&dig->q);
+ mpbfree(&dig->p);
+ mpbfree(&dig->q);
mpnfree(&dig->g);
mpnfree(&dig->y);
mpnfree(&dig->hm);
@@ -1095,7 +1095,7 @@ pgpDig pgpFreeDig(/*@only@*/ /*@null@*/ pgpDig dig)
/*@=branchstate@*/
dig->md5ctx = NULL;
- mp32bfree(&dig->rsa_pk.n);
+ mpbfree(&dig->rsa_pk.n);
mpnfree(&dig->rsa_pk.e);
mpnfree(&dig->m);
mpnfree(&dig->c);
diff --git a/rpmio/tinv.c b/rpmio/tinv.c
index bc7a1e224..75777852a 100644
--- a/rpmio/tinv.c
+++ b/rpmio/tinv.c
@@ -1,12 +1,12 @@
#include "system.h"
-#include "mp32barrett.h"
+#include "mpbarrett.h"
#include "mp32.h"
#include "popt.h"
#include "debug.h"
static int _debug = 0;
-static int Zmp32binv_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
+static int Zmpbinv_w(const mpbarrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
{
uint32 ysize = b->size+1;
int ubits, vbits;
@@ -123,7 +123,7 @@ fprintf(stderr, " D: "), mp32println(stderr, ysize, D);
return 1;
}
-static int Ymp32binv_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
+static int Ympbinv_w(const mpbarrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
{
uint32 ysize = b->size+1;
int k;
@@ -295,7 +295,7 @@ fprintf(stderr, " t3: "), mp32println(stderr, ysize, t3);
* needs workspace of (6*size+6) words
* @note xdata and result cannot point to the same area
*/
-static int Xmp32binv_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
+static int Xmpbinv_w(const mpbarrett* b, uint32 xsize, const uint32* xdata, uint32* result, uint32* wksp)
{
/*
* Fact: if a element of Zn, then a is invertible if and only if gcd(a,n) = 1
@@ -466,7 +466,7 @@ int
main(int argc, const char * argv[])
{
poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
- mp32barrett q;
+ mpbarrett q;
mpnumber s;
uint32 qsize;
uint32* qtemp;
@@ -481,7 +481,7 @@ main(int argc, const char * argv[])
}
}
- mp32bzero(&q); mp32bsethex(&q, dsa_q);
+ mpbzero(&q); mpbsethex(&q, dsa_q);
qsize = q.size;
qtemp = malloc((13*qsize+13) * sizeof(*qtemp));
qwksp = qtemp+2*qsize;
@@ -493,15 +493,15 @@ fprintf(stderr, "================================================== %d\n", i);
mpnzero(&s); mpnsethex(&s, dsa_s[i]);
fprintf(stderr, "-------------------------------------------------- %d\n", i);
- rc = Xmp32binv_w(&q, s.size, s.data, qtemp, qwksp);
+ rc = Xmpbinv_w(&q, s.size, s.data, qtemp, qwksp);
fprintf(stderr, "beecrypt: "); mp32println(stderr, qsize, qtemp);
fprintf(stderr, "-------------------------------------------------- %d\n", i);
- rc = Ymp32binv_w(&q, s.size, s.data, qtemp, qwksp);
+ rc = Ympbinv_w(&q, s.size, s.data, qtemp, qwksp);
fprintf(stderr, " Knuth: "); mp32println(stderr, qsize, qtemp);
fprintf(stderr, "-------------------------------------------------- %d\n", i);
- rc = Zmp32binv_w(&q, s.size, s.data, qtemp, qwksp);
+ rc = Zmpbinv_w(&q, s.size, s.data, qtemp, qwksp);
fprintf(stderr, " Brent: "); mp32println(stderr, qsize, qtemp);
fprintf(stderr, "-------------------------------------------------- %d\n", i);
diff --git a/rpmio/tkey.c b/rpmio/tkey.c
index 66c582a20..e03dba04d 100644
--- a/rpmio/tkey.c
+++ b/rpmio/tkey.c
@@ -108,8 +108,8 @@ main (int argc, char *argv[])
dig = pgpNewDig();
- mp32bzero(&dig->p); mp32bsethex(&dig->p, fips_p);
- mp32bzero(&dig->q); mp32bsethex(&dig->q, fips_q);
+ mpbzero(&dig->p); mpbsethex(&dig->p, fips_p);
+ mpbzero(&dig->q); mpbsethex(&dig->q, fips_q);
mpnzero(&dig->g); mpnsethex(&dig->g, fips_g);
mpnzero(&dig->y); mpnsethex(&dig->y, fips_y);
mpnzero(&dig->r); mpnsethex(&dig->r, fips_r);
@@ -121,8 +121,8 @@ main (int argc, char *argv[])
fprintf(stderr, "=============================== DSA FIPS-186-1: rc %d\n", rc);
- mp32bfree(&dig->p);
- mp32bfree(&dig->q);
+ mpbfree(&dig->p);
+ mpbfree(&dig->q);
mpnfree(&dig->g);
mpnfree(&dig->y);
@@ -167,8 +167,8 @@ fprintf(stderr, "\n hm = [ 160]: %s\n\n", digest);
fprintf(stderr, "=============================== DSA verify: rc %d\n", rc);
- mp32bfree(&dig->p);
- mp32bfree(&dig->q);
+ mpbfree(&dig->p);
+ mpbfree(&dig->q);
mpnfree(&dig->g);
mpnfree(&dig->y);