Skip to content
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

Create compressing Representation->JSON converter #93

Open
rheitjoh opened this issue Apr 7, 2021 · 0 comments
Open

Create compressing Representation->JSON converter #93

rheitjoh opened this issue Apr 7, 2021 · 0 comments
Labels
Gitlab Old issue moved over from Gitlab repository

Comments

@rheitjoh
Copy link
Member

rheitjoh commented Apr 7, 2021

(This issue has been imported from the Gitlab repository because it seems to not have been addressed yet)

Original Text (Issue 35)

Currently, each object is completely and independently of everything else represented in its Representations.
This often produces redundancies (e.g., a polynomial ring over F_p and a hash function to the same F_p both include the representation of F_p in their own representation).

A solution to this (without losing the ability to easily reconstruct objects from their Representations) is to create a smart Representation -> JSON converter that looks through the supplied Representation, removes redundancies(*), and then encodes the result in JSON (in the JSON -> Representation conversion, it re-introduces the redundancies).

This is an optional enhancement that would improve public parameter and key sizes for protocols.

(*): go through the Representation's object tree, find equal subtrees (equals() method), replace occurences of redundant subtrees with a reference to a single Representation of that subtree.
For example: Remove the F_p-Representation from the Representations of the polynomial ring and the hash function, add it to some top-level object at the key "ref_3", and put a reference for all occurences (like polynomialRing.__ref_baseRing = 3). When going from JSON to Representation again, resolve these references.

Comment by Jan Bobolz

We could also do all this without reinventing the wheel, by probably just gzipping the json string when sending it.

Overall, I'll leave this as an optional enhancement with very low priority.
(However, the ticket will remain here as a ward against people saying that representations are too redundant at times)

@rheitjoh rheitjoh added the Gitlab Old issue moved over from Gitlab repository label Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gitlab Old issue moved over from Gitlab repository
Projects
None yet
Development

No branches or pull requests

1 participant