Frank Denis
d75d6e7f77
Remove unused var, sort std.crypto.*
2020-09-30 01:39:55 +02:00
Frank Denis
6eaba61ef5
std/crypto: implement the HKDF construction
2020-09-30 01:39:55 +02:00
Jakub Konka
bb636cb3bf
Revert "Fix for Windows: std.os.windows.DeleteFile()"
2020-09-29 19:35:44 -04:00
Andrew Kelley
63685190da
move std.rb to the standard library orphanage
...
https://github.com/ziglang/std-lib-orphanage/
This code is not used by anything else in the standard library or by the
compiler or any of its tools and therefore it's a great candidate
to be maintained by a third party.
2020-09-29 16:01:51 -07:00
Andrew Kelley
a1ae3f92c1
Merge pull request #6442 from jedisct1/aegis
...
std/crypto: add the AEGIS AEADs
2020-09-29 15:18:06 -04:00
Andrew Kelley
65b03092e3
Merge pull request #6450 from jedisct1/gimli-opt
...
std/crypto: make Gimli 60% faster
2020-09-29 15:16:52 -04:00
Frank Denis
8d67f15d36
aegis: add test vectors, and link to the latest version of the spec
2020-09-29 17:10:04 +02:00
Frank Denis
bb1c6bc376
Add AEGIS-256 as well
2020-09-29 17:10:04 +02:00
Frank Denis
9f274e1f7d
std/crypto: add the AEGIS128L AEAD
...
Showcase that Zig can be a great option for high performance cryptography.
The AEGIS family of authenticated encryption algorithms was selected for
high-performance applications in the final portfolio of the CAESAR
competition.
They reuse the AES core function, but are substantially faster than the
CCM, GCM and OCB modes while offering a high level of security.
AEGIS algorithms are especially fast on CPUs with built-in AES support, and
the 128L variant fully takes advantage of the pipeline in modern Intel CPUs.
Performance of the Zig implementation is on par with libsodium.
2020-09-29 17:10:04 +02:00
Alexandros Naskos
d27a34f05c
Merge branch 'master' into args-tuple
2020-09-29 16:19:44 +03:00
Alexandros Naskos
3342e28784
Merge pull request #6416 from MasterQ32/meta-tuple
...
Implements std.meta.Tuple(), implements #4607 in userland.
2020-09-29 15:59:27 +03:00
Frank Denis
56d820087d
gimli: make permute a constant, remove leading underscore
2020-09-29 14:01:08 +02:00
Frank Denis
4194714965
Don't unroll the gimli permutation on release-small
2020-09-29 13:23:04 +02:00
Loris Cro
a45a4230bc
Fix std.event.Future
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-29 11:18:35 +02:00
Frank Denis
613f8fe83f
Use mem.copy() instead of manual iterations
2020-09-29 10:23:00 +02:00
Frank Denis
868a46eb43
std/crypto: make gimli slightly faster
...
Before:
gimli-hash: 120 MiB/s
gimli-aead: 130 MiB/s
After:
gimli-hash: 195 MiB/s
gimli-aead: 208 MiB/s
Also fixes in-place decryption by the way.
If the input & output buffers were the same, decryption used to fail.
Return on decryption error in the benchmark to detect similar issues
in future AEADs even in non release-fast mode.
2020-09-29 00:29:20 +02:00
Andrew Kelley
a0c0f9ead5
Merge pull request #6441 from kprotty/lock
...
New std.event.Lock implementation
2020-09-28 17:30:36 -04:00
LemonBoy
5c6cd5e2c9
stage{1,2}: Fix parsing of range literals
...
stage1 was unable to parse ranges whose starting point was written in
binary/octal as the first dot in '...' was incorrectly interpreted as
decimal point.
stage2 forgot to reset the literal type to IntegerLiteral when it
discovered the dot was not a decimal point.
I've only stumbled across this bug because zig fmt keeps formatting the
ranges without any space around the ...
2020-09-28 14:16:26 -04:00
kprotty
468a4bf0b4
address some review changes
2020-09-28 07:25:51 -05:00
Felix (xq) Queißner
c2d60bc5b5
Follows @tadeokondrak remark about taking []const type.
2020-09-28 12:24:22 +02:00
Felix (xq) Queißner
55dfe729b4
Changes comptime block to test.
2020-09-28 11:44:55 +02:00
Felix (xq) Queißner
9331466998
Changes comptime block to test.
2020-09-28 11:42:39 +02:00
Jakub Konka
e60939bfaa
Merge pull request #6397 from suirad/fix-5537
...
Fix for Windows: std.os.windows.DeleteFile()
2020-09-27 21:59:29 +02:00
kprotty
a31d9f92f2
new std.event.Lock implementation
2020-09-27 14:05:38 -05:00
Andrew Kelley
8794ce6f79
Merge pull request #6293 from LakeByTheWoods/fmt_fixes
...
zig fmt fixes
2020-09-27 05:49:38 -04:00
Ian Simonson
eab51b7785
Make LinearFifo not crash when discarding from empty buffer
...
Previously if a LinearFifo was empty and discard was called
an unsigned overflow would occur. However it is safe to perform
this overflow as a bitwise & operation with 0xFFFFFFFFFFFFFF is a noop
2020-09-27 05:46:39 -04:00
Woze Parrrot
ed357f9897
uefi system_table
2020-09-27 03:15:18 -04:00
Suirad
43cd9eb110
Add clarification comment
2020-09-25 18:11:31 -05:00
Suirad
f78652484a
Stdlib fix for os.windows.deleteFile to fail with
...
a proper error when attempting to delete a directory that isnt empty
2020-09-25 18:09:05 -05:00
Andrew Kelley
a502604702
Merge pull request #6412 from kristoff-it/generalize-event-loop
...
Make os.zig not depend on the event loop
2020-09-25 17:26:44 -04:00
Loris Cro
dc01ef7388
Remove noop check
...
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2020-09-25 23:21:20 +02:00
Alexandros Naskos
288198e51d
Merge pull request #6413 from LemonBoy/fix-5116
...
Make ArenaAllocator try to resize first
2020-09-25 19:47:50 +03:00
Loris Cro
8d01133bd0
update doc comments
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-25 18:42:24 +02:00
LemonBoy
bd9003ed5b
std: ArenaAllocator tries to resize before allocating
...
Closes #5116
2020-09-25 10:58:07 +02:00
Felix (xq) Queißner
7f68b14377
Implements std.meta.Tuple(), implements #4607 in userland.
2020-09-25 09:27:00 +02:00
Felix (xq) Queißner
93291cc472
Implements std.meta.ArgsTuple.
2020-09-25 09:16:43 +02:00
Andrew Kelley
f8b3543cab
I think this test is still flakey
...
re-opens #4922
2020-09-24 22:57:03 -07:00
Josh Wolfe
1a8669eada
build.zig: addBuildOptionArtifact
2020-09-25 01:53:38 -04:00
Loris Cro
c196c27af8
recvfrom
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
419aea54cb
sendto
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
7fec5b3def
pwritev
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
7a07c62a07
pwrite
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:21 +02:00
Loris Cro
18f6629bd8
writev
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:03 +02:00
Loris Cro
9075f8e5a1
write
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:05:41 +02:00
Loris Cro
59ecdaea12
preadv
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:04:43 +02:00
Loris Cro
bd9f2369d5
pread
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:04:05 +02:00
Loris Cro
bc35435ca6
readv
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:03:12 +02:00
Loris Cro
08364ac773
read
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:00:55 +02:00
Loris Cro
730428bfd6
connect
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 21:56:27 +02:00
Loris Cro
e85c89630e
accept
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 21:56:27 +02:00