V-crypto :key:

May 5, 2026 · View on GitHub

Attention!
V-crypto has no connection to the official V community and is not maintained by it.
→ It is not recommended to use the algorithms implemented here productively until the status is implemented. As a non-cryptographer, I cannot fully validate the security.

Contributions welcome!


V-crypto provides...

  • a detailed overview of important cryptographic algorithms, protocols and formats,
  • the current implementation status of the official V community.
  • less known but relevant as well as self-developed official algorithms that might be published here.

Cryptographic algorithms and protocols available in V standard library

algorithmcategory, infoimportancestatus
AESsymmetric block cipherhigh, daily useimplemented :heavy_check_mark: [Git]
argon2hash-algorithm / key derivation functionhighimplemented :heavy_check_mark: [Git]
bcrypthash-algorithmhighimplemented :heavy_check_mark: [Git]
blake2(b,s)hash-algorithmmoderateimplemented :heavy_check_mark: [Git] [Git]
blake3hash-algorithmmoderateimplemented :heavy_check_mark: [Git]
blowfishlegacy symmetric block ciphermoderateimplemented :heavy_check_mark: [Git]
blockcipher modesCBC, CFB, CTR, OFBCipher-Block-Chaining, Cipher-Feedback, Counter, Output-Feedbackhighimplemented :heavy_check_mark: [Git]
(3)DESlegacy symmetric block cipherlowimplemented :heavy_check_mark: [Git]
ECDSAsignature algorithm based on elliptic curveshigh, daily useOpenSSL C Wrapper :yellow_circle: [Git]
Ed25519signature algorithm based on elliptic curveshighimplemented :heavy_check_mark: [Git]
HMAChash-based message authentication codehighimplemented :heavy_check_mark: [Git]
MD5legacy hash-algorithmhighimplemented :heavy_check_mark: [Git]
PBKDF2key derivation functionhighimplemented :heavy_check_mark: [Git]
PEMencoding formathighimplemented :heavy_check_mark: [Git]
RANDrandom number generatorhigh, daily useimplemented :heavy_check_mark: [Git]
RC4legacy stream cipherlowimplemented :heavy_check_mark: [Git]
RIPEMD160legacy hash-algorithmmoderateimplemented :heavy_check_mark: [Git]
scrypthash-algorithm / key derivation functionhighimplemented :heavy_check_mark: [Git]
SHA1legacy hash-algorithmmoderateimplemented :heavy_check_mark: [Git]
SHA256hash-algorithmhigh, daily useimplemented :heavy_check_mark: [Git]
SHA512hash-algorithmhigh, daily useimplemented :heavy_check_mark: [Git]
SHA3hash-algorithmmoderateimplemented :heavy_check_mark: [Git]
Asconlightweight AEADmoderateexperimental :yellow_circle: [Git]
ChaCha20symmetric stream cipherhigh, daily useexperimental :yellow_circle: [Git]
ChaCha20-Poly1305Authenticated encryption with associated data (AEAD)high, daily useexperimental :yellow_circle: [Git]
Curve25519elliptic curvehigh, daily useexpiremental :yellow_circle: [Git]
ML-DSApost-quantum secure digital signature (aka. Crystals Dilithium; lattice based)highexperimental :yellow_circle: [Git]
Poly1305message authentication codemoderateexperimental :yellow_circle: [Git]
SLH-DSApost-quantum secure signature algorithm (aka. SPHINCS+; hash based)moderateexperimental :yellow_circle: [Git]
SM4block ciphermoderateexperimental :yellow_circle: [Git]

Last Update: 04-05-2026

Cryptographic algorithms and protocols (not officially) planned for V standard library

The V wrapper libsodium [Git] has some of these algorithms.

algorithmcategory, infoimportancestatus
blockcipher modesXTS, CCM, GCMXEX-based tweaked-codebook mode with ciphertext stealing, Counter with CBC-MAC (AEAD), Galois/Counter (AEAD)highthirdparty :x: [Git]
Curve448elliptic curvehighthirdparty :yellow_circle: [Git]
DSAlegacy signature algorithmlow(see [1]) :x:
ECDHasymmetric crypto based on elliptic curveshigh, daily use(see [1], [2]), thirdparty, non standard :x: [Git]
Ed448signature algorithm based on elliptic curveshigh:x:
HKDFkey derivation functionmoderatethirdparty :x: [Git]
HQCpost-quantum secure key encapsulation (code based)moderate:x:
ML-KEMpost-quantum secure key encapsulation (aka. Crystals Kyber; lattice based)high:x:
P-224/256/384/(521)elliptic curves (NIST)high, daily use:x:
secp256k1elliptic curvemoderatethirdparty, non standard :x: [Git]
RSAasymmetric cryptohigh, daily use(see [1]), thirdparty, non standard :x: [Git]
SSHnetwork protocolhigh, daily use(see [2]) :x:
TLSprotocol for secure network communicationhigh, daily use(see [2]), wrapper, thirdparty :yellow_circle: [Git] [Git]
x509encoding formathighwrapper, thirdparty :yellow_circle: [Git]

Last Update: 04-05-2026

Additional cryptographic algorithms implemented/planned in V-crypto (this Repo)

The V wrapper libsodium [Git] has some of these algorithms.

algorithmcategory, infoimportancestatus
blockcipher modes → ECB, EAX, IGE, OCBElectronic-Codebook, encrypt-then-authenticate-then-translate, Infinite Garble Extension, Offset codebook mode (AEAD)moderateexperimental (only ECB, IGE) :yellow_circle: [Git]
brainpoolP(256,384,521)r1elliptic curvehigh:x:
Camelliasymmetric block cipherlow:x:
CASTsymmetric block ciphermoderate:x:
Grain v1symmetric stream ciphermoderate:x:
HC-(128,256)symmetric stream ciphermoderate:x:
IDEAsymmetric block cipherlow:x:
MD4legacy hash-algorithmlowexperimental :yellow_circle: [Git]
RC6symmetric block cipherlow:x:
RIPEMD160legacy hash-algorithmmoderateexperimental :yellow_circle: [Git]
(X)Salsa20symmetric stream cipherhighexperimental :yellow_circle: [Git]
Serpentsymmetric block ciphermoderate:x:
Specklegacy block cipherlow:x:
TEA, XTEAlegacy block cipherlowexperimental :yellow_circle: [Git] [Git]
Twofischsymmetric block ciphermoderateexperimental :yellow_circle: [Git]
yescrypthash-algorithm / key derivation functionhigh:x:

Last Update: 04-05-2026


v_crypto

Installation

v install https://github.com/bstnbuck/V-crypto

Usage

In general, the functionality is easy to understand based on the tests of the respective algorithm. For larger algorithms, a README file with the most important functions follows.

import v_crypto.md4

fn main(){
    // short way to get MD4 hex hash
    println("`test` hashed with MD4 is: "+md4.hexhash("test"))

    // long way to get bytes array
    mut d := md4.new()
    blocksize, bytes_hash := d.checksum('test'.bytes())
    println("input produces a bytes checksum $bytes_hash.hex() with block size: $blocksize")

    d.reset() // with reset, a new empty checksum can be produced
    _, _ := d.checksum('Hi from V_crypto. This is an example of a long long line.'.bytes())
}

Please report security related issues to: bstnbuck (at) proton (dot) me