Repository navigation
OnixLabs.Security.Cryptography.IEddsaPublicKey
Defines an EdDSA cryptographic public key, as specified in RFC 8032 (Ed25519, PureEdDSA).
| Namespace | OnixLabs.Security.Cryptography |
| Assembly | OnixLabs.Security.Cryptography.dll (NuGet) |
| Implements |
IPublicKeyImportable<EddsaPublicKey>, IPublicKeyExportable, IBinaryConvertible
|
public interface IEddsaPublicKey :
IPublicKeyImportable<EddsaPublicKey>,
IPublicKeyExportable,
IBinaryConvertibleIEddsaPublicKey follows the same IsDataValid / VerifyData pattern as IEcdsaPublicKey but omits the HashAlgorithm/HashAlgorithmName and DSASignatureFormat parameters — Ed25519 incorporates its own hash function and produces a fixed-format signature. There is no IsHashValid / VerifyHash family because EdDSA does not expose an intermediate hash step.
| Member | Returns | Description |
|---|---|---|
IsDataValid(ReadOnlySpan<byte>, ReadOnlySpan<byte>) |
bool |
Checks if a span was signed with the given raw signature. |
IsDataValid(ReadOnlySpan<byte>, ReadOnlySpan<byte>, int, int) |
bool |
Checks if a byte-range slice was signed with the given raw signature. |
IsDataValid(ReadOnlySpan<byte>, Stream) |
bool |
Checks if a stream was signed with the given raw signature. |
IsDataValid(ReadOnlySpan<byte>, IBinaryConvertible) |
bool |
Checks if an IBinaryConvertible was signed with the given raw signature. |
IsDataValid(DigitalSignature, ReadOnlySpan<byte>) |
bool |
Checks if a span was signed with a DigitalSignature. |
IsDataValid(DigitalSignature, ReadOnlySpan<byte>, int, int) |
bool |
Checks if a byte-range slice was signed with a DigitalSignature. |
IsDataValid(DigitalSignature, Stream) |
bool |
Checks if a stream was signed with a DigitalSignature. |
IsDataValid(DigitalSignature, IBinaryConvertible) |
bool |
Checks if an IBinaryConvertible was signed with a DigitalSignature. |
VerifyData(ReadOnlySpan<byte>, ReadOnlySpan<byte>) |
void |
Verifies a span with a raw signature; throws on failure. |
VerifyData(ReadOnlySpan<byte>, ReadOnlySpan<byte>, int, int) |
void |
Verifies a byte-range slice with a raw signature; throws on failure. |
VerifyData(ReadOnlySpan<byte>, Stream) |
void |
Verifies a stream with a raw signature; throws on failure. |
VerifyData(ReadOnlySpan<byte>, IBinaryConvertible) |
void |
Verifies an IBinaryConvertible with a raw signature; throws on failure. |
VerifyData(DigitalSignature, ReadOnlySpan<byte>) |
void |
Verifies a span with a DigitalSignature; throws on failure. |
VerifyData(DigitalSignature, ReadOnlySpan<byte>, int, int) |
void |
Verifies a byte-range slice with a DigitalSignature; throws on failure. |
VerifyData(DigitalSignature, Stream) |
void |
Verifies a stream with a DigitalSignature; throws on failure. |
VerifyData(DigitalSignature, IBinaryConvertible) |
void |
Verifies an IBinaryConvertible with a DigitalSignature; throws on failure. |
bool IsDataValid(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> data);
bool IsDataValid(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> data, int offset, int count);
bool IsDataValid(ReadOnlySpan<byte> signature, Stream data);
bool IsDataValid(ReadOnlySpan<byte> signature, IBinaryConvertible data);
bool IsDataValid(DigitalSignature signature, ReadOnlySpan<byte> data);
bool IsDataValid(DigitalSignature signature, ReadOnlySpan<byte> data, int offset, int count);
bool IsDataValid(DigitalSignature signature, Stream data);
bool IsDataValid(DigitalSignature signature, IBinaryConvertible data);Determines whether the specified data and signature pair was produced by the EdDSA private key corresponding to this public key.
| Parameter | Type | Description |
|---|---|---|
signature |
ReadOnlySpan<byte> or DigitalSignature
|
The signature to validate. |
data |
ReadOnlySpan<byte> / Stream / IBinaryConvertible
|
The unsigned data to validate. |
offset |
int |
(slice overloads) The offset into the span from which to begin reading. |
count |
int |
(slice overloads) The number of bytes to read from the span. |
Returns — true if the signature is valid for the supplied data; otherwise false.
void VerifyData(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> data);
void VerifyData(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> data, int offset, int count);
void VerifyData(ReadOnlySpan<byte> signature, Stream data);
void VerifyData(ReadOnlySpan<byte> signature, IBinaryConvertible data);
void VerifyData(DigitalSignature signature, ReadOnlySpan<byte> data);
void VerifyData(DigitalSignature signature, ReadOnlySpan<byte> data, int offset, int count);
void VerifyData(DigitalSignature signature, Stream data);
void VerifyData(DigitalSignature signature, IBinaryConvertible data);Verifies that the specified data was signed by the EdDSA private key corresponding to this public key. Throws if verification fails.
Parameters match those of the IsDataValid overloads above.
Exceptions — Throws (implementation-defined, typically CryptographicException) if the signature is not valid for the supplied data and key.
ONIXLabs .NET Library · Repository · NuGet · License (Apache-2.0)
Copyright © ONIXLabs 2020. Licensed under the Apache License, Version 2.0.
- Enumeration<T>
- Optional<T>
- OptionalEqualityComparer<T>
- OptionalExtensions
- Result
- Result<T>
- ResultEqualityComparer<T>
- ResultExtensions
- Specification<T>
- Preconditions
- IValueEquatable<T>
- IValueComparable<T>
- IBinaryConvertible
- ISpanBinaryConvertible
- IMemoryBinaryConvertible
- ArrayExtensions
- ComparableExtensions
- DateTimeExtensions
- ISpanParsableExtensions
- ObjectExtensions
- RandomExtensions
- ReadOnlySequenceExtensions
- ReadOnlySpanExtensions
- StringExtensions
- Base16
- Base32
- Base58
- Base64
- IBaseCodec
- IBaseValue
- IBaseValue<T>
- Base16Codec
- Base32Codec
- Base58Codec
- Base64Codec
- Base16FormatProvider
- Base32FormatProvider
- Base58FormatProvider
- Base64FormatProvider
- EncodingExtensions
- ReadOnlySpanExtensions
- StringBuilderExtensions
- BigDecimal
- BigDecimalEqualityComparer
- BigDecimalOrdinalityComparer
- NumberInfo
- NumberInfoEqualityComparer
- NumberInfoOrdinalityComparer
- Int256
- Int512
- UInt256
- UInt512
- Float128
- Float256
- GenericMath
- NumericsExtensions
- ConversionMode
- ScaleMode
- Hash
- NamedHash
- Sha3
- Sha3Hash224
- Sha3Hash256
- Sha3Hash384
- Sha3Hash512
- Sha3Shake128
- Sha3Shake256
- MerkleTree
- MerkleTree<T>
- PrivateKey
- PublicKey
- NamedPrivateKey
- NamedPublicKey
- EcdhPrivateKey
- EcdhPublicKey
- EcdsaPrivateKey
- EcdsaPublicKey
- EddsaPrivateKey
- EddsaPublicKey
- RsaPrivateKey
- RsaPublicKey
- DigitalSignature
- DigitalSignatureAndPublicKey
- Salt
- Secret
- ICryptoPrimitive<T>
- IHashable
- IEcdhPrivateKey
- IEcdsaPrivateKey
- IEddsaPrivateKey
- IRsaPrivateKey
- IPrivateKeyDerivable<T>
- IPrivateKeyExportable
- IPrivateKeyImportable<T>
- IPrivateKeyPemImportable<T>
- IPrivateKeyPkcs8Exportable
- IPrivateKeyPkcs8Importable<T>
- IPrivateKeyPkcs8PemExportable
- IPrivateKeyRawExportable
- IPrivateKeyRawImportable<T>
- IPrivateKeyRawPemExportable
- IEcdhPublicKey
- IEcdsaPublicKey
- IEddsaPublicKey
- IRsaPublicKey
- IPublicKeyExportable
- IPublicKeyImportable<T>
- IPublicKeyPemExportable
- IPublicKeyPemImportable<T>
- IPublicKeyRawExportable
- IPublicKeyRawImportable<T>
- HashAlgorithmExtensions
- ReadOnlySpanExtensions