Ed25519Signer.NET 9.0.0.6

Additional Details

Please update to the most recent version at the earliest convenience

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Ed25519Signer.NET --version 9.0.0.6                
NuGet\Install-Package Ed25519Signer.NET -Version 9.0.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ed25519Signer.NET" Version="9.0.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ed25519Signer.NET --version 9.0.0.6                
#r "nuget: Ed25519Signer.NET, 9.0.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ed25519Signer.NET as a Cake Addin
#addin nuget:?package=Ed25519Signer.NET&version=9.0.0.6

// Install Ed25519Signer.NET as a Cake Tool
#tool nuget:?package=Ed25519Signer.NET&version=9.0.0.6                

alternate text is missing from this package README image

Sign (or verify) a request using Ed25519 from RFC8032

Generate Keys

This library can not generate keys, it just signs and verifies, there is no reason for the library to do this.

If you have Windows 10/11 you can generate them from the command prompt with a standard Windows installation.

// Generate Private Key
openssl genpkey -algorithm ed25519 -out private.pem

// Generate Public Key from the Private Key
openssl pkey -in private.pem -pubout -out public.pem

This also ensures that your keys are really valid and that the library can really understand them.

Load Key from PEM File

Ed25519KeyData privateKeyData = new Ed25519KeyData("C:\\Keys\\private.pem");

Ed25519PrivateKey privatekey = Ed25519KeyFactory.CreatePrivateKey(privateKeyData.Read());

Signing Data

Ed25519Signer signer = new Ed25519Signer();

signer.Init(privatekey);

signer.BlockUpdate(new byte[32] /* data to sign */, 0 /* offset */, 32 /* data length*/);

byte[] output = signer.GenerateSignature();

signer.Reset();

Verifying Data

Ed25519Verifier verify = new Ed25519Verifier();

verify.Init(publicKey);

verify.BlockUpdate(new byte[32] /* same data to verify */, 0 /* offset */, 32 /* data length*/);

bool v = verify.VerifySignature(output);

verify.Reset();

Full Example

static void Main()
{
    // Signing is usually done by a client
    Ed25519Signer signer = new Ed25519Signer();

    Ed25519KeyData privateKeyData = new Ed25519KeyData("C:\\Keys\\private.pem");

    Ed25519PrivateKey privatekey = Ed25519KeyFactory.CreatePrivateKey(privateKeyData.Read());

    Debug.Assert(privatekey.Length == 32);

    signer.Init(privatekey);

    signer.BlockUpdate(new byte[32] /* data to sign */, 0 /* offset */, 32 /* data length*/);

    byte[] output = signer.GenerateSignature();

    signer.Reset();

    // Verifying is usually done by a server
    Ed25519Verifier verify = new Ed25519Verifier();

    Ed25519KeyData publicKeyData = new Ed25519KeyData("C:\\Keys\\public.pem");

    Ed25519PublicKey publicKey = Ed25519KeyFactory.CreatePublicKey(publicKeyData.Read());

    verify.Init(publicKey);

    verify.BlockUpdate(new byte[32] /* same data to verify */, 0 /* offset */, 32 /* data length*/);

    bool v = verify.VerifySignature(output);

    verify.Reset();

    // Data Matches
    if (v)
    {
        Console.WriteLine("Yes");
    }
    else
    {
        Console.WriteLine("No");
    }

    Console.ReadLine();
}

Contributing

If you can improve anything without changing the result or violating the security considerations in RFC8032 then please open a pull request.

Anything you contribute will have the same license and terms as the upstream library and the license remains unchanged.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated