softkey

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package softkey provides an in-memory KeyStore for tests and local development. It holds private keys in process memory and performs signing and key agreement in software. Production deployments should back the didcomm.KeyStore interface with an HSM or KMS instead, so that key material never resides in the application's address space.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is an in-memory KeyStore keyed by verification-method id.

func New

func New(materials ...*didcomm.KeyMaterial) (*Store, error)

New builds a Store seeded with the given key material.

func (*Store) Add

func (s *Store) Add(km *didcomm.KeyMaterial) error

Add loads one DID's key material into the store.

func (*Store) DiffieHellman

func (s *Store) DiffieHellman(_ context.Context, kid string, peerPublicKey []byte) ([]byte, error)

DiffieHellman implements didcomm.KeyStore.

func (*Store) Sign

func (s *Store) Sign(_ context.Context, kid string, data []byte) ([]byte, error)

Sign implements didcomm.KeyStore.

Jump to

Keyboard shortcuts

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