4.2. ReSeal


You may see some or no content at all on this page that documents the API. If that is the case please build the documentation locally (Docker Build), or view this documentation using a “autodoc”-ed version of this documentation (see: Documentation Variations).

The core ReSeal library consists primarily of two components, the cache (ReCache), and the Microsoft Simple Encrypted Arithmetic Library (SEAL) abstraction (ReSeal).

class fhez.recache.ReCache(enable=None)

Core caching object for ReSeal.

This cache can be enabled (default) to improve/ minimise the need to regenerate the transient properties of ReSeal. That is to say ReSeal only keeps/ stores the minimum required attributes like the keys, the cyphertext and the parameters, as everything else is derived from those at the point of need. Thus this class caches the generated intermediaries so they can be re-used rather than commiting compute power every time they are called. E.G seal.Encryptor and seal.Decryptor are examples of cached objects.

class fhez.rescheme.ReScheme(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)

Marshmallow serialisation schema.

This schema works with ReSeal to help in transmission of serialised ReSeal objects. This also helps to verify the contents are structured as expected on the recieving end. However since byte strings are encoded as strings there is little further testing that can be done on them.