Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DES-CBC block cipher support #29

Open
qdm12 opened this issue Mar 25, 2023 · 1 comment
Open

Add DES-CBC block cipher support #29

qdm12 opened this issue Mar 25, 2023 · 1 comment

Comments

@qdm12
Copy link

qdm12 commented Mar 25, 2023

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!

@itaranto
Copy link

Can you please open a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants