AES cipher in CBC version 1 mode
- [x] I have read CONTRIBUTING.md.
- [x] This pull request is all my own work -- I have not plagiarized it.
- [x] All filenames are in PascalCase.
- [x] All functions and variable names follow Java naming conventions.
- [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
"Fixes #4586"
The IV in this implementation seemingly does nothing, decrypting data seems to use a random IV instead of the actual IV used when encrypting. Have you tested this properly?
Also, is this thread safe?
The IV in this implementation seemingly does nothing, decrypting data seems to use a random IV instead of the actual IV used when encrypting. Have you tested this properly?
Also, is this thread safe?
The IV in this implementation seemingly does nothing, decrypting data seems to use a random IV instead of the actual IV used when encrypting. Have you tested this properly? Also, is this thread safe?
- Hey, I am sorry I closed the PR by mistake.
To quote the implementation of IV, the IV is not necessarily secret in AES-CBC. Hence, is appended with the cipher text itself. Therefore, it is not needed for decryption, which is handled by mode in the above code. I hope i answered to your query as needed. :)
The IV in this implementation seemingly does nothing, decrypting data seems to use a random IV instead of the actual IV used when encrypting. Have you tested this properly?
Also, is this thread safe?
- Hey, I am sorry I closed the PR by mistake.
To quote the implementation of IV, the IV is not necessarily secret in AES-CBC. Hence, is appended with the cipher text itself. Therefore, it is not needed for decryption, which is handled by mode in the above code.
I hope i answered to your query as needed. :)
The IV is integral for decrypting data in some modes. In your use case tho, it is not being passed to the Cipher at all, and acts more like a salt, being appended to the data being encrypted and thrown away once decrypted.
The IV in this implementation seemingly does nothing, decrypting data seems to use a random IV instead of the actual IV used when encrypting. Have you tested this properly?
Also, is this thread safe?
- Hey, I am sorry I closed the PR by mistake.
To quote the implementation of IV, the IV is not necessarily secret in AES-CBC. Hence, is appended with the cipher text itself. Therefore, it is not needed for decryption, which is handled by mode in the above code. I hope i answered to your query as needed. :)
The IV is integral for decrypting data in some modes. In your use case tho, it is not being passed to the Cipher at all, and acts more like a salt, being appended to the data being encrypted and thrown away once decrypted.
That's pretty much true honestly. To my knowledge in CBC version 1, the IV was not utilized properly and hence were the further versions developed. I also plan to drop the enhanced version of the algorithm to this repository in future. I hope it'll help.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please reopen this pull request once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution!