From cbeb0b26e4c7caa8d1b47de791a7418dc20a4567 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 1 Apr 2006 19:24:03 +0000 Subject: Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. --- src/libsec/port/dsaprimes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libsec/port/dsaprimes.c') diff --git a/src/libsec/port/dsaprimes.c b/src/libsec/port/dsaprimes.c index ff1dd5d8..72546f15 100644 --- a/src/libsec/port/dsaprimes.c +++ b/src/libsec/port/dsaprimes.c @@ -2,12 +2,12 @@ #include #include -// NIST algorithm for generating DSA primes -// Menezes et al (1997) Handbook of Applied Cryptography, p.151 -// q is a 160-bit prime; p is a 1024-bit prime; q divides p-1 +/* NIST algorithm for generating DSA primes */ +/* Menezes et al (1997) Handbook of Applied Cryptography, p.151 */ +/* q is a 160-bit prime; p is a 1024-bit prime; q divides p-1 */ -// arithmetic on unsigned ints mod 2**160, represented -// as 20-byte, little-endian uchar array +/* arithmetic on unsigned ints mod 2**160, represented */ +/* as 20-byte, little-endian uchar array */ static void Hrand(uchar *s) @@ -29,7 +29,7 @@ Hincr(uchar *s) break; } -// this can run for quite a while; be patient +/* this can run for quite a while; be patient */ void DSAprimes(mpint *q, mpint *p, uchar seed[SHA1dlen]) { @@ -58,7 +58,7 @@ forever: Hs[19] |= 0x80; letomp(Hs, 20, q); }while(!probably_prime(q, 18)); - if(seed != nil) // allow skeptics to confirm computation + if(seed != nil) /* allow skeptics to confirm computation */ memmove(seed, s, SHA1dlen); i = 0; j = 2; -- cgit v1.2.3