Nucypher-Core part 2 (more ABI changes)#2809
Conversation
3e96c10 to
8e601b4
Compare
950baf4 to
1b465ea
Compare
ce6cf4d to
3e1eafc
Compare
vepkenez
left a comment
There was a problem hiding this comment.
I can't speak to some of the implications but I love the continuing advancements in simplicity.
🥇
nucypher/utilities/porter/control/specifications/porter_schema.py
Outdated
Show resolved
Hide resolved
nucypher/utilities/porter/control/specifications/porter_schema.py
Outdated
Show resolved
Hide resolved
Instead: - Add it as a parameter to `retrieve_cfrags()` - Add it to `ReencryptionRequest` - Remove `EncryptedTreasureMap._public_signature` and `hrac`
6687ef3 to
848d7e3
Compare
|
The last commit attempts to normalize the So in that commit the guidelines were:
The disadvantage of the One small change to be added is a simpler support for optional fields - we just need a byte flag instead of wrapping them in a |
…reasureMap similarly to KeyFrag
Now it's the user's responsibility
…crypting_key Also change recipient_key to policy_encrypting_key in MessageKit.author(), now that MessageKit is only used for reencryptable messages.
…core constructors
Enrico doesn't sign anything anymore.
Allow for every Versioned type to be able to deserialize itself from the bytestring.
There was a problem hiding this comment.
Already left all the comments and questions I have here. LGTM. I don't know if it really counts as a "part 3" but let's move onto the next PR for any follow-ups. As discussed the tasks mentioned in the "for reviewers" section need to be resolved before the next major release.
|
The TODOs were filed as issues:
Filed nucypher/rust-umbral#73
Filed #2816
Filed #2817
Filed #2818 |
Breaking changes:
NodeMetadata, sign the whole metadata. As a part of that,interface_signatureandtimestampattributes were removed.timestampis now a metadata attribute, since it's recorded when the metadata is created.hrac,publisher_verifying_key, and_public_signatureare no longer bundled withEncryptedTreasureMap.publisher_verifying_keyis added toReencryptionRequest.MessageKitdoes not sign anything now, it's the user's responsibility.EncryptedKeyFrag, a separate versioned entity hosting an encryptedAuthorizedKeyFrag.AuthorizedTreasureMap, a separate versioned entity hosting an "unverifed" treasure map (similarly to how the pairAuthorizedKeyFrag-VerifiedKeyFragworks.AuthorizedKeyFrag, not just its checksum.AuthorizedKeyFragchanged fromAKF_toAKFrVariableLengthBytestring. Now every class knows how to deserialize itself from the stream, instead of relying on the higher level class to provide it with a bytestring of correct length.VariableLengthBytestring.In particular, fixes #2743:
MessageKitis just plain capsule + ciphertextAuthorizedKeyFrag(which is a plaintext forEncryptedKeyFrag) has its main payload (kfrag) + HRAC signed by the publisherAuthorizedTreasureMap(which is a plaintext forEncryptedTreasureMap) has its main payload (treasure map) + recipient key signed by the publisheralice_verifying_keyfromReencryptionRequest(as a part of What is the purpose of sending verifying keys in ReencryptionRequest? #2812)Other changes:
Enrico.from_alice(), since Enrico doesn't sign anything anymore.Ursula._decrypt_kfrag()- the verifying key passed to it is supposed to be Publisher'sUnbondedWorkeris not mysteriously caught and ignored inverify_node(), but instead propagated to be caught inlearn_from_teacher_node()like the rest of exceptions.BobReencryptionResponseverification fromRetrievalClient._request_reencryption()toReencryptionResponse.verify()http.HTTPStatusenum instead of hardcoded status codes.For reviewers:
publisher_verifying_keymay be removed fromTreasureMap, or a cross-check added to see if it matches the HRACAuthorizedKeyFrag.verify()- should we have a forced verification method forKeyFragin Umbral?AuthorizedKeyFrag, and the recipient key is not saved inAuthorizedTreasureMap. The externally passed value is used for verification. Another option is to store them in the respective objects (still passing an external value, of course) - this creates some redundancy, but may simplify error checking. A parallel can be drawn also with how capsules are signed inReencryptionResponse, but not included in it. Thoughts?MessageKit, to enable possible updates?MessageKittoEncryptedMessagefor the uniformity with kfrags and treasure maps?