crypto icon indicating copy to clipboard operation
crypto copied to clipboard

Add support for symmetric ciphers

Open maraino opened this issue 3 years ago • 0 comments

Description

Some KMS will support symmetric ciphers PKCS#11 is one of them.

We will probably need to add something like:

type Cipher interface {
	CreateCipher(req *CreateCipherRequest) (*CreateCipherResponse, error)
	CreateSecretKey(req *CreateSecretKeyRequest) (*CreateSecretKeyResponse, error)
}

CreateCipher can load a previously created secret key, or we can remove CreateSecretKey and do both operations in CreateCipher.

We might either add different fields for different cipher types (cipher.AEAD, cipher.Block, cipher.BlockMode, cipher.Stream) or use something like crypto11.SecretKey

maraino avatar Oct 26 '22 21:10 maraino