kidresolver

package
v0.0.0-...-64dd8ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DIDKeyResolver

type DIDKeyResolver struct{}

DIDKeyResolver resolves a 'kid'/'skid' containing a did:key value.

func (*DIDKeyResolver) Resolve

func (k *DIDKeyResolver) Resolve(kid string) (*cryptoapi.PublicKey, error)

Resolve a 'kid'/'skid' protected header with a did:key value into a marshalled public key or error if key resolution fails.

type KIDResolver

type KIDResolver interface {
	// Resolve a 'kid'/'skid' into a marshalled public key or error if key resolution fails.
	Resolve(string) (*cryptoapi.PublicKey, error)
}

KIDResolver helps resolve the kid public key from a recipient 'kid' or a sender 'skid' during JWE decryption. The JWEDecrypter should be able to load the public key using a resolution scheme for a key reference found in the 'skid' JWE protected header/'kid' recipient header.

type StoreResolver

type StoreResolver struct {
	// store where the kid key is potentially stored.
	Store storage.Store
}

StoreResolver resolves a 'kid'/'skid' containing a kms ID value (JWK fingerprint) from a dedicated pre-loaded store. Note: this is not a kms keystore. This StoreResolver is useful in cases where a thirdparty store is needed. This is useful in unit tests and especially for test vectors using the ECDH-1PU Appendix B example to load the sender key so that recipients can resolve a predefined 'skid'. Aries Framework Go is using the DIDKeyResolver by default (for request without DID docs) and DIDDocResolver (for requests with existing DID connections).

func (*StoreResolver) Resolve

func (s *StoreResolver) Resolve(kid string) (*cryptoapi.PublicKey, error)

Resolve a 'kid'/'skid' by loading kid's PublicKey from a store or return an error if it fails.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL