[refactor] BIGNUM: Modify bin2bn() to work from least to most significant chunk
authorRichard Levitte <levitte@openssl.org>
Wed, 24 Nov 2021 07:23:02 +0000 (08:23 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 20 Jan 2022 16:57:39 +0000 (17:57 +0100)
commitc30de601850f367e4c16ad91c0168a2e0dc647c0
tree92ba1e509952ce31225beebb62b1ffbcfacd9588
parent99d3349d6f4b62c89d0cbcd6200cbc9bda388c52
[refactor] BIGNUM: Modify bin2bn() to work from least to most significant chunk

This will make it easier to introduce the possibility for signed input
numbers.

We also refactor the inner loop to simplify the calculation of each
bignum chunk.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17139)
crypto/bn/bn_lib.c