This release is a pre-release and may not be stable for production use.
Swarmauri Signing Ed25519
swarmauri_signing_ed25519 provides an Ed25519 implementation of the
ISigning interface for creating detached signatures over byte payloads and
canonicalized envelopes.
Features
- Deterministic JSON canonicalization is always available, ensuring stable digests for dictionary-based envelopes.
- Optional CBOR canonicalization can be enabled with the
[cbor]extra to install thecbor2dependency. - Detached signatures are produced with
cryptography's Ed25519 primitives and returned as sequences so multi-signature workflows remain possible. - Verification accepts multiple public keys via
opts["pubkeys"]and honoursrequire={"min_signers": N}for quorum checks. - Ed25519 private keys can be supplied either as cryptography objects or raw
seed bytes using the
KeyRefhelper structure fromswarmauri_core.
Installation
pip
pip install swarmauri_signing_ed25519
Poetry
poetry add swarmauri_signing_ed25519
uv
uv add swarmauri_signing_ed25519
Install with the [cbor] extra when CBOR canonicalization is required:
pip install "swarmauri_signing_ed25519[cbor]"
poetry add swarmauri_signing_ed25519[cbor]
uv add swarmauri_signing_ed25519[cbor]
Usage
The package exposes a single entry point, Ed25519EnvelopeSigner, implementing
ISigning. The signer reports JSON (and optionally CBOR) support via
supports(), canonicalizes envelopes through canonicalize_envelope, and
produces detached signatures using sign_bytes/sign_envelope. Verification
expects the relevant public keys to be supplied using opts["pubkeys"].
Key references
Ed25519EnvelopeSigner accepts Ed25519 private keys using KeyRef values. The
two supported forms are:
{"kind": "cryptography_obj", "obj": Ed25519PrivateKey}for in-memory cryptography objects.{"kind": "raw_ed25519_sk", "bytes": seed}whereseedis the 32-byte private key seed (or the 64-byte expanded secret key).
Example
The example below signs a JSON envelope and verifies the detached signature with the generated public key.
import asyncio
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from swarmauri_signing_ed25519 import Ed25519EnvelopeSigner
async def main() -> bool:
signer = Ed25519EnvelopeSigner()
private_key = Ed25519PrivateKey.generate()
key_ref = {"kind": "cryptography_obj", "obj": private_key}
envelope = {"subject": "alice", "scope": ["inbox:read"]}
signatures = await signer.sign_envelope(key_ref, envelope)
public_key = private_key.public_key()
verified = await signer.verify_envelope(
envelope,
signatures,
opts={"pubkeys": [public_key]},
)
return verified
verified = asyncio.run(main())
print(f"Signature verified? {verified}")
Entry Point
The signer registers under the swarmauri.signings entry point as
Ed25519EnvelopeSigner.
Want to help?
If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.
Metadata
Release files for swarmauri_signing_ed25519 0.11.0.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_signing_ed25519-0.11.0.dev1.tar.gz | 9.2 kB | Without provenance | Details for swarmauri_signing_ed25519-0.11.0.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_signing_ed25519-0.11.0.dev1-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_signing_ed25519-0.11.0.dev1-py3-none-any.whl |
Total release size: 19.5 kB
Release files / swarmauri_signing_ed25519-0.11.0.dev1.tar.gz
| Download URL | swarmauri_signing_ed25519-0.11.0.dev1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4389b072661312dca6361039ff3d98bfb9d04bd8f998edde440ba20dec41ca0
|
|
BLAKE2b-256 checksum How to use checksums |
efe38af6e4d3629dc7bbd4fb6c8eebc291425a9ea6c035ccb01e6c69a429168a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_signing_ed25519-0.11.0.dev1-py3-none-any.whl
| Download URL | swarmauri_signing_ed25519-0.11.0.dev1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65fd7b49772418b962c96ef12dc803230a23046ea5ab3e26eea3bccfe56d8fd4
|
|
BLAKE2b-256 checksum How to use checksums |
c50714aff4dbdbef197328c585e25d3165d60fcd97f64e22f466428126c22b6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for swarmauri_signing_ed25519 0.11.0.dev1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.