zig/lib/std
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
..
atomic std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
build link-tests: do not save global extracted var unless a match 2022-06-28 10:23:25 +02:00
c add const to msghdr_const iov and control pointers 2022-06-07 15:23:44 -04:00
compress stage2: make error{} the same size as anyerror 2022-06-11 23:49:33 +03:00
crypto crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
dwarf wasm: Implement debug info for parameters 2022-05-09 18:51:46 +02:00
event std.event: use .{} to initiate Lock to unlocked state 2022-07-01 00:09:36 +03:00
fmt add more corner case tests to float_parse (#11727) 2022-05-26 22:05:53 -04:00
fs math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
hash std: fix crypto and hash benchmark 2022-04-24 23:01:06 -04:00
heap Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed 2022-06-25 21:27:56 -07:00
http std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io Sema: add missing set_union_tag 2022-06-12 19:17:41 +03:00
json std.json: Support disabling indent (#11823) 2022-06-29 11:53:01 +02:00
math stage2: lower float negation explicitly 2022-06-30 00:02:00 -07:00
mem Allocator: correct PanicFree function name 2022-05-02 15:29:27 -04:00
meta std.meta.TrailerFlags: improve init type 2022-05-04 21:26:48 +02:00
net LLVM: fix lowering of untagged union types 2022-06-30 02:43:05 -04:00
os zig fmt: fix idempotency with newlines surrounding doc comment 2022-06-28 21:38:28 +02:00
rand crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
target
testing Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed 2022-06-25 21:27:56 -07:00
Thread math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
time std.time.epoch: fix issue in documentation 2021-12-16 19:08:58 -08:00
tz Support legacy TZ format, expose header struct to a potential writer 2022-01-01 12:47:08 +00:00
unicode
valgrind
x std.x.os.net: make error set consistent across targets 2022-06-27 18:26:50 -07:00
zig zig fmt: fix idempotency with newlines surrounding doc comment 2022-06-28 21:38:28 +02:00
array_hash_map.zig Sema: solve a false positive "depends on itself" 2022-05-06 22:40:57 -07:00
array_list.zig std.ArrayList: use variable for local mutable state 2022-03-11 22:47:24 -07:00
ascii.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
atomic.zig std.Thread.Futex improvements (#11464) 2022-04-19 19:42:15 -05:00
base64.zig std.base64: upgrade to new function pointer semantics 2022-03-30 20:38:01 -07:00
bit_set.zig stage2: check that struct is a tuple when value tags differ in eql 2022-06-17 21:04:21 +03:00
bounded_array.zig std/bounded_array.zig: Add Writer interface 2022-04-14 02:56:40 -04:00
buf_map.zig reverse some of the now unneeded changes from squeek 2022-05-11 18:41:23 -06:00
buf_set.zig std.BufSet.clone: fix key ownership 2022-03-01 13:28:47 -05:00
build.zig build: handle weakly imported libs and frameworks 2022-06-28 09:19:01 +02:00
builtin.zig Sema: improve index out of bounds panic message 2022-05-16 17:42:51 -07:00
c.zig std.c: Move Darwin-unspecific functions from std/c/darwin.zig to std/c.zig 2022-05-07 00:02:15 +09:00
child_process.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
coff.zig std.coff: parse out codebase and entrypoint from optionalheader 2022-04-28 18:31:20 +03:00
compress.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
comptime_string_map.zig
crypto.zig crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
cstr.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
debug.zig Merge pull request #11919 from squeek502/failing-allocator-stacktrace 2022-06-28 14:44:00 -04:00
dwarf.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
dynamic_library.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
elf.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
enums.zig deprecated TypeInfo in favor of Type 2022-03-08 20:38:12 +02:00
event.zig
fifo.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
fmt.zig stage2: lower float negation explicitly 2022-06-30 00:02:00 -07:00
fs.zig std.fs: fix incorrect passing of pointer to temporary 2022-06-06 13:11:50 -07:00
hash.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
hash_map.zig std: fix missing hash map safety 2022-04-20 17:18:06 -07:00
heap.zig std: update tests to stage2 semantics 2022-06-03 20:21:20 +03:00
http.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io.zig stage2: progress towards stage3 2022-04-14 10:12:45 -07:00
json.zig std.json: Support disabling indent (#11823) 2022-06-29 11:53:01 +02:00
leb128.zig
linked_list.zig
log.zig std lib API deprecations for the upcoming 0.9.0 release 2021-11-30 00:13:07 -07:00
macho.zig macho: discriminate between normal and weak dylibs 2022-06-28 09:18:54 +02:00
math.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
mem.zig mem: add splitBackwards (#11908) 2022-06-29 08:23:09 +02:00
meta.zig std: update tests to stage2 semantics 2022-06-03 20:21:20 +03:00
multi_array_list.zig std.MultiArrayList: add functions addOne, pop, and popOrNull (#11553) 2022-04-29 22:51:53 -04:00
net.zig std: adjust for stage2 semantics 2022-06-07 21:27:07 +03:00
once.zig
os.zig std.os.execvpe: fix buffer overflow 2022-06-21 11:21:45 +02:00
packed_int_array.zig zig fmt: remove trailing whitespace on doc comments 2022-04-05 18:08:33 +03:00
pdb.zig std.pdb: fix incorrect use of packed struct 2022-05-02 22:06:02 -07:00
priority_dequeue.zig std.priority_dequeue: allow comparator to take a context parameter 2021-12-15 17:46:10 -08:00
priority_queue.zig Revert "AstGen: preserve inferred ptr result loc for breaks" 2022-06-28 18:38:25 -07:00
process.zig document that on Windows, all key arguments in EnvMap must be valid utf8 2022-05-11 18:41:23 -06:00
Progress.zig std.Progress.log: adjust API 2022-05-26 21:58:19 -07:00
rand.zig crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
segmented_list.zig std: disable tests that crash stage2 2022-06-03 20:21:20 +03:00
SemanticVersion.zig
simd.zig std: adjust for stage2 semantics 2022-06-07 21:27:07 +03:00
sort.zig std: add sort method to ArrayHashMap and MultiArrayList 2022-03-10 13:13:17 -05:00
start.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
start_windows_tls.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
std.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
target.zig Bump support macOS versions; clean up allocs in llvm.targetTriple 2022-05-22 22:31:41 +02:00
testing.zig checkAllAllocationFailures: add possibility of SwallowedOutOfMemoryError (split from NondeterministicMemoryUsage) 2022-06-23 17:20:24 -07:00
Thread.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
time.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
treap.zig treap: zig fmt 2022-04-15 17:01:01 -05:00
tz.zig std.tz: fix function returning pointer to local variable 2022-06-17 21:04:21 +03:00
unicode.zig Sema: handle tuple and anon_struct in resolveTypeFully 2022-06-11 11:02:56 +03:00
valgrind.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
wasm.zig wasm: Implement memset, and sret arguments. 2022-01-04 17:59:05 +01:00
x.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
zig.zig stage2 parser: UTF-8 encode \u{NNNNNN} escape sequences 2022-03-02 14:45:19 -05:00