RecipientKeyAlgorithm Property
This property holds the algorithm associated with the key.
Syntax
ecccontrol.RecipientKeyAlgorithm[=integer]
Possible Values
eaSecp256r1(0), eaSecp384r1(1), eaSecp521r1(2), eaEd25519(3), eaEd448(4), eaX25519(5), eaX448(6), eaSecp160k1(7), eaSecp192k1(8), eaSecp224k1(9), eaSecp256k1(10)
Default Value
0
Remarks
This property holds the algorithm associated with the key. Possible values are:
- 0 (eaSecp256r1)
- 1 (eaSecp384r1)
- 2 (eaSecp521r1)
- 3 (eaEd25519)
- 4 (eaEd448)
- 5 (eaX25519)
- 6 (eaX448)
- 7 (eaSecp160k1)
- 8 (eaSecp192k1)
- 9 (eaSecp224k1)
- 10 (eaSecp256k1)
When assigning a key using the PEM formatted RecipientKeyPrivateKey and RecipientKeyPublicKey the RecipientKeyAlgorithm property will be automatically updated with the key algorithm.
When assigning a key using the raw key parameters (RecipientKeyK, RecipientKeyRx, and RecipientKeyRy for NIST or RecipientKeyXPk, and RecipientKeyXSk for Curve25519/Curve448) the RecipientKeyAlgorithm property must be set manually to the key algorithm.
The following table summarizes the supported operations for keys created with each algorithm:
KeyAlgorithm | Supported Operations |
secp256r1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
secp384r1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
secp521r1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
x25519 | ECDH (ComputeSecret) |
x448 | ECDH (ComputeSecret) |
ed25519 | EdDSA (Sign and VerifySignature) |
ed448 | EdDSA (Sign and VerifySignature) |
eaSecp160k1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
eaSecp192k1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
eaSecp224k1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
eaSecp256k1 | ECDH/ECIES/ECDSA (ComputeSecret, Encrypt, Decrypt, Sign, and VerifySignature) |
Data Type
Integer