zig/lib/std/crypto
Frank Denis 9ee0a706da
crypto.bcrypt: allow very large passwords to be pre-hashed (#15955)
crypto.bcrypt: allow very large passwords to be pre-hashed

bcrypt has a slightly annoying limitation: passwords are limited
to 72 characters. In the original implementation, additional characters
are silently ignored.

When they care, applications adopt different strategies to work around
this, in incompatible ways.

Ideally, large passwords should be pre-hashed using a hash function that
hinders GPU attackers, and the hashed function should not be deterministic
in order to defeat shucking attacks.

This change improves the developer experience by adding a very explicit
`silently_truncate_password` option, that can be set to `false` in
order to do that automatically, and consistently across Zig applications.

By default, passwords are still truncated, so this is not a breaking
change.

Add some inline documentation for our beloved autodoc by the way.
2023-06-06 09:08:57 +02:00
..
25519 std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
aes crypto.aes: define optimal_parallel_blocks for more CPUs (#15829) 2023-05-23 19:47:11 +00:00
Certificate std.fs.file: Rename File.Kind enum values to snake case 2023-05-25 20:17:07 +01:00
pcurves std.crypto: expose Fe isOdd & add basic parity tests for each pcurve (#15734) 2023-05-21 13:00:48 +02:00
tls std.http: add TlsAlert descriptions so that they can at least be viewed in err return traces 2023-06-01 13:43:55 -05:00
aegis.zig crypto.AegisMac: fix a regression from s/mem.copy/@memcpy/ (#15733) 2023-05-16 23:51:47 +00:00
aes.zig cbe: fix remaining aarch64 issues 2023-04-21 16:36:31 -04:00
aes_gcm.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
aes_ocb.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
argon2.zig std: update to use @memcpy directly 2023-04-28 13:24:43 -07:00
ascon.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
bcrypt.zig crypto.bcrypt: allow very large passwords to be pre-hashed (#15955) 2023-06-06 09:08:57 +02:00
benchmark.zig Fix std.hash benchmarks (#15917) 2023-06-02 20:08:28 +02:00
blake2.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
blake3.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
Certificate.zig Merge pull request #15579 from squeek502/mem-delimiters 2023-06-03 13:51:02 -07:00
chacha20.zig std.crypto.chacha: remove the hack for ChaCha with a 64-bit counter (#15818) 2023-05-23 14:36:44 +00:00
cmac.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
ecdsa.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
errors.zig std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
ff.zig std.crypto.ff - Alloc-free, constant-time field arithmetic for crypto (#15795) 2023-05-22 16:11:06 +02:00
ghash_polyval.zig std.crypto: 2.5 times faster ghash and polyval on WebAssembly (#15835) 2023-05-24 08:38:28 +02:00
hash_composition.zig std.crypto.hash: allow creating hash functions from compositions (#11965) 2022-07-01 11:37:41 +02:00
hkdf.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
hmac.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
isap.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
keccak_p.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
kyber_d00.zig std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
md5.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
modes.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
pbkdf2.zig Fix PBKDF2 docstring comment 2023-05-01 22:14:51 +03:00
phc_encoding.zig Update all std.mem.split calls to their appropriate function 2023-05-13 13:45:05 -07:00
poly1305.zig poly1305: properly cast the mask from u1 to u64 (#15869) 2023-05-27 08:50:57 +00:00
salsa20.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
scrypt.zig Update all std.mem.split calls to their appropriate function 2023-05-13 13:45:05 -07:00
sha1.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
sha2.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
sha3.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
siphash.zig Fix std.hash benchmarks (#15917) 2023-06-02 20:08:28 +02:00
test.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
tlcsprng.zig Remove Gimli and Xoodoo from the standard library (#14928) 2023-03-21 04:54:10 +00:00
tls.zig std.http: add TlsAlert descriptions so that they can at least be viewed in err return traces 2023-06-01 13:43:55 -05:00
utils.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00