pkcs8 icon indicating copy to clipboard operation
pkcs8 copied to clipboard

Add DES-CBC block cipher support

Open qdm12 opened this issue 1 year ago • 1 comments

Hi there,

I need the DES-CBC block cipher, it's relatively easy to do with a new file cipher_des.go:

var (
	oidDESCBC = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 7}
)

func init() {
	RegisterCipher(oidDESCBC, func() Cipher {
		return DESCBC
	})
}

// DESCBC is the DES cipher in CBC mode.
var DESCBC = cipherWithBlock{
	ivSize:   des.BlockSize,
	keySize:  8,
	newBlock: des.NewCipher,
	oid:      oidDESCBC,
}

Let me know if you want me to PR this or if you would see any problem with this. Thanks!

qdm12 avatar Mar 25 '23 07:03 qdm12