Commit Graph

5 Commits (178d69191ba008dffd70d2854df09cec556b59dd)

Author SHA1 Message Date
kristopher tate 15d30b967a std/crypto/x25519.zig: add test for `createPublicKey`; 2018-09-06 12:24:53 +09:00
kristopher tate d1855a0e93 std/crypto/x25519.zig: fix signature for `createPublicKey`; 2018-09-06 12:24:12 +09:00
Marc Tiehuis 8b50d10a84 std/crypto: Clean up poly1305/x25519 2018-09-04 20:16:12 +12:00
Marc Tiehuis a7527389cc Make poly1305 and x25519 more idiomatic zig
This also adjusts the current hash/hmac functions to have a consistent
interface allowing easier switching/testing.
2018-08-31 18:40:09 +12:00
Marc Tiehuis 65b89f598c Add poly1305 and x25519 crypto primitives
These are translated from [monocypher](https://monocypher.org/) which
has fairly competitive performance while remaining quite simple.

Initial performance comparision:

Zig:
 Poly1305: 1423 MiB/s
 X25519:   8671 exchanges per second

Monocypher:
 Poly1305: 1567 MiB/s
 X25519:   10539 exchanges per second

There is room for improvement and no real effort has been made at all in
optimization beyond a direct translation.
2018-08-30 18:02:19 +12:00