C# Class Goedel.Cryptography.Secret

Represents a secret key that may be split into or reformed from a collection of shares.
Afficher le fichier Open project: hallambaker/Mathematical-Mesh Class Usage Examples

Méthodes publiques

Свойство Type Description
Key byte[]

Méthodes publiques

Méthode Description
Equals ( System obj ) : bool

Test for equality

GetHashCode ( ) : int

Hash code of the current class.

Secret ( KeyShare Shares ) : System

Recreate a secret from the specified shares.

Secret ( byte Key ) : System

Create a secret from the specified key value.

Secret ( int Bits ) : System

Create a new random secret with the specified number of bits.

Secret ( string Shares ) : System

Recreate a secret from shares specified as Base32 encoded strings.

Split ( ) : Goedel.Cryptography.KeyShare[]

Create a set of 2 key shares with a quorum of 2.

Split ( int N ) : Goedel.Cryptography.KeyShare[]

Create a set of N key shares with a quorum of N.

Split ( int N, int K ) : Goedel.Cryptography.KeyShare[]

Create a set of N key shares with a quorum of K.

Méthodes protégées

Méthode Description
Secret ( ) : System

Constructor for use in inherited classes.

Private Methods

Méthode Description
ArrayXOR ( byte Base, byte Mix ) : void
ArrayXOR1 ( byte Base, byte Mix ) : void
Combine ( KeyShare Shares ) : byte[]
CombineN ( KeyShare Shares ) : byte[]
CombineNK ( KeyShare Shares ) : byte[]
GetBytes ( System.Numerics.BigInteger In ) : byte[]
MakePositive ( byte Data ) : System.Numerics.BigInteger
ModInverse ( System.Numerics.BigInteger k, System.Numerics.BigInteger m ) : System.Numerics.BigInteger
PolyMod ( int x, System.Numerics.BigInteger PolyNomial, System.Numerics.BigInteger Modulus ) : System.Numerics.BigInteger

Method Details

Equals() public méthode

Test for equality
public Equals ( System obj ) : bool
obj System The secret to test against
Résultat bool

GetHashCode() public méthode

Hash code of the current class.
public GetHashCode ( ) : int
Résultat int

Secret() protected méthode

Constructor for use in inherited classes.
protected Secret ( ) : System
Résultat System

Secret() public méthode

Recreate a secret from the specified shares.
public Secret ( KeyShare Shares ) : System
Shares KeyShare The shares to be recombined.
Résultat System

Secret() public méthode

Create a secret from the specified key value.
public Secret ( byte Key ) : System
Key byte
Résultat System

Secret() public méthode

Create a new random secret with the specified number of bits.
public Secret ( int Bits ) : System
Bits int
Résultat System

Secret() public méthode

Recreate a secret from shares specified as Base32 encoded strings.
public Secret ( string Shares ) : System
Shares string The shares to be recombined.
Résultat System

Split() public méthode

Create a set of 2 key shares with a quorum of 2.
public Split ( ) : Goedel.Cryptography.KeyShare[]
Résultat Goedel.Cryptography.KeyShare[]

Split() public méthode

Create a set of N key shares with a quorum of N.
public Split ( int N ) : Goedel.Cryptography.KeyShare[]
N int
Résultat Goedel.Cryptography.KeyShare[]

Split() public méthode

Create a set of N key shares with a quorum of K.
public Split ( int N, int K ) : Goedel.Cryptography.KeyShare[]
N int Number of key shares to create (max is 32).
K int Quorum of key shares required to reconstruct the secret.
Résultat Goedel.Cryptography.KeyShare[]

Property Details

Key public_oe property

The Key value
public byte[] Key
Résultat byte[]