std.crypto.sign.Ed25519.BatchElement
A (signature, message, public_key) tuple for batch verification.
- Kind
- struct
- Module
std.crypto.sign.Ed25519
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.crypto.sign.Ed25519 in the Zig reference. This page has 47 cards.
A (signature, message, public_key) tuple for batch verification.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The underlying elliptic curve.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Ed25519 signatures with key blinding.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a blinding seed.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A blind key pair.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(key_pair: Ed25519.KeyPair, blind_seed: [blind_seed_length]u8, ctx: []const u8) (NonCanonicalError || IdentityElementError)!BlindKeyPair
Create an blind key pair from an existing key pair, a blinding seed and a context.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sign(key_pair: BlindKeyPair, msg: []const u8, noise: ?[noise_length]u8) (IdentityElementError || KeyMismatchError || NonCanonicalError || WeakPublicKeyError)!Signature
Sign a message using a blind key pair, and optional random noise.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A blind public key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn unblind(blind_public_key: BlindPublicKey, blind_seed: [blind_seed_length]u8, ctx: []const u8) (IdentityElementError || NonCanonicalError || EncodingError || WeakPublicKeyError)!PublicKey
Recover a public key from a blind version of it.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A blind secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
An Ed25519 key pair.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromSecretKey(secret_key: SecretKey) (NonCanonicalError || EncodingError || IdentityElementError)!KeyPair
Create a key pair from an existing secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn generate(io: std.Io) KeyPair
Generate a new, random key pair.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn generateDeterministic(seed: [seed_length]u8) IdentityElementError!KeyPair
Deterministically derive a key pair from a cryptograpically secure secret seed.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a seed required to create a key pair.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sign(key_pair: KeyPair, msg: []const u8, noise: ?[noise_length]u8) (IdentityElementError || NonCanonicalError || KeyMismatchError || WeakPublicKeyError)!Signature
Sign a message using the key pair.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn signer(key_pair: KeyPair, noise: ?[noise_length]u8, io: std.Io) (IdentityElementError || KeyMismatchError || NonCanonicalError || WeakPublicKeyError)!Signer
Create a Signer, that can be used for incremental signing.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn signerWithBaseNonce(key_pair: KeyPair, base_nonce: [32]u8, noise: ?[noise_length]u8) (IdentityElementError || KeyMismatchError || NonCanonicalError || WeakPublicKeyError)!Signer
Create a signer that can be used for incremental signing, using a custom base nonce. `base_nonce` must be unique for each signed message; otherwise, the secret key can be trivially recovered by an attacker.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of optional random bytes, for non-deterministic signatures.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
An Ed25519 public key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a raw public key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(bytes: [encoded_length]u8) NonCanonicalError!PublicKey
Create a public key from raw bytes.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(pk: PublicKey) [encoded_length]u8
Convert a public key to raw bytes.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
An Ed25519 secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a raw secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(bytes: [encoded_length]u8) !SecretKey
Create a secret key from raw bytes.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn publicKeyBytes(self: SecretKey) [PublicKey.encoded_length]u8
Return the raw public key bytes corresponding to this secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn seed(self: SecretKey) [KeyPair.seed_length]u8
Return the seed used to generate this secret key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(sk: SecretKey) [encoded_length]u8
Return the secret key as raw bytes.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
An Ed25519 signature.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Length (in bytes) of a raw signature.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(bytes: [encoded_length]u8) Signature
Create a signature from a raw encoding of (r, s).
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(sig: Signature) [encoded_length]u8
Return the raw signature (r, s) in little-endian format.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verifier(sig: Signature, public_key: PublicKey) Verifier.InitError!Verifier
Create a Verifier for incremental verification of a signature.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verify(sig: Signature, msg: []const u8, public_key: PublicKey) VerifyError!void
Verify the signature against a message and public key.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verifyStrict(sig: Signature, msg: []const u8, public_key: PublicKey) VerifyError!void
Verify the signature against a message and public key using cofactorless verification.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A Signer is used to incrementally compute a signature.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn finalize(self: *Signer) Signature
Compute a signature over the entire message.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn update(self: *Signer, data: []const u8) void
Add new data to the message being signed.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A Verifier is used to incrementally verify a signature.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn update(self: *Verifier, msg: []const u8) void
Add new content to the message to be verified.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verify(self: *Verifier) VerifyError!void
Verify that the signature is valid for the entire message.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verifyStrict(self: *Verifier) VerifyError!void
Verify that the signature is valid for the entire message using cofactorless verification.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn verifyBatch(io: std.Io, comptime count: usize, signature_batch: [count]BatchElement) (SignatureVerificationError || IdentityElementError || WeakPublicKeyError || EncodingError || NonCanonicalError)!void
Verify several signatures in a single operation, much faster than verifying signatures one-by-one.
std.crypto.sign.Ed25519Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.