Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. OCaml
  3. cryptokit

cryptokit

NOASSERTIONCrelease1211

A comprehensive OCaml library providing cryptographic primitives like ciphers, hashes, and public-key cryptography for security-sensitive applications.

GitHubGitHub
109 stars27 forks0 contributors

What is cryptokit?

Cryptokit is an OCaml library that provides a comprehensive set of cryptographic primitives, including ciphers, hash functions, public-key cryptography, and random number generation. It solves the need for implementing secure cryptographic protocols in OCaml applications, offering both modern and legacy algorithms in a modular framework.

Target Audience

OCaml developers building security-sensitive applications, such as secure communication tools, authentication systems, or data protection utilities, who need reliable cryptographic primitives.

Value Proposition

Developers choose Cryptokit for its extensive, well-documented primitives, composable design that allows custom cryptographic pipelines, and integration with OCaml's ecosystem via Dune and Zarith.

Overview

A library of cryptographic primitives (ciphers, hashes, etc) for OCaml

Use Cases

Best For

  • Implementing secure communication protocols in OCaml
  • Adding encryption and decryption capabilities to OCaml applications
  • Generating and verifying digital signatures with RSA or ECDSA
  • Performing key derivation for password-based authentication
  • Creating custom cryptographic transformations using a modular approach
  • Benchmarking cryptographic operations in OCaml environments

Not Ideal For

  • Projects requiring timing-attack-resistant implementations for public-key cryptography
  • Teams needing out-of-the-box, high-level security protocols without composing primitives
  • Applications in jurisdictions with strict cryptographic export or usage regulations
  • Environments where only specific, non-Weierstrass elliptic curve forms are required

Pros & Cons

Pros

Comprehensive Algorithm Support

Includes a wide range of modern and legacy primitives like AES-GCM, Chacha20-Poly1305, SHA-3, and RSA, as listed in the overview and features section.

Modular Transformation Design

Promotes a 'Lego'-like style for composing cryptographic pipelines from primitives, enabling custom workflows over character streams.

Hardware Acceleration Integration

Uses AES-NI and PCLMUL extensions on supported x86 processors for AES and GCM, as noted in the design notes, improving performance.

Extensive Documentation

Offers detailed documentation comments in cryptokit.mli and buildable HTML docs with Dune, aiding in implementation and debugging.

Cons

Lack of Timing Attack Protection

The README explicitly states that RSA and ECDSA implementations are not protected against timing attacks, posing security risks for sensitive applications.

Limited Elliptic Curve Support

Only supports elliptic curves in Weierstrass form, missing other common formats, which restricts flexibility for modern cryptographic protocols.

Complex Dependency Setup

Requires OCaml 4.08+, Dune, Zarith, and Zlib, with configuration steps that can be challenging for developers new to the OCaml ecosystem.

Frequently Asked Questions

Quick Stats

Stars109
Forks27
Contributors0
Open Issues5
Last commit6 months ago
CreatedSince 2016

Tags

#random-number-generation#key-derivation#security-library#encryption#cryptography#public-key-cryptography#hash-functions#ocaml#symmetric-ciphers

Built With

d
dune
z
zlib
O
OCaml

Included in

OCaml3.1k
Auto-fetched 10 hours ago

Related Projects

ocaml-tlsocaml-tls

TLS in pure OCaml

Stars322
Forks70
Last commit1 day ago
nocryptonocrypto

OCaml cryptographic library

Stars112
Forks54
Last commit6 years ago
DigestifDigestif

Simple hash algorithms in OCaml

Stars95
Forks31
Last commit9 days ago
nocoinernocoiner

A Commitment Scheme library for Coin Flipping/Tossing algorithms and sort. :four_leaf_clover: :camel: :lock: :key:

Stars11
Forks2
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub