SignerKeyAlgorithm Property
This property holds the algorithm associated with the key.
Syntax
ANSI (Cross Platform) int GetSignerKeyAlgorithm();
int SetSignerKeyAlgorithm(int iSignerKeyAlgorithm); Unicode (Windows) INT GetSignerKeyAlgorithm();
INT SetSignerKeyAlgorithm(INT iSignerKeyAlgorithm);
Possible Values
EA_SECP_256R_1(0),
EA_SECP_384R_1(1),
EA_SECP_521R_1(2),
EA_ED_25519(3),
EA_ED_448(4),
EA_X25519(5),
EA_X448(6),
EA_SECP_160K_1(7),
EA_SECP_192K_1(8),
EA_SECP_224K_1(9),
EA_SECP_256K_1(10)
@property (nonatomic,readwrite,assign,getter=signerKeyAlgorithm,setter=setSignerKeyAlgorithm:) int signerKeyAlgorithm; - (int)signerKeyAlgorithm; - (void)setSignerKeyAlgorithm:(int)newSignerKeyAlgorithm;
Possible Values
EA_SECP_256R_1(0),
EA_SECP_384R_1(1),
EA_SECP_521R_1(2),
EA_ED_25519(3),
EA_ED_448(4),
EA_X25519(5),
EA_X448(6),
EA_SECP_160K_1(7),
EA_SECP_192K_1(8),
EA_SECP_224K_1(9),
EA_SECP_256K_1(10)
#define PID_ECC_SIGNERKEYALGORITHM 30 IPWORKSENCRYPT_EXTERNAL void* IPWORKSENCRYPT_CALL IPWorksEncrypt_ECC_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKSENCRYPT_EXTERNAL int IPWORKSENCRYPT_CALL IPWorksEncrypt_ECC_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
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 SignerKeyPrivateKey and SignerKeyPublicKey the SignerKeyAlgorithm property will be automatically updated with the key algorithm.
When assigning a key using the raw key parameters (SignerKeyK, SignerKeyRx, and SignerKeyRy for NIST or SignerKeyXPk, and SignerKeyXSk for Curve25519/Curve448) the SignerKeyAlgorithm 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