Repository navigation
Add DES CBC decryption for wrapped key imports - #31
Open
keithfong94 wants to merge 3 commits into
Open
keithfong94 wants to merge 3 commits into
keithfong94 wants to merge 3 commits into
Conversation
Contributor
Author
|
/request-review |
|
Success 🎉 The review request was sent to the following:
If you see something that doesn't look right, follow this doc to improve our slack channel mapping. Thank you! |
There was a problem hiding this comment.
🟡 Changes recommended
Add single-DES CBC coverage and the standard Apache 2.0 headers.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds explicit-IV, unpadded CBC decryption for DES and 3DES, with documentation and version updates.
Changes:
- Implements
DecryptCBCwith input validation. - Adds CBC vectors and invalid-input tests.
- Updates README and version to 1.15.0.
File summaries
| File | Summary |
|---|---|
VERSION.txt |
Bumps version to 1.15.0. |
README.md |
Documents DES CBC support. |
des/des_cbc_cipher.go |
Adds CBC decryption implementation. |
des/des_cbc_cipher_test.go |
Adds CBC vectors and validation tests. |
Review details
Suppressed comments (1)
des/des_cbc_cipher.go:10
- The new API is documented as supporting both DES and 3DES, but the tests only construct a 3DES cipher. A regression affecting
CreateFromDESKeyBytes/CreateFromDESKeyStringwould therefore leave the newly supported single-DES CBC path unverified; add at least one independent single-DES CBC vector (the invalid-input cases can be shared).
func (c *Cipher) DecryptCBC(cipherBytes, iv []byte) ([]byte, error) {
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
conanak99
approved these changes
Sep 18, 2026
|
The approval(s) from conanak99 do(es)n't fullfill the approvers requirements because:
|
harry-pham-wise
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Add
Cipher.DecryptCBCfor DES/3DES with an explicit IV, input validation, and no padding removal. This supports G+D PRK imports without changing existing ECB operations or KCV calculations. Prepare version 1.15.0.Checked double- and triple-length 3DES against independent Python cryptography/OpenSSL vectors with zero and nonzero IVs. Full tests and
go vetpass. Fixtures contain synthetic keys only.Checklist