---
name: "EVP_PKEY_CTX_set_params"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/EVP_PKEY_CTX_set_params"
---

# EVP\_PKEY\_CTX\_set\_params(3ssl)

provider parameter passing operations

## NAME

EVP\_PKEY\_CTX\_set\_params, EVP\_PKEY\_CTX\_settable\_params, EVP\_PKEY\_CTX\_get\_params, EVP\_PKEY\_CTX\_gettable\_params - provider parameter passing operations

## SYNOPSIS

```
 #include <openssl/evp.h>
 int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
 const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
 int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
 const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
```

## DESCRIPTION

The **EVP\_PKEY\_CTX\_get\_params()** and **EVP\_PKEY\_CTX\_set\_params()** functions allow transfer of arbitrary key parameters to and from providers. Not all parameters may be supported by all providers. See **OSSL\_PROVIDER**(3) for more information on providers. The *params* field is a pointer to a list of **OSSL\_PARAM** structures, terminated with a **OSSL\_PARAM\_END**(3) struct. See **OSSL\_PARAM**(3) for information about passing parameters. These functions must only be called after the EVP\_PKEY\_CTX has been initialised for use in an operation. These methods replace the **EVP\_PKEY\_CTX\_ctrl()** mechanism. (EVP\_PKEY\_CTX\_ctrl now calls these methods internally to interact with providers).

**EVP\_PKEY\_CTX\_gettable\_params()** and **EVP\_PKEY\_CTX\_settable\_params()** get a constant **OSSL\_PARAM**(3) array that describes the gettable and settable parameters for the current algorithm implementation, i.e. parameters that can be used with **EVP\_PKEY\_CTX\_get\_params()** and **EVP\_PKEY\_CTX\_set\_params()** respectively. These functions must only be called after the EVP\_PKEY\_CTX has been initialised for use in an operation.

### Parameters

Examples of EVP\_PKEY parameters include the following:

"Common parameters" in **provider-keymgmt**(7) "Key Exchange parameters" in **provider-keyexch**(7) "Signature parameters" in **provider-signature**(7)

"Common RSA parameters" in **EVP\_PKEY-RSA**(7) "RSA key generation parameters" in **EVP\_PKEY-RSA**(7) "FFC parameters" in **EVP\_PKEY-FFC**(7) "FFC key generation parameters" in **EVP\_PKEY-FFC**(7) "DSA parameters" in **EVP\_PKEY-DSA**(7) "DSA key generation parameters" in **EVP\_PKEY-DSA**(7) "DH parameters" in **EVP\_PKEY-DH**(7) "DH key generation parameters" in **EVP\_PKEY-DH**(7) "Common EC parameters" in **EVP\_PKEY-EC**(7) "Common X25519, X448, ED25519 and ED448 parameters" in **EVP\_PKEY-X25519**(7) "Common LMS parameters" in **EVP\_PKEY-LMS**(7) "Common parameters" in **EVP\_PKEY-ML-DSA**(7) "Common parameters" in **EVP\_PKEY-ML-KEM**(7)

## RETURN VALUES

**EVP\_PKEY\_CTX\_set\_params()** returns 1 for success or 0 otherwise. **EVP\_PKEY\_CTX\_settable\_params()** returns an OSSL\_PARAM array on success or NULL on error. It may also return NULL if there are no settable parameters available.

All other functions and macros described on this page return a positive value for success and 0 or a negative value for failure. In particular a return value of -2 indicates the operation is not supported by the public key algorithm.

## NOTES

LMS support is disabled by default at compile-time. To enable, specify the **enable-lms** build configuration option.

## SEE ALSO

**EVP\_PKEY\_CTX\_new**(3), **EVP\_PKEY\_encrypt**(3), **EVP\_PKEY\_decrypt**(3), **EVP\_PKEY\_sign**(3), **EVP\_PKEY\_verify**(3), **EVP\_PKEY\_verify\_recover**(3), **EVP\_PKEY\_derive**(3), **EVP\_PKEY\_keygen**(3)

## HISTORY

All functions were added in OpenSSL 3.0.

Support for **ML-DSA**\> and **ML-KEM** was added in OpenSSL 3.5.

Support for **LMS** was added in OpenSSL 3.6.

## COPYRIGHT

Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License").  You may not use this file except in compliance with the License.  You can obtain a copy in the file LICENSE in the source distribution or at \<https://www.openssl.org/source/license.html\>.
