diff options
author | Rich Salz <rsalz@openssl.org> | 2016-09-05 18:08:43 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-09-06 10:42:01 -0400 |
commit | 01c09f9fde5793e0b3712d602b02e2aed4908e8d (patch) | |
tree | 8dffd9ac9fd1f8525fe8c7bcc81ba636108fe242 /doc/crypto/BN_bn2bin.pod | |
parent | 77a42b5f177e308233ab108806c48b9590a780e2 (diff) | |
download | openssl-01c09f9fde5793e0b3712d602b02e2aed4908e8d.tar.gz |
Misc BN fixes
Never output -0; make "negative zero" an impossibility.
Do better checking on BN_rand top/bottom requirements and #bits.
Update doc.
Ignoring trailing garbage in BN_asc2bn.
Port this commit from boringSSL: https://boringssl.googlesource.com/boringssl/+/899b9b19a4cd3fe526aaf5047ab9234cdca19f7d%5E!/
Ensure |BN_div| never gives negative zero in the no_branch code.
Have |bn_correct_top| fix |bn->neg| if the input is zero so that we
don't have negative zeros lying around.
Thanks to Brian Smith for noticing.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'doc/crypto/BN_bn2bin.pod')
-rw-r--r-- | doc/crypto/BN_bn2bin.pod | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/crypto/BN_bn2bin.pod b/doc/crypto/BN_bn2bin.pod index 14b152e430..b272010ba0 100644 --- a/doc/crypto/BN_bn2bin.pod +++ b/doc/crypto/BN_bn2bin.pod @@ -57,6 +57,7 @@ including the leading character '-' which means negative, to form a valid hexadecimal number representation and converts them to a B<BIGNUM> and stores it in **B<bn>. If *B<bn> is NULL, a new B<BIGNUM> is created. If B<bn> is NULL, it only computes the length of valid representation. +A "negative zero" is converted to zero. BN_dec2bn() is the same using the decimal system. BN_print() and BN_print_fp() write the hexadecimal encoding of B<a>, |