Documentation ¶
Index ¶
- Variables
- func AcceptLockOut(initiator string, account string, groupid string, nonce string, ...) (string, error)
- func AcceptReShare(initiator string, account string, groupid string, tsgroupid string, ...) (string, error)
- func AcceptReqAddr(initiator string, account string, cointype string, groupid string, ...) (string, error)
- func AcceptSign(initiator string, account string, pubkey string, msghash []string, ...) (string, error)
- func CalcDelta(alpha1 []*big.Int, betaU1 []*big.Int, ch chan interface{}, ThresHold int) *big.Int
- func CalcSigma(uu1 []*big.Int, vU1 []*big.Int, ch chan interface{}, ThresHold int) *big.Int
- func Calc_r(cointype string, w *RPCReqWorker, idSign sortableIDSSlice, ...) (*big.Int, *big.Int)
- func Calc_s(msgprex string, cointype string, w *RPCReqWorker, idSign sortableIDSSlice, ...) *big.Int
- func Call(msg interface{}, enode string)
- func Call2(msg interface{})
- func CheckAcc(eid string, geter_acc string, sigs string) bool
- func CheckAccept(pubkey string, mode string, account string) bool
- func CheckGroupEnode(gid string) bool
- func CheckRaw(raw string) (string, string, string, interface{}, error)
- func CheckReply(l *list.List, rt RpcType, key string) bool
- func CommitRpcReq()
- func Compress(c []byte) (string, error)
- func DECDSAGenKeyCalcPrivKey(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) (*big.Int, bool)
- func DECDSAGenKeyCalcPubKey(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) (map[string][]*big.Int, bool)
- func DECDSAGenKeyRoundFive(msgprex string, ch chan interface{}, w *RPCReqWorker, u1 *big.Int) bool
- func DECDSAGenKeyRoundFour(msgprex string, ch chan interface{}, w *RPCReqWorker) (*ec2.NtildeH1H2, bool)
- func DECDSAGenKeyRoundOne(msgprex string, ch chan interface{}, w *RPCReqWorker) (*big.Int, *ec2.PolyStruct2, *ec2.PolyGStruct2, *ec2.Commitment, *ec2.PublicKey, ...)
- func DECDSAGenKeyRoundThree(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) bool
- func DECDSAGenKeyRoundTwo(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) ([]*ec2.ShareStruct2, bool)
- func DECDSAGenKeySaveData(cointype string, ids sortableIDSSlice, w *RPCReqWorker, ch chan interface{}, ...) bool
- func DECDSAGenKeyVerifyCommitment(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) ([]string, map[string]*ec2.Commitment, bool)
- func DECDSAGenKeyVerifyShareData(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) (map[string]*ec2.ShareStruct2, []string, bool)
- func DECDSAGenKeyVerifyZKU(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ...) bool
- func DECDSASignPaillierEncrypt(cointype string, save string, w *RPCReqWorker, idSign sortableIDSSlice, ...) (map[string]*big.Int, map[string]*big.Int, map[string]*ec2.PublicKey)
- func DECDSASignRoundEight(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, l1 *big.Int, ...) (*ec2.ZkABProof, []string)
- func DECDSASignRoundEleven(msgprex string, cointype string, w *RPCReqWorker, idSign sortableIDSSlice, ...) map[string]*big.Int
- func DECDSASignRoundFive(msgprex string, cointype string, delta1 *big.Int, idSign sortableIDSSlice, ...) *big.Int
- func DECDSASignRoundFour(msgprex string, cointype string, save string, w *RPCReqWorker, ...) (map[string]*big.Int, map[string]*ec2.MtAZK2Proof_nhh, map[string]*big.Int, ...)
- func DECDSASignRoundNine(msgprex string, cointype string, w *RPCReqWorker, idSign sortableIDSSlice, ...) ([]string, *ec2.Commitment)
- func DECDSASignRoundOne(msgprex string, w *RPCReqWorker, idSign sortableIDSSlice, ch chan interface{}) (*big.Int, *big.Int, *ec2.Commitment)
- func DECDSASignRoundSeven(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, ...) (*ec2.Commitment, []string, *big.Int, *big.Int)
- func DECDSASignRoundSix(msgprex string, u1Gamma *big.Int, commitU1GammaG *ec2.Commitment, ...) *ec2.ZkUProof
- func DECDSASignRoundTen(msgprex string, commitBigUT1 *ec2.Commitment, w *RPCReqWorker, ...) []string
- func DECDSASignRoundThree(msgprex string, cointype string, save string, w *RPCReqWorker, ...) bool
- func DECDSASignRoundTwo(msgprex string, cointype string, save string, w *RPCReqWorker, ...) (map[string]*ec2.MtAZK1Proof_nhh, map[string]*ec2.NtildeH1H2)
- func DECDSASignVerifyBigUTCommitment(msgprex string, cointype string, commitbiguts []string, ...) bool
- func DECDSASignVerifyBigVAB(cointype string, w *RPCReqWorker, commitbigvabs []string, zkabproofs []string, ...) (map[string]*ec2.Commitment, *big.Int, *big.Int)
- func DECDSASignVerifyCommitment(cointype string, w *RPCReqWorker, idSign sortableIDSSlice, ...) map[string][]*big.Int
- func DECDSASignVerifyZKGammaW(msgprex string, cointype string, save string, w *RPCReqWorker, ...) bool
- func DECDSASignVerifyZKNtilde(msgprex string, cointype string, save string, w *RPCReqWorker, ...) bool
- func DECDSA_Sign_Verify_RSV(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool
- func Decode2(s string, datatype 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 DisAcceptMsg(raw string, workid int)
- func DisMsg(msg string)
- func DoubleHash(id string, cointype string) *big.Int
- func DoubleHash2(id string, keytype string) *big.Int
- func EdVerify(input InputVerify) bool
- func Encode2(obj interface{}) (string, error)
- func EncryptMsg(msg string, enodeID string) (string, error)
- func ExsitPubKey(account string, cointype string) (string, bool)
- func Find(l *list.List, msg string) bool
- func GenRandomSafePrime(length int)
- func GetAcceptLockOutDir() string
- func GetAcceptReqAddrDir() string
- func GetAccounts(geter_acc, mode string) (interface{}, string, error)
- func GetAccountsBalance(pubkey string, geter_acc string) (interface{}, string, error)
- func GetAddr(pubkey string, cointype string) (string, string, error)
- func GetAllAccountsDir() string
- func GetAllPubKeyDataFromDb() *common.SafeMap
- func GetBalance(account string, cointype string, dcrmaddr string) (string, string, error)
- func GetChannelValue(t int, obj interface{}) (string, string, error)
- func GetDbDir() string
- func GetDcrmAddr(pubkey string) (string, string, error)
- func GetEnodesByUid(uid *big.Int, cointype string, groupid string) string
- func GetGAccsDir() string
- func GetGroupDir() string
- func GetGroupIdByEnode(enode string) string
- func GetGroupSigsDataByRaw(raw string) (string, error)
- func GetIds(cointype string, groupid string) sortableIDSSlice
- func GetIds2(keytype string, groupid string) sortableIDSSlice
- func GetLockOutNonce(account string) (string, string, error)
- func GetLockOutStatus(key string) (string, string, error)
- func GetPaillierPk2(cointype string, w *RPCReqWorker, uid *big.Int) *ec2.PublicKey
- func GetPubKeyData(key string, account string, cointype string) (string, string, error)
- func GetPubKeyDataFromLocalDb(key string) (bool, interface{})
- func GetPubKeyDataValueFromDb(key string) []byte
- func GetRawReply(l *list.List) map[string]*RawReply
- func GetReShareNonce(account string) (string, string, error)
- func GetReShareStatus(key string) (string, string, error)
- func GetRealByUid(cointype string, w *RPCReqWorker, uid *big.Int) int
- func GetRealByUid2(keytype string, w *RPCReqWorker, uid *big.Int) int
- func GetReqAddrKeyByOtherKey(key string, rt RpcType) string
- func GetReqAddrNonce(account string) (string, string, error)
- func GetReqAddrStatus(key string) (string, string, error)
- func GetRetErr(err string) error
- func GetRetErrJsonStr(code int, err string) string
- func GetSelfPrivKey(cointype string, idSign sortableIDSSlice, w *RPCReqWorker, save string, ...) *ec2.PrivateKey
- func GetSignNonce(account string) (string, string, error)
- func GetSignStatus(key string) (string, string, error)
- func GetSignString(r *big.Int, s *big.Int, v int32, i int) string
- func GetSkU1Dir() string
- func GetSkU1FromLocalDb(key string) []byte
- func GetValueFromPubKeyData(key string) (bool, interface{})
- func GetWorkerId(w *RPCReqWorker) (int, error)
- func HandleC1Data(ac *AcceptReqAddrData, key string, workid int)
- func HandleNoReciv(key string, reqer string, ower string, datatype string, wid int)
- func Init(groupId string)
- func InitAcceptData(raw string, workid int, sender string, ch chan interface{}) error
- func InitChan()
- func InitDev(keyfile string)
- func InitGroupInfo(groupId string)
- func IsCurNode(enodes string, cur string) bool
- func IsInGroup(enode string, groupId string) bool
- func IsValidReShareAccept(from string, gid string) bool
- func KeyGenerate_DECDSA(msgprex string, ch chan interface{}, id int, cointype string) bool
- func KeyGenerate_ed(msgprex string, ch chan interface{}, id int, cointype string) bool
- func LockOut(raw string) (string, string, error)
- func MapPrivKeyShare(cointype string, w *RPCReqWorker, idSign sortableIDSSlice, privshare string) (*big.Int, *big.Int)
- func PutGroup(groupId string) bool
- func ReShare(raw string) (string, string, error)
- func ReShare_ec2(msgprex string, initator string, groupid string, pubkey string, account string, ...)
- func RegDcrmGetEosAccountCallBack(f func() (string, string, string))
- 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 ReqDataFromGroup(msgprex string, wid int, datatype string, trytimes int, timeout int) bool
- func ReqDcrmAddr(raw string) (string, string, error)
- func RpcAcceptLockOut(raw string) (string, string, error)
- func RpcAcceptReShare(raw string) (string, string, error)
- func RpcAcceptReqAddr(raw string) (string, string, error)
- func RpcAcceptSign(raw string) (string, string, error)
- func SaveAcceptLockOutData(ac *AcceptLockOutData) error
- func SaveAcceptReShareData(ac *AcceptReShareData) error
- func SaveAcceptReqAddrData(ac *AcceptReqAddrData) error
- func SaveAcceptSignData(ac *AcceptSignData) error
- func SavePubKeyDataToDb()
- func SaveSkU1ToDb()
- func SendMsgToDcrmGroup(msg string, groupid string)
- func SendMsgToPeer(enodes string, msg string)
- func SetLockOutNonce(account string, nonce string) (string, error)
- func SetReShareNonce(account string, nonce string) (string, error)
- func SetReqAddrNonce(account string, nonce string) (string, error)
- func SetSignNonce(account string, nonce string) (string, error)
- func SetUpMsgList(msg string, enode string)
- func SetUpMsgList2(msg string)
- func SetUpMsgList3(msg string, enode string, rch chan interface{})
- func Sign(raw string) (string, string, error)
- func Sign_ec2(msgprex string, save string, sku1 *big.Int, message string, cointype string, ...) string
- func Sign_ed(msgprex string, save string, sku1 *big.Int, message string, cointype string, ...) string
- func SortCurNodeInfo(value []interface{}) []interface{}
- func Start(waitmsg uint64)
- func Tool_DecimalByteSlice2HexString(DecimalSlice []byte) string
- func UnCompress(s string) (string, error)
- type AcceptLockOutData
- type AcceptReShareData
- type AcceptReqAddrData
- type AcceptSignData
- type AccountsList
- type DcrmAccountsBalanceRes
- type DcrmAddrRes
- type DcrmHash
- type DcrmPubkeyRes
- type DecdsaLog
- 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 EnAcc
- type EnAccs
- type Err
- type ErrorRet
- type InputVerify
- type KeyData
- type LockOutCurNodeInfo
- type LockOutReply
- type LockOutReplys
- type LockOutStatus
- type NoRecivData
- type NodeReply
- type PubAccounts
- type PubKeyData
- type PubKeyInfo
- type RPCReq
- type RPCReqWorker
- type RawReply
- type ReShareCurNodeInfo
- type ReShareStatus
- type RecivAcceptResTime
- type RecivDcrmTime
- type RecvMsg
- type ReqAddrReply
- type ReqAddrStatus
- type ReqDispatcher
- type RpcDcrmRes
- type RpcType
- type SendAcceptResTime
- type SendDcrmTime
- type SendMsg
- type SignCurNodeInfo
- type SignData
- type SignStatus
- type SubAddressBalance
- type TxDataAcceptLockOut
- type TxDataAcceptReShare
- type TxDataAcceptReqAddr
- type TxDataAcceptSign
- type TxDataLockOut
- type TxDataReShare
- type TxDataReqAddr
- type TxDataSign
- 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."}` ErrCoinTypeNotSupported = `{Code:18,Error:"coin type is not supported."}` 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."}` ErrGetRealEosUserFail = `{Code:27,Error:"cannot get real eos account."}` ErrSendTxToNetFail = `{Code:14,Error:"send tx to outside net fail."}` 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 ( LdbPubKeyData = common.NewSafeMap(10) //make(map[string][]byte) PubKeyDataChan = make(chan KeyData, 10000) SkU1Chan = make(chan KeyData, 10000) )
View Source
var ( C1Data = common.NewSafeMap(10) //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 GetEosAccount func() (string, string, string) )
View Source
var ( RPCReqQueueCache = make(chan RPCReq, RPCMaxQueue) //rpc-req //dcrm node RPCMaxWorker = 10000 RPCMaxQueue = 10000 RPCReqQueue chan RPCReq )
View Source
var (
KeyFile string
)
View Source
var (
PaillierKeyLength = 2048
)
Functions ¶
func AcceptLockOut ¶
func AcceptReShare ¶
func AcceptReqAddr ¶
func AcceptSign ¶
func CheckGroupEnode ¶
func CommitRpcReq ¶
func CommitRpcReq()
func DECDSAGenKeyCalcPrivKey ¶
func DECDSAGenKeyCalcPrivKey(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, sstruct map[string]*ec2.ShareStruct2, ids sortableIDSSlice) (*big.Int, bool)
func DECDSAGenKeyCalcPubKey ¶
func DECDSAGenKeyCalcPubKey(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, udecom map[string]*ec2.Commitment, ids sortableIDSSlice) (map[string][]*big.Int, bool)
func DECDSAGenKeyRoundFive ¶
func DECDSAGenKeyRoundFive(msgprex string, ch chan interface{}, w *RPCReqWorker, u1 *big.Int) bool
func DECDSAGenKeyRoundFour ¶
func DECDSAGenKeyRoundFour(msgprex string, ch chan interface{}, w *RPCReqWorker) (*ec2.NtildeH1H2, bool)
func DECDSAGenKeyRoundOne ¶
func DECDSAGenKeyRoundOne(msgprex string, ch chan interface{}, w *RPCReqWorker) (*big.Int, *ec2.PolyStruct2, *ec2.PolyGStruct2, *ec2.Commitment, *ec2.PublicKey, *ec2.PrivateKey, bool)
func DECDSAGenKeyRoundThree ¶
func DECDSAGenKeyRoundThree(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, u1PolyG *ec2.PolyGStruct2, commitU1G *ec2.Commitment, ids sortableIDSSlice) bool
func DECDSAGenKeyRoundTwo ¶
func DECDSAGenKeyRoundTwo(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, u1Poly *ec2.PolyStruct2, ids sortableIDSSlice) ([]*ec2.ShareStruct2, bool)
func DECDSAGenKeySaveData ¶
func DECDSAGenKeySaveData(cointype string, ids sortableIDSSlice, w *RPCReqWorker, ch chan interface{}, skU1 *big.Int, u1PaillierPk *ec2.PublicKey, u1PaillierSk *ec2.PrivateKey, cs []string, u1NtildeH1H2 *ec2.NtildeH1H2) bool
func DECDSAGenKeyVerifyCommitment ¶
func DECDSAGenKeyVerifyCommitment(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, ds []string, commitU1G *ec2.Commitment, ids sortableIDSSlice) ([]string, map[string]*ec2.Commitment, bool)
func DECDSAGenKeyVerifyShareData ¶
func DECDSAGenKeyVerifyShareData(msgprex string, cointype string, ch chan interface{}, w *RPCReqWorker, u1PolyG *ec2.PolyGStruct2, u1Shares []*ec2.ShareStruct2, ids sortableIDSSlice) (map[string]*ec2.ShareStruct2, []string, bool)
func DECDSAGenKeyVerifyZKU ¶
func DECDSASignRoundEight ¶
func DECDSASignRoundEleven ¶
func DECDSASignRoundFive ¶
func DECDSASignRoundFour ¶
func DECDSASignRoundFour(msgprex string, cointype string, save string, w *RPCReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*ec2.PublicKey, zkfactproof map[string]*ec2.NtildeH1H2, u1Gamma *big.Int, w1 *big.Int, betaU1Star []*big.Int, vU1Star []*big.Int, ch chan interface{}) (map[string]*big.Int, map[string]*ec2.MtAZK2Proof_nhh, map[string]*big.Int, map[string]*ec2.MtAZK3Proof_nhh, bool)
func DECDSASignRoundNine ¶
func DECDSASignRoundNine(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]*ec2.Commitment, l1 *big.Int, ch chan interface{}) ([]string, *ec2.Commitment)
func DECDSASignRoundOne ¶
func DECDSASignRoundOne(msgprex string, w *RPCReqWorker, idSign sortableIDSSlice, ch chan interface{}) (*big.Int, *big.Int, *ec2.Commitment)
func DECDSASignRoundSeven ¶
func DECDSASignRoundSix ¶
func DECDSASignRoundSix(msgprex string, u1Gamma *big.Int, commitU1GammaG *ec2.Commitment, w *RPCReqWorker, ch chan interface{}) *ec2.ZkUProof
func DECDSASignRoundTen ¶
func DECDSASignRoundTen(msgprex string, commitBigUT1 *ec2.Commitment, w *RPCReqWorker, ch chan interface{}) []string
func DECDSASignRoundThree ¶
func DECDSASignRoundTwo ¶
func DECDSASignVerifyBigUTCommitment ¶
func DECDSASignVerifyBigUTCommitment(msgprex string, cointype string, commitbiguts []string, commitbigutd11s []string, commitBigUT1 *ec2.Commitment, w *RPCReqWorker, idSign sortableIDSSlice, ch chan interface{}, commitbigcom map[string]*ec2.Commitment) bool
func DECDSASignVerifyBigVAB ¶
func DECDSASignVerifyCommitment ¶
func DECDSASignVerifyCommitment(cointype string, w *RPCReqWorker, idSign sortableIDSSlice, commitU1GammaG *ec2.Commitment, u1GammaZKProof *ec2.ZkUProof, ch chan interface{}) map[string][]*big.Int
func DECDSASignVerifyZKGammaW ¶
func DECDSASignVerifyZKGammaW(msgprex string, cointype string, save string, w *RPCReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*ec2.PublicKey, zkfactproof map[string]*ec2.NtildeH1H2, mkg map[string]*big.Int, mkg_mtazk2 map[string]*ec2.MtAZK2Proof_nhh, mkw map[string]*big.Int, mkw_mtazk2 map[string]*ec2.MtAZK3Proof_nhh, ch chan interface{}) bool
func DECDSA_Sign_Verify_RSV ¶
func DecryptCkGamma ¶
func DecryptCkGamma(cointype string, idSign sortableIDSSlice, w *RPCReqWorker, u1PaillierSk *ec2.PrivateKey, mkg map[string]*big.Int, ch chan interface{}) []*big.Int
func DecryptCkW ¶
func DecryptCkW(cointype string, idSign sortableIDSSlice, w *RPCReqWorker, u1PaillierSk *ec2.PrivateKey, mkw map[string]*big.Int, ch chan interface{}) []*big.Int
func DecryptMsg ¶
func DisAcceptMsg ¶
func DisMsg ¶
func DisMsg(msg string)
msg: key-enode:C1:X1:X2...:Xn msg: key-enode1:NoReciv:enode2:C1
func EdVerify ¶
func EdVerify(input InputVerify) bool
func GenRandomSafePrime ¶
func GenRandomSafePrime(length int)
func GetAcceptLockOutDir ¶
func GetAcceptLockOutDir() string
func GetAcceptReqAddrDir ¶
func GetAcceptReqAddrDir() string
func GetAccounts ¶
func GetAccountsBalance ¶
func GetAllAccountsDir ¶
func GetAllAccountsDir() string
func GetAllPubKeyDataFromDb ¶
func GetBalance ¶
func GetGAccsDir ¶
func GetGAccsDir() string
func GetGroupDir ¶
func GetGroupDir() string
func GetGroupIdByEnode ¶
func GetGroupSigsDataByRaw ¶
func GetPaillierPk2 ¶
func GetPubKeyData ¶
func GetRealByUid ¶
func GetRealByUid(cointype string, w *RPCReqWorker, uid *big.Int) int
func GetRealByUid2 ¶
func GetRealByUid2(keytype string, w *RPCReqWorker, uid *big.Int) int
func GetReqAddrKeyByOtherKey ¶
func GetRetErrJsonStr ¶
func GetSelfPrivKey ¶
func GetSelfPrivKey(cointype string, idSign sortableIDSSlice, w *RPCReqWorker, save string, ch chan interface{}) *ec2.PrivateKey
func GetSkU1Dir ¶
func GetSkU1Dir() string
func GetSkU1FromLocalDb ¶
func GetValueFromPubKeyData ¶
func GetWorkerId ¶
func GetWorkerId(w *RPCReqWorker) (int, error)
func HandleC1Data ¶
func HandleC1Data(ac *AcceptReqAddrData, key string, workid int)
func HandleNoReciv ¶
func InitAcceptData ¶
func InitChan ¶
func InitChan()
workers,RpcMaxWorker,RpcReqWorker,RpcReqQueue,RpcMaxQueue,ReqDispatcher
func InitGroupInfo ¶
func InitGroupInfo(groupId string)
func IsValidReShareAccept ¶
func KeyGenerate_DECDSA ¶
ec2 msgprex = hash
func KeyGenerate_ed ¶
ed msgprex = hash
func MapPrivKeyShare ¶
func ReShare_ec2 ¶
func ReShare_ec2(msgprex string, initator string, groupid string, pubkey string, account string, mode string, sigs string, ch chan interface{}, id int)
msgprex = hash return value is the backup for the dcrm sig
func RegP2pGetGroupCallBack ¶
p2p callback
func RegP2pGetSelfEnodeCallBack ¶
func RegP2pGetSelfEnodeCallBack(f func() string)
func RegP2pParseNodeCallBack ¶
func ReqDataFromGroup ¶
func SaveAcceptLockOutData ¶
func SaveAcceptLockOutData(ac *AcceptLockOutData) error
func SaveAcceptReShareData ¶
func SaveAcceptReShareData(ac *AcceptReShareData) error
func SaveAcceptReqAddrData ¶
func SaveAcceptReqAddrData(ac *AcceptReqAddrData) error
func SaveAcceptSignData ¶
func SaveAcceptSignData(ac *AcceptSignData) error
func SavePubKeyDataToDb ¶
func SavePubKeyDataToDb()
func SaveSkU1ToDb ¶
func SaveSkU1ToDb()
func SendMsgToDcrmGroup ¶
func SetUpMsgList ¶
func SetUpMsgList2 ¶
func SetUpMsgList2(msg string)
func SetUpMsgList3 ¶
func Sign_ec2 ¶
func Sign_ec2(msgprex string, save string, sku1 *big.Int, 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
func Sign_ed ¶
func Sign_ed(msgprex string, save string, sku1 *big.Int, message string, cointype string, pk string, ch chan interface{}, id int) string
msgprex = hash return value is the backup for the dcrm sig
func SortCurNodeInfo ¶
func SortCurNodeInfo(value []interface{}) []interface{}
Types ¶
type AcceptLockOutData ¶
type AcceptLockOutData struct { Initiator string //enode Account string GroupId string Nonce string PubKey string DcrmTo string Value string Cointype string LimitNum string Mode string TimeStamp string Deal string Accept string Status string OutTxHash string Tip string Error string AllReply []NodeReply WorkId int }
type AcceptReShareData ¶
type AcceptReShareData struct {}
type AcceptReqAddrData ¶
type AcceptReqAddrData struct { Initiator string //enode Account string Cointype string GroupId string Nonce string LimitNum string Mode string TimeStamp string Deal string Accept string Status string PubKey string Tip string Error string AllReply []NodeReply WorkId int Sigs string //5:eid1:acc1:eid2:acc2:eid3:acc3:eid4:acc4:eid5:acc5 }
type AcceptSignData ¶
type AcceptSignData struct { Initiator string //enode Account string GroupId string Nonce string PubKey string MsgHash []string MsgContext []string Keytype string LimitNum string Mode string TimeStamp string Deal string Accept string Status string Rsv string //rsv1:rsv2:....:rsvn:NULL Tip string Error string AllReply []NodeReply WorkId int }
type AccountsList ¶
type AccountsList struct { GroupID string Accounts []PubKeyInfo }
type DcrmAccountsBalanceRes ¶
type DcrmAccountsBalanceRes struct { PubKey string Balances []SubAddressBalance }
type DcrmAddrRes ¶
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 DcrmPubkeyRes ¶
type DecdsaLog ¶
type DecdsaLog struct { CurEnode string //enodeid:ip:port GroupEnodes []string DcrmCallTime string RecivAcceptRes []RecivAcceptResTime SendAcceptRes []SendAcceptResTime RecivDcrm []RecivDcrmTime SendDcrm []SendDcrmTime FailTime string FailInfo string No_Reciv []NoRecivData }
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 InputVerify ¶
type LockOutCurNodeInfo ¶
type LockOutCurNodeInfo struct { Key string Account string GroupId string Nonce string DcrmFrom string DcrmTo string Value string Cointype string ThresHold string Mode string TimeStamp string }
func GetCurNodeLockOutInfo ¶
func GetCurNodeLockOutInfo(geter_acc string) ([]*LockOutCurNodeInfo, string, error)
type LockOutReply ¶
type LockOutReplys ¶
type LockOutReplys struct {
Replys []LockOutReply
}
type LockOutStatus ¶
type NoRecivData ¶
type PubAccounts ¶
type PubAccounts struct {
Group []AccountsList
}
type PubKeyData ¶
type PubKeyInfo ¶
type RPCReqWorker ¶
type RPCReqWorker struct { RPCReqWorkerPool chan chan RPCReq RPCReqChannel chan RPCReq DcrmFrom string NodeCnt int ThresHold int // 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) Clear2 ¶
func (w *RPCReqWorker) Clear2()
func (*RPCReqWorker) Start ¶
func (w *RPCReqWorker) Start()
func (*RPCReqWorker) Stop ¶
func (w *RPCReqWorker) Stop()
type ReShareCurNodeInfo ¶
type ReShareCurNodeInfo struct {}
func GetCurNodeReShareInfo ¶
func GetCurNodeReShareInfo() ([]*ReShareCurNodeInfo, string, error)
type ReShareStatus ¶
type ReShareStatus struct {}
type RecivAcceptResTime ¶
type RecivDcrmTime ¶
type ReqAddrReply ¶
type ReqAddrReply struct { Key string Account string Cointype string GroupId string Nonce string ThresHold string Mode string TimeStamp string }
func GetCurNodeReqAddrInfo ¶
func GetCurNodeReqAddrInfo(geter_acc string) ([]*ReqAddrReply, string, error)
type ReqAddrStatus ¶
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 ¶
type SendAcceptResTime ¶
type SendDcrmTime ¶
type SignCurNodeInfo ¶
type SignCurNodeInfo struct { Key string Account string PubKey string MsgHash []string MsgContext []string KeyType string GroupId string Nonce string ThresHold string Mode string TimeStamp string }
func GetCurNodeSignInfo ¶
func GetCurNodeSignInfo(geter_acc string) ([]*SignCurNodeInfo, string, error)
type SignStatus ¶
type SubAddressBalance ¶
type TxDataAcceptLockOut ¶
type TxDataAcceptReShare ¶
type TxDataAcceptReShare struct {}
type TxDataAcceptReqAddr ¶
type TxDataAcceptSign ¶
type TxDataLockOut ¶
type TxDataReShare ¶
type TxDataReShare struct {}
type TxDataReqAddr ¶
type TxDataSign ¶
Click to show internal directories.
Click to hide internal directories.