zig/lib/std/crypto
mlugg d11bbde5f9
compiler: remove anonymous struct types, unify all tuples
This commit reworks how anonymous struct literals and tuples work.

Previously, an untyped anonymous struct literal
(e.g. `const x = .{ .a = 123 }`) was given an "anonymous struct type",
which is a special kind of struct which coerces using structural
equivalence. This mechanism was a holdover from before we used
RLS / result types as the primary mechanism of type inference. This
commit changes the language so that the type assigned here is a "normal"
struct type. It uses a form of equivalence based on the AST node and the
type's structure, much like a reified (`@Type`) type.

Additionally, tuples have been simplified. The distinction between
"simple" and "complex" tuple types is eliminated. All tuples, even those
explicitly declared using `struct { ... }` syntax, use structural
equivalence, and do not undergo staged type resolution. Tuples are very
restricted: they cannot have non-`auto` layouts, cannot have aligned
fields, and cannot have default values with the exception of `comptime`
fields. Tuples currently do not have optimized layout, but this can be
changed in the future.

This change simplifies the language, and fixes some problematic
coercions through pointers which led to unintuitive behavior.

Resolves: #16865
2024-10-31 20:42:53 +00:00
..
25519 std: update for new CallingConvention 2024-10-19 19:15:23 +01:00
aes std: update eval branch quotas after bdbc485 2024-08-21 01:30:46 +01:00
Certificate Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
pcurves compiler: handle eval branch quota in memoized calls 2024-08-21 01:26:55 +01:00
tls Add post-quantum key agreement X25519MLKEM768 2024-09-24 13:18:32 -07:00
aegis.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
aes.zig x86_64: fix incorrect mnemonic selection 2024-02-25 11:22:10 +01:00
aes_gcm.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
aes_ocb.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
argon2.zig std.crypto.pwhash: Add recommended parameters (#20527) 2024-07-07 20:18:33 +00:00
ascon.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
bcrypt.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
benchmark.zig std.crypto.pcurves.*: simpler, smaller, faster u64 addition with carry (#19644) 2024-04-14 01:13:22 +02:00
blake2.zig std: update eval branch quotas after bdbc485 2024-08-21 01:30:46 +01:00
blake3.zig x86_64: implement more shuffles 2024-02-25 11:22:10 +01:00
Certificate.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
chacha20.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
cmac.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
ecdsa.zig std.crypto.ecdsa: use separate function for null seed (#20953) 2024-08-07 01:06:15 -07:00
errors.zig crypto.edwards25519: add the ability to check for group membership (#20175) 2024-06-04 10:11:05 +02:00
ff.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
ghash_polyval.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
hash_composition.zig x86_64: implement enough to pass unicode tests 2023-10-23 22:42:18 -04:00
hkdf.zig closes #21824 (#21832) 2024-10-28 14:54:02 +00:00
hmac.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
isap.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
keccak_p.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
md5.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
ml_kem.zig std.crypto.ml_kem: Reduce test iteration counts from 100 to 10. (#21285) 2024-09-02 23:20:48 +00:00
modes.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
pbkdf2.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
phc_encoding.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
poly1305.zig std: avoid field/decl name conflicts 2024-08-29 20:39:11 +01:00
salsa20.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
scrypt.zig std.crypto.pwhash: Add recommended parameters (#20527) 2024-07-07 20:18:33 +00:00
sha1.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
sha2.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
sha3.zig closes #21824 (#21832) 2024-10-28 14:54:02 +00:00
siphash.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
test.zig
timing_safe.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
tlcsprng.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
tls.zig Add post-quantum key agreement X25519MLKEM768 2024-09-24 13:18:32 -07:00