-
Notifications
You must be signed in to change notification settings - Fork 272
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
Adapt NuCypher to Umbral==0.1.3a0 #620
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the tests pass, this looks good otherwise... Didn't expect it to be that simple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐧
nucypher/config/keyring.py
Outdated
@@ -62,7 +64,7 @@ | |||
# Keyring | |||
__WRAPPING_KEY_LENGTH = 32 | |||
__WRAPPING_KEY_INFO = b'NuCypher-KeyWrap' | |||
__HKDF_HASH_ALGORITHM = hashes.BLAKE2b | |||
__HKDF_HASH_ALGORITHM = SHA256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't actually need to be updated to SHA256 for compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__HKDF_HASH_ALGORITHM = SHA256 | |
__HKDF_HASH_ALGORITHM = hashes.BLAKE2b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
nucypher/config/keyring.py
Outdated
__HKDF_HASH_ALGORITHM = SHA256 | ||
__HKDF_HASH_LENGTH = 64 | ||
__HKDF_HASH_ALGORITHM = BLAKE2B | ||
__HKDF_HASH_LENGTH = BLAKE2B_DIGEST_LENGTH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused, and also it doesn't have much sense, since there's no such thing as the hash length in HKDF. This was in fact specific to BLAKE2b only. I think we can safely remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
nucypher/config/keyring.py
Outdated
@@ -43,9 +43,11 @@ | |||
|
|||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT | |||
from nucypher.crypto.api import generate_self_signed_certificate | |||
from nucypher.crypto.constants import SHA256, BLAKE2B, BLAKE2B_DIGEST_LENGTH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHA256
is not used anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
92af45a
to
e9e933c
Compare
Also removes a bunch of pinned Pipfile deps. Be sure to update to the latest pipenv!