ped25519
ped25519 · Ed25519 signing and verification functions implemented in Rust with pgrx.
Overview
PostgreSQL · 14, 15, 16
Usage
Sources:
ped25519 version 0.1.0 provides Ed25519 signing and verification as in-process Rust functions. The signing function accepts message bytes, a 32-byte public key, and a 32-byte private key; verification accepts message bytes, a 64-byte signature, and the 32-byte public key.
Sign and verify
This uses the fixed example key material published by upstream, not a production key:
The result should be true. ped25519 does not generate keys or provide a key store; key generation, rotation, backup, and access control remain application responsibilities.
Security and compatibility
Never place real private keys in migration files, query text, parameters visible to monitoring, or application logs. Revoke public execution and grant signing only to a narrowly scoped role; verification can usually be granted separately. Prefer signing outside the database when a dedicated key manager or hardware-backed key can be used.
The Rust implementation slices the supplied public and combined key buffers before all length errors can be returned cleanly. Enforce exact input lengths to avoid a panic/error path. The reviewed pgrx build declares PostgreSQL 14 through 16 features and requires superuser installation; validate the package on the exact target major version.