-
Notifications
You must be signed in to change notification settings - Fork 70
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
What's a better error message in decapsulate_reencrypted than "generic umbral error"? #22
Comments
This error seems to be raised if not enough cFrags are present to open the However, currently the assertion requires original |
That check is ensuring that the reconstructed capsule comes from the original capsule, so by definition, there is no way to check that without the original components. There are many possible problems that may make this check to fail, but from the cryptographic point of view, we don't want to give detailed information of the error in order to avoid potential attacks. The reason is that there are many attacks out there exploiting the different possible error messages to infer secret information (e.g., private keys). An example (not applicable here), is padding oracle attacks |
Having said that, this error message could be something like you said: |
I propose: "Failed to decrypt with the provided private key" |
Poking around, I seem to be able to generate this error in two ways:
Is there a way to naively (ie, without injecting the value of |
Well, if something is knowable in the scope of this function, then it is already in the purview of an attacker who has direct witness over its execution. Sure, we don't want to encourage users to spread detailed error information in a public way (as with any application), but I don't think there's any harm in this function failing in such a way that discriminates between the various possibilities, is there? |
I think there is not (and there shouldn't be).
Yes, that's true, but that's not the target type of adversary for this measure. We are dealing here with the ones that have black-box access (e.g., remote access). |
Exactly, so there's no harm in the function raising different errors for these different conditions. |
This now an exception class |
At the moment, there is no message at all: https://github.com/nucypher/pyUmbral/blob/master/umbral/pre.py#L476 Edit: line moved: https://github.com/nucypher/pyUmbral/blob/master/umbral/pre.py#L440 |
Do we intend to leave the message blank here? https://github.com/nucypher/pyUmbral/blob/master/umbral/pre.py#L440 |
I don't exactly understand what is being asserted here.
Perhaps, "This capsule doesn't appear to have been made for this public key" ?
The text was updated successfully, but these errors were encountered: