Versions in this module Expand all Collapse all v1 v1.0.1 Dec 24, 2023 Changes in this version + const EC + const Ed25519 + const JSONWebSignature2020 + const JSONWebSignature2020Context + const JWSSignatureSuiteCanonicalizationAlgorithm + const JWSSignatureSuiteDigestAlgorithm + const JWSSignatureSuiteID + const JWSSignatureSuiteProofAlgorithm + const JWSSignatureSuiteType + const OKP + const P256 + const P384 + const RSA + const SECP256k1 + const X25519 + func GetJSONWebSignature2020Suite() cryptosuite.CryptoSuite + func PubKeyBytesToTypedKey(keyBytes []byte, kt cryptosuite.LDKeyType) (gocrypto.PublicKey, error) + type ALG string + type CRV string + type JSONWebKey2020 struct + Controller string + ID string + Type cryptosuite.LDKeyType + func GenerateEd25519JSONWebKey2020() (*JSONWebKey2020, error) + func GenerateJSONWebKey2020(kty KTY, crv CRV) (*JSONWebKey2020, error) + func GenerateP256JSONWebKey2020() (*JSONWebKey2020, error) + func GenerateP384JSONWebKey2020() (*JSONWebKey2020, error) + func GenerateRSAJSONWebKey2020() (*JSONWebKey2020, error) + func GenerateSECP256k1JSONWebKey2020() (*JSONWebKey2020, error) + func GenerateX25519JSONWebKey2020() (*JSONWebKey2020, error) + func JSONWebKey2020FromPrivateKey(key gocrypto.PrivateKey) (*JSONWebKey2020, error) + func (jwk *JSONWebKey2020) IsValid() error + type JSONWebKeySigner struct + func NewJSONWebKeySigner(id string, key jwx.PrivateKeyJWK, purpose cryptosuite.ProofPurpose) (*JSONWebKeySigner, error) + func (*JSONWebKeySigner) GetSignatureType() cryptosuite.SignatureType + func (s *JSONWebKeySigner) GetKeyID() string + func (s *JSONWebKeySigner) GetPayloadFormat() cryptosuite.PayloadFormat + func (s *JSONWebKeySigner) GetProofPurpose() cryptosuite.ProofPurpose + func (s *JSONWebKeySigner) GetSigningAlgorithm() string + func (s *JSONWebKeySigner) SetPayloadFormat(format cryptosuite.PayloadFormat) + func (s *JSONWebKeySigner) SetProofPurpose(purpose cryptosuite.ProofPurpose) + func (s *JSONWebKeySigner) Sign(tbs []byte) ([]byte, error) + type JSONWebKeyVerifier struct + func NewJSONWebKeyVerifier(id string, key jwx.PublicKeyJWK) (*JSONWebKeyVerifier, error) + func (v JSONWebKeyVerifier) GetKeyID() string + func (v JSONWebKeyVerifier) Verify(message, signature []byte) error + type JSONWebSignature2020Proof struct + Challenge string + Created string + JWS string + ProofPurpose cryptosuite.ProofPurpose + Type cryptosuite.SignatureType + VerificationMethod string + func JSONWebSignatureProofFromGenericProof(p crypto.Proof) (*JSONWebSignature2020Proof, error) + func (j *JSONWebSignature2020Proof) DecodeJWS() ([]byte, error) + func (j *JSONWebSignature2020Proof) GetDetachedJWS() string + func (j *JSONWebSignature2020Proof) SetDetachedJWS(jws string) + func (j *JSONWebSignature2020Proof) ToGenericProof() crypto.Proof + type JWSSignatureSuite struct + func (JWSSignatureSuite) CanonicalizationAlgorithm() string + func (JWSSignatureSuite) Canonicalize(marshaled []byte) (*string, error) + func (JWSSignatureSuite) ID() string + func (JWSSignatureSuite) Marshal(data any) ([]byte, error) + func (JWSSignatureSuite) MessageDigestAlgorithm() gocrypto.Hash + func (JWSSignatureSuite) RequiredContexts() []string + func (JWSSignatureSuite) SignatureAlgorithm() cryptosuite.SignatureType + func (JWSSignatureSuite) Type() cryptosuite.LDKeyType + func (j JWSSignatureSuite) CreateVerifyHash(doc map[string]any, proof crypto.Proof, opts *cryptosuite.ProofOptions) ([]byte, error) + func (j JWSSignatureSuite) Digest(tbd []byte) ([]byte, error) + func (j JWSSignatureSuite) Sign(s cryptosuite.Signer, p cryptosuite.WithEmbeddedProof) error + func (j JWSSignatureSuite) Verify(v cryptosuite.Verifier, p cryptosuite.WithEmbeddedProof) error + type KTY string