# man > RSA-PSS(7SSL)

---
type: CommandReference
command: RSA-PSS
mode: man
section: 7SSL
source: man-pages
---

## Quick Reference
- Generate an RSA-PSS key with no restrictions: use `EVP_PKEY_keygen` with `RSA-PSS` algorithm.
- Restrict the message digest for the key: set `EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md)` before generation.
- Restrict the MGF1 digest: set `EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md)`.
- Restrict the minimum salt length: set `EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len)`.
- Sign data using the RSA-PSS key: call `EVP_PKEY_sign(ctx, sig, &siglen, tbs, tbslen)`. The padding mode is always PSS; if the key has restrictions, parameters are automatically enforced.
- Verify a signature: call `EVP_PKEY_verify(ctx, sig, siglen, tbs, tbslen)` with the same PSS restrictions.

## Name
RSA-PSS — EVP_PKEY RSA-PSS algorithm support

## Synopsis
The **RSA-PSS** EVP_PKEY implementation is a restricted RSA algorithm that supports only signing, verification, and key generation using PSS padding. Optional parameter restrictions (digest, MGF1 digest, salt length) can be embedded in the key and enforced automatically during signing.

## Options
**Key generation controls** (set via `EVP_PKEY_CTX`):

- `EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md)` — Set the message digest to use for PSS (restricts the key to this digest).
- `EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md)` — Set the MGF1 digest (restricts MGF1).
- `EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len)` — Set the minimum salt length (0 for maximum length, or a specific value).

The padding mode is always PSS and cannot be changed. All other RSA control operations are shared but subject to these constraints.

## See Also
- [EVP_PKEY_CTX_set_rsa_pss_keygen_md(3)](/phpMan.php/man/EVP_PKEY_CTX_set_rsa_pss_keygen_md/3/markdown)
- [EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(3)](/phpMan.php/man/EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md/3/markdown)
- [EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(3)](/phpMan.php/man/EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen/3/markdown)
- [EVP_PKEY_CTX_new(3)](/phpMan.php/man/EVP_PKEY_CTX_new/3/markdown)
- [EVP_PKEY_CTX_ctrl_str(3)](/phpMan.php/man/EVP_PKEY_CTX_ctrl_str/3/markdown)
- [EVP_PKEY_derive(3)](/phpMan.php/man/EVP_PKEY_derive/3/markdown)