Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Restore
run: dotnet restore Ed25519.sln --nologo

- name: Build
run: dotnet build Ed25519.sln --configuration Release --no-restore --nologo

- name: Test
run: dotnet test tests/Ed25519.Tests.csproj --configuration Release --no-build --nologo
41 changes: 41 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish NuGet

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Restore
run: dotnet restore Ed25519.sln --nologo

- name: Build
run: dotnet build Ed25519.sln --configuration Release --no-restore --nologo

- name: Test
run: dotnet test tests/Ed25519.Tests.csproj --configuration Release --no-build --nologo

- name: Pack
run: dotnet pack src/Ed25519.csproj --configuration Release --no-build --nologo -o artifacts

- name: Push to NuGet
run: dotnet nuget push artifacts/*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ A pure C# implementation of the Ed25519 digital signature algorithm, ported from

## Installation

Install from NuGet:

```bash
dotnet add package Ed25519
dotnet add package Dexcompiler.Ed25519
```

> Note: This package ID is the canonical package name for this repository. The similarly named `Ed25519` package on NuGet is a different project.

## Usage

### Generate a Keypair
Expand Down Expand Up @@ -157,6 +161,14 @@ The implementation uses constant-time conditional moves (`CMov`, `CSwap`) to pre
- **Base point B**: The standard Ed25519 generator
- **Group order L**: `2²⁵² + 27742317777372353535851937790883648493`

## Maintainer Release Workflow

1. Set `NUGET_API_KEY` in repository secrets.
2. Update `Version` in `src/Ed25519.csproj` for the intended release.
3. Push a tag in `vX.Y.Z` format (for example, `v1.0.5`).
4. GitHub Actions will build, test, pack, and publish `Dexcompiler.Ed25519` with `--skip-duplicate`.
5. Verify package availability on nuget.org and test `dotnet add package Dexcompiler.Ed25519` in a clean project.

## License

MIT License
2 changes: 1 addition & 1 deletion src/Ed25519.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<OutputType>Library</OutputType>

<!-- NuGet Package metadata -->
<PackageId>Ed25519</PackageId>
<PackageId>Dexcompiler.Ed25519</PackageId>
<Version>1.0.4</Version>
<Authors>Dexter Ajoku</Authors>
<Description>Pure C# implementation of Ed25519 digital signatures. RFC 8032 compliant, ported from ref10 reference implementation. Includes PKCS#8/SPKI/PEM key import/export.</Description>
Expand Down
Loading