POST CSR Generation Generate
The POST /CSRGeneration/Generate method is used to generate an X.509 X.509 defines public-key certificates that bind a public key to an identity. As profiled in RFC 5280, it’s the most common certificate/CA standard for TLS (web auth), client logins, S/MIME email, VPNs, and signed documents. Certificate Signing Request
A CSR or certificate signing request is a block of encoded text that is submitted to a CA when enrolling for a certificate. When you generate a CSR within Keyfactor Command, the matching private key for it is stored in Keyfactor Command in encrypted format and will be married with the certificate once returned from the CA. in PKCS #10
The standard request format for X.509 certificates (RFC 2986). A PKCS #10 CSR includes the subject (identity) and public key, can carry requested X.509 v3 extensions via an extensionRequest (e.g., Subject Alternative Name), and is self-signed with the private key to prove possession; it isn’t a certificate, but the input you submit to a CA for issuance. format. This method returns HTTP 200 OK on a success with a message body containing the text of the CSR
A CSR or certificate signing request is a block of encoded text that is submitted to a CA when enrolling for a certificate. When you generate a CSR within Keyfactor Command, the matching private key for it is stored in Keyfactor Command in encrypted format and will be married with the certificate once returned from the CA. file created.
This method generates a private key Private keys are used in cryptography (symmetric and asymmetric) to encrypt or sign content. In asymmetric cryptography, they are used together in a key pair with a public key. The private or secret key is retained by the key's creator, making it highly secure. and stores it in the Keyfactor Command database. When you use the CSR resulting from this method to enroll for a certificate through Keyfactor Command (see POST Enrollment CSR), the resulting certificate is married together with the stored private key and may then be download with private key (see POST Certificates Recover).


- RSA
A widely used public-key cryptosystem, RSA is commonly used for encryption and digital signatures. It is based on the mathematical difficulty of factoring large integers.
- ECDSA
ECDSA (Elliptic Curve Digital Signature Algorithm) is used for digital signatures in public-key cryptography. It offers strong security with smaller key sizes compared to RSA, making it ideal for resource-constrained environments. (ECC
Elliptical curve cryptography (ECC) is a public key encryption technique based on elliptic curve theory that can be used to create faster, smaller, and more efficient cryptographic keys. ECC generates keys through the properties of the elliptic curve equation instead of the traditional method of generation as the product of very large prime numbers.)
- EdDSA
- Ed448
A high-security elliptic curve algorithm, Ed448 is used for digital signatures and is known for providing very strong security while maintaining high performance. It is part of the Edwards-curve Digital Signature Algorithm (EdDSA) family.
- Ed25519
Another member of the EdDSA family, Ed25519 is designed for high security and speed. It is widely used in modern cryptography and provides robust protection with a 256-bit key size.
- Ed448
- ML-DSA
- ML-DSA-44
A variant of the Digital Signature Algorithm (DSA) designed for high-performance and secure digital signatures. ML-DSA-44 is optimized for specific machine learning use cases or specialized systems.
- ML-DSA-65
Similar to ML-DSA-44, this variant provides a larger key size and is suited for environments requiring more robust security. It is often used in cases where cryptographic strength needs to be balanced with performance.
- ML-DSA-87
An even stronger variant of ML-DSA, offering a larger key size and enhanced security features for demanding cryptographic operations. Like the others in the ML-DSA family, it is designed for specific use cases that require high-performance cryptography.
- ML-DSA-44
- SLH-DSA
- SLH-DSA-SHA2-128s
- SLH-DSA-SHA2-128f
- SLH-DSA-SHA2-192s
- SLH-DSA-SHA2-192f
- SLH-DSA-SHA2-256s
- SLH-DSA-SHA2-256f
- SLH-DSA-SHAKE-128s
- SLH-DSA-SHAKE-128f
- SLH-DSA-SHAKE-192s
- SLH-DSA-SHAKE-192f
- SLH-DSA-SHAKE-256s
- SLH-DSA-SHAKE-256f

The following Post-Quantum Cryptography Cryptographic algorithms designed to be secure against the potential capabilities of quantum computers, which could break traditional encryption methods. (PQC
Cryptographic algorithms designed to be secure against the potential capabilities of quantum computers, which could break traditional encryption methods.) key algorithms are supported as the alternative key for enrollment:
- ML-DSA
- ML-DSA-44
- ML-DSA-65
- ML-DSA-87
- SLH-DSA
- SLH-DSA-SHA2-128s
SLH-DSA-SHA2-128f
SLH-DSA-SHA2-192s
SLH-DSA-SHA2-192f
SLH-DSA-SHA2-256s
SLH-DSA-SHA2-256f
SLH-DSA-SHAKE-128s
SLH-DSA-SHAKE-128f
SLH-DSA-SHAKE-192s
SLH-DSA-SHAKE-192f
SLH-DSA-SHAKE-256s
SLH-DSA-SHAKE-256f
The availability of these algorithms depends on the following factors:
- System-wide enrollment pattern policy
- Individual enrollment pattern policy
- Algorithms set on the certificate template
A certificate template defines the policies and rules that a CA uses when a request for a certificate is received. at the CA
A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. level (either for the selected enrollment pattern, if applicable, or the default enrollment pattern)
When configuring key information policies at the enrollment pattern level, only key sizes that are valid for the selected algorithm will be available. These sizes are determined by the system-wide policy, enrollment pattern policy, and the supported key sizes in the template configuration. For PFX A PFX file (personal information exchange format), also known as a PKCS#12 archive, is a single, password-protected certificate archive that contains both the public and matching private key and, optionally, the certificate chain. It is a common format for Windows servers. enrollment and CSR generation, you must submit a valid KeyType, and KeyLength or Curve as applicable, for the request.
Table 473: POST CSR Generation Generate Input Parameters
Name | In | Description |
---|---|---|
AlternativeCurve | Body |
A string indicating the elliptic curve for the requested alternate key. This field is in the endpoint for future support. CSR generation with ECC as a secondary key is not supported at this time. |
AlternativeKeyLength | Body |
An integer indicating the desired alternative key size of the certificate to be requested with the CSR. For the currently supported AlternativeKeyType values, the supported AlternativeKeyLength values are 0 or null. |
AlternativeKeyType | Body |
A string indicating the desired alternative key encryption algorithm of the certificate to be requested with the CSR. Supported key algorithms are:
A CSR with a secondary key using a Post-Quantum Cryptography (PQC) key algorithm can be used to enroll for a hybrid certificate (a certificate with two key pairs). |
Curve | Body |
A string indicating the elliptic curve for the requested primary key. ECC curves must be specified using the OID for the ECC algorithm. Keyfactor recommends using one of the most commonly used ECC curves when possible, if a specific alternate curve is not required. Common curves include:
If this value is not supplied and the KeyType is ECC, the value will be derived from the KeyLength if the length provided matches one of the default curves (P-256, P-384, or P-521). |
Key Length | Body |
Required in some cases. An integer indicating the desired key size of the certificate to be requested with the CSR. Supported key sizes are:
This value is required only if KeyType = RSA. |
KeyType | Body |
Required. A string indicating the desired primary key encryption algorithm of the certificate to be requested with the CSR. Supported key algorithms are:
|
SANs | Body |
An object that contains the elements for Keyfactor Command to use when generating the subject alternative name (SAN) for the certificate requested by the CSR, each of which is supplied as an array of strings. For example: Copy
|
Subject | Body |
Required. A string containing the subject name of the certificate to be requested with the CSR using X.500 format for the full distinguished name (DN). For example: Copy
|
Template | Body | A string indicating the template to use when generating the CSR. This field is optional. If both the Template and EnrollmentPatternId are provided, the settings from the enrollment pattern take precedence. Important: The template must be configured with at least one enrollment pattern in order to be used (see POST Enrollment Patterns). Note: This parameter is considered deprecated and may be removed in a future release. Important: The If you choose to select |
Enrollment Pattern Id | Body |
An integer indicating the enrollment pattern to use when generating the CSR. The enrollment pattern must have been configured in Keyfactor Command to support CSR generation. If this value is not provided, the default enrollment pattern defined for the template provided in the request (see the Template parameter) will be used, if applicable. This field is optional. If both the Template and EnrollmentPatternId are provided, the settings from the enrollment pattern take precedence. Important: The
If you choose to select |
Table 474: POST CSR Generation Generate Response Data
Name | Description |
---|---|
CSR | The text of the CSR in PEM format. |


Was this page helpful? Provide Feedback