zig/lib/std
Frank Denis 51a3d0603c std.rand: set DefaultCsprng to Gimli, and require a larger seed
`DefaultCsprng` is documented as a cryptographically secure RNG.

While `ISAAC` is a CSPRNG, the variant we have, `ISAAC64` is not.
A 64 bit seed is a bit small to satisfy that claim.

We also saw it being used with the current date as a seed, that
also defeats the point of a CSPRNG.

Set `DefaultCsprng` to `Gimli` instead of `ISAAC64`, rename
the parameter from `init_s` to `secret_seed` + add a comment to
clarify what kind of seed is expected here.

Instead of directly touching the internals of the Gimli implementation
(which can change/be architecture-specific), add an `init()` function
to the state.

Our Gimli-based CSPRNG was also not backtracking resistant. Gimli
is a permutation; it can be reverted. So, if the state was ever leaked,
future secrets, but also all the previously generated ones could be
recovered. Clear the rate after a squeeze in order to prevent this.

Finally, a dumb test was added just to exercise `DefaultCsprng` since
we don't use it anywhere.
2020-10-15 20:57:16 -04:00
..
atomic
build std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
c std.c (darwin) update to new opaque syntax 2020-10-08 22:45:39 -07:00
compress std: Add a gzip decoder 2020-09-11 20:02:41 -04:00
crypto std.rand: set DefaultCsprng to Gimli, and require a larger seed 2020-10-15 20:57:16 -04:00
debug update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
event Merge pull request #6655 from kprotty/timers 2020-10-14 21:49:45 -04:00
fmt Merge pull request #6246 from Vexu/field 2020-09-05 13:58:02 +03:00
fs disable the failing std lib freebsd tests 2020-10-12 20:08:23 -07:00
hash Merge pull request #6172 from tadeokondrak/@Type(.Union) 2020-09-14 16:43:49 +03:00
heap std: ArenaAllocator tries to resize before allocating 2020-09-25 10:58:07 +02:00
io Use less inefficient method of replacing TypeInfo.UnionField.enum_field 2020-09-07 06:23:27 -06:00
json
math std: Add/Fix/Change parts of big.int 2020-10-09 22:16:48 -04:00
mem use Allocator.allocSentinel now that the stage1 bug is fixed 2020-09-29 12:06:35 -07:00
meta Add alignment field to TypeInfo.UnionField and TypeInfo.StructField 2020-10-01 15:01:25 -06:00
net
os Merge pull request #6616 from fengb/darwin-rusage 2020-10-15 20:49:54 -04:00
rand
special std/build: support --color 2020-10-13 20:06:03 +02:00
target Merge remote-tracking branch 'origin/master' into llvm11 2020-08-21 14:50:37 -07:00
testing
time
unicode
valgrind
zig getExternalExecutor fixups regarding dynamic linker 2020-10-15 16:44:16 -07:00
array_hash_map.zig std.ArrayHashMap: count and iterator are not deprecated 2020-09-25 20:50:40 -07:00
array_list.zig Fix std.ArrayListUnmanaged + improve test coverage 2020-09-29 19:49:13 +02:00
array_list_sentineled.zig
ascii.zig
atomic.zig
auto_reset_event.zig Add more comments & cleanup AutoResetEvent 2020-10-11 19:16:07 -05:00
base64.zig
buf_map.zig
buf_set.zig hash_map: rename to ArrayHashMap and add new HashMap implementation 2020-09-02 00:17:50 +02:00
build.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
builtin.zig Merge pull request #6421 from tadeokondrak/opaque-syntax 2020-10-07 16:58:50 -04:00
c.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
child_process.zig replaced inStream() with reader() 2020-10-15 19:30:21 -04:00
coff.zig Completed basic PE linker for stage2 2020-09-04 05:15:03 +03:00
compress.zig std: Add a gzip decoder 2020-09-11 20:02:41 -04:00
comptime_string_map.zig
crypto.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
cstr.zig
debug.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
dwarf.zig
dwarf_bits.zig
dynamic_library.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
elf.zig std: Fix typo in ELF section header iterator 2020-09-15 18:14:06 +03:00
event.zig add WaitGroup to std.event 2020-10-07 04:34:09 -04:00
fifo.zig Make LinearFifo not crash when discarding from empty buffer 2020-09-27 05:46:39 -04:00
fmt.zig std/fmt: add bufPrintZ() 2020-10-15 12:21:19 +02:00
fs.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
hash.zig Promote hash/siphash to crypto/siphash 2020-08-22 02:47:50 -04:00
hash_map.zig Switch type of HashMap's count from usize to u32 (#6262) 2020-09-09 00:33:14 -04:00
heap.zig std: ArenaAllocator tries to resize before allocating 2020-09-25 10:58:07 +02:00
io.zig zig fmt: Remove dynamic stack from auto-indenting-stream 2020-08-31 23:39:50 +10:00
json.zig Use less inefficient method of replacing TypeInfo.UnionField.enum_field 2020-09-07 06:23:27 -06:00
linked_list.zig std: remove init functions from linked list nodes 2020-08-22 02:47:39 -04:00
log.zig fix another round of regressions in this branch 2020-09-26 21:03:38 -07:00
macho.zig Write out LC_DYSYMTAB together with dyld_stub_binder undef symbol 2020-10-04 15:31:47 +02:00
math.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
mem.zig update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
meta.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
mutex.zig
net.zig recvfrom 2020-09-24 22:06:41 +02:00
once.zig
os.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
packed_int_array.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
pdb.zig update rest of tests 2020-09-04 22:49:14 +03:00
priority_queue.zig Fix issue #6303: iterating empty PriorityQueue crashes 2020-09-10 12:00:53 +03:00
process.zig Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
progress.zig Introduces a space after the ellipsis for test and progress. 2020-09-03 18:07:30 -04:00
rand.zig std.rand: set DefaultCsprng to Gimli, and require a larger seed 2020-10-15 20:57:16 -04:00
reset_event.zig
segmented_list.zig
sort.zig
spinlock.zig
start.zig std: start: use std.log instead of stderr 2020-09-18 01:58:16 -07:00
start_windows_tls.zig
std.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
target.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
testing.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
thread.zig update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
time.zig Merge pull request #6655 from kprotty/timers 2020-10-14 21:49:45 -04:00
unicode.zig
valgrind.zig
zig.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00