Whitespace cleanup in crypto
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1264)
This commit is contained in:
parent
0517ffc47c
commit
02e112a885
23 changed files with 30 additions and 31 deletions
|
@ -130,7 +130,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
|||
# endif /* OPENSSL_NO_ASM */
|
||||
|
||||
/*-
|
||||
* BN_div computes dv := num / divisor, rounding towards
|
||||
* BN_div computes dv := num / divisor, rounding towards
|
||||
* zero, and sets up rm such that dv*divisor + rm = num holds.
|
||||
* Thus:
|
||||
* dv->neg == num->neg ^ divisor->neg (unless the result is zero)
|
||||
|
|
|
@ -97,7 +97,7 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
|||
bn_check_top(m);
|
||||
|
||||
/*-
|
||||
* For even modulus m = 2^k*m_odd, it might make sense to compute
|
||||
* For even modulus m = 2^k*m_odd, it might make sense to compute
|
||||
* a^p mod m_odd and a^p mod 2^k separately (with Montgomery
|
||||
* exponentiation for the odd part), using appropriate exponent
|
||||
* reductions, and combine the results using the CRT.
|
||||
|
|
|
@ -370,7 +370,7 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
|
|||
* i.e.
|
||||
* sign*(Y + D*X)*a == B (mod |n|).
|
||||
*
|
||||
* So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
|
||||
* So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
|
||||
* -sign*X*a == B (mod |n|),
|
||||
* sign*Y*a == A (mod |n|).
|
||||
* Note that X and Y stay non-negative all the time.
|
||||
|
@ -565,7 +565,7 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
|
|||
* i.e.
|
||||
* sign*(Y + D*X)*a == B (mod |n|).
|
||||
*
|
||||
* So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
|
||||
* So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
|
||||
* -sign*X*a == B (mod |n|),
|
||||
* sign*Y*a == A (mod |n|).
|
||||
* Note that X and Y stay non-negative all the time.
|
||||
|
|
|
@ -284,7 +284,6 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
|
|||
} else
|
||||
BN_zero(group->cofactor);
|
||||
|
||||
|
||||
/*
|
||||
* Some groups have an order with
|
||||
* factors of two, which makes the Montgomery setup fail.
|
||||
|
|
|
@ -230,7 +230,7 @@ int CRYPTO_ocb128_setiv(OCB128_CONTEXT *ctx, const unsigned char *iv,
|
|||
|
||||
/*
|
||||
* Spec says IV is 120 bits or fewer - it allows non byte aligned lengths.
|
||||
* We don't support this at this stage
|
||||
* We don't support this at this stage
|
||||
*/
|
||||
if ((len > 15) || (len < 1) || (taglen > 16) || (taglen < 1)) {
|
||||
return -1;
|
||||
|
|
|
@ -582,7 +582,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
|
|||
BIO_free_all(btmp);
|
||||
BIO_free_all(etmp);
|
||||
BIO_free_all(bio);
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static BIO *PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
|
||||
|
|
|
@ -183,7 +183,7 @@ int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
|
|||
/*
|
||||
* Always do this zero-padding copy (even when num == flen) to avoid
|
||||
* leaking that information. The copy still leaks some side-channel
|
||||
* information, but it's impossible to have a fixed memory access
|
||||
* information, but it's impossible to have a fixed memory access
|
||||
* pattern since we can't read out of the bounds of |from|.
|
||||
*
|
||||
* TODO(emilia): Consider porting BN_bn2bin_padded from BoringSSL.
|
||||
|
|
|
@ -2538,7 +2538,7 @@ static int dane_match(X509_STORE_CTX *ctx, X509 *cert, int depth)
|
|||
|
||||
/*
|
||||
* If we've previously matched a PKIX-?? record, no need to test any
|
||||
* further PKIX-?? records, it remains to just build the PKIX chain.
|
||||
* further PKIX-?? records, it remains to just build the PKIX chain.
|
||||
* Had the match been a DANE-?? record, we'd be done already.
|
||||
*/
|
||||
if (dane->mdpth >= 0)
|
||||
|
|
|
@ -90,7 +90,7 @@ int BN_get_flags(const BIGNUM *b, int n);
|
|||
*/
|
||||
void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
|
||||
|
||||
/* Wrapper function to make using BN_GENCB easier, */
|
||||
/* Wrapper function to make using BN_GENCB easier */
|
||||
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
||||
|
||||
BN_GENCB *BN_GENCB_new(void);
|
||||
|
|
Loading…
Reference in a new issue