minicrypto 0.4.0

Modern cryptography for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Minicrypto

Tiny, zero-dependency cryptographic primitives library for D language. Its main use case is building custom secure transport protocols, e.g. for online games, VoIP and IoT.

Most of it is a direct port of Monocypher C code to D, retaining Monocypher API.

GitHub Actions CI Status DUB Package License: CC0-1.0

Why another crypto library?

Most existing libraries are bloated with legacy algorithms that should not be used for building new stuff. Trying to support every existing standard makes them over-engineered and confuses users. Minicrypto provides only a minimal set of modern algorithms. It is not a binding nor a wrapper around system cryptography, and has no dependencies, which makes usage easy and straightforward. Also Minicrypto is the only known @nogc and betterC-compliant crypto library for D. Manual memory management is preferable in real-time applications and a strict requirement for system development.

Features

  • Fast
  • No garbage collector usage (@nogc)
  • Portable across Windows and Posix systems

Modules

  • minicrypto.argon2 - Argon2 key derivation function
  • minicrypto.blake2b - BLAKE2b cryptographic hash function
  • minicrypto.chacha20 - ChaCha20 stream cipher
  • minicrypto.poly1305 - Poly1305 one-time message authentication code
  • minicrypto.aead - ChaCha20-Poly1305 authenticated encryption with associated data (AEAD) algorithm
  • minicrypto.x25519 - elliptic-curve Diffie-Hellman based on Curve25519
  • minicrypto.eddsa - EdDSA digital signature algorithm based on Curve25519
  • minicrypto.csprng - cryptographically secure pseudorandom number generator.

BetterC

Minicrypto can be optionally used in BetterC mode. Add the following to your dub.json:

"subConfigurations": {
    "minicrypto": "betterC"
}

License

CC0 1.0 Universal

Authors:
  • Timur Gafarov
Dependencies:
none
Versions:
0.4.0 2026-Jul-29
0.3.0 2026-Jul-28
0.2.0 2026-Jul-28
0.1.0 2026-Jul-28
~main 2026-Jul-29
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 3 downloads this week

  • 3 downloads this month

  • 3 downloads total

Score:
0.0
Short URL:
minicrypto.dub.pm