All Projects → jedisct1 → libsodium-xchacha20-siv

jedisct1 / libsodium-xchacha20-siv

Licence: BSD-2-Clause license
Deterministic/nonce-reuse resistant authenticated encryption scheme using XChaCha20, implemented on libsodium.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to libsodium-xchacha20-siv

mbedtls-esp8266
Updated and Upgraded mbedTLS library for the ESP8266 (probably ESP32 too)
Stars: ✭ 13 (-48%)
Mutual labels:  crypto, chacha20
Libsodium.js
libsodium compiled to Webassembly and pure JavaScript, with convenient wrappers.
Stars: ✭ 665 (+2560%)
Mutual labels:  crypto, libsodium
sodium
An wrapper for libsodium in golang
Stars: ✭ 54 (+116%)
Mutual labels:  crypto, libsodium
Tweetnacl Js
Port of TweetNaCl cryptographic library to JavaScript
Stars: ✭ 1,176 (+4604%)
Mutual labels:  crypto, libsodium
Streamcryptor
Stream encryption & decryption with libsodium and protobuf
Stars: ✭ 112 (+348%)
Mutual labels:  crypto, libsodium
Kryptor
A simple, modern, and secure encryption and signing tool that aims to be a better version of age and Minisign.
Stars: ✭ 267 (+968%)
Mutual labels:  libsodium, xchacha20
Libsodium Php
The PHP extension for libsodium.
Stars: ✭ 507 (+1928%)
Mutual labels:  crypto, libsodium
Zbox
Zero-details, privacy-focused in-app file system.
Stars: ✭ 1,185 (+4640%)
Mutual labels:  crypto, libsodium
Libsodium Go
A complete overhaul of the Golang wrapper for libsodium
Stars: ✭ 105 (+320%)
Mutual labels:  crypto, libsodium
Nsec
A modern and easy-to-use cryptographic library for .NET Core based on libsodium
Stars: ✭ 217 (+768%)
Mutual labels:  crypto, libsodium
rust-libhydrogen
Libhydrogen bindings for Rust.
Stars: ✭ 15 (-40%)
Mutual labels:  crypto, libsodium
reactive-trader
In the coming weeks this plans to become a Gekko plugin that reacts to market changes, finding and running only the most profitable strategies.
Stars: ✭ 91 (+264%)
Mutual labels:  crypto
banana split
Shamir's Secret Sharing for people with friends
Stars: ✭ 106 (+324%)
Mutual labels:  crypto
sodium-universal
Universal wrapper for sodium-javascript and sodium-native working in Node.js and the Browser
Stars: ✭ 63 (+152%)
Mutual labels:  libsodium
cox
Crystal wrapper for the libsodium crypto API
Stars: ✭ 15 (-40%)
Mutual labels:  libsodium
libsodium-sys-stable
Sodiumoxide's libsodium-sys crate, but that installs stable versions of libsodium.
Stars: ✭ 16 (-36%)
Mutual labels:  libsodium
cryptowallet-cli
CW is a crypto wallet generator CLI tool for a lot of blockchains: Bitcoin, Ethereum, Binance Smart Chain and many others
Stars: ✭ 45 (+80%)
Mutual labels:  crypto
crypto-news
Crypto News allows you to convert cryptocurrencies, view latest news and exchange rates for each ICO – all the data from the world of cryptocurrencies in one place.
Stars: ✭ 26 (+4%)
Mutual labels:  crypto
pony-sodium
Safe Pony FFI wrapper for the libsodium cryptography library. 🐴 🔐
Stars: ✭ 24 (-4%)
Mutual labels:  libsodium
BerylEnigma
一个为渗透测试与CTF而制作的工具集,主要实现一些加解密的功能。
Stars: ✭ 329 (+1216%)
Mutual labels:  crypto

XChaCha20-SIV

Deterministic/nonce-reuse resistant authenticated encryption scheme using XChaCha20, implemented on libsodium.

XChaCha20-Poly1305 XChaCha20-SIV
Key size 256 bits 256 bits (before expansion)
Authentication tag 128 bits 256 bits
Nonce 192 bits, mandatory Optional
Nonce reuse Can leak plaintext Only leaks message duplication
Speed Fast Slightly slower

Usage

int crypto_aead_det_xchacha20_encrypt_detached(
    unsigned char *c,
    unsigned char mac[crypto_aead_det_xchacha20_ABYTES],
    const unsigned char *m, size_t mlen,
    const unsigned char *ad, size_t adlen,
    const unsigned char *nonce,
    const unsigned char k[crypto_aead_det_xchacha20_KEYBYTES]);

Encrypt a message m of length mlen bytes using a key k, an optional nonce nonce (which can left to NULL), optionally authenticating additional data ad (if not NULL) of length adlen bytes in addition to the message itself. The IV acting as a MAC is stored into mac.

int crypto_aead_det_xchacha20_decrypt_detached(
    unsigned char *m,
    const unsigned char *c, size_t clen,
    const unsigned char mac[crypto_aead_det_xchacha20_ABYTES],
    const unsigned char *ad, size_t adlen,
    const unsigned char *nonce,
    const unsigned char k[crypto_aead_det_xchacha20_KEYBYTES]);

Decrypt a ciphertext c or length clen bytes using a key k, an optional nonce nonce (which can be left to NULL), optionally verifying additional data ad (if not NULL) of length adlen bytes in addition to the message itself, using the MAC mac.

The function returns -1 if the authentication tag didn't verify, and 0 on success, storing the decrypted message into m.

int crypto_aead_det_xchacha20_encrypt(unsigned char *c,
                                      const unsigned char *m, size_t mlen,
                                      const unsigned char *ad, size_t adlen,
                                      const unsigned char *nonce,
                                      const unsigned char  k[crypto_aead_det_xchacha20_KEYBYTES]);

Similar to encrypt_detached, but the ciphertext and MAC are concatenated.

c must be mlen + crypto_aead_det_xchacha20_ABYTES long.

int crypto_aead_det_xchacha20_decrypt(unsigned char *m,
                                      const unsigned char *c, size_t clen,
                                      const unsigned char *ad, size_t adlen,
                                      const unsigned char *nonce,
                                      const unsigned char k[crypto_aead_det_xchacha20_KEYBYTES]);

Similar to decrypt_detached, with the ciphertext and the MAC having been concatenated.

void crypto_aead_det_xchacha20_keygen(unsigned char k[crypto_aead_det_xchacha20_KEYBYTES]);

Create a 256-bit secret key.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].