Categorygithub.com/niclabs/tcecdsa
modulepackage
0.0.7
Repository: https://github.com/niclabs/tcecdsa.git
Documentation: pkg.go.dev

# README

Threshold Cryptography Eliptic Curve Digital Signature Algorithm

Go Report Card Build Status GoDoc

Implementation of Threshold Cryptography Eliptic Curve Digital Signature Algorithm proposed on the paper Using Level-1 Homomorphic Encryption To Improve Threshold DSA Signatures For Bitcoin Wallet Security.

This implementation is loosely based on the extension of Paillier Toolbox to use Level-2 Homomorphic Encryption from Princeton CITP. That code is the working example of the work in the paper mentioned earlier.

This code also implements the level-2 homomorphic encryption protocol from Dario Catalano et al, Boosting Linearly-Homomorphic Encryption to Evaluate Degree-2 Functions on Encrypted Data.

Requirements

The only requirement for this library is our [Threshold Paillier Implementation] (https://github.com/niclabs/tcpaillier). It will be downloaded automatically if the module is used with Go Modules

Using the library

To use the library with a module-enabled go project, you must write the following line on a terminal on the root file of the project.

go get github.com/niclabs/tcecdsa

Tests

To run the tests you just need to use go test:

go test github.com/niclabs/tcecdsa

# Packages

Package l2fhe represents a homomorphic encryption scheme based on Catalano-Fiore and Paillier Cryptosystem.

# Functions

HashToInt converts a hash value to an integer.
No description provided by the author
NewKey returns a new distributed key share list, using the specified l (total number of nodes), k (threshold), curveName (elliptic curve name, between those Go supports by default) and params (additional params) If the params are nil, it creates them.
NewPoint returns a new point centered in (x, y).
NewSigZKProof creates the SigZKProof used by the protocol.
NewZero returns a new point centered in (0,0).
RandomFieldElement returns A random element of the field underlying the given curve using the procedure given in [NSA] A.2.1.
RandomInRange returns a number between an interval [min, max).
No description provided by the author

# Constants

Session is finished.
Session was created.
Session has passed Round 1.
Session has passed Round 2.
Session has passed Round 3.
Undefined status.

# Variables

No description provided by the author

# Structs

KeyGenZKProof represents the parameters for the Key Generation ZKProof.
KeyInitMessage defines a message sent on key generation.
KeyMeta represents a set of parameters that are used by every key share.
KeyShare represents a "piece" of the key held by a participant of the distributed protocol.
NewKeyParams represents a group of params that the metod NewKey can use.
Point represents a point in a discrete elliptic curve.
Round1Message defines a message sent on Signature Initialization (Round1 on this implementation).
Round2Message defines a message sent on Round 2.
Round3Message defines a message sent on Round 3.
No description provided by the author
SigSession represents a set of values saved and used by the participants to generate an specific Signature.
SigZKProof represents the parameters for the Signature ZKProof.
SigZKProofParams groups all the params used on Signing ZKProof.
ZKProofMeta contains the RSA parameters required to create ZKProofs.

# Type aliases

KeyInitMessageList represents a list of KeyInitMessage.
Round1MessageList represents a list of Round1Message.
Round2MessageList represents a list of Round2Message.
Round3MessageList represents a list of Round3Message.
Status represents the current state of a SigSession.