[openssl-users] How to get a bye or word from BIGNUM in OpenSSL 1.1?
noloader at gmail.com
Wed Aug 2 02:21:08 UTC 2017
I'm trying to extract the low-order byte or word from a BIGNUM in
OpenSSL 1.1. We were told to use BN_bn2binpad, but its not clear to me
how to specify the location we want to extract.
const char v = "ffeeddccbbaa99887766554433221100";
BIGNUM n = BN_new();
if (BN_hex2bn(&n, v))
fprintf(stderr, "failed to parse BIGNUM\n");
I don't see how to get the low-order word 33221100, or the second to
last byte 11.
Here' the documentation but I don't see how to do it:
libraries, like Java, Botan and Crypto++ allow us to specify a potion
to extract from in cases like these.
How do we extract bytes or words from a BIGNUM?
Thanks in advance.
More information about the openssl-users