Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeCompactSignature(sig string) (*protos.Signature, error)
- func EncodeCompactSignature(sig *protos.Signature) (string, error)
- func PrivateKeySign(s Signer, index *big.Int, hash []byte) (*protos.Signature, error)
- func PrivatekeyToString(priv Signer) (string, error)
- func PublicKeyToBytes(pk Verifier) ([]byte, error)
- type Factory
- type Hierarchical
- type Signer
- type Verifier
- func DecodeCompactPublicKey(pk string) (Verifier, error)
- func GetChildPublicKey(pk Verifier, index *big.Int) (Verifier, error)
- func PublicKeyFromBytes(raw []byte) (Verifier, error)
- func PublicKeyFromPBMessage(pubProto *protos.PublicKey) (Verifier, error)
- func PublicKeyFromSignature(sig *protos.Signature) (Verifier, error)
Constants ¶
View Source
const ( SCHEME_ECDSA = "ecdsa" PUBLICKEY_FINGERPRINT_LEN = 8 )
Variables ¶
View Source
var DefaultVersion int32
Functions ¶
func DecodeCompactSignature ¶
we define a compact, simple encoding for the protbuf signature before our SDK for other language is mature... which has such a form: <crypto scheme mark>:<encoded sig>:[derived part := <index>,<finger print>,[cc]]
func PrivateKeySign ¶
Types ¶
type Hierarchical ¶
type Signer ¶
type Signer interface { Hierarchical Public() Verifier Sign([]byte) (*protos.Signature, error) // contains filtered or unexported methods }
func PrivateKeyFromPBMessage ¶
func PrivateKeyFromPBMessage(privProto *protos.PrivateKey) (Signer, error)
Click to show internal directories.
Click to hide internal directories.