Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdDSA signatures with blind keys

A Zig implementation of the EdDSA key blinding proposal.

    // Create a standard Ed25519 key pair
    const kp = try Ed25519.KeyPair.create(null);

    // Create a random blinding seed
    var blind: [32]u8 = undefined;
    crypto.random.bytes(&blind);

    // Blind the key pair
    const blind_kp = try BlindEd25519.blind(kp, blind);

    // Sign a message and check that it can be verified with the blind public key
    const msg = "test";
    const sig = try BlindEd25519.sign(msg, blind_kp, null);
    try Ed25519.verify(sig, msg, blind_kp.blind_public_key);

    // Unblind the public key
    const pk = try BlindEd25519.unblind_public_key(blind_kp.blind_public_key, blind);
    try std.testing.expectEqualSlices(u8, &pk, &kp.public_key);

About

A Zig implementation of EdDSA signatures with blind keys.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.