Skip to content

Crypto

Crypto configuration manages the public key infrastructure (PKI) on NX-OS. Key pairs (crypto key generate) create the RSA or ECC keys a device uses for its identity certificates, and certificate authority trustpoints (crypto ca trustpoint) bind a key pair to a CA, define the enrollment method and control how peer certificates are checked for revocation. Trustpoints are referenced by features that use certificates, such as NX-API, syslog over TLS and RADIUS over TLS/DTLS. CA authentication and certificate import are operational steps that remain outside the data model.

Key pairs cannot be changed after they have been generated. To change the type, modulus or exportable setting of a key pair, remove it and add it again.

Diagram
NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
cryptoClasscryptoNo

NameTypeConstraintMandatoryDefault Value
keysListkeysNo
ca_trustpointsListca_trustpointsNo

NameTypeConstraintMandatoryDefault Value
labelStringYes
typeChoicersa, eccNo
exportableBooleantrue, falseNo
modulusChoice224, 384, 512, 521, 768, 1024, 1536, 2048, 3072, 4096No

ca_trustpoints (nxos.devices.configuration.crypto)

Section titled “ca_trustpoints (nxos.devices.configuration.crypto)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
enrollment_terminalBooleantrue, falseNo
rsakeypairStringNo
ecckeypairStringNo
cabundleStringNo
revocation_checkListChoice[crl, ocsp, none]No
ocsp_urlStringNo

Example 1: ECC key pair and trustpoint for terminal enrollment

nxos:
devices:
- name: LEAF1
configuration:
crypto:
keys:
- label: LEAF1-KEY
type: ecc
modulus: 384
exportable: true
ca_trustpoints:
- name: CORP-CA
enrollment_terminal: true
ecckeypair: LEAF1-KEY
revocation_check:
- crl
- none

Example 2: RSA key pair and trustpoint with a CA bundle and OCSP revocation checking

nxos:
devices:
- name: SPINE1
configuration:
crypto:
keys:
- label: SPINE1-RSA
type: rsa
modulus: 2048
ca_trustpoints:
- name: ISSUING-CA
enrollment_terminal: true
rsakeypair: SPINE1-RSA
cabundle: CORP-CA-BUNDLE
ocsp_url: http://ocsp.example.com:80
revocation_check:
- ocsp
- crl
- none