From c695ebe2a09cb7f9aaec3c435ab94d36a6d6aece Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 16 Jan 2015 09:21:50 +0000 Subject: Additional comment changes for reformat of 1.0.2 Reviewed-by: Tim Hudson --- crypto/bn/bn.h | 3 ++- crypto/bn/bn_const.c | 24 ++++++++++++++++-------- crypto/bn/bn_div.c | 2 +- crypto/bn/bn_gf2m.c | 3 ++- crypto/bn/bn_kron.c | 3 ++- crypto/bn/bn_print.c | 3 ++- 6 files changed, 25 insertions(+), 13 deletions(-) (limited to 'crypto/bn') diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 5a00c874dc..fc89691f54 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -636,7 +636,8 @@ int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r^2 + r = a mod p */ #define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) -/* Some functions allow for representation of the irreducible polynomials +/*- + * Some functions allow for representation of the irreducible polynomials * as an unsigned int[], say p. The irreducible f(t) is then of the form: * t^p[0] + t^p[1] + ... + t^p[k] * where m = p[0] > p[1] > ... > p[k] = 0. diff --git a/crypto/bn/bn_const.c b/crypto/bn/bn_const.c index eb60a25b3c..b23bf2b631 100755 --- a/crypto/bn/bn_const.c +++ b/crypto/bn/bn_const.c @@ -3,7 +3,8 @@ #include "bn.h" -/* "First Oakley Default Group" from RFC2409, section 6.1. +/*- + * "First Oakley Default Group" from RFC2409, section 6.1. * * The prime is: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } * @@ -26,7 +27,8 @@ BIGNUM *get_rfc2409_prime_768(BIGNUM *bn) return BN_bin2bn(RFC2409_PRIME_768,sizeof(RFC2409_PRIME_768),bn); } -/* "Second Oakley Default Group" from RFC2409, section 6.2. +/*- + * "Second Oakley Default Group" from RFC2409, section 6.2. * * The prime is: 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }. * @@ -52,7 +54,8 @@ BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn) return BN_bin2bn(RFC2409_PRIME_1024,sizeof(RFC2409_PRIME_1024),bn); } -/* "1536-bit MODP Group" from RFC3526, Section 2. +/*- + * "1536-bit MODP Group" from RFC3526, Section 2. * * The prime is: 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 } * @@ -83,7 +86,8 @@ BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn) return BN_bin2bn(RFC3526_PRIME_1536,sizeof(RFC3526_PRIME_1536),bn); } -/* "2048-bit MODP Group" from RFC3526, Section 3. +/*- + * "2048-bit MODP Group" from RFC3526, Section 3. * * The prime is: 2^2048 - 2^1984 - 1 + 2^64 * { [2^1918 pi] + 124476 } * @@ -119,7 +123,8 @@ BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn) return BN_bin2bn(RFC3526_PRIME_2048,sizeof(RFC3526_PRIME_2048),bn); } -/* "3072-bit MODP Group" from RFC3526, Section 4. +/*- + * "3072-bit MODP Group" from RFC3526, Section 4. * * The prime is: 2^3072 - 2^3008 - 1 + 2^64 * { [2^2942 pi] + 1690314 } * @@ -165,7 +170,8 @@ BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn) return BN_bin2bn(RFC3526_PRIME_3072,sizeof(RFC3526_PRIME_3072),bn); } -/* "4096-bit MODP Group" from RFC3526, Section 5. +/*- + * "4096-bit MODP Group" from RFC3526, Section 5. * * The prime is: 2^4096 - 2^4032 - 1 + 2^64 * { [2^3966 pi] + 240904 } * @@ -222,7 +228,8 @@ BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn) return BN_bin2bn(RFC3526_PRIME_4096,sizeof(RFC3526_PRIME_4096),bn); } -/* "6144-bit MODP Group" from RFC3526, Section 6. +/*- + * "6144-bit MODP Group" from RFC3526, Section 6. * * The prime is: 2^6144 - 2^6080 - 1 + 2^64 * { [2^6014 pi] + 929484 } * @@ -300,7 +307,8 @@ BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn) return BN_bin2bn(RFC3526_PRIME_6144,sizeof(RFC3526_PRIME_6144),bn); } -/* "8192-bit MODP Group" from RFC3526, Section 7. +/*- + * "8192-bit MODP Group" from RFC3526, Section 7. * * The prime is: 2^8192 - 2^8128 - 1 + 2^64 * { [2^8062 pi] + 4743158 } * diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 3c59981163..94c6ec0444 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -131,7 +131,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, && !defined(PEDANTIC) && !defined(BN_DIV3W) # if defined(__GNUC__) && __GNUC__>=2 # if defined(__i386) || defined (__i386__) - /* + /*- * There were two reasons for implementing this template: * - GNU C generates a call to a function (__udivdi3 to be exact) * in reply to ((((BN_ULLONG)n0)< p[1] > ... > p[k] = 0. diff --git a/crypto/bn/bn_kron.c b/crypto/bn/bn_kron.c index 740359b752..6c0cd08210 100644 --- a/crypto/bn/bn_kron.c +++ b/crypto/bn/bn_kron.c @@ -66,7 +66,8 @@ int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) int ret = -2; /* avoid 'uninitialized' warning */ int err = 0; BIGNUM *A, *B, *tmp; - /* In 'tab', only odd-indexed entries are relevant: + /*- + * In 'tab', only odd-indexed entries are relevant: * For any odd BIGNUM n, * tab[BN_lsw(n) & 7] * is $(-1)^{(n^2-1)/8}$ (using TeX notation). diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 1743b6a7e2..739564da5f 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -108,7 +108,8 @@ char *BN_bn2dec(const BIGNUM *a) BIGNUM *t=NULL; BN_ULONG *bn_data=NULL,*lp; - /* get an upper bound for the length of the decimal integer + /*- + * get an upper bound for the length of the decimal integer * num <= (BN_num_bits(a) + 1) * log(2) * <= 3 * BN_num_bits(a) * 0.1001 + log(2) + 1 (rounding error) * <= BN_num_bits(a)/10 + BN_num_bits/1000 + 1 + 1 -- cgit v1.2.3