Laytan ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 1 éve
..
_aes ac7f44b1b8 core/crypto/aes: Slightly tweak GHASH to look less spooky 1 éve
_blake2 00ab3beed9 core:crypto/hash: Add a generic higher level hash interface 1 éve
_chacha20 ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 1 éve
_edwards25519 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
_fiat 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
_sha3 b818ebc02f core/crypto/kmac: Initial import 1 éve
aead ba1ad82c2b core/crypto/aead: Initial import 1 éve
aes ba1ad82c2b core/crypto/aead: Initial import 1 éve
blake2b 7a8b1669b0 core/crypto: Expose the block sizes for every hash algorithm 1 éve
blake2s 7a8b1669b0 core/crypto: Expose the block sizes for every hash algorithm 1 éve
chacha20 ba1ad82c2b core/crypto/aead: Initial import 1 éve
chacha20poly1305 ba1ad82c2b core/crypto/aead: Initial import 1 éve
ed25519 b9293334ca core/crypto/ed25519: Rename a member for clarity 1 éve
hash b68311d777 core/crypto/hash: Make the `_to_buffer` routines return the hash slice 1 éve
hkdf 550e798c1b core/crypto/hkdf: Initial import 1 éve
hmac fa8dd5a13b core/crypto: Misc cleanups and documentation improvements 1 éve
kmac 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
legacy 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
pbkdf2 290168f862 core/crypto/pbkdf2: Initial import 1 éve
poly1305 4defe88dec core/crypto/_fiat/field_poly1305: Mark more functions contextless 1 éve
ristretto255 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
sha2 7a8b1669b0 core/crypto: Expose the block sizes for every hash algorithm 1 éve
sha3 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
shake 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
siphash e86bb3a795 core/crypto: Change hash asserts to panics 1 éve
sm3 7a8b1669b0 core/crypto: Expose the block sizes for every hash algorithm 1 éve
tuplehash 4b71c47fd5 Check for unneeded `transmute` with `-vet-cast` 1 éve
x25519 563c527419 core/crypto/_edwards25519: Initial import 1 éve
README.md a43a5b053c core/crypto: Add more documentation about assumptions (NFC) 1 éve
crypto.odin c9c0b9ea7b core/crypto: Fix/add some documentation (NFC) 1 éve
rand_bsd.odin 7feff1c113 Merged with master 1 éve
rand_darwin.odin e296d6fb90 Fix loads of indentation issues with mixing spaces and tabs 1 éve
rand_generic.odin 7feff1c113 Merged with master 1 éve
rand_js.odin a6eb64df6c core/crypto: Add a `HAS_RAND_BYTES` constant 1 éve
rand_linux.odin 3ff8952813 Replace `panic(fmt.tprintf(` antipattern with `fmt.panicf` 1 éve
rand_windows.odin 9f9abb8fb3 Use `union #shared_nil` for `os.Error` 1 éve

README.md

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.
  • Implementations assume a 64-bit architecture (64-bit integer arithmetic is fast, and includes add-with-carry, sub-with-borrow, and full-result multiply).
  • Hardware sidechannels are explicitly out of scope for this package. Notable examples include but are not limited to:
    • Power/RF side-channels etc.
    • Fault injection attacks etc.
    • Hardware vulnerabilities ("apply mitigations or buy a new CPU").
  • 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.