mercuryPQCrypto is a go post quantum cryptography (PQC) algorithms lib for studying the pqc migration and application adaptation.

Overview

mercuryPQCrypto-README

1 mercuryPQCrypto: Mercury Cryptography Project

mercuryPQCrypto is a cryptography project conducted by Chongqing University, China, which considers crypto agility and integrates go 1.14.10 crypto1, Open Quantum Safe (OQS) liboqs/liboqs-go 0.7.12 and tjfoc gmsm-1.4.13. This project aims to study the migration and application adaptation of post quantum cryptography (PQC) algorithms and Chinese national commercial cryptography algorithms (sm-series).

We have integrated NIST Post-Quantum Cryptography Standardization round 3 digital signature finalists though OQS liboqs/liboqs-go, including:

  • CRYSTALS-Dilithium: Dilithium2, Dilithium3, Dilithium5, Dilithium2-AES, Dilithium3-AES, Dilithium5-AES
  • Falcon: Falcon-512, Falcon-1024
  • Rainbow: Rainbow-III-Classic, Rainbow-III-Circumzenithal, Rainbow-III-Compressed, Rainbow-V-Classic, Rainbow-V-Circumzenithal, Rainbow-V-Compressed

It's important to note that since a new work4 makes key-recovery practical for the Rainbow SL 1 parameters become possible, we will not integrate SL 1 parameters in the future work.

And Chinese national commercial cryptography algorithms by tjfoc gmsm:

  • SM2
  • SM3
  • SM4

Among the above algorithms, the post quantum signature algorithms not only support key generation, signature and verification, but also supports all operations in X509.go and private key format conversion in PKCS8.go. You can follow the instructions on crypto in go 1.14.10 to use them. The interfaces of mercuryPQCrypto methods are unchanged compared with go 1.14.10. Currently, the Chinese national commercial cryptography algorithms only supports simple key generation, encryption, decryption, signature, verification, and digest computation.

2 Instructions

2.1 Environment Variable

  1. OS: ubuntu 18.04 +.
  2. GoLang: Please make sure you have installed go 1.14.10 and/or above.
  3. liboqs and liboqs-go: Please follow the project instructions of liboqs and liboqs-go and configure the corresponding environment variable, both of them must be configured correctly.

2.2 Clone the Project

git clone https://github.com/buyobuyo404/mercuryPQCrypto.git

Then put mercuryPQCrypto into $gopath/github.com/mercury folder.

2.3 Note

  1. Import Package: when importing PQC algorithm packages, the package aliases need to be displayed, otherwise package conflicts may occur. You can do like this:
import (
	falcon1024 "github.com/mercury/mercuryPQCrypto/pqc/falcon/falcon1024"
	falcon512 "github.com/mercury/mercuryPQCrypto/pqc/falcon/falcon512"

	dilithium2 "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium2"
	dilithium2AES "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium2AES"
	dilithium3 "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium3"
	dilithium3AES "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium3AES"
	dilithium5 "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium5"
	dilithium5AES "github.com/mercury/mercuryPQCrypto/pqc/dilithium/dilithium5AES"

	rainbowIIICircumzenithal "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowIIICircumzenithal"
	rainbowIIIClassic "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowIIIClassic"
	rainbowIIICompressed "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowIIICompressed"
	rainbowVCircumzenithal "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowVCircumzenithal"
	rainbowVClassic "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowVClassic"
	rainbowVCompressed "github.com/mercury/mercuryPQCrypto/pqc/rainbow/rainbowVCompressed"
)

3 Future Work

  1. Integrate NIST Post-Quantum Cryptography Standardization round 3 submissions digital signature algorithms alternate candidates, public-key encryption and key-establishment finalists and alternate candidates.
  2. Keep a close eye on NIST Post-Quantum Cryptography Standardization round 4 and make quick adjustments accordingly.
  3. Implement the algorithms in NIST PQC round 4 using go.
  4. Use this project to study the pqc migration in PKI and blockchain.

4 About Us

We are post quantum cryptography research team, from School of Big Data and Software, Chongqing University, China. Our main research fields includes post quantum cryptography and its engineering migration and application.

Footnotes

  1. go crypto: Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Moreover, crypto is the cryptographic module of go, which provides various operations on cryptography and certificates. https://github.com/golang/go/tree/master/src/crypto

  2. Open Quantum Safe (OQS) liboqs/liboqs-go 0.7.1: liboqs is an open source C library for quantum-safe cryptographic algorithms and we can use post-quantum algorithms from liboqs in the go languages via liboqs-go wrappers. The project is mainly implemented by Open Quantum Safe (OQS), University of Waterloo. https://openquantumsafe.org/

  3. tjfoc gmsm: It is the Chinese national commercial cryptography algorithms go implementation by Suzhou Tongji Blockchain Research Institute. https://github.com/tjfoc/gmsm

  4. Breaking Rainbow Takes a Weekend on a Laptop, Ward Beullens https://eprint.iacr.org/2022/214.pdf

You might also like...
The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.

Fabric Smart Client The Fabric Smart Client (FSC, for short) is a new Fabric client-side component whose objective is twofold. FSC aims to simplify th

Cross-platform application for easy encrypted sharing of files, folders, and text between devices.
Cross-platform application for easy encrypted sharing of files, folders, and text between devices.

wormhole-gui Wormhole-gui is a cross-platform application that lets you easily share files, folders and text between devices. It uses the Go implement

GUI application for Raspberry PI which allows simultaneous manipulation of infrared and nightvision cameras

IRNC GUI application for Raspberry PI which allows simultaneous manipulation of infrared and nightvision cameras IRNC stands for "InfraRed and Nightvi

Go Encrypt! Is a simple command-line encryption and decryption application using AES-256 GCM.

Go Encrypt! Go Encrypt! is a command-line application used to easily encrypt and decrypt files with the AES-256 GCM encryption algorithm. Usage Usage

Akroma GO client - Akroma is an EVM based application development platform (smart-contracts).

Akroma Akroma is an EVM based application development platform (smart-contracts). Akroma will utilize a Masternode system, and build out an Oracle pla

An application based on fabric Hyperledger

An application based on fabric Hyperledger

immune Guard agent application

immune Guard Agent This is the agent component of the immune Guard product. It used together with the immune Guard API Service. Further information ca

A terminal application to watch crypto prices!
A terminal application to watch crypto prices!

cryptgo Latest Stable Version: Crytpgo is a TUI based application written purely in Go to monitor and observe cryptocurrency prices in real time! Inst

Create chain for application built using starport.

test test is a blockchain built using Cosmos SDK and Tendermint and created with Starport. Get started starport chain serve serve command installs de

Comments
  • Integration of NetConn() for tls package with some package rename

    Integration of NetConn() for tls package with some package rename

    To make the library interfaceable with the framework I am modifying, I added the NetConn() function found in the crypto/tls library (go version go1.19.3 linux/amd64). I also changed the name of some packages following golang's best practice

    opened by CosimoMichelagnoli 0
Owner
buyobuyo
buyobuyo
This repository holds supplementary Go cryptography libraries

Go Cryptography This repository holds supplementary Go cryptography libraries. Download/Install The easiest way to install is to run go get -u golang.

lin 1 Dec 30, 2021
Script in Golang using Go 1.6 std lib methods to traverse directories and read the files

dev-check-in Script in Golang using Go 1.6 std lib methods to traverse directories and read the files Using only the standard library. It will find al

Gabriel 0 Dec 14, 2021
Gogst - This lib will tell you what is current market status of your stock

gogst (Golang global stock time) This lib will tell you what is current market s

Band Protocol 0 Jan 28, 2022
Aegis - Implementation of AEGIS-128L and AEGIS-256 AEAD algorithms.

Aegis - Implementation of AEGIS-128L and AEGIS-256 AEAD algorithms.

Eric Lagergren 4 Dec 29, 2022
goBlockChain is a version of the classic blockChain with POW algorithms written in golang.

goBlockChain is a version of the classic blockChain with POW algorithms written in golang. May come in handy when learning about this technology.

Alexandr Primak 1 Oct 31, 2021
Proof of Work Algorithms For Golang

Proof of Work Algorithms Overview Note: This library is still in active developm

2zo 0 Jan 7, 2022
Easy to use crypto library with multiple algorithms

crypka Crypka is library, which abstracts away crypto, so one can easily do: Swap cryptosystems by swapping algorithm object in one place Easily and s

null 1 Mar 6, 2022
Eunomia is a distributed application framework that support Gossip protocol, QuorumNWR algorithm, PBFT algorithm, PoW algorithm, and ZAB protocol and so on.

Introduction Eunomia is a distributed application framework that facilitates developers to quickly develop distributed applications and supports distr

Cong 2 Sep 28, 2021
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀

cointop is a fast and lightweight interactive terminal based UI application for tracking and monitoring cryptocurrency coin stats in real-time.

Miguel Mota 3.5k Jan 6, 2023
Frontier Chain is a blockchain application built using Cosmos SDK and Tendermint.

Frontier Chain Frontier Chain is a blockchain application built using Cosmos SDK and Tendermint. Setup Initialize the blockchain with one validator no

Frontier 12 Jul 12, 2022