Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TauPowers = 1 << 21 TauPowersG1 = TauPowers<<1 - 1 ChallengeSize = TauPowersG1*bls12.G1UncompressedSize + TauPowers*bls12.G2UncompressedSize + TauPowers*bls12.G1UncompressedSize + TauPowers*bls12.G1UncompressedSize + bls12.G2UncompressedSize + blake2b.Size PublicKeySize = 3*bls12.G2UncompressedSize + 6*bls12.G1UncompressedSize ResponseSize = TauPowersG1*bls12.G1CompressedSize + TauPowers*bls12.G2CompressedSize + TauPowers*bls12.G1CompressedSize + TauPowers*bls12.G1CompressedSize + bls12.G2CompressedSize + blake2b.Size + PublicKeySize )
Functions ¶
func NewKeypair ¶
func NewKeypair(digest []byte) (*PublicKey, *PrivateKey)
func WriteNextChallenge ¶
func WriteResponse ¶
Types ¶
type Accumulator ¶
type Accumulator struct { TauG1 []*bls12.EP TauG2 []*bls12.EP2 AlphaTau []*bls12.EP BetaTau []*bls12.EP BetaG2 *bls12.EP2 }
func ReadAccumulator ¶
func ReadAccumulator(r io.Reader, compressed bool) (*Accumulator, error)
type Challenge ¶
type Challenge struct { PreviousHash []byte ChallengeHash []byte ResponseHash []byte Accumulator *Accumulator PublicKey *PublicKey }
func ReadChallenge ¶
type PrivateKey ¶
type PrivateKey struct {
Tau, Alpha, Beta []byte
}
Click to show internal directories.
Click to hide internal directories.