Skip to content

Instantly share code, notes, and snippets.

@rikonor
Created April 7, 2025 01:09
Show Gist options
  • Save rikonor/5262c6dd65df0d3a78bfe5361d89289e to your computer and use it in GitHub Desktop.
Save rikonor/5262c6dd65df0d3a78bfe5361d89289e to your computer and use it in GitHub Desktop.
Signing and Verifying
# Generate private key
openssl genpkey -algorithm Ed25519 -out private.pem
# Derive public key
openssl pkey -in private.pem -pubout -out public.pem
# Generate signature
openssl pkeyutl -sign -inkey private.pem -rawin -in data_to_sign.txt -out signature.sig
# Verify signature
openssl pkeyutl -verify -pubin -inkey public.pem -rawin -in data_to_sign.txt -sigfile signature.sig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment