Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i2p-signer

i2p-signer is a small offline command-line utility for I2P destination-key workflows. It allows a domain owner to prove control of an Ed25519 signing key without sending the private key to a remote service, web service, or browser.

It is designed to live as an independent GitHub project. The binary makes no network requests, retains no keys, and does not configure I2P routers.

Why It Exists

A destination-management service must verify that the person asking to manage a hostname controls its associated destination. i2p-signer keeps that proof on the owner's machine:

service creates an exact challenge with a nonce
                   |
                   v
owner signs that exact byte sequence locally
                   |
                   v
owner submits the signature and public destination
                   |
                   v
service verifies the Ed25519 signature

Only the signature and public destination leave the local machine. The private key stays in the key file and is never uploaded.

How It Works

gen-key reads 32 random bytes from the operating-system cryptographic random source, derives an Ed25519 key pair, and writes a 64-byte local file:

32-byte Ed25519 seed | 32-byte public signing key

The file is created with mode 0600 on supported systems. sign reads the key material, signs the exact message bytes with Ed25519, then writes the signature in I2P Base64, where + becomes - and / becomes ~. inspect shows public metadata: the destination, its .b32.i2p address, and the public signing key. It does not print the private seed.

The supported key inputs are:

Input Purpose
64-byte seed plus public key Format generated by gen-key
Header plus Ed25519 seed/public key Compatible compact identity variant
Full i2pd privatekey.dat Extracts and validates the destination signing key

The tool rejects .4.dat and .6.dat LeaseSet encryption-key files. Those files are not destination signing identities and cannot prove control of a hostname.

Build

The project requires the Go version declared in go.mod.

git clone https://github.com/OWNER/i2p-signer.git
cd i2p-signer
go test ./...
go build -trimpath -ldflags="-s -w" -o i2p-signer .

Run ./i2p-signer without arguments to show command help.

Cross-Compile

The program has no C dependencies, so cross-compilation needs only Go:

# Linux x86_64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/i2p-signer-linux-amd64 .

# Linux ARM64
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o dist/i2p-signer-linux-arm64 .

# macOS ARM64
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o dist/i2p-signer-darwin-arm64 .

# Windows x86_64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/i2p-signer-windows-amd64.exe .

GitHub Actions runs tests and produces artifacts for Linux, macOS, and Windows on every pull request, push to main, and manual workflow run. See build.yml.

Releases

Version tags use the vMAJOR.MINOR.PATCH form. Pushing a v* tag runs the same test and cross-build matrix, creates a GitHub Release, and attaches all five binaries plus SHA256SUMS.

Download binaries only from the repository's GitHub Releases page. Verify the downloaded binary against SHA256SUMS before executing it:

sha256sum --check SHA256SUMS

Commands

# Generate a new local identity file.
./i2p-signer gen-key my-identity.dat

# Inspect public destination and signing-key metadata.
./i2p-signer inspect my-identity.dat

# Sign the exact challenge displayed by the service.
./i2p-signer sign my-identity.dat "I own example.i2p\nNonce: challenge-value"

Use the challenge exactly as received, including newlines and nonce values. Changing whitespace or omitting a line produces a different signature and will cause verification to fail.

Security

  • Keep generated and i2pd private-key files secret and backed up securely.
  • Do not upload a key file to a browser, chat, source repository, or support request.
  • Submit a signature only to the service that issued its challenge.
  • Download binaries only from the repository's GitHub Actions artifacts or GitHub Releases, then validate the published checksum.
  • Report vulnerabilities through the process in SECURITY.md.

Development

go test ./...
go vet ./...

Tests use generated fixture data and require neither real I2P identities nor network access.

License

MIT. Copyright (c) 2026 Sommelier admin@matrix.co.ua. Reuse is permitted provided the copyright notice and license text are retained; see LICENSE.

About

i2p-Signer domain .i2p

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages