Files
Odin/core/crypto
Yawning Angel 44758f2a60 core/crypto: Stop using context.temp_allocator
The max digest size for the foreseeable future will be 512 bits, and the
max block size is currently 1152 bits (SHA3-224).  If people add more
exotic hash algorithms without bumping the constants when required,
tests will fail.

The stream buffer will currently be 576 bytes, which is "fine" to just
stick on the stack, and is a sensible multiple of the more common block
size of 64 bytes.
2024-02-07 02:33:53 +09:00
..
2023-11-17 16:53:29 +09:00
2023-11-17 16:53:29 +09:00
2023-10-27 10:51:21 +11:00
2022-02-25 08:49:25 +00:00

crypto

A cryptography library for the Odin language.

Supported

This package offers various algorithms implemented in Odin, along with useful helpers such as access to the system entropy source, and a constant-time byte comparison.

Implementation considerations

  • The crypto packages are not thread-safe.
  • Best-effort is make to mitigate timing side-channels on reasonable architectures. Architectures that are known to be unreasonable include but are not limited to i386, i486, and WebAssembly.
  • The packages attempt to santize sensitive data, however this is, and will remain a "best-effort" implementation decision. As Thomas Pornin puts it "In general, such memory cleansing is a fool's quest."
  • All of these packages have not received independent third party review.

License

This library is made available under the BSD-3 license.