Key Algorithms¶
A signing key's algorithm, curve or key size, and hash algorithm are set when the key is created, in the fields described in Create a New Key. They cannot be changed later, except on a REJECTED key. A CA or FW key created under a ROOT key takes the ROOT key's Generator Algorithm. An imported key takes its algorithm and parameter from the key, and its hash and signature algorithms from the certificate's signature algorithm.
Options¶
| Generator Algorithm | Signature algorithm | Parameter | Hash algorithm | Signature formats |
|---|---|---|---|---|
EC (default) | ECDSA | secp256r1 (P-256, default), secp384r1 (P-384), secp521r1 (P-521) | SHA256 (default), SHA384, SHA512 | asn1, p1363, cms |
RSA | RSA | 2048 (default), 3072, 4096 bits | SHA256 (default), SHA384, SHA512 | asn1, cms |
The Signature algorithm follows from the Generator Algorithm. The form accepts any hash algorithm with any curve or key size. The signature format is chosen per sign order, not per key; see Signature Formats.
EC (ECDSA)¶
- Compact signatures, efficient for embedded verifiers.
p1363returns the fixed-width r‖s form that embedded verifiers expect.asn1returns DER, which OpenSSL and most desktop tools expect.
RSA¶
- The most widely accepted algorithm for Authenticode (Windows executable signing), and required by some legacy tools. JSign and osslsigncode also sign Authenticode with ECDSA keys; before you choose ECDSA, confirm that the Windows versions you target accept an ECDSA code-signing chain.
- Because a key under a ROOT takes the ROOT's algorithm, an RSA FW key needs an RSA ROOT key, a self-signed FW key, or an imported key.
asn1on an RSA key is a plain PKCS#1 v1.5 signature. A sign order requestingp1363on an RSA key returns400.
Hash algorithms¶
| Hash algorithm | Typical use |
|---|---|
SHA256 | The standard choice for most uses |
SHA384 | Stronger; common with P-384 |
SHA512 | Strongest; common with P-521 |
The client hashes the data with the key's hash algorithm and submits the hash; see Hash algorithm.