distributed_keygen.utils module
Useful functions for the distributed keygen module.
- class distributed_keygen.utils.Shares(p=<factory>, q=<factory>, n=<factory>, biprime=<factory>, v=<factory>, lambda_=<factory>, beta=<factory>, secret_key=<factory>)[source]
Bases: object
Shares contains all shares of this party. Every subclass contains an object for that element, such as $p$ or $q$. These objects contain up to two entries: “additive” and “shares”, in “additive”, the local additive share of that element is stored, in “shares”, the shamir shares of the local additive share are stored.
- class Beta(additive=0, shares=<factory>)[source]
Bases: object
Shares of $beta$.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class Biprime(additive=0, shares=<factory>)[source]
Bases: object
Shares of the used biprime.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class Lambda(additive=0, shares=<factory>)[source]
Bases: object
Shares of $lambda$.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class N(shares=<factory>)[source]
Bases: object
Shares of $n$.
- shares:
Dict
[int
, int
]
- class P(additive=0, shares=<factory>)[source]
Bases: object
Shares of $p$.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class Q(additive=0, shares=<factory>)[source]
Bases: object
Shares of $q$.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class SecretKey(additive=0, shares=<factory>)[source]
Bases: object
Shares of the secret key.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- class V(additive=0, shares=<factory>)[source]
Bases: object
Shares of $v$.
- additive:
int
= 0
- shares:
Dict
[int
, int
]
- beta:
Beta
- biprime:
Biprime
- lambda_:
Lambda
- n:
N
- p:
P
- q:
Q
- secret_key:
SecretKey
- v:
V
- distributed_keygen.utils.mult_list(list_, modulus=None)[source]
Utility function to multiply a list of numbers in a modular group
- Parameters:
-
- Return type:
int
- Returns:
product of the elements in the list modulo the modulus