Documentation ¶
Index ¶
- Variables
- func CalcDelta(alpha1 []*big.Int, betaU1 []*big.Int, ch chan interface{}) *big.Int
- func CalcSigma(uu1 []*big.Int, vU1 []*big.Int, ch chan interface{}) *big.Int
- func CalcUs(mMtA *big.Int, u1K *big.Int, r *big.Int, sigma1 *big.Int) *big.Int
- func Calc_r(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ...) (*big.Int, *big.Int)
- func Calc_s(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ...) *big.Int
- func Call(msg interface{}, enode string)
- func CommitRpcReq()
- func Compress(c []byte) (string, error)
- func DcrmCall(msg interface{}, enode string) <-chan string
- func DcrmCallRet(msg interface{}, enode string)
- func Decode2(s string) (interface{}, error)
- func DecryptCkGamma(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, ...) []*big.Int
- func DecryptCkW(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, ...) []*big.Int
- func DecryptMsg(cm string) (string, error)
- func DefaultDataDir() string
- func DisMsg(msg string)
- func DoubleHash(id string, keytype string) *big.Int
- func ECDSAGenKeyCalcPrivKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) (*big.Int, bool)
- func ECDSAGenKeyCalcPubKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) (map[string][]*big.Int, bool)
- func ECDSAGenKeyRoundFive(msgprex string, ch chan interface{}, w *RpcReqWorker, u1 *big.Int) bool
- func ECDSAGenKeyRoundFour(msgprex string, ch chan interface{}, w *RpcReqWorker) (*lib.NtildeH1H2, bool)
- func ECDSAGenKeyRoundOne(msgprex string, ch chan interface{}, w *RpcReqWorker) (*big.Int, *lib.PolyStruct2, *lib.PolyGStruct2, *lib.Commitment, *lib.PublicKey, ...)
- func ECDSAGenKeyRoundThree(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) bool
- func ECDSAGenKeyRoundTwo(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) ([]*lib.ShareStruct2, bool)
- func ECDSAGenKeySaveData(cointype string, ids sortableIDSSlice, w *RpcReqWorker, ch chan interface{}, ...) bool
- func ECDSAGenKeyVerifyCommitment(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) ([]string, map[string]*lib.Commitment, bool)
- func ECDSAGenKeyVerifyShareData(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) (map[string]*lib.ShareStruct2, []string, bool)
- func ECDSAGenKeyVerifyZKU(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ...) bool
- func ECDSASignPaillierEncrypt(cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ...) (map[string]*big.Int, map[string]*big.Int, map[string]*lib.PublicKey)
- func ECDSASignRoundEight(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, l1 *big.Int, ...) (*lib.ZkABProof, []string)
- func ECDSASignRoundEleven(msgprex string, cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ...) map[string]*big.Int
- func ECDSASignRoundFive(msgprex string, cointype string, delta1 *big.Int, idSign sortableIDSSlice, ...) *big.Int
- func ECDSASignRoundFour(msgprex string, cointype string, save string, w *RpcReqWorker, ...) (map[string]*big.Int, map[string]*lib.MtAZK2Proof_nhh, map[string]*big.Int, ...)
- func ECDSASignRoundNine(msgprex string, cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ...) ([]string, *lib.Commitment)
- func ECDSASignRoundOne(msgprex string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}) (*big.Int, *big.Int, *lib.Commitment)
- func ECDSASignRoundSeven(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, ...) (*lib.Commitment, []string, *big.Int, *big.Int)
- func ECDSASignRoundSix(msgprex string, u1Gamma *big.Int, commitU1GammaG *lib.Commitment, ...) *lib.ZkUProof
- func ECDSASignRoundTen(msgprex string, commitBigUT1 *lib.Commitment, w *RpcReqWorker, ...) []string
- func ECDSASignRoundThree(msgprex string, cointype string, save string, w *RpcReqWorker, ...) bool
- func ECDSASignRoundTwo(msgprex string, cointype string, save string, w *RpcReqWorker, ...) (map[string]*lib.MtAZK1Proof_nhh, map[string]*lib.NtildeH1H2)
- func ECDSASignVerifyBigUTCommitment(cointype string, commitbiguts []string, commitbigutd11s []string, ...) bool
- func ECDSASignVerifyBigVAB(cointype string, w *RpcReqWorker, commitbigvabs []string, zkabproofs []string, ...) (map[string]*lib.Commitment, *big.Int, *big.Int)
- func ECDSASignVerifyCommitment(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ...) map[string][]*big.Int
- func ECDSASignVerifyZKGammaW(cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ...) bool
- func ECDSASignVerifyZKNtilde(msgprex string, cointype string, save string, w *RpcReqWorker, ...) bool
- func Encode2(obj interface{}) (string, error)
- func EncryptMsg(msg string, enodeID string) (string, error)
- func Find(l *list.List, msg string) bool
- func GenRandomSafePrime(length int)
- func GetChannelValue(t int, obj interface{}) (string, error)
- func GetDbDir() string
- func GetEnodesByUid(uid *big.Int, cointype string, groupid string) string
- func GetEnodesInfo()
- func GetGroupDir() string
- func GetGroupIdByEnode(enode string) string
- func GetIds(cointype string, groupid string) sortableIDSSlice
- func GetPaillierPk(save string, index int) *lib.PublicKey
- func GetPaillierSk(save string, index int) *lib.PrivateKey
- func GetRandomBetaV(PaillierKeyLength int) ([]*big.Int, []*big.Int, []*big.Int, []*big.Int)
- func GetRandomInt(length int) *big.Int
- func GetRandomIntFromZn(n *big.Int) *big.Int
- func GetRetErr(err string) error
- func GetRetErrJsonStr(code int, err string) string
- func GetSelfPrivKey(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, save string, ...) *lib.PrivateKey
- func GetSignString(r *big.Int, s *big.Int, v int32, i int) string
- func GetZkFactProof(save string, index int) *lib.NtildeH1H2
- func InitChan()
- func InitDev(keyfile string, groupId string)
- func IsCurNode(enodes string, cur string) bool
- func IsInGroup(enode string, groupId string) bool
- func KeyGenerate_ECDSA(msgprex string, ch chan interface{}, id int, cointype string) bool
- func MapPrivKeyShare(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, privshare string) (*big.Int, *big.Int)
- func PutGroup(groupId string) bool
- func ReadBits(bigint *big.Int, buf []byte)
- func RegP2pBroadcastInGroupOthersCallBack(f func(string, string) (string, error))
- func RegP2pGetGroupCallBack(f func(string) (int, string))
- func RegP2pGetSelfEnodeCallBack(f func() string)
- func RegP2pParseNodeCallBack(f func(string) string)
- func RegP2pSendMsgToPeerCallBack(f func(string, string) error)
- func RegP2pSendToGroupAllNodesCallBack(f func(string, string) (string, error))
- func SavePubKeyDataToDb()
- func SendMsgToDcrmGroup(msg string, groupid string)
- func SendMsgToPeer(enodes string, msg string)
- func SendReqToGroup(msg string, rpctype string) (string, error)
- func SetUpMsgList(msg string)
- func Sign_ec2(msgprex string, save string, message string, cointype string, pkx *big.Int, ...) string
- func Tool_DecimalByteSlice2HexString(DecimalSlice []byte) string
- func UnCompress(s string) (string, error)
- func Verify(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool
- func Verify2(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool
- type DcrmHash
- type ECDSASignature
- func (this *ECDSASignature) GetR() *big.Int
- func (this *ECDSASignature) GetRecoveryParam() int32
- func (this *ECDSASignature) GetRoudFiveAborted() bool
- func (this *ECDSASignature) GetS() *big.Int
- func (this *ECDSASignature) New()
- func (this *ECDSASignature) New2(r *big.Int, s *big.Int)
- func (this *ECDSASignature) New3(r *big.Int, s *big.Int, recoveryParam int32)
- func (this *ECDSASignature) SetR(r *big.Int)
- func (this *ECDSASignature) SetRecoveryParam(recoveryParam int32)
- func (this *ECDSASignature) SetRoudFiveAborted(roudFiveAborted bool)
- func (this *ECDSASignature) SetS(s *big.Int)
- type Err
- type ErrorRet
- type KeyData
- type RecvMsg
- type ReqAddrSendMsgToDcrm
- type ReqDispatcher
- type RpcDcrmRes
- type RpcReq
- type RpcReqWorker
- type SendMsg
- type SignSendMsgToDcrm
- type WorkReq
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //err code 1 ErrEncodeSendMsgFail = `{Code:1,Error:"encode send msg fail."}` ErrParamError = `{Code:2,Error:"parameters error."}` ErrGetOtherNodesDataFail = `{Code:3,Error:"NetWork Error,Get Data From Other Node Fail."}` ErrUnknownChType = `{Code:4,Error:"unknown channel type."}` ErrGetChValueFail = `{Code:5,Error:"get channel value fail."}` ErrNoFindWorker = `{Code:7,Error:"can not find worker."}` ErrGetWorkerIdError = `{Code:10,Error:"get worker id error."}` ErrGetPrexDataError = `{Code:11,Error:"get msg prefix data error."}` ErrSendDataToGroupFail = `{Code:15,Error:"send data to group fail."}` ErrInternalMsgFormatError = `{Code:16,Error:"msg data format error."}` ErrGetNoResFromGroupMem = `{Code:17,Error:"no get any result from other group node."}` ErrGroupNotReady = `{Code:23,Error:"the group is not ready.please try again."}` ErrGetGenPubkeyFail = `{Code:24,Error:"get generate pubkey fail."}` ErrGetGenSaveDataFail = `{Code:25,Error:"get generate save data fail."}` ErrCreateDbFail = `{Code:26,Error:"create db fail."}` ErrDcrmSigWrongSize = `{Code:28,Error:"wrong size for dcrm sig."}` ErrDcrmSigFail = `{Code:29,Error:"dcrm sign fail."}` ErrInvalidDcrmAddr = `{Code:30,Error:"invalid dcrm address."}` ErrGetC1Timeout = `{Code:31,Error:"get C1 timeout."}` ErrGetEnodeByUIdFail = `{Code:32,Error:"can not find proper enodes by uid."}` ErrGetD1Timeout = `{Code:33,Error:"get D1 timeout."}` ErrGetSHARE1Timeout = `{Code:34,Error:"get SHARE1 timeout."}` ErrGetAllSHARE1Fail = `{Code:35,Error:"get all SHARE1 msg fail."}` ErrGetAllD1Fail = `{Code:36,Error:"get all D1 msg fail."}` ErrVerifySHARE1Fail = `{Code:37,Error:"verify SHARE1 fail."}` ErrGetAllC1Fail = `{Code:38,Error:"get all C1 msg fail."}` ErrKeyGenVerifyCommitFail = `{Code:39,Error:"verify commit in keygenerate fail."}` ErrGetZKFACTPROOFTimeout = `{Code:40,Error:""get ZKFACTPROOF timeout."}` ErrGetZKUPROOFTimeout = `{Code:41,Error:""get ZKUPROOF timeout."}` ErrGetAllZKFACTPROOFFail = `{Code:42,Error:"get all ZKFACTPROOF msg fail."}` ErrVerifyZKFACTPROOFFail = `{Code:43,Error:"verify ZKFACTPROOF fail."}` ErrGetAllZKUPROOFFail = `{Code:44,Error:"get all ZKUPROOF msg fail."}` ErrVerifyZKUPROOFFail = `{Code:45,Error:"verify ZKUPROOF fail."}` ErrGetC11Timeout = `{Code:46,Error:"get C11 timeout."}` ErrGetMTAZK1PROOFTimeout = `{Code:47,Error:"get MTAZK1PROOF timeout."}` ErrGetKCTimeout = `{Code:48,Error:"get KC timeout."}` ErrGetAllKCFail = `{Code:49,Error:"get all KC msg fail."}` ErrGetAllMTAZK1PROOFFail = `{Code:50,Error:"get all MTAZK1PROOF msg fail."}` ErrVerifyMTAZK1PROOFFail = `{Code:51,Error:"verify MTAZK1PROOF fail.""}` ErrGetMKGTimeout = `{Code:52,Error:"get MKG timeout."}` ErrGetAllMKGFail = `{Code:53,Error:"get all MKG msg fail."}` ErrGetMKWTimeout = `{Code:54,Error:"get MKW timeout."}` ErrGetAllMKWFail = `{Code:55,Error:"get all MKW msg fail."}` ErrVerifyMKGFail = `{Code:56,Error:"verify MKG fail.""}` ErrVerifyMKWFail = `{Code:57,Error:"verify MKW fail.""}` ErrGetPaillierPrivKeyFail = `{Code:58,Error:"get paillier privkey fail.""}` ErrGetDELTA1Timeout = `{Code:59,Error:"get DELTA1 timeout."}` ErrGetAllDELTA1Fail = `{Code:60,Error:"get all DELTA1 msg fail."}` ErrGetD11Timeout = `{Code:61,Error:"get D11 timeout."}` ErrGetAllD11Fail = `{Code:62,Error:"get all D11 msg fail."}` ErrGetAllC11Fail = `{Code:63,Error:"get all C11 msg fail."}` ErrSignVerifyCommitFail = `{Code:64,Error:"verify commit in dcrm sign fail."}` ErrREqualZero = `{Code:65,Error:"sign error: r equal zero."}` ErrGetS1Timeout = `{Code:66,Error:"get S1 timeout."}` ErrGetAllS1Fail = `{Code:67,Error:"get all S1 msg fail."}` ErrVerifySAllFail = `{Code:68,Error:"verify SAll != m*G + r*PK in dcrm sign ec2."}` ErrGetSS1Timeout = `{Code:69,Error:"get SS1 timeout."}` ErrGetAllSS1Fail = `{Code:70,Error:"get all SS1 msg fail."}` ErrSEqualZero = `{Code:71,Error:"sign error: s equal zero."}` ErrDcrmSignVerifyFail = `{Code:72,Error:"dcrm sign verify fail."}` )
dcrm erros
View Source
var ( Sep = "dcrmparm" SepSave = "dcrmsepsave" SepSg = "dcrmmsg" SepDel = "dcrmsepdel" PaillierKeyLength = 2048 KeyFile string //callback GetGroup func(string) (int, string) SendToGroupAllNodes func(string, string) (string, error) GetSelfEnode func() string BroadcastInGroupOthers func(string, string) (string, error) SendToPeer func(string, string) error ParseNode func(string) string PubKeyData = make(chan KeyData, 1000) RpcReqQueueCache = make(chan RpcReq, RpcMaxQueue) )
View Source
var ( //rpc-req //dcrm node RpcMaxWorker = 2000 RpcMaxQueue = 10000 RpcReqQueue chan RpcReq Enode_cnts int NodeCnt = 3 ThresHold = 3 )
//////////////////////dcrm///////////////////////////////
Functions ¶
func CommitRpcReq ¶
func CommitRpcReq()
func DcrmCallRet ¶
func DcrmCallRet(msg interface{}, enode string)
func DecryptCkGamma ¶
func DecryptCkGamma(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, u1PaillierSk *lib.PrivateKey, mkg map[string]*big.Int, ch chan interface{}) []*big.Int
func DecryptCkW ¶
func DecryptCkW(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, u1PaillierSk *lib.PrivateKey, mkw map[string]*big.Int, ch chan interface{}) []*big.Int
func DecryptMsg ¶
func DefaultDataDir ¶
func DefaultDataDir() string
func DoubleHash ¶
commitment question 1,only use sha3-256
func ECDSAGenKeyCalcPrivKey ¶
func ECDSAGenKeyCalcPrivKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, sstruct map[string]*lib.ShareStruct2, ids sortableIDSSlice) (*big.Int, bool)
func ECDSAGenKeyCalcPubKey ¶
func ECDSAGenKeyCalcPubKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, udecom map[string]*lib.Commitment, ids sortableIDSSlice) (map[string][]*big.Int, bool)
func ECDSAGenKeyRoundFive ¶
func ECDSAGenKeyRoundFive(msgprex string, ch chan interface{}, w *RpcReqWorker, u1 *big.Int) bool
func ECDSAGenKeyRoundFour ¶
func ECDSAGenKeyRoundFour(msgprex string, ch chan interface{}, w *RpcReqWorker) (*lib.NtildeH1H2, bool)
func ECDSAGenKeyRoundOne ¶
func ECDSAGenKeyRoundOne(msgprex string, ch chan interface{}, w *RpcReqWorker) (*big.Int, *lib.PolyStruct2, *lib.PolyGStruct2, *lib.Commitment, *lib.PublicKey, *lib.PrivateKey, bool)
func ECDSAGenKeyRoundThree ¶
func ECDSAGenKeyRoundThree(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1PolyG *lib.PolyGStruct2, commitU1G *lib.Commitment, ids sortableIDSSlice) bool
func ECDSAGenKeyRoundTwo ¶
func ECDSAGenKeyRoundTwo(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1Poly *lib.PolyStruct2, ids sortableIDSSlice) ([]*lib.ShareStruct2, bool)
func ECDSAGenKeySaveData ¶
func ECDSAGenKeySaveData(cointype string, ids sortableIDSSlice, w *RpcReqWorker, ch chan interface{}, skU1 *big.Int, u1PaillierPk *lib.PublicKey, u1PaillierSk *lib.PrivateKey, cs []string, u1NtildeH1H2 *lib.NtildeH1H2) bool
func ECDSAGenKeyVerifyCommitment ¶
func ECDSAGenKeyVerifyCommitment(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ds []string, commitU1G *lib.Commitment, ids sortableIDSSlice) ([]string, map[string]*lib.Commitment, bool)
func ECDSAGenKeyVerifyShareData ¶
func ECDSAGenKeyVerifyShareData(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1PolyG *lib.PolyGStruct2, u1Shares []*lib.ShareStruct2, ids sortableIDSSlice) (map[string]*lib.ShareStruct2, []string, bool)
func ECDSAGenKeyVerifyZKU ¶
func ECDSASignRoundEight ¶
func ECDSASignRoundEleven ¶
func ECDSASignRoundFive ¶
func ECDSASignRoundFour ¶
func ECDSASignRoundFour(msgprex string, cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*lib.PublicKey, zkfactproof map[string]*lib.NtildeH1H2, u1Gamma *big.Int, w1 *big.Int, betaU1Star []*big.Int, vU1Star []*big.Int, ch chan interface{}) (map[string]*big.Int, map[string]*lib.MtAZK2Proof_nhh, map[string]*big.Int, map[string]*lib.MtAZK3Proof_nhh, bool)
func ECDSASignRoundNine ¶
func ECDSASignRoundNine(msgprex string, cointype string, w *RpcReqWorker, idSign sortableIDSSlice, mMtA *big.Int, r *big.Int, pkx *big.Int, pky *big.Int, BigVx *big.Int, BigVy *big.Int, rho1 *big.Int, commitbigcom map[string]*lib.Commitment, l1 *big.Int, ch chan interface{}) ([]string, *lib.Commitment)
func ECDSASignRoundOne ¶
func ECDSASignRoundOne(msgprex string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}) (*big.Int, *big.Int, *lib.Commitment)
func ECDSASignRoundSeven ¶
func ECDSASignRoundSix ¶
func ECDSASignRoundSix(msgprex string, u1Gamma *big.Int, commitU1GammaG *lib.Commitment, w *RpcReqWorker, ch chan interface{}) *lib.ZkUProof
func ECDSASignRoundTen ¶
func ECDSASignRoundTen(msgprex string, commitBigUT1 *lib.Commitment, w *RpcReqWorker, ch chan interface{}) []string
func ECDSASignRoundThree ¶
func ECDSASignRoundTwo ¶
func ECDSASignVerifyBigUTCommitment ¶
func ECDSASignVerifyBigUTCommitment(cointype string, commitbiguts []string, commitbigutd11s []string, commitBigUT1 *lib.Commitment, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, commitbigcom map[string]*lib.Commitment) bool
func ECDSASignVerifyBigVAB ¶
func ECDSASignVerifyCommitment ¶
func ECDSASignVerifyCommitment(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, commitU1GammaG *lib.Commitment, u1GammaZKProof *lib.ZkUProof, ch chan interface{}) map[string][]*big.Int
func ECDSASignVerifyZKGammaW ¶
func ECDSASignVerifyZKGammaW(cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*lib.PublicKey, zkfactproof map[string]*lib.NtildeH1H2, mkg map[string]*big.Int, mkg_mtazk2 map[string]*lib.MtAZK2Proof_nhh, mkw map[string]*big.Int, mkw_mtazk2 map[string]*lib.MtAZK3Proof_nhh, ch chan interface{}) bool
func ECDSASignVerifyZKNtilde ¶
func GenRandomSafePrime ¶
func GenRandomSafePrime(length int)
func GetChannelValue ¶
func GetEnodesInfo ¶
func GetEnodesInfo()
func GetGroupDir ¶
func GetGroupDir() string
func GetGroupIdByEnode ¶
func GetPaillierSk ¶
func GetPaillierSk(save string, index int) *lib.PrivateKey
func GetRandomBetaV ¶
func GetRandomInt ¶
func GetRetErrJsonStr ¶
func GetSelfPrivKey ¶
func GetSelfPrivKey(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, save string, ch chan interface{}) *lib.PrivateKey
func GetZkFactProof ¶
func GetZkFactProof(save string, index int) *lib.NtildeH1H2
paillier question 2,delete zkfactor,add ntilde h1 h2
func InitChan ¶
func InitChan()
workers,RpcMaxWorker,RpcReqWorker,RpcReqQueue,RpcMaxQueue,ReqDispatcher
func KeyGenerate_ECDSA ¶
ec2 msgprex = hash
func MapPrivKeyShare ¶
func ReadBits ¶
ReadBits encodes the absolute value of bigint as big-endian bytes. Callers must ensure that buf has enough space. If buf is too short the result will be incomplete.
func RegP2pGetGroupCallBack ¶
func RegP2pGetSelfEnodeCallBack ¶
func RegP2pGetSelfEnodeCallBack(f func() string)
func RegP2pParseNodeCallBack ¶
func SavePubKeyDataToDb ¶
func SavePubKeyDataToDb()
func SendMsgToDcrmGroup ¶
func SendMsgToPeer ¶
func SetUpMsgList ¶
func SetUpMsgList(msg string)
func Sign_ec2 ¶
func Sign_ec2(msgprex string, save string, message string, cointype string, pkx *big.Int, pky *big.Int, ch chan interface{}, id int) string
msgprex = hash return value is the backup for the dcrm sig
Types ¶
type DcrmHash ¶
type DcrmHash [32]byte
func Keccak256Hash ¶
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
type ECDSASignature ¶
type ECDSASignature struct {
// contains filtered or unexported fields
}
func (*ECDSASignature) GetR ¶
func (this *ECDSASignature) GetR() *big.Int
func (*ECDSASignature) GetRecoveryParam ¶
func (this *ECDSASignature) GetRecoveryParam() int32
func (*ECDSASignature) GetRoudFiveAborted ¶
func (this *ECDSASignature) GetRoudFiveAborted() bool
func (*ECDSASignature) GetS ¶
func (this *ECDSASignature) GetS() *big.Int
func (*ECDSASignature) New ¶
func (this *ECDSASignature) New()
func (*ECDSASignature) SetR ¶
func (this *ECDSASignature) SetR(r *big.Int)
func (*ECDSASignature) SetRecoveryParam ¶
func (this *ECDSASignature) SetRecoveryParam(recoveryParam int32)
func (*ECDSASignature) SetRoudFiveAborted ¶
func (this *ECDSASignature) SetRoudFiveAborted(roudFiveAborted bool)
func (*ECDSASignature) SetS ¶
func (this *ECDSASignature) SetS(s *big.Int)
type ReqAddrSendMsgToDcrm ¶
type ReqAddrSendMsgToDcrm struct {
KeyType string
}
func (*ReqAddrSendMsgToDcrm) Run ¶
func (self *ReqAddrSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type ReqDispatcher ¶
type ReqDispatcher struct { // A pool of workers channels that are registered with the dispatcher WorkerPool chan chan RpcReq }
rpc-req
func NewReqDispatcher ¶
func NewReqDispatcher(maxWorkers int) *ReqDispatcher
func (*ReqDispatcher) Run ¶
func (d *ReqDispatcher) Run()
type RpcDcrmRes ¶
func GetGroupRes ¶
func GetGroupRes(wid int) RpcDcrmRes
type RpcReqWorker ¶
type RpcReqWorker struct { RpcReqWorkerPool chan chan RpcReq RpcReqChannel chan RpcReq // contains filtered or unexported fields }
func FindWorker ¶
func FindWorker(sid string) (*RpcReqWorker, error)
func NewRpcReqWorker ¶
func NewRpcReqWorker(workerPool chan chan RpcReq) *RpcReqWorker
func (*RpcReqWorker) Clear ¶
func (w *RpcReqWorker) Clear()
func (*RpcReqWorker) Start ¶
func (w *RpcReqWorker) Start()
func (*RpcReqWorker) Stop ¶
func (w *RpcReqWorker) Stop()
type SignSendMsgToDcrm ¶
func (*SignSendMsgToDcrm) Run ¶
func (self *SignSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
Click to show internal directories.
Click to hide internal directories.