aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/crypto.odin
Commit message (Collapse)AuthorAgeFilesLines
* Remove `core:mem` import from `core:crypto`.Jeroen van Rijn3 days1-4/+39
|
* core/crypto: Start work on the NIST curvesYawning Angel2026-01-281-0/+3
|
* core/crypto/_subtle: Refactor out common helpersYawning Angel2026-01-281-1/+12
|
* base/runtime: Add `rand_bytes` and `HAS_RAND_BYTES`Yawning Angel2025-11-291-1/+5
| | | | | | Having the OS/runtime provide a cryptographic entropy source is the right thing to do, and we need it to initialize the default random number generator.
* Further overhaul of package line comments.Jeroen van Rijn2025-10-091-1/+1
|
* More package linesJeroen van Rijn2025-10-091-4/+1
|
* core/crypto: Fix/add some documentation (NFC)Yawning Angel2024-07-161-1/+5
|
* fix `@(optimization_mode)` usage in builtin collectionsLaytan Laats2024-07-081-1/+1
|
* `to_random_generator` -> `random_generator`gingerBill2024-06-151-1/+1
|
* Add `Reset` modegingerBill2024-06-151-0/+2
|
* Add `runtime.Random_Generator` interfacegingerBill2024-06-151-0/+20
|
* core/crypto: Add a `HAS_RAND_BYTES` constantYawning Angel2024-04-231-6/+3
|
* core/crypto: Add `has_rand_bytes`Yawning Angel2024-04-091-0/+10
| | | | | This allows runtime detection as to if `rand_bytes` is supported or not, and lets us enable the test-case on all of the supported targets.
* core/crypto: Disable optimization for the ct byte compareYawning Angel2023-04-081-0/+1
| | | | | Hedge against the possibility of a compiler getting clever enough to optimize this pattern as well.
* crypto: Add rand_bytesYawning Angel2021-11-171-0/+11
| | | | | | | This adds `rand_bytes(dst: []byte)` which fills the destination buffer with entropy from the cryptographic random number generator. This takes the "simple is best" approach and just directly returns the OS CSPRNG output instead of doing anything fancy (a la OpenBSD's arc4random).
* core/crypto: Add constant-time memory comparison routinesYawning Angel2021-11-171-0/+41
Using a constant-time comparison is required when comparing things like MACs, password digests, and etc to avoid exposing sensitive data via trivial timing attacks. These routines could also live under core:mem, but they are somewhat specialized, and are likely only useful for cryptographic applications.