solcrypto icon indicating copy to clipboard operation
solcrypto copied to clipboard

Solidity crypto libraries, ring signatures, proof of knowledge, packed signatures etc. with matching Python implementations for secp256k1 and (alt)BN-256

SolCrypto

Build Status

This repository contains Solidity and Python implementations of several cryptographic primitives, they are designed to work together and make it easier to build novel cryptosystems using composable primitives. These implementations can be easily switched to either the secp256k1 or alt_bn128 curves.

Algorithms

  • Schnorr proof of knowledge: Schnorr.sol, schnorr.py
  • AOS ring signatures: AOSRing.sol, aosring.py
  • Linkable AOS ring signatures: UAOSRing.sol, uaosring.py
  • Packed ECDSA signatures (2x 256bit words, no v): ECDSA.sol, ecdsa.py
  • Merkle tree: MerkleProof.sol, merkle.py
  • Fast AOS ring signatures, using ecrecover: HackyAOSRing.sol, hackyaosring.py, see this post on ethresear.ch

TODO

  • Pedersen commitments
  • Security hardening
  • Documentation

White Papers