EVP_PKEY_get_int_param is not getting degree from EC key -> man page use of integer for BIGNUM

Kenneth Goldman kgoldman at us.ibm.com
Tue Jan 11 18:37:40 UTC 2022


> From: openssl-users <openssl-users-bounces at openssl.org> On Behalf Of
> Blumenthal, Uri - 0553 - MITLL
> Sent: Wednesday, January 5, 2022 6:41 PM
> To: Dr Paul Dale <pauli at openssl.org>; openssl-users at openssl.org
> Subject: [EXTERNAL] Re: EVP_PKEY_get_int_param is not getting degree from
> EC key
> 
> The problem that I see is that there's a set of parameters (such as
> OSSL_PKEY_PARAM_EC_COFACTOR), not described in the man pages, with
> under-specified type.
> E.g., how is one to know where's "normal" ~~sloppiness~~ imperfection in
> writing, and where "unsigned integer" truly means 'NOT C type "unsigned int"',
> especially since it's all in a C API description (so one tends to expect C types,
> unless CLEARLY stated otherwise)?
> 
> Beneficial - would be a man page that lists these parameters, their types, and
> the appropriate method for retrieving them (e.g., EVP_PKEY_get_int_param()
> or EVP_PKEY_get_bn_param()).
> 
> I support specifying the type in the comments as "unsigned BIGNUM" over
> "just adding a note".
>     >

I like this suggestion.  I had the same issue with 

https://www.openssl.org/docs/man3.0/man7/EVP_PKEY-EC.html

which uses 'unsigned integer' to mean a BIGNUM.

https://www.mail-archive.com/openssl-users@openssl.org/msg90149.html

The C language uses 'integer' to mean a basic type of various lengths - 8,16,32, etc
bot surely not a structure or pointer.

https://www.gnu.org/software/libc/manual/html_node/Integers.html

I think integer has a common enough understanding in C that OpenSSL
should use a different term for a BIGNUM.


More information about the openssl-users mailing list