---
name: "tpm2tss_rsa_genkey"
section: "3"
platform: "linux"
package: "tpm2-tss-engine"
version: "1.2.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tpm2tss_rsa_genkey"
---

# tpm2tss\_rsa\_genkey(3)

Make an RSA key object

## NAME

**tpm2tss\_rsa\_genkey** – Make an RSA key object

## SYNOPSIS

**#include \<tpm2tss.h\>**

\*\*int tpm2tss\_rsa\_genkey(RSA *rsa, int bits, BIGNUM* e, char \*password);\*\*

## DESCRIPTION

**tpm2tss\_rsa\_genkey** issues the generation of an RSA key `rsa` using the TPM. The keylength is determined by `bits`. The exponent is determined by `e`. The new key will be protected by `password`.

## RETURN VALUE

Upon successful completion **tpm2tss\_rsa\_genkey**() returns 1. Otherwise 0.

### AUTHOR

Written by Andreas Fuchs.

### COPYRIGHT

tpm2tss is Copyright (C) 2018 Fraunhofer SIT sponsored by Infineon Technologies AG. License BSD 3-clause.

### SEE ALSO

[openssl(1)](/openssl/1.md), tpm2tss\_genkey(1)
