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 remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
aes.zig std: break up some long lines 2022-01-28 16:23:47 -07:00
aes_gcm.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
aes_ocb.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
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 std: add writer methods on all crypto.hash types (#10168) 2021-11-20 01:37:17 -08:00
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 std/crypto: use finer-grained error sets in function signatures (#8558) 2021-04-20 19:57:27 +02:00
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 remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
hmac.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
isap.zig std: update usage of std.testing 2021-05-08 15:15:30 +03:00
md5.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
modes.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
pbkdf2.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
phc_encoding.zig std.crypto: fix invalid pass by value 2022-06-20 15:11:22 +03:00
poly1305.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
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 std: add writer methods on all crypto.hash types (#10168) 2021-11-20 01:37:17 -08:00
sha2.zig std: add writer methods on all crypto.hash types (#10168) 2021-11-20 01:37:17 -08:00
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 remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
tlcsprng.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
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