Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 2.78 KB

File metadata and controls

34 lines (25 loc) · 2.78 KB

Solidity Crypto Library

Collection of cryptographic primitives usable in Solidity smart contracts.

Currently implemented:

  • Binary Search in Solidity
  • Merkle Dispute Handler
  • Gas Estimator (works for contracts with less than 7 functions)

Existing libraries

BLS signature verification:

Post Quantum:

  • EnQlave (in development) is a quantum-resistant wallet built using smart contracts and relies on the eXtended Merkle Signature Scheme (XMSS).

Zero Knowledge Proofs:

  • ZoKrates the zk-SNARKS implementation for Ethereum. One can generate a proofing and verification key off-chain and use this proofing key to generate a proof, which can then be verified by a pre-compiled smart contract.
  • Zero-Knowledge Range Proof enable a more efficient range proof than using generic zk-SNARK.
  • ZSL uses zk-SNARKS to enable private transfers of “z-tokens” using private and public smart-contracts.
  • EY Nightfall uses the ZoKrates toolkit to enable private ERC-20 and ERC-721 transactions.
  • Phantom is an improvement of ZSL and Nightfall, which uses Shrub Merkle trees, among other changes, to enable more efficient zkps on Ethereum.

Other libraries that implement cryptographic primitives:

  • OpenZeppelin Cryptography includes an ECDSA- and a MerkleProof library.
  • solCrypto implements Schnorr proof of knowledge, AOS ring signatures, Linkable AOS ring signatures, Packed ECDSA signatures, Merkle tree proof, AOS ring signatures.
  • solGrined implements Pedersen Commitment.
  • solRsaVerify verifies RSA signatures.
  • Ether-Schnoor-Verification implements Schnorr multi-signature verification.
  • elliptic-curve-solidity supports the following operations: Modular: inverse, exponentiation. Jacobian: addition, double, multiplication. Affine: inverse, addition, subtraction, multiplication. Auxiliary: convert to affine, derive coordinate Y, point on curve
  • eth-random returns a "random" value by specifying which block in the future will be used for extracting this "random" value out of the hash.