EVP_PKEY_get_int_param is not getting degree from EC key
Tomas Mraz
tomas at openssl.org
Tue Jan 4 17:08:58 UTC 2022
On Tue, 2022-01-04 at 17:02 +0000, Blumenthal, Uri - 0553 - MITLL
wrote:
> > > In other words, the man page says it's unsigned int, but in fact
> > it's
> > > BIGNUM? Because the pointer I gave was to "unsigned int", like
> > in the
> > > OP's code.
> >
> > The param is too big to fit into int. If you were using some
> > ridiculously small EC curve the call would succeed. The parameter
> > types
> > != C types and the manual page does not say "unsigned int" but
> > "unsigned integer" for a reason.
>
> Yes, that makes sense.
>
> But, considering that the man pages describe C API, wouldn't it be
> nice to mention (even though it may be obvious that a number of order
> 2^384 might not fit into 32 or even 64 bits) that the actual type is
> BIGNUM?
No, the type is not a BIGNUM. Please read "man OSSL_PARAM" it contains
the information on what types OSSL_PARAM support.
> Also, what should arguments to that C call EVP_PKEY_get_int_param()
> look like to succeed? Do I need to pass a pointer to BN there???
Please read "man EVP_PKEY_get_int_param".
--
Tomáš Mráz, OpenSSL
More information about the openssl-users
mailing list