p11

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: BSD-3-Clause-Clear Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnsupportedRSAOptions = Error("hsm unsupported RSA option value")
	ErrHsmDecrypt            = Error("hsm decrypt error")
)

See https://github.com/ThalesIgnite/crypto11/blob/d334790e12893aa2f8a2c454b16003dfd9f7d2de/rsa.go

Variables

This section is empty.

Functions

func DecryptOAEP

func DecryptOAEP(session *Pkcs11Session, key *Pkcs11PrivateKeyRSA, ciphertext []byte, hashFunction crypto.Hash, label []byte) ([]byte, error)

func GenerateEphemeralKasKeys added in v0.1.13

func GenerateEphemeralKasKeys(session *Pkcs11Session) (pkcs11.ObjectHandle, []byte, error)

func GenerateNanoTDFSessionKey added in v0.1.13

func GenerateNanoTDFSessionKey(session *Pkcs11Session, privateKeyHandle pkcs11.ObjectHandle, ephemeralPublicKey []byte) ([]byte, error)

func GenerateNanoTDFSymmetricKey added in v0.1.13

func GenerateNanoTDFSymmetricKey(ephemeralPublicKeyBytes []byte, session *Pkcs11Session, key *Pkcs11PrivateKeyEC) ([]byte, error)

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Pkcs11PrivateKeyEC added in v0.1.13

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

func NewPrivateKeyEC added in v0.1.13

func NewPrivateKeyEC(handle pkcs11.ObjectHandle) Pkcs11PrivateKeyEC

type Pkcs11PrivateKeyRSA

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

func NewPrivateKeyRSA

func NewPrivateKeyRSA(handle pkcs11.ObjectHandle) Pkcs11PrivateKeyRSA

type Pkcs11Session

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

func NewSession

func NewSession(ctx *pkcs11.Ctx, handle pkcs11.SessionHandle) Pkcs11Session

Jump to

Keyboard shortcuts

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