Documentation ¶
Index ¶
- Constants
- func DecryptOAEP(session *Pkcs11Session, key *Pkcs11PrivateKeyRSA, ciphertext []byte, ...) ([]byte, error)
- func GenerateEphemeralKasKeys(session *Pkcs11Session) (pkcs11.ObjectHandle, []byte, error)
- func GenerateNanoTDFSessionKey(session *Pkcs11Session, privateKeyHandle pkcs11.ObjectHandle, ...) ([]byte, error)
- func GenerateNanoTDFSymmetricKey(ephemeralPublicKeyBytes []byte, session *Pkcs11Session, ...) ([]byte, error)
- type Error
- type Pkcs11PrivateKeyEC
- type Pkcs11PrivateKeyRSA
- type Pkcs11Session
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 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
Click to show internal directories.
Click to hide internal directories.