{"id":22249393,"url":"https://github.com/bstnbuck/v-crypto","last_synced_at":"2026-01-05T23:02:26.390Z","repository":{"id":222876941,"uuid":"543613045","full_name":"bstnbuck/V-crypto","owner":"bstnbuck","description":"Current status of V's crypto library and implementation of additional algorithms","archived":false,"fork":false,"pushed_at":"2024-04-22T10:41:09.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-22T11:48:30.908Z","etag":null,"topics":["crypto","ecb-mode","md4","ripemd160","salsa20","tea","vlang","xsalsa20","xtea"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bstnbuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-09-30T13:26:09.000Z","updated_at":"2024-04-22T10:42:34.000Z","dependencies_parsed_at":"2024-04-22T11:47:03.208Z","dependency_job_id":"05ff4e10-ed63-4392-9479-2fe8cdf92959","html_url":"https://github.com/bstnbuck/V-crypto","commit_stats":null,"previous_names":["bstnbuck/v-crypto"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bstnbuck%2FV-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bstnbuck%2FV-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bstnbuck%2FV-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bstnbuck%2FV-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bstnbuck","download_url":"https://codeload.github.com/bstnbuck/V-crypto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245458703,"owners_count":20618697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["crypto","ecb-mode","md4","ripemd160","salsa20","tea","vlang","xsalsa20","xtea"],"created_at":"2024-12-03T06:26:29.682Z","updated_at":"2026-01-05T23:02:26.366Z","avatar_url":"https://github.com/bstnbuck.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"# V-crypto :key:\n\n\u003e **Attention!**\u003cbr\u003e\n**V-crypto** has no connection to the official V community and is not maintained by it.\u003cbr\u003e \n**\u0026rarr; 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.\n\n\u003e**Contributions welcome!**\n\n---\n\n#### V-crypto provides...\n* a detailed **overview** of important cryptographic algorithms, protocols and formats,\n* the **current implementation status** of the official V community. \n* less known but relevant as well as self-developed official algorithms that might be published here. \n\n## Cryptographic algorithms and protocols available in V standard library\n| algorithm | category, info | importance | status | \n| --- | --- | --- | --- |\n| **AES** | symmetric block cipher | high, daily use | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/aes)]|\n| **bcrypt** | hash-algorithm | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/bcrypt)]|\n| **blake2(b,s)** | hash-algorithm | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/blake2b)] [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/blake2s)]|\n| **blake3** | hash-algorithm | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/blake3)]|\n| **blowfish** | legacy symmetric block cipher | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/blowfish)]|\n| *blockcipher modes* \u0026rarr; **CBC, CFB, CTR, OFB** | Cipher-Block-Chaining, Cipher-Feedback, Counter, Output-Feedback | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/cipher)]|\n| **(3)DES** | legacy symmetric block cipher | low | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/des)]|\n| **ECDSA** | signature algorithm based on elliptic curves | high, daily use | OpenSSL C Wrapper :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/ecdsa)] |\n| **Ed25519** | signature algorithm based on elliptic curves | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/ed25519)]|\n| HMAC | hash-based message authentication code | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/hmac)]|\n| **MD5** | legacy hash-algorithm | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/md5)]|\n| **PBKDF2** | key derivation function | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/pbkdf2)] |\n| PEM | encoding format | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/pem)]|\n| **RAND** | random number generator | high, daily use | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/rand)]|\n| RC4 | legacy stream cipher | low | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/rc4)]|\n| RIPEMD160 | legacy hash-algorithm | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/ripemd160)] |\n| **scrypt** | hash-algorithm / key derivation function | high | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/scrypt)]|\n| **SHA1** | legacy hash-algorithm | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/sha1)]|\n| **SHA256** | hash-algorithm | high, daily use | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/sha256)]|\n| **SHA512** | hash-algorithm | high, daily use | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/sha512)]|\n| **SHA3** | hash-algorithm | moderate | implemented :heavy_check_mark: [[Git](https://github.com/vlang/v/tree/master/vlib/crypto/sha3)]|\n| Ascon | lightweight AEAD | moderate | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/ascon)] |\n| **ChaCha20** | symmetric stream cipher | high, daily use | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/chacha20)]|\n| **ChaCha20-Poly1305** | Authenticated encryption with associated data (AEAD) | high, daily use | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/chacha20poly1305)]|\n| **Curve25519** | elliptic curve | high, daily use | expiremental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/curve25519)]|\n| Poly1305 | message authentication code | moderate | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/poly1305)]|\n| SLH-DSA | post-quantum secure signature algorithm (aka. SPHINCS+; hash based) | moderate | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/slhdsa)]\n| SM4 | block cipher | moderate | experimental :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/vlib/x/crypto/sm4)]|\n\n\u003e Last Update: 01-06-2025\n\n## Cryptographic algorithms and protocols (not officially) planned for V standard library\n\nThe V wrapper libsodium [[Git](https://github.com/vlang/libsodium)] has some of these algorithms.\n\n| algorithm | category, info | importance | status |\n| --- | --- | --- | --- |\n| *blockcipher modes* \u0026rarr; **XTS, CCM, GCM** | XEX-based tweaked-codebook mode with ciphertext stealing, Counter with CBC-MAC (AEAD), Galois/Counter (AEAD) | high | :x: |\n| **DSA** | legacy signature algorithm | low | (see [[1](https://github.com/vlang/v/discussions/12679)]) :x: |\n| **ECDH** | asymmetric crypto based on elliptic curves | high, daily use | (see [[1](https://github.com/vlang/v/discussions/12679)], [[2](https://github.com/vlang/v/issues/8547)]), thirdparty, non standard :x: [[Git](https://github.com/blackshirt/ecdhe)] |\n| HKDF | key derivation function | moderate | thirdparty :x: [[Git](https://github.com/blackshirt/hkdf)]|\n| HQC | post-quantum secure key encapsulation (code based) | moderate | :x: |\n| ML-KEM | post-quantum secure key encapsulation (aka. Crystals Kyber; lattice based) | high | :x: |\n| ML-DSA | post-quantum secure digital signature (aka. Crystals Dilithium; lattice based) | high | :x: |\n| **P-224/256/384**/(521) | elliptic curves (NIST) | high, daily use | :x: |\n| secp256k1 | elliptic curve | moderate | thirdparty, non standard :x: [[Git](https://github.com/ismyhc/vsecp256k1)] |\n| **RSA** | asymmetric crypto | high, daily use | (see [[1](https://github.com/vlang/v/discussions/12679)]), thirdparty, non standard :x: [[Git](https://github.com/LvMalware/vrsa-package)] |\n| **SSH** | network protocol | high, daily use | (see [[2](https://github.com/vlang/v/issues/8547)]) :x: |\n| **TLS** | protocol for secure network communication | high, daily use | (see [[2](https://github.com/vlang/v/issues/8547)]), wrapper, thirdparty :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/thirdparty/mbedtls)] [[Git](https://github.com/blackshirt/tls13)]|\n| x509 | encoding format | high | wrapper, thirdparty :yellow_circle: [[Git](https://github.com/vlang/v/tree/master/thirdparty/mbedtls)] |\n\n\u003e Last Update: 28-09-2024\n\n## Additional cryptographic algorithms implemented/planned in V-crypto (this Repo)\n\nThe V wrapper libsodium [[Git](https://github.com/vlang/libsodium)] has some of these algorithms.\n\n| algorithm | category, info | importance | status | \n| --- | --- | --- | --- |\n| **argon2** | hash-algorithm / key derivation function | high | :x: |\n| *blockcipher modes* \u0026rarr; ECB, EAX, IGE, OCB | Electronic-Codebook, encrypt-then-authenticate-then-translate, Infinite Garble Extension, Offset codebook mode (AEAD) | moderate | experimental (only ECB, IGE) :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/_cipher)] |\n| **brainpoolP(256,384,521)r1** | elliptic curve | high | :x: |\n| Camellia | symmetric block cipher | low | :x: |\n| CAST | symmetric block cipher | moderate | :x: |\n| **Curve448** | elliptic curve | high | :x: |\n| **Ed448** | signature algorithm based on elliptic curves | high | :x: |\n| Grain v1 | symmetric stream cipher | moderate | :x: |\n| HC-(128,256) | symmetric stream cipher | moderate | :x: |\n| IDEA | symmetric block cipher | low | :x: |\n| Kyber(512,1024) | key encapsulation mechanism, post-quanten crypto | low | :x: |\n| MD4 | legacy hash-algorithm | low | experimental :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/md4)] |\n| RC6 | symmetric block cipher | low | :x: |\n| **RIPEMD160** | legacy hash-algorithm | moderate | experimental :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/ripemd160)] |\n| **(X)Salsa20** | symmetric stream cipher | high | experimental :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/salsa20)] |\n| **Serpent** | symmetric block cipher | moderate | :x: |\n| Speck | legacy block cipher | low | :x: |\n| TEA, XTEA | legacy block cipher | low | experimental :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/tea)] [[Git](https://github.com/bstnbuck/V-crypto/tree/main/xtea)]|\n| **Twofisch** | symmetric block cipher | moderate | experimental :yellow_circle: [[Git](https://github.com/bstnbuck/V-crypto/tree/main/twofish)] |\n| **yescrypt** | hash-algorithm / key derivation function | high | :x: |\n\n\u003e Last Update: 01-07-2024\n---\n## v_crypto\n### Installation\n```bash\nv install https://github.com/bstnbuck/V-crypto\n```\n\n### Usage\nIn 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.\n\n```v\nimport v_crypto.md4\n\nfn main(){\n    // short way to get MD4 hex hash\n    println(\"`test` hashed with MD4 is: \"+md4.hexhash(\"test\"))\n\n    // long way to get bytes array\n    mut d := md4.new()\n    blocksize, bytes_hash := d.checksum('test'.bytes())\n    println(\"input produces a bytes checksum $bytes_hash.hex() with block size: $blocksize\")\n\n    d.reset() // with reset, a new empty checksum can be produced\n    _, _ := d.checksum('Hi from V_crypto. This is an example of a long long line.'.bytes())\n}\n```\n\n\u003e Please report security related issues to: bstnbuck (at) proton (dot) me\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbstnbuck%2Fv-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbstnbuck%2Fv-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbstnbuck%2Fv-crypto/lists"}