KeyGenOptions

interface KeyGenOptions

KeyGenOptions serves as an interface defining options or parameters that influence cryptographic key generation within the KeyGenerator interface.

The cryptographic key generation process may be influenced by various parameters, such as key size, secure random generation strategies, or specific curve parameters for elliptic curve cryptography. Implementations of KeyGenOptions may encapsulate such parameters, providing a structured means to specify them during key generation.

Concrete implementations of KeyGenOptions should document and validate their specific parameters, ensuring they are appropriate for the intended cryptographic algorithm or method. Developers are encouraged to make use of KeyGenOptions to configure their key generation processes to meet their security and performance requirements.

Example Usage:

val keyGenOptions: KeyGenOptions = ...
val keyGenerator: KeyGenerator = ...
val privateKey: Jwk = keyGenerator.generatePrivateKey(keyGenOptions)

Note:

While it may not be mandatory to specify key generation options during key generation, implementations must ensure that secure defaults are utilized when options are not provided.