Documentation
¶
Index ¶
- Constants
- Variables
- func BatchVerify(pubs []Pubkey, msg []byte, sigs []Signature) bool
- func Bytes2Big(b []byte) (x big.Int)
- func Decimal2Big(s string) (x big.Int)
- func Hex2Big(s string) (x big.Int)
- func PrintCtrs()
- func PubkeyCtrs() string
- func SeckeyCtrs() string
- func SignatureCtrs() string
- func VerifyAggregateSig(pubs []Pubkey, msg []byte, asig Signature) bool
- func VerifyPop(pub Pubkey, pop Pop) bool
- func VerifySig(pub Pubkey, msg []byte, sig Signature) bool
- type ID
- type Pop
- type Pubkey
- type PubkeyMap
- type Rand
- type Seckey
- func AggregateSeckeys(secs []Seckey) (sec Seckey)
- func RecoverSeckey(secs []Seckey, ids []ID) (sec Seckey)
- func RecoverSeckeyByMap(m SeckeyMap, k int) (sec Seckey)
- func SeckeyFromBigInt(b *big.Int) (sec Seckey)
- func SeckeyFromBytes(b []byte) (sec Seckey)
- func SeckeyFromInt(i int64) (sec Seckey)
- func SeckeyFromRand(seed Rand) Seckey
- func ShareSeckey(msec []Seckey, id ID) (sec Seckey)
- func ShareSeckeyByAddr(msec []Seckey, addr common.Address) (sec Seckey)
- type SeckeyMap
- type Signature
- type SignatureMap
Constants ¶
const RandLength = 32
RandLength --
Variables ¶
var R = Decimal2Big("16798108731015832284940804142231733909759579603404752749028378864165570215949")
R --
Functions ¶
func BatchVerify ¶
BatchVerify --
func SeckeyCtrs ¶
func SeckeyCtrs() string
SeckeyCtrs -- one-line summary of counter values related to secret key operations
func VerifyAggregateSig ¶
VerifyAggregateSig --
Types ¶
type ID ¶
type ID struct {
// contains filtered or unexported fields
}
ID -- id for secret sharing, represented by big.Int
type Pubkey ¶
type Pubkey struct {
// contains filtered or unexported fields
}
Pubkey -
func AggregatePubkeys ¶
AggregatePubkeys -- aggregate multiple into one by summing up
func PubkeyFromSeckey ¶
PubkeyFromSeckey -- derive the pubkey from seckey
func SharePubkey ¶
SharePubkey -- Derive shares from master through polynomial substitution
type Rand ¶
type Rand [RandLength]byte
Rand --
func (Rand) DerivedRand ¶
DerivedRand -- Derived Randomness hierarchically
func (Rand) RandomPerm ¶
RandomPerm -- Convert to a random permutation
type Seckey ¶
type Seckey struct {
// contains filtered or unexported fields
}
Seckey -- represented by a big.Int modulo R
func AggregateSeckeys ¶
AggregateSeckeys -- Aggregate multiple seckeys into one by summing up
func RecoverSeckey ¶
RecoverSeckey -- Recover master from shares through Lagrange interpolation
func RecoverSeckeyByMap ¶
RecoverSeckeyByMap --
func ShareSeckey ¶
ShareSeckey -- Derive shares from master through polynomial substitution
func ShareSeckeyByAddr ¶
ShareSeckeyByAddr -- wrapper around sharing by ID
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature --
func AggregateSigs ¶
AggregateSigs -- aggregate multiple into one by summing up
func RecoverSignature ¶
RecoverSignature -- Recover master from shares through Lagrange interpolation
func RecoverSignatureByMap ¶
func RecoverSignatureByMap(m SignatureMap, k int) (sec Signature)
RecoverSignatureByMap --