COSEAlgorithmIdentifier
Namespace: Wisej.Ext.WebAuthn
Assembly: Wisej.Ext.WebAuthn (4.1.0.0)
Identifies a cryptographic algorithm.
- C#
- VB.NET
public enum COSEAlgorithmIdentifier
Public Enum COSEAlgorithmIdentifier
The values match the COSE algorithm identifiers registered with IANA. Validate supports ES256 and RS256. See #typedefdef-cosealgorithmidentifier.
Example:
// Accept ES256 (preferred) and RS256 keys during registration.
var parameters = new[]
{
new PublicKeyCredentialParameters(COSEAlgorithmIdentifier.ES256),
new PublicKeyCredentialParameters(COSEAlgorithmIdentifier.RS256)
};
// Check the algorithm of a stored public key.
if (publicKey.Algorithm == COSEAlgorithmIdentifier.ES256)
Console.WriteLine("Elliptic curve key (P-256).");
Fields
| Name | Description | Value |
|---|---|---|
| EdDSA | EdDSA algorithm. | |
| ES256 | ES256 algorithm. | |
| ES384 | ES384 algorithm. | |
| ES512 | ES512 algorithm. | |
| RS256 | RS256 algorithm. |
Used By
| Name | Description |
|---|---|
| PublicKey.Algorithm | The public key algorithm used. |
| PublicKeyCredentialParameters.Alg | Specifies the cryptographic signature algorithm with which the newly generated credential will be used, and thus also the type of asymmetric key pair to be generated, e.g., RSA or Elliptic Curve. |