httk.core.ed25519

Ed25519 signing with an optional accelerated backend.

All private keys accepted and returned by this module are standard 32-byte Ed25519 seeds. The stdlib implementation follows RFC 8032 and is kept as a portable fallback; cryptography is used automatically when installed.

Attributes

Functions

ed25519_backend_available(→ bool)

Return whether backend can perform Ed25519 operations.

ed25519_generate_seed(→ bytes)

Generate a standard 32-byte Ed25519 private seed.

ed25519_public_key(→ bytes)

Derive the 32-byte public key for a 32-byte private seed.

ed25519_sign(→ bytes)

Return an RFC 8032 Ed25519 signature for message.

ed25519_verify(→ bool)

Return whether signature is valid, treating malformed input as false.

Module Contents

httk.core.ed25519.ed25519_backend_available(backend: str = 'cryptography') bool[source]

Return whether backend can perform Ed25519 operations.

httk.core.ed25519.ed25519_generate_seed() bytes[source]

Generate a standard 32-byte Ed25519 private seed.

httk.core.ed25519.ed25519_public_key(seed: bytes, *, backend: str | None = None) bytes[source]

Derive the 32-byte public key for a 32-byte private seed.

httk.core.ed25519.ed25519_sign(seed: bytes, message: bytes, *, backend: str | None = None) bytes[source]

Return an RFC 8032 Ed25519 signature for message.

httk.core.ed25519.ed25519_verify(public_key: bytes, message: bytes, signature: bytes, *, backend: str | None = None) bool[source]

Return whether signature is valid, treating malformed input as false.

httk.core.ed25519.generate_ed25519_seed[source]
httk.core.ed25519.derive_ed25519_public_key[source]
httk.core.ed25519.sign_ed25519[source]
httk.core.ed25519.verify_ed25519[source]