package mirage-crypto-rng
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=332886c365c6035077e3ce676a63da8f7500c15a1628b3c07e139b0e551f1f6f
sha512=cb8f4de93241cde0582bcd0283766c681a02dbcb9f3b4786eb0656c651f42ba2db467ff63bff79c5eacfd410e410d77dc31bfc51049c39e1e86685ec0a884c1f
Description
Mirage-crypto-rng provides a random number generator interface, and implementations: Fortuna, HMAC-DRBG, getrandom/getentropy based (in the unix sublibrary)
Added to opam-repository:
README
OCaml cryptographic primitives library
This repository contains a small cryptographic library that puts emphasis on the applicative style and ease of use. It includes basic ciphers (AES, 3DES, RC4, ChaCha20/Poly1305), AEAD primitives (AES-GCM, AES-CCM, ChaCha20/Poly1305), public-key primitives (RSA, DSA, DH), elliptic curves (NIST P-256, P-384, P-521, and curve 25519), and a strong RNG (Fortuna).
RSA timing attacks are countered by blinding. AES timing attacks are avoided by delegating to AES-NI.
Initially, this package was developed for MirageOS, but it is very well suitable in any OCaml application. It is a fork of the ocaml-nocrypto package developed by David Kaloper. It was forked with the permission of the original author in order to facilitate changes (e.g. build system) required by MirageOS that the upstream didn't have time to keep up with.
The following packages are provided in this repository, each installable via opam install package-name:
mirage-crypto- the base for symmetric ciphers (AES, 3DES, RC4, ChaCha20/Poly1305) - uses allocation-free and loop-free C code,mirage-crypto-ec- elliptic curves (NIST P-256, P-384, P-521, curve 25519) - uses primitives exported from fiat-crypto,mirage-crypto-pk- asymmetric cryptography (RSA, DSA, DH) - uses zarith with gmp,mirage-crypto-rng- random number generators (Fortuna, HMAC-DRBG),mirage-crypto-rng-mirage- seed and feed entropy for the RNG with MirageOS unikernels,mirage-crypto-rng-mkernel- seed and feed entropy for the RNG with mkernel (using the miou scheduler).
On Unix, getrandom() (and getentropy()) or /dev/urandom are used for random number generation. On MirageOS, entropy harvesting and feeding uses non-deterministic execution time (whirlwind RNG), and hooks into the main event loop to get some bits of the timestamp of each event, rdrand and rdseed CPU instructions if available.
RNG seeding
If RNG fails with Fatal error: exception Unseeded_generator, you need to seed it.
let () = Mirage_crypto_rng_unix.use_default ()LICENSE
Mostly ISC, the mirage-crypto-rng and mirage-crypto-rng-mirage packages are 2 clause BSD licensed, the mirage-crypto-ec package is MIT licensed.
Dependencies (7)
-
digestif
>= "1.1.4" -
mirage-crypto
= version - logs
- duration
-
dune-configurator
>= "2.0.0" -
dune
>= "2.7" -
ocaml
>= "4.14.0"
Dev Dependencies (3)
-
ohex
with-test & >= "0.2.0" -
randomconv
with-test & >= "0.2.0" -
ounit2
with-test
Used by (79)
-
albatross
= "2.1.0" - anthropic
-
arc
>= "0.0.3" -
awa
>= "0.4.0" -
awskit-eio
< "0.2.0" - awso-eio
- azure-cosmos-db-eio
-
builder-web
>= "0.2.0" -
caldav
>= "0.2.4" -
capnp-rpc-net
>= "1.2.4" -
capnp-rpc-unix
>= "2.1" -
caqti-eio
>= "2.1.2" -
chamelon
>= "0.2.1" -
chamelon-unix
>= "0.2.1" -
charrua-client
>= "1.6.0" - chatoyant
-
cohttp-eio
>= "6.1.0" -
conduit-mirage
>= "8.0.0" -
conex-mirage-crypto
>= "1.0.0" -
dkim
>= "0.8.0" -
dkim-mirage
>= "0.8.0" -
dns-certify
>= "10.1.0" -
dns-cli
>= "9.1.0" -
dns-client
>= "9.1.0" -
dns-client-lwt
>= "10.1.0" -
dns-client-mirage
>= "10.1.0" -
dns-resolver
>= "10.1.0" -
dns-server
>= "9.1.0" -
dns-stub
>= "10.1.0" -
dream
>= "1.0.0~alpha7" -
flux
>= "0.0.1~beta6" -
git
>= "3.17.0" -
git-unix
>= "3.17.0" - granary
- http-mirage-client
-
httpcats
>= "0.3.1" -
irmin-cli
>= "3.11.0" -
irmin-client
>= "3.11.0" -
jose
>= "0.10.0" - jws
-
letsencrypt
>= "1.0.0" & < "2.0.0" -
letsencrypt-app
>= "1.0.0" - MlFront_Cache
- MlFront_Signify
- mhttp
- miou
-
mirage-crypto-ec
>= "2.4.1" -
mirage-crypto-pk
>= "2.4.1" -
mirage-crypto-rng-mirage
>= "2.4.1" -
mirage-crypto-rng-mkernel
>= "2.4.1" - mnet
- mnet-dhcp
-
mrmime
>= "0.7.0" - neodriver_eio
- noise
-
ocluster
>= "0.4.0" - oidc
-
opentelemetry-client-cohttp-eio
>= "0.90" -
otr
>= "1.0.0" -
paf
>= "0.7.0" -
paf-cohttp
>= "0.8.0" - passe
- polymarket
- snf_mcp
-
starred_ml
>= "0.0.8" -
tcpip
>= "8.2.0" -
tls
>= "1.0.4" -
tls-async
>= "2.0.1" -
tls-eio
>= "2.0.1" - tls-liquidsoap
-
tls-lwt
>= "2.0.1" -
tls-miou-unix
>= "2.1.2" - utcp
- valkey
-
vif
>= "0.0.1~beta4" -
webauthn
>= "0.2.0" -
websocket
>= "2.17" -
x509
>= "1.0.6" -
yocaml_git
>= "2.2.0"
Conflicts (1)
-
mirage-runtime
< "3.8.0"