nucypher / pyUmbral

NuCypher's reference implementation of Umbral (threshold proxy re-encryption) using OpenSSL and Cryptography.io
https://pyumbral.readthedocs.io
GNU General Public License v3.0
284 stars 71 forks source link

Umbral data class serialization #2

Closed tuxxy closed 6 years ago

tuxxy commented 6 years ago

Moving discussions between @cygnusv and I from Email to GitHub!

The Umbral data classes need to have a serialization format. This involves the classes:

  1. RekeyFrag
  2. CiphertextKEM
  3. CiphertextFrag
  4. CiphertextCombined
  5. ChallengeResponse

Inside of these classes, we don't have very informative names, so maybe we should also consider some naming here so auditors can have an idea of what each component is.

cygnusv commented 6 years ago

All these class names can be changed, but I'm afraid it's very difficult to come up with informative names for most of the elements inside them. Let me think about it and propose something here. What I wouldn't like is to make the code to verbose, although I agree that currently it look very cryptic.

tuxxy commented 6 years ago

Yeah, I understand that these components might be very difficult to name appropriately.

I don't think we need to be exceptionally verbose and I agree with you on that -- this code should not be verbose.

What I do think is that we could use names that are meaningful and descriptive.

For example, (this isn't actual code, it's just an example I came up with):

Instead of x. We can call it x_coeff. This is a better name in that it describes x as a coefficient.

Where I think we should be verbose is code documentation. In each of these classes, maybe we could give a relatively short overview of how these components are used? For example, "These components are used in a polynomial for Shamir's Secret Sharing, see the Umbral paper for more information."

tuxxy commented 6 years ago

Handled in #15, awaiting review and merge.

tuxxy commented 6 years ago

Merged in #15.