Documentation ¶
Index ¶
- Variables
- func AggregateBls12381PublicKeys(pk ...*Bls12381PublicKey) kyber.Point
- func AggregateBls12381Signatures(sigs ...[]byte) ([]byte, error)
- func EncodeMultibase(publicKey crypto.PublicKey) (string, error)
- func ValidateBls12381(vm VerificationMethod, signature []byte, msg []byte) (bool, error)
- func ValidateEcdsaSecp256k1(vm VerificationMethod, signature []byte, msg []byte) (bool, error)
- func ValidateEd25519(vm VerificationMethod, sig []byte, msg []byte) (bool, error)
- type Bls12381PrivateKey
- type Bls12381PublicKey
- type JWK
- type Secp256k1PrivateKey
- type Secp256k1PublicKey
- type VerificationMethod
- type VerificationMethodType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AggregateBls12381PublicKeys ¶
func AggregateBls12381PublicKeys(pk ...*Bls12381PublicKey) kyber.Point
func ValidateBls12381 ¶
func ValidateBls12381(vm VerificationMethod, signature []byte, msg []byte) (bool, error)
func ValidateEcdsaSecp256k1 ¶
func ValidateEcdsaSecp256k1(vm VerificationMethod, signature []byte, msg []byte) (bool, error)
func ValidateEd25519 ¶
func ValidateEd25519(vm VerificationMethod, sig []byte, msg []byte) (bool, error)
Types ¶
type Bls12381PrivateKey ¶
type Bls12381PrivateKey struct {
// contains filtered or unexported fields
}
func NewBls12381PrivateKey ¶
func NewBls12381PrivateKey() *Bls12381PrivateKey
func NewBls12391PrivateKeyFromBytes ¶
func NewBls12391PrivateKeyFromBytes(b []byte) (*Bls12381PrivateKey, error)
func (*Bls12381PrivateKey) Bytes ¶
func (b *Bls12381PrivateKey) Bytes() ([]byte, error)
func (*Bls12381PrivateKey) Equal ¶
func (b *Bls12381PrivateKey) Equal(obls crypto.PrivateKey) bool
func (*Bls12381PrivateKey) Public ¶
func (b *Bls12381PrivateKey) Public() crypto.PublicKey
func (*Bls12381PrivateKey) Sign ¶
func (b *Bls12381PrivateKey) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) (signature []byte, err error)
type Bls12381PublicKey ¶
func NewBls12381PublicKey ¶
func NewBls12381PublicKey(d []byte) (*Bls12381PublicKey, error)
func (*Bls12381PublicKey) Bytes ¶
func (b *Bls12381PublicKey) Bytes() ([]byte, error)
type Secp256k1PrivateKey ¶
type Secp256k1PrivateKey struct {
*ecdsa.PrivateKey
}
func NewEcdsaSecp256k1PrivateKey ¶
func NewEcdsaSecp256k1PrivateKey() (*Secp256k1PrivateKey, error)
func (*Secp256k1PrivateKey) Bytes ¶
func (p *Secp256k1PrivateKey) Bytes() ([]byte, error)
func (*Secp256k1PrivateKey) Public ¶
func (p *Secp256k1PrivateKey) Public() crypto.PublicKey
func (*Secp256k1PrivateKey) Sign ¶
func (p *Secp256k1PrivateKey) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) ([]byte, error)
type Secp256k1PublicKey ¶
func NewSecp256k1PublicKey ¶
func NewSecp256k1PublicKey(d []byte) (*Secp256k1PublicKey, error)
func (*Secp256k1PublicKey) Bytes ¶
func (p *Secp256k1PublicKey) Bytes() ([]byte, error)
type VerificationMethod ¶
type VerificationMethod struct { ID string `json:"id"` Type VerificationMethodType `json:"type"` Controller string `json:"controller"` PublicKeyJwk *JWK `json:"publicKeyJwk,omitempty"` PublicKeyMultibase string `json:"publicKeyMultibase,omitempty"` }
type VerificationMethodType ¶
type VerificationMethodType string
const ( Bls12381G1Key2020 VerificationMethodType = "Bls12381G1Key2020" Bls12381G2Key2020 VerificationMethodType = "Bls12381G2Key2020" EcdsaSecp256k1RecoveryMethod2020 VerificationMethodType = "EcdsaSecp256k1RecoveryMethod2020" EcdsaSecp256k1VerificationKey2019 VerificationMethodType = "EcdsaSecp256k1VerificationKey2019" Ed25519VerificationKey2018 VerificationMethodType = "Ed25519VerificationKey2018" JsonWebKey2020 VerificationMethodType = "JsonWebKey2020" PgpVerificationkey2021 VerificationMethodType = "PgpVerificationkey2021" RsaVerificationKey2018 VerificationMethodType = "RsaVerificationKey2018" Verificationcondition2021 VerificationMethodType = "Verificationcondition2021" X25519KeyAgreementKey2019 VerificationMethodType = "X25519KeyAgreementKey2019" )
Click to show internal directories.
Click to hide internal directories.