zig/lib/std/crypto
Frank Denis ee01dd4032
crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866)
Gimli was a game changer. A permutation that is large enough to be
used in sponge-like constructions, yet small enough to be compact
to implement and fast on a wide range of platforms.

And Gimli being part of the Zig standard library was awesome.

But since then, Gimli entered the NIST Lightweight Cryptography
Competition, competing againt other candidates sharing a similar set
of properties.

Unfortunately, Gimli didn't pass the 3rd round.

There are no practical attacks against Gimli when used correctly, but
NIST's decision means that Gimli is unlikely to ever get any traction.

So, maybe the time has come to move Gimli from the standard library
to another repository.

We shouldn't do it without providing an alternative, though.
And the best candidate for this is probably Xoodoo.

Xoodoo is the core function of Xoodyak, one of the finalists of the
NIST LWC competition, and the most direct competitor to Gimli. It is
also a 384-bit permutation, so it can easily be used everywhere Gimli
was used with no parameter changes.

It is the building block of Xoodyak (for actual encryption and hashing)
as well as Charm, that some Zig applications are already using.

Like Gimli that it was heavily inspired from, it is compact and
suitable for constrained environments.

This change adds the Xoodoo permutation to std.crypto.core.

The set of public functions includes everything required to later
implement existing Xoodoo-based constructions.

In order to prepare for the Gimli deprecation, the default
CSPRNG was changed to a Xoodoo-based that works exactly the same way.
2022-07-01 13:18:08 +02:00
..
25519 std/crypto/{25519,pcurves}: make the scalar field order public (#11955) 2022-06-29 07:44:43 +02:00
aes std.crypto: cosmetic improvement to AES multiplication algorithm (#11616) 2022-05-25 19:23:49 +02:00
pcurves std.crypto.ecc: add support for the secp256k1 curve (#11880) 2022-06-29 15:11:33 +02:00
aegis.zig
aes.zig
aes_gcm.zig
aes_ocb.zig
argon2.zig std.crypto: fix invalid pass by value 2022-06-20 15:11:22 +03:00
bcrypt.zig std.crypto: fix invalid pass by value 2022-06-20 15:11:22 +03:00
benchmark.zig std: fix crypto and hash benchmark 2022-04-24 23:01:06 -04:00
blake2.zig
blake3.zig std: update tests to stage2 semantics 2022-06-03 20:21:20 +03:00
chacha20.zig replace other uses of std.meta.Vector with @Vector (#11346) 2022-03-30 14:12:14 -04:00
ecdsa.zig std.crypto.hash: allow creating hash functions from compositions (#11965) 2022-07-01 11:37:41 +02:00
errors.zig
ghash.zig replace other uses of std.meta.Vector with @Vector (#11346) 2022-03-30 14:12:14 -04:00
gimli.zig replace other uses of std.meta.Vector with @Vector (#11346) 2022-03-30 14:12:14 -04:00
hash_composition.zig std.crypto.hash: allow creating hash functions from compositions (#11965) 2022-07-01 11:37:41 +02:00
hkdf.zig
hmac.zig
isap.zig
md5.zig
modes.zig
pbkdf2.zig
phc_encoding.zig std.crypto: fix invalid pass by value 2022-06-20 15:11:22 +03:00
poly1305.zig
salsa20.zig replace other uses of std.meta.Vector with @Vector (#11346) 2022-03-30 14:12:14 -04:00
scrypt.zig std.crypto: fix invalid pass by value 2022-06-20 15:11:22 +03:00
sha1.zig
sha2.zig
sha3.zig std: update tests to stage2 semantics 2022-06-03 20:21:20 +03:00
siphash.zig Fixes comptime 'error: cannot assign to constant' error in siphash. 2022-05-16 22:31:09 -04:00
test.zig
tlcsprng.zig
utils.zig replace other uses of std.meta.Vector with @Vector (#11346) 2022-03-30 14:12:14 -04:00
xoodoo.zig crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00