Documentation ¶
Index ¶
- Constants
- func BytesToStr(h []byte) string
- func CheckSig(hash []byte, pk interface{}, sig []byte) error
- func ECDSASignatureFromBytes(raw []byte) (*big.Int, *big.Int, error)
- func ECDSASignatureToBytes(r, s *big.Int) ([]byte, error)
- func GenerateECDSAKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func GenerateKeyPair() (interface{}, interface{}, error)
- func Hash(data []byte) []byte
- func MerkleHashDigests(digests [][]byte) []byte
- func ParallelDataArrayHash(data [][]byte) []byte
- func ParseCertPEM(certFile string) ([]byte, error)
- func PrivateKeyFromBytes(raw []byte) (interface{}, error)
- func PrivateKeyFromFile(file string) (interface{}, error)
- func PrivateKeyFromPEMBlock(block *pem.Block) (interface{}, error)
- func PrivateKeyToBytes(pk interface{}) (pkBytes []byte, err error)
- func PublicKeyFromBytes(raw []byte) (interface{}, error)
- func PublicKeyFromFile(file string) (interface{}, error)
- func PublicKeyToBytes(pk interface{}) (pkBytes []byte, err error)
- func Sign(hash []byte, sk interface{}) ([]byte, error)
- func SignECDSASignature(sk *ecdsa.PrivateKey, hash []byte) ([]byte, error)
- func SrtToBytes(s string) ([]byte, error)
- func TBLSKeyGeneration(t, n int) (*TBLSPubKey, []*TBLSPrivKeyShare)
- func TBLSPrivKeyShareΤοBytes(priv *TBLSPrivKeyShare) ([]byte, error)
- func TBLSPubKeyShareΤοBytes(pub *TBLSPubKeyShare) ([]byte, error)
- func TBLSPubKeyToBytes(pub *TBLSPubKey) ([]byte, error)
- func TBLSRecoverSignature(pubKey *TBLSPubKey, msg []byte, sigShares [][]byte, t, n int) ([]byte, error)
- func TBLSSigShare(privShare *TBLSPrivKeyShare, msg []byte) ([]byte, error)
- func TBLSSigShareVerification(pubKey *TBLSPubKey, msg []byte, sigShare []byte) error
- func TBLSVerifySharesAndRecoverSignature(pubKey *TBLSPubKey, msg []byte, sigShares [][]byte, t, n int) ([]byte, error)
- func TBLSVerifySingature(pubKey *TBLSPubKey, msg []byte, signature []byte) error
- func VerifyECDSASignature(pk *ecdsa.PublicKey, hash []byte, signature []byte) error
- type ECDSASignature
- type TBLSPrivKey
- type TBLSPrivKeyShare
- type TBLSPubKey
- type TBLSPubKeyShare
Constants ¶
View Source
const Hspace string = "115792089237316195423570985008687907853269984665640564039457584007913129639936" //2^256
Variables ¶
This section is empty.
Functions ¶
func BytesToStr ¶
func GenerateECDSAKeyPair ¶
func GenerateECDSAKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
func GenerateKeyPair ¶
func GenerateKeyPair() (interface{}, interface{}, error)
func MerkleHashDigests ¶
func ParallelDataArrayHash ¶
func ParseCertPEM ¶
func PrivateKeyFromBytes ¶
func PrivateKeyFromFile ¶
func PrivateKeyFromPEMBlock ¶
func PrivateKeyToBytes ¶
func PublicKeyFromBytes ¶
func PublicKeyFromFile ¶
func PublicKeyToBytes ¶
func SignECDSASignature ¶
func SignECDSASignature(sk *ecdsa.PrivateKey, hash []byte) ([]byte, error)
func SrtToBytes ¶
func TBLSKeyGeneration ¶
func TBLSKeyGeneration(t, n int) (*TBLSPubKey, []*TBLSPrivKeyShare)
func TBLSPrivKeyShareΤοBytes ¶
func TBLSPrivKeyShareΤοBytes(priv *TBLSPrivKeyShare) ([]byte, error)
func TBLSPubKeyShareΤοBytes ¶
func TBLSPubKeyShareΤοBytes(pub *TBLSPubKeyShare) ([]byte, error)
func TBLSPubKeyToBytes ¶
func TBLSPubKeyToBytes(pub *TBLSPubKey) ([]byte, error)
func TBLSRecoverSignature ¶
func TBLSSigShare ¶
func TBLSSigShare(privShare *TBLSPrivKeyShare, msg []byte) ([]byte, error)
func TBLSSigShareVerification ¶
func TBLSSigShareVerification(pubKey *TBLSPubKey, msg []byte, sigShare []byte) error
func TBLSVerifySingature ¶
func TBLSVerifySingature(pubKey *TBLSPubKey, msg []byte, signature []byte) error
Types ¶
type ECDSASignature ¶
type TBLSPrivKey ¶
type TBLSPrivKey struct {
// contains filtered or unexported fields
}
type TBLSPrivKeyShare ¶
type TBLSPrivKeyShare struct {
// contains filtered or unexported fields
}
func TBLSPrivKeyShareFromBytes ¶
func TBLSPrivKeyShareFromBytes(priv []byte) (*TBLSPrivKeyShare, error)
type TBLSPubKey ¶
type TBLSPubKey struct {
// contains filtered or unexported fields
}
func TBLSPubKeyFromBytes ¶
func TBLSPubKeyFromBytes(pub []byte) (*TBLSPubKey, error)
type TBLSPubKeyShare ¶
type TBLSPubKeyShare struct {
// contains filtered or unexported fields
}
func TBLSPubKeyShareFromBytes ¶
func TBLSPubKeyShareFromBytes(pub []byte) (*TBLSPubKeyShare, error)
Click to show internal directories.
Click to hide internal directories.