A lightweight, secure, easy-to-use cryptographic library for constrained environments like microcontrollers.
Libhydrogen is a lightweight, secure, and easy-to-use cryptographic library built for constrained environments like microcontrollers. It provides a high-level API to solve common cryptographic problems using only two cryptographic building blocks: Curve25519 and Gimli. The library is designed to be minimal, portable, and hard to misuse, making it ideal for applications where resources are limited.
Embedded systems developers, IoT engineers, and anyone building applications for microcontrollers or other resource-constrained environments who need reliable cryptography.
Developers choose Libhydrogen for its extreme simplicity, small footprint, and focus on security in constrained environments. Its minimalistic design, zero dynamic allocations, and misuse-resistant API make it a reliable choice where other cryptographic libraries are too heavy or complex.
A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Zero dynamic allocations and low stack requirements (median 32 bytes, max 128 bytes) make it ideal for microcontrollers and resource-constrained devices, as highlighted in the README.
Inspired by libsodium, it provides easy-to-use functions for common cryptographic tasks, reducing misuse by avoiding low-level primitives, as described in the features.
Written in standard C99, it works out of the box on Linux, BSD, macOS, Windows, and Arduino, ensuring broad compatibility for embedded and desktop applications.
Built exclusively with Curve25519 and Gimli, the small codebase is easy to audit for security, enhancing reliability in sensitive environments.
Relies solely on two cryptographic building blocks, so if an application requires alternatives or industry-standard algorithms, libhydrogen cannot accommodate them, as per its minimalist design.
Explicitly states non-goal of interoperability with other libraries, which can create integration challenges with existing systems or protocols like TLS.
Networking is a non-goal; while a key exchange API is available, full transport layer security is not yet implemented, limiting use for secure communication scenarios.