{"id":13830138,"url":"https://github.com/mirage/mirage-crypto","last_synced_at":"2026-02-10T17:06:13.511Z","repository":{"id":37447436,"uuid":"238478536","full_name":"mirage/mirage-crypto","owner":"mirage","description":"Cryptographic primitives for OCaml, in OCaml (also used in MirageOS)","archived":false,"fork":false,"pushed_at":"2026-02-09T20:53:28.000Z","size":9533,"stargazers_count":81,"open_issues_count":23,"forks_count":46,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-02-09T23:59:06.722Z","etag":null,"topics":["aes","cryptography","dh","dsa","fortuna","mirageos","ocaml","rng","rsa","sha2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-05T15:08:28.000Z","updated_at":"2026-02-09T20:53:33.000Z","dependencies_parsed_at":"2024-03-11T14:45:00.533Z","dependency_job_id":"b34bf106-e2d7-4fd3-9479-f36dcb3e7221","html_url":"https://github.com/mirage/mirage-crypto","commit_stats":{"total_commits":1223,"total_committers":37,"mean_commits":"33.054054054054056","dds":0.4677023712183156,"last_synced_commit":"b9033a26b4ebc950d36a7fca7c7669fd344e8e04"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/mirage/mirage-crypto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fmirage-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fmirage-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fmirage-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fmirage-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirage","download_url":"https://codeload.github.com/mirage/mirage-crypto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirage%2Fmirage-crypto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29308986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","cryptography","dh","dsa","fortuna","mirageos","ocaml","rng","rsa","sha2"],"created_at":"2024-08-04T10:00:56.372Z","updated_at":"2026-02-10T17:06:13.503Z","avatar_url":"https://github.com/mirage.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# OCaml cryptographic primitives library\n\nThis repository contains a small cryptographic library that puts emphasis on the\napplicative style and ease of use. It includes basic ciphers (AES, 3DES, RC4,\nChaCha20/Poly1305), AEAD primitives (AES-GCM, AES-CCM, ChaCha20/Poly1305),\npublic-key primitives (RSA, DSA, DH), elliptic curves (NIST P-256, P-384, P-521,\nand curve 25519), and a strong RNG (Fortuna).\n\nRSA timing attacks are countered by blinding. AES timing attacks are avoided by\ndelegating to AES-NI.\n\nInitially, this package was developed for [MirageOS](https://mirageos.org), but\nit is very well suitable in any OCaml application. It is a fork of the\n[ocaml-nocrypto](https://github.com/mirleft/ocaml-nocrypto) package developed by\nDavid Kaloper. It was forked with the permission of the original author in order\nto facilitate changes (e.g. build system) required by MirageOS that the upstream\ndidn't have time to keep up with.\n\nThe following packages are provided in this repository, each installable via `opam install package-name`:\n- `mirage-crypto` - the base for symmetric ciphers (AES, 3DES, RC4, ChaCha20/Poly1305) - uses allocation-free and loop-free C code,\n- `mirage-crypto-ec` - elliptic curves (NIST P-256, P-384, P-521, curve 25519) - uses primitives exported from [fiat-crypto](https://github.com/mit-plv/fiat-crypto),\n- `mirage-crypto-pk` - asymmetric cryptography (RSA, DSA, DH) - uses [zarith](https://github.com/ocaml/zarith) with [gmp](https://gmplib.org),\n- `mirage-crypto-rng` - random number generators (Fortuna, HMAC-DRBG),\n- `mirage-crypto-rng-mirage` - seed and feed entropy for the RNG with MirageOS unikernels,\n- `mirage-crypto-rng-miou-unix` - seed and feed entropy for the RNG with [miou](https://github.com/robur-coop/miou) scheduler on Unix.\n\nOn Unix, `getrandom()` (and `getentropy()`) or `/dev/urandom` are used for\nrandom number generation. On MirageOS, entropy harvesting and feeding uses\nnon-deterministic execution time ([whirlwind RNG](https://www.ieee-security.org/TC/SP2014/papers/Not-So-RandomNumbersinVirtualizedLinuxandtheWhirlwindRNG.pdf)),\nand hooks into the main event loop to get some bits of the timestamp of each event,\n`rdrand` and `rdseed` CPU instructions if available.\n\n## RNG seeding\n\nIf RNG fails with `Fatal error: exception Unseeded_generator`, you need to\nseed it.\n\n```OCaml\nlet () = Mirage_crypto_rng_unix.use_default ()\n```\n\n## LICENSE\n\nMostly ISC, the `mirage-crypto-rng-mirage` is 2 clause BSD licensed, `mirage-crypto-ec` is MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Fmirage-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirage%2Fmirage-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirage%2Fmirage-crypto/lists"}