All Projects → symbolicsoft → kyber-k2so

symbolicsoft / kyber-k2so

Licence: MIT License
Go implementation of the Kyber (version 3) post-quantum IND-CCA2 KEM.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to kyber-k2so

Awesome He
✨ Awesome - A curated list of amazing Homomorphic Encryption libraries, software and resources
Stars: ✭ 224 (+873.91%)
Mutual labels:  cryptography
Awesome Blockchain Rust
Collect libraries and packages about blockchain/cryptography in Rust
Stars: ✭ 251 (+991.3%)
Mutual labels:  cryptography
dilithium
No description or website provided.
Stars: ✭ 166 (+621.74%)
Mutual labels:  lattice-based-crypto
Erlang Jose
JSON Object Signing and Encryption (JOSE) for Erlang and Elixir
Stars: ✭ 232 (+908.7%)
Mutual labels:  cryptography
Sqleet
SQLite3 encryption that sucks less
Stars: ✭ 244 (+960.87%)
Mutual labels:  cryptography
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+74495.65%)
Mutual labels:  cryptography
Frank jwt
JSON Web Token implementation in Rust.
Stars: ✭ 227 (+886.96%)
Mutual labels:  cryptography
gotts
A blockchain for non-collateralized stable-coins, follow MimbleWimble protocol but with explicit amount.
Stars: ✭ 48 (+108.7%)
Mutual labels:  cryptography
Libhydrogen
A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
Stars: ✭ 247 (+973.91%)
Mutual labels:  cryptography
LibSWIFFT
LibSWIFFT - A fast C/C++ library for the SWIFFT secure homomorphic hash function
Stars: ✭ 23 (+0%)
Mutual labels:  lattice-based-crypto
Paseto.js
PASETO: Platform-Agnostic Security Tokens
Stars: ✭ 241 (+947.83%)
Mutual labels:  cryptography
Helib
HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
Stars: ✭ 2,749 (+11852.17%)
Mutual labels:  cryptography
Bitcoin
Bitcoin Core integration/staging tree
Stars: ✭ 60,211 (+261686.96%)
Mutual labels:  cryptography
Awesome Substrate
A curated list of awesome projects and resources related to the Substrate blockchain development framework.
Stars: ✭ 228 (+891.3%)
Mutual labels:  cryptography
InstaContract
Smart contracts comprising the business logic of the InstaDApp
Stars: ✭ 40 (+73.91%)
Mutual labels:  kyber
Orion
Usable, easy and safe pure-Rust crypto
Stars: ✭ 227 (+886.96%)
Mutual labels:  cryptography
Cryptopp
free C++ class library of cryptographic schemes
Stars: ✭ 3,150 (+13595.65%)
Mutual labels:  cryptography
stash-electron
Stash - The friendly secret storage made for teams
Stars: ✭ 18 (-21.74%)
Mutual labels:  cryptography
kyber
No description or website provided.
Stars: ✭ 170 (+639.13%)
Mutual labels:  lattice-based-crypto
frodo
practical quantum-secure key encapsulation from generic lattices
Stars: ✭ 17 (-26.09%)
Mutual labels:  lattice-based-crypto

Kyber-K2SO

Kyber-K2SO GoDoc Go Report Card GitHub

Kyber-K2SO is a clean implementation of the Kyber IND-CCA2-secure key encapsulation mechanism (KEM), whose security is based on the hardness of solving the learning-with-errors (LWE) problem over module lattices. Kyber is one of the candidate algorithms submitted to the NIST post-quantum cryptography project.

Security Disclaimer

🚨 Extensive effort has been undertaken in order to ensure the correctness, interoperability, safety and reliability of this library. Furthermore, it is unlikely that the API will change in the future. While this library is likely ready for production use, it is offered as-is, and without a guarantee.

Features & Usage

Keeping in mind the Security Disclaimer above, Kyber-K2SO appears to be appropriate for use in any environment supported by Go: client-side application, server-side applications and more. All operations take no more than a few milliseconds on regular computing hardware.

Features

  • Small, easy to read code. Kyber-K2SO is to our knowledge the smallest implementation of Kyber Version 3.
  • Simple API. KemKeypair768() to generate a private key and a public key, KemEncrypt768(publicKey) generate and encrypt a shared secret, and KemDecrypt768(ciphertext, privateKey) to decrypt the shared secret. Aside from Kyber-768, Kyber-512 and Kyber-1024 are also offered.
  • Good performance. Kyber-K2SO is more than fast enough for regular usage in any environment supported by the Go programming language.
  • Constant time (probably). As far as we can tell, decryption appears to perform in constant time. Further analysis is encouraged.

Using Kyber-K2SO

go get -u github.com/symbolicsoft/kyber-k2so
package main

import (
	kyberk2so "github.com/symbolicsoft/kyber-k2so"
)

func main() {
	privateKey, publicKey, _ := kyberk2so.KemKeypair768()
	ciphertext, ssA, _ := kyberk2so.KemEncrypt768(publicKey)
	ssB, _ := kyberk2so.KemDecrypt768(ciphertext, privateKey)
}

Replace 768 with 512 or 1024 in the above function names in order to call Kyber-512 or Kyber-1024 instead of Kyber-768.

Running Tests

> go test -v

=== RUN   TestVectors512
--- PASS: TestVectors512 (0.01s)
=== RUN   TestVectors768
--- PASS: TestVectors768 (0.01s)
=== RUN   TestVectors1024
--- PASS: TestVectors1024 (0.01s)
=== RUN   TestSelf512
--- PASS: TestSelf512 (0.19s)
=== RUN   TestSelf768
--- PASS: TestSelf768 (0.30s)
=== RUN   TestSelf1024
--- PASS: TestSelf1024 (0.46s)
PASS
ok  	github.com/symbolicsoft/kyber-k2so	1.140s

Running Benchmarks

> go test -bench=.

goos: linux
goarch: amd64
pkg: github.com/symbolicsoft/kyber-k2so
BenchmarkKemKeypair512-8    	   28116	     41519 ns/op
BenchmarkKemKeypair768-8    	   15864	     74150 ns/op
BenchmarkKemKeypair1024-8   	   10000	    105946 ns/op
BenchmarkKemEncrypt512-8    	   21409	     56336 ns/op
BenchmarkKemEncrypt768-8    	   13629	     87541 ns/op
BenchmarkKemEncrypt1024-8   	    9987	    131054 ns/op
BenchmarkKemDecrypt512-8    	   17650	     65348 ns/op
BenchmarkKemDecrypt768-8    	   12352	     99300 ns/op
BenchmarkKemDecrypt1024-8   	    8913	    140804 ns/op
PASS
ok  	github.com/symbolicsoft/kyber-k2so	16.180s

About Kyber-K2SO

Kyber-K2SO is published by Symbolic Software under the MIT License.

Kyber-K2SO originally implemented Kyber version 2. Kyber-K2SO was subsequently updated in version 0.1.0 to implement Kyber version 3 thanks to work contributed by Anton Tutoveanu in March 2021.

We thank Peter Schwabe for his feedback during the development of this implementation.

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].