Closed qmuntal closed 1 year ago
This will be used in crypto/des.
I've refactored the AES implementation so it can share code with DES, as they are both implemented using similar CNG APIs.
This PR also implements DES over CBC mode so it can be used as a cipher.BlockMode in cipher.NewCBCDecrypter and cipher.NewCFBEncrypter.
Note that DES doesn't support GCM mode, and CNG doesn't implement the CTR mode (neither it does for AES https://github.com/microsoft/go-crypto-winnative/issues/4).
@dagood I've pushed one more commit implementing DES over CBC mode, please review that too.
This will be used in crypto/des.
I've refactored the AES implementation so it can share code with DES, as they are both implemented using similar CNG APIs.
This PR also implements DES over CBC mode so it can be used as a cipher.BlockMode in cipher.NewCBCDecrypter and cipher.NewCFBEncrypter.
Note that DES doesn't support GCM mode, and CNG doesn't implement the CTR mode (neither it does for AES https://github.com/microsoft/go-crypto-winnative/issues/4).