openssl (version 0.9.1)

keygen: Generate Key pair

Description

The keygen functions generate a random private key. Use as.list(key)$pubkey to derive the corresponding public key.

Usage

rsa_keygen(bits = 2048)

dsa_keygen(bits = 1024)

ec_keygen(curve = c("P-256", "P-384", "P-521"))

Arguments

bits
bitsize of the generated RSA/DSA key
curve
which NIST curve to use

Examples

Run this code
key <- rsa_keygen()
pubkey <- as.list(key)$pubkey

Run the code above in your browser using DataCamp Workspace