latest.ipv8.attestation.wallet.irmaexact.gabi.keys
Copyright (c) 2016, Maarten Everts All rights reserved.
This source code has been ported from https://github.com/privacybydesign/gabi The authors of this file are not -in any way- affiliated with the original authors or organizations.
Module Contents
Classes
Algorithm parameters for Gabi. |
|
Gabi private key. |
|
Gabi public key. |
|
A Camenisch-Lysyanskaya signature. |
Functions
|
Select a safe prime from the given list that fits the Gabi protocol's requirements. |
|
Generate a prime pair that fits Gabi's protocol requirements. |
|
Calculate the Legendre Symbol for numbner a and prime p. |
|
Generate a new key pair for a given number of attributes. |
|
CRT the given exponents (or their hashes if they are bigger than the max length). |
|
CRT the given exponents using public key information. |
|
Generate a prime in a given range. |
|
Sign a bunch of messages using our key material. |
|
Sign a bunch of messages using our key material. |
Attributes
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.DefaultEpochLength = 432000
- class latest.ipv8.attestation.wallet.irmaexact.gabi.keys.BaseParameters(LePrime: int, Lh: int, Lm: int, Ln: int, Lstatzk: int)
Algorithm parameters for Gabi.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.DefaultSystemParameters
- class latest.ipv8.attestation.wallet.irmaexact.gabi.keys.PrivateKey(p: int, q: int, counter: int, expiryDate: int)
Gabi private key.
- class latest.ipv8.attestation.wallet.irmaexact.gabi.keys.PublicKey(N: int, Z: int, S: int, R: list[int], counter: int, expiryDate: int, param: BaseParameters | None = None)
Gabi public key.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.findMatch(safeprimes: list[int], param: BaseParameters, p: int) int | None
Select a safe prime from the given list that fits the Gabi protocol’s requirements.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.generateSafePrimePair(param: BaseParameters) tuple[int, int]
Generate a prime pair that fits Gabi’s protocol requirements.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.legendreSymbol(a: int, p: int) int
Calculate the Legendre Symbol for numbner a and prime p.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.GenerateKeyPair(param: BaseParameters, numAttributes: int, counter: int, expiryDate: int) tuple[PrivateKey, PublicKey]
Generate a new key pair for a given number of attributes.
- class latest.ipv8.attestation.wallet.irmaexact.gabi.keys.CLSignature(A: int, E: int, V: int, KeyshareP: int | None = None)
A Camenisch-Lysyanskaya signature.
- Randomize(pk: PublicKey) CLSignature
Mask the signature without changing its underlying data.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.representToBases(bases: list[int], exps: list[int], modulus: int, maxMessageLength: int) int
CRT the given exponents (or their hashes if they are bigger than the max length).
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.RepresentToPublicKey(pk: PublicKey, exps: list[int]) int
CRT the given exponents using public key information.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.smallPrimes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53]
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.smallPrimesProduct = 16294579238595022365
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.randomPrimeInRange(start: int, length: int) int
Generate a prime in a given range.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.signMessageBlockAndCommitment(sk: PrivateKey, pk: PublicKey, U: int, ms: list[int]) CLSignature
Sign a bunch of messages using our key material.
- latest.ipv8.attestation.wallet.irmaexact.gabi.keys.SignMessageBlock(sk: PrivateKey, pk: PublicKey, ms: list[int]) CLSignature
Sign a bunch of messages using our key material.