-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add header and payload to Ciphertext bindings #154
Comments
Just to get on the same page: // No changes
pub struct Ciphertext<E: Pairing> {
// U
pub commitment: E::G1Affine,
// W
pub auth_tag: E::G2Affine,
// V
pub ciphertext: Vec<u8>,
}
impl<E: Pairing> Ciphertext<E> {
// ...
pub fn header(&self) -> CiphertextHeader<E> { ... }
pub fn payload(&self) -> CiphertextPayload
}
pub struct CiphertextHeader<E: Pairing> {
// U
pub commitment: E::G1Affine,
// W
pub auth_tag: E::G2Affine,
// sha256(V)
// Note: Preferably a static array, either [0u8; 32] or GenericArray<U32>
pub ciphertext_hash: Vec<u8>,
}
pub type CiphertextPayload = Vec<u8>; Bindings are just wrapping & exposing these methods and structures. Not sure what other changes are required at this point (e.g. what consumes these new structures, etc.), but IMHO we just need to zero in on the data structures, and the rest should fall into place. |
Yes, I think that sounds fine, but let's see what @derekpierre thinks, since he asked for this to facilitate the work in the nucypher-core and nucypher layers. The point here is to add this just as a helper function for nucypher-core consumption, without impacting anything else on the Ferveo side.
Can you elaborate on this? |
I was just trying to say that even though I'm not familiar with the upstream of this issue, it seems to me like implementing these structures will require a minor refactor, and it should be fairly easy. |
Drafted updated |
@piotr-roslaniec I think you are on the same page. The crux of the issue is this: #149 (comment). From the python-side it could be ugly for when decryption requests need to be made, to take the What would be more ideal is if the Obtaining that Using Similar issue would be for |
Does it make sense to compute the "tag hash" ( Edit: Resolved by Discord conversation with @derekpierre - The prerequisites for this change have already been addressed here: https://github.com/nucypher/ferveo/pull/149/files#diff-77fd8e16ac649ad31c2c194cc79b5f867795266417d190b9d372609b92d7e2b6R35. |
Closed by #155 |
To facilitate the creation of TDec Requests after the changes introduced by #149, we need a set of helper functions to facilitate getting the necessary information, i.e., commitment U, authentication tag W and hash of the symmetric ciphertext. Tentatively, let's call this the header, and for the bulk of the symmetric ciphertext, let's call it the payload. This is what just something that we need above the ferveo level, so that's why I'm suggesting doing this in the bindings
The text was updated successfully, but these errors were encountered: