Closed fjarri closed 3 years ago
- rename
pk
todelegating_pk
inencrypt()
Rather than delegating_pk
, this should be a simple encrypting_pk
. One of the core propositions of PRE is that delegation is completely orthogonal to encryption.
- rename
decrypting_sk
todelegating_sk
indecrypt_original()
- rename
decrypting_sk
toreceiving_sk
indecrypt_reencrypted()
I don't get this distinction between delegating and receiving. In both cases it's "receiving"; "decrypting" also works.
I don't get this distinction between delegating and receiving. In both cases it's "receiving"; "decrypting" also works.
Here's my rationale:
First, the encrypting/decrypting
prefixes. I think they are redundant; if you are passing a key to encrypt/decrypt
, these keys are by default used for encrypting/decrypting (while other usages still warrant a prefix, like verifying_key
).
Now for the delegating/receiving
prefixes. While it's true that one can use Umbral as a simple asymmetric encryption scheme (and we do use it that way to encrypt kfrags for Ursula), it is not the intended usage, and, in fact, an overkill. I wanted to emphasize that:
encrypt
is supposed to take a key the delegator, and not the receiver, has control over (I was confused by this myself on several occasions)decrypt_original
is more of a debugging tool than a part of a normal process, and takes the same key that was used in encrypt
decrypt_reencrypted
takes a different key compared to what was used in encrypt
Synced with https://github.com/nucypher/rust-umbral/pull/50
https://github.com/nucypher/nucypher/pull/2612 uses this branch in CI
VerifiedKeyFrag.from_verified_bytes()
(for storage purposes)metadata
support fromreencrypt()
(see https://github.com/nucypher/nucypher/issues/259)pk
todelegating_pk
inencrypt()
decrypting_sk
todelegating_sk
indecrypt_original()
decrypting_sk
toreceiving_sk
indecrypt_reencrypted()
HasSerializedSize.serialized_size()
, and overhaulSerializable
given the new assumption that all of our objects have constant sizes known in advance. The size is needed innucypher
(to set up splitters)Serializable
intoSerializable
andDeserializable
GenericError
with the standardValueError