-
Notifications
You must be signed in to change notification settings - Fork 20
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
Interfacing with Python #41
Conversation
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 94.64% 95.65% +1.00%
==========================================
Files 10 11 +1
Lines 766 759 -7
==========================================
+ Hits 725 726 +1
+ Misses 41 33 -8
Continue to review full report at Codecov.
|
3a9ac8b
to
ec32655
Compare
cd2eb82
to
62dda02
Compare
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.
LGTM 👍
Looks very solid. I had no issues with running Python bindings locally.
Starting with 1.3 it's a 2018-edition crate, so it doesn't need [macro-use] anymore.
Necessary adjustments to reach binary compatibility with PyUmbral. See the related nucypher/pyUmbral#263
Parameters
with objects and decoupledu
fromg
(as decided in Do we need to carry aroundUmbralParameters
? #3)UmbralDEM
toDEM
(we have namespaces for that)__bytes__()
andfrom_bytes()
in Python bindings (part of Expose serialization in bindings #11)SecretKeyFactory
for secret key derivationCapsuleFrag.verify()
to match the rest of the library (and the Python version)Effectively fixes #27, although nothing really changed in the binary format on the Rust side (except for domain tags, missing
Parameters
and XChaCha); most of the work is done on the Python sideNote for reviewers:
Notes:
PyUmbral
UmbralSecretKey
is (de)serialized usingnacl
'sSecretBox
with the password expanded innucypher
. This behavior can be replicated by usingxsalsa20poly1305
crate if necessary. But since we are breaking capsule compatibility anyway, users probably won't want to hold on to theirUmbralPrivateKey
s, so we can use the preferredchacha20poly1305
+ password expansion withSHA256
(our hash of choice), which is already exposed viaUmbralDEM
(renamed toDEM
in this PR)