<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1" />

Org.BouncyCastle.Math.EC.Rfc8032.Ed25519

public static class Ed25519
A low-level implementation of the Ed25519, Ed25519ctx, and Ed25519ph instantiations of the Edwards-Curve Digital Signature Algorithm specified in RFC 8032.
namespace Org.BouncyCastle.Math.EC.Rfc8032 { public static class Ed25519 { public enum Algorithm { Ed25519, Ed25519ctx, Ed25519ph } public sealed class PublicPoint { } public static readonly int PrehashSize; public static readonly int PublicKeySize; public static readonly int SecretKeySize; public static readonly int SignatureSize; public static IDigest CreatePrehash(); public static void EncodePublicPoint(PublicPoint publicPoint, byte[] pk, int pkOff); public static void EncodePublicPoint(PublicPoint publicPoint, Span<byte> pk); public static void GeneratePrivateKey(SecureRandom random, byte[] k); public static void GeneratePrivateKey(SecureRandom random, Span<byte> k); public static void GeneratePublicKey(byte[] sk, int skOff, byte[] pk, int pkOff); public static void GeneratePublicKey(ReadOnlySpan<byte> sk, Span<byte> pk); public static PublicPoint GeneratePublicKey(byte[] sk, int skOff); public static PublicPoint GeneratePublicKey(ReadOnlySpan<byte> sk); public static void Precompute(); public static void Sign(byte[] sk, int skOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff); public static void Sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff); public static void Sign(byte[] sk, int skOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff); public static void Sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff); public static void Sign(ReadOnlySpan<byte> sk, ReadOnlySpan<byte> m, Span<byte> sig); public static void Sign(ReadOnlySpan<byte> sk, ReadOnlySpan<byte> pk, ReadOnlySpan<byte> m, Span<byte> sig); public static void Sign(ReadOnlySpan<byte> sk, byte[] ctx, ReadOnlySpan<byte> m, Span<byte> sig); public static void Sign(ReadOnlySpan<byte> sk, ReadOnlySpan<byte> pk, byte[] ctx, ReadOnlySpan<byte> m, Span<byte> sig); public static void SignPrehash(byte[] sk, int skOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff); public static void SignPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff); public static void SignPrehash(byte[] sk, int skOff, byte[] ctx, IDigest ph, byte[] sig, int sigOff); public static void SignPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, IDigest ph, byte[] sig, int sigOff); public static void SignPrehash(ReadOnlySpan<byte> sk, byte[] ctx, ReadOnlySpan<byte> ph, Span<byte> sig); public static void SignPrehash(ReadOnlySpan<byte> sk, ReadOnlySpan<byte> pk, byte[] ctx, ReadOnlySpan<byte> ph, Span<byte> sig); public static void SignPrehash(ReadOnlySpan<byte> sk, byte[] ctx, IDigest ph, Span<byte> sig); public static void SignPrehash(ReadOnlySpan<byte> sk, ReadOnlySpan<byte> pk, byte[] ctx, IDigest ph, Span<byte> sig); public static bool ValidatePublicKeyFull(byte[] pk, int pkOff); public static bool ValidatePublicKeyFull(ReadOnlySpan<byte> pk); public static PublicPoint ValidatePublicKeyFullExport(byte[] pk, int pkOff); public static PublicPoint ValidatePublicKeyFullExport(ReadOnlySpan<byte> pk); public static bool ValidatePublicKeyPartial(byte[] pk, int pkOff); public static bool ValidatePublicKeyPartial(ReadOnlySpan<byte> pk); public static PublicPoint ValidatePublicKeyPartialExport(byte[] pk, int pkOff); public static PublicPoint ValidatePublicKeyPartialExport(ReadOnlySpan<byte> pk); public static bool Verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen); public static bool Verify(byte[] sig, int sigOff, PublicPoint publicPoint, byte[] m, int mOff, int mLen); public static bool Verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen); public static bool Verify(byte[] sig, int sigOff, PublicPoint publicPoint, byte[] ctx, byte[] m, int mOff, int mLen); public static bool Verify(ReadOnlySpan<byte> sig, ReadOnlySpan<byte> pk, ReadOnlySpan<byte> m); public static bool Verify(ReadOnlySpan<byte> sig, PublicPoint publicPoint, ReadOnlySpan<byte> m); public static bool Verify(ReadOnlySpan<byte> sig, ReadOnlySpan<byte> pk, byte[] ctx, ReadOnlySpan<byte> m); public static bool Verify(ReadOnlySpan<byte> sig, PublicPoint publicPoint, byte[] ctx, ReadOnlySpan<byte> m); public static bool VerifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff); public static bool VerifyPrehash(byte[] sig, int sigOff, PublicPoint publicPoint, byte[] ctx, byte[] ph, int phOff); public static bool VerifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, IDigest ph); public static bool VerifyPrehash(byte[] sig, int sigOff, PublicPoint publicPoint, byte[] ctx, IDigest ph); public static bool VerifyPrehash(ReadOnlySpan<byte> sig, ReadOnlySpan<byte> pk, byte[] ctx, ReadOnlySpan<byte> ph); public static bool VerifyPrehash(ReadOnlySpan<byte> sig, PublicPoint publicPoint, byte[] ctx, ReadOnlySpan<byte> ph); public static bool VerifyPrehash(ReadOnlySpan<byte> sig, ReadOnlySpan<byte> pk, byte[] ctx, IDigest ph); public static bool VerifyPrehash(ReadOnlySpan<byte> sig, PublicPoint publicPoint, byte[] ctx, IDigest ph); } }