openssl/openssl

The `OSSL_PKEY_PARAM_BITS` is under-documented

Closed

#28,337 opened on Aug 25, 2025

 (0 comments) (0 reactions) (0 assignees)C (11,262 forks)batch import
branch: 3.5branch: masterhelp wantedtriaged: documentation

Repository metrics

Stars
 (30,157 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

The parameter OSSL_PKEY_PARAM_BITS is under-documented. The only reference to that is in the manual page for provider-keymgmt, only saying its cryptosystem-specific:

https://github.com/openssl/openssl/blob/53eb2363a1e6336a40a64b3f7b9f09eca95fabef/doc/man7/provider-keymgmt.pod?plain=1#L382-L386

But neither of the cryptosystems specifies this parameter in the documentation nor its explicit meaning. In case of RSA, its mostly intuitive what bits should mean and what value we should expect, but in newer cryptosystems, such as ML-DSA, this is not obvious.

From the code (with help of @beldmit to de-obfuscate the provider implementation), it looks like for the ML-DSA and SLH-DSA it also means the bit size of public key, but its not documented anywhere and it is left for the user to guess (or dig very very deep in the code).

Please, add to each of the PKEY cryptosystem documentation the meaning of this (or other missing) parameters.

Contributor guide