Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedisct1/zig-eddsa-key-blinding
A Zig implementation of EdDSA signatures with blind keys.
https://github.com/jedisct1/zig-eddsa-key-blinding
blinding ed25519 eddsa zig zig-package
Last synced: 4 months ago
JSON representation
A Zig implementation of EdDSA signatures with blind keys.
- Host: GitHub
- URL: https://github.com/jedisct1/zig-eddsa-key-blinding
- Owner: jedisct1
- License: mit
- Created: 2022-01-20T21:42:36.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-15T18:57:27.000Z (over 1 year ago)
- Last Synced: 2024-10-05T04:35:52.976Z (4 months ago)
- Topics: blinding, ed25519, eddsa, zig, zig-package
- Language: Zig
- Homepage:
- Size: 4.88 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EdDSA signatures with blind keys
A Zig implementation of the [EdDSA key blinding](https://chris-wood.github.io/draft-wood-cfrg-eddsa-blinding/draft-wood-cfrg-eddsa-blinding.html) proposal.
```zig
// 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);
```