zig/lib/std/crypto
Andrew Kelley a0f9a5e78d std: more reliable HTTP and TLS networking
* std.Io.Reader: fix confused semantics of rebase. Before it was
  ambiguous whether it was supposed to be based on end or seek. Now it
  is clearly based on seek, with an added assertion for clarity.

* std.crypto.tls.Client: fix panic due to not enough buffer size
  available. Also, avoid unnecessary rebasing.

* std.http.Reader: introduce max_head_len to limit HTTP header length.
  This prevents crash in underlying reader which may require a minimum
  buffer length.

* std.http.Client: choose better buffer sizes for streams and TLS
  client. Crucially, the buffer shared by HTTP reader and TLS client
  needs to be big enough for all http headers *and* the max TLS record
  size. Bump HTTP header size default from 4K to 8K.

fixes #24872

I have noticed however that there are still fetch problems
2025-08-16 00:16:15 -07:00
..
25519 std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
aes std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
Certificate std.crypto.Certificate.Bundle: haiku support 2025-06-05 13:45:52 +01:00
codecs zig fmt: apply new cast builtin order 2025-08-03 14:59:56 +02:00
pcurves std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
tls std: more reliable HTTP and TLS networking 2025-08-16 00:16:15 -07:00
aegis.zig std.crypto.aegis: Absorb ad instead of encrypting it. 2025-08-13 09:00:57 +02:00
aes.zig std.Target: Introduce Cpu convenience functions for feature tests. 2025-06-05 06:12:00 +02:00
aes_gcm.zig Add documentation to std.crypto.aes_gcm.AesGcm.encrypt (#24427) 2025-07-13 07:33:08 +00:00
aes_ocb.zig crypto/aes_ocb.zig: actually check against test vectors (#24835) 2025-08-15 13:09:06 +00:00
argon2.zig std.ArrayList: make unmanaged the default 2025-08-11 15:52:49 -07:00
ascon.zig std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
bcrypt.zig crypto.pwhash.bcrypt: make silently_truncate_password a member of Params (#22792) 2025-02-19 22:37:51 +01:00
benchmark.zig std.fmt: breaking API changes 2025-07-07 22:43:51 -07:00
blake2.zig std.io: deprecated Reader/Writer; introduce new API 2025-07-07 22:43:51 -07:00
blake3.zig std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
Certificate.zig Validate wildcard TLS certificates correctly (#24829) 2025-08-14 13:57:00 +00:00
chacha20.zig std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
cmac.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
codecs.zig fixed codecs.zig (#23706) 2025-04-29 22:07:30 +00:00
ecdsa.zig crypto: fix typo in ecdsa comment 2025-08-05 07:51:39 +01: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: remove inline from most functions 2025-07-13 18:26:13 +02: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 crypto.keccak.State: add checks to prevent insecure transitions (#22020) 2024-11-20 11:16:09 +01:00
md5.zig std.tar: update to new I/O API 2025-07-22 09:41:44 -07:00
ml_kem.zig std: fmt.format to io.Writer.print 2025-07-09 15:31:02 -07: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 std.Io: delete CountingWriter 2025-08-07 22:26:42 -07:00
poly1305.zig std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
salsa20.zig std.crypto: remove inline from most functions 2025-07-13 18:26:13 +02:00
scrypt.zig std.Io: delete CountingWriter 2025-08-07 22:26:42 -07:00
Sha1.zig std.crypto: fix Sha1 namespace 2025-07-14 00:14:21 -07:00
sha2.zig zig fmt 2025-07-16 10:27:39 -07:00
sha3.zig std.io: deprecated Reader/Writer; introduce new API 2025-07-07 22:43:51 -07:00
siphash.zig std.io: deprecated Reader/Writer; introduce new API 2025-07-07 22:43:51 -07:00
test.zig
timing_safe.zig zig fmt: apply new cast builtin order 2025-08-03 14:59:56 +02:00
tlcsprng.zig std.crypto.tlcsprng: Fix hardcoded use of defaultRandomSeed() 2025-02-22 22:39:40 -05:00
tls.zig std.crypto.tls: rework for new std.Io API 2025-08-07 10:04:29 -07:00