EcdsaVerify Constructor
EcdsaVerify(ECDsa)
Create an instance of the EcdsaVerify class using the ECDsa object that contains the public key.
public EcdsaVerify(ECDsa ecdsa)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.ECDsa | ecdsa | The public key to use to verify. This constructor will copy a reference to this object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The ecdsa argument is null. |
System.ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports only NIST P-256 and P-384 curves.
EcdsaVerify(PivPublicKey)
Create an instance of the EcdsaVerify class using the PIV ECC public key.
public EcdsaVerify(PivPublicKey pivPublicKey)
Parameters
Type | Name | Description |
---|---|---|
PivPublicKey | pivPublicKey | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The pivPublicKey argument is null. |
System.ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports only NIST P-256 and P-384 curves.
EcdsaVerify(CoseKey)
Create an instance of the EcdsaVerify class using the COSE EC public key.
public EcdsaVerify(CoseKey coseKey)
Parameters
Type | Name | Description |
---|---|---|
CoseKey | coseKey | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The coseKey is null. |
System.ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports only NIST P-256 and P-384 curves.
EcdsaVerify(ReadOnlyMemory<Byte>)
Create an instance of the EcdsaVerify class using the encoded point.
public EcdsaVerify(ReadOnlyMemory<byte> encodedEccPoint)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | encodedEccPoint | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The coseKey is null. |
System.ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports only NIST P-256 and P-384 curves and only supports the
uncompressed encoded point: 04||x-coordinate||y-coordinate
where both coordinates are the curve size (each coordinate is 32 bytes
for P-256 and 48 bytes for P-384), prepended with 00 bytes if
necessary.
EcdsaVerify(X509Certificate2)
Create an instance of the EcdsaVerify class using the given certificate.
public EcdsaVerify(X509Certificate2 certificate)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.X509Certificates.X509Certificate2 | certificate | The certificate containing the public key to use to verify. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The certificate argument is null. |
System.ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports only NIST P-256 and P-384 curves.