This repository was archived by the owner on May 31, 2025. It is now read-only.
use python-cryptography instead of python-crypto#1793
Closed
dirk-thomas wants to merge 1 commit intomelodic-develfrom
Closed
use python-cryptography instead of python-crypto#1793dirk-thomas wants to merge 1 commit intomelodic-develfrom
dirk-thomas wants to merge 1 commit intomelodic-develfrom
Conversation
dirk-thomas
commented
Aug 14, 2019
| 'LZ4 compression will not be available.') | ||
| found_lz4 = False | ||
|
|
||
| AES_BLOCK_SIZE = 16 |
Member
Author
There was a problem hiding this comment.
Why use this constant over AES.block_size (which is 128)?
dirk-thomas
commented
Aug 14, 2019
| if not self._gpg_key_user: | ||
| return | ||
| self._symmetric_key = Random.new().read(AES.block_size) | ||
| self._symmetric_key = os.urandom(AES.block_size) |
Member
Author
There was a problem hiding this comment.
Why AES.block_size here instead of AES_BLOCK_SIZE?
Member
Author
|
This is currently blocking the Python 3 migration (see #1792 (comment)). |
Member
Author
|
@mikepurvis Since you commented on the original ticket do you have a use case for this? If yes, could you manually test this change to ensure in doesn't break compatibility / behavior? |
Member
Author
|
As an alternative I am considering #1609 since it is much simpler and therefore has a lower chance of regressions. |
Member
Author
|
For now we went with |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Redo of #1606 since the fork has been delete and the patch needed some fixes.
The passing CI for the original PR which had bugs which would have failed at runtime shows that this code isn't covered by any unit tests. So this needs manual testing to ensure it doesn't break anything.
A few pending questions inline.