Help on class PairingGroup in module charm.toolbox.pairinggroup:
class PairingGroup(builtins.object)
| PairingGroup(param_id, param_file=False, secparam=512, verbose=False)
|
| Methods defined here:
|
| EndBenchmark(self)
| ends an ongoing benchmark
|
| GetBenchmark(self, option)
| retrieves benchmark results for any of these options:
| RealTime, CpuTime, Mul, Div, Add, Sub, Exp, Pair, Granular
|
| GetGeneralBenchmarks(self)
| retrieves benchmark count for all group operations
|
| GetGranularBenchmarks(self)
| retrieves group operation count per type: ZR, G1, G2, and GT
|
| InitBenchmark(self)
| initiates the benchmark state
|
| StartBenchmark(self, options)
| starts the benchmark with any of these options:
| RealTime, CpuTime, Mul, Div, Add, Sub, Exp, Pair, Granular
|
| __init__(self, param_id, param_file=False, secparam=512, verbose=False)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
| debug(self, data, prefix=None)
|
| decode(self, element)
|
| deserialize(self, obj, compression=True)
| Deserialize a bytes serialized element into a pairing object.
|
| :param compression: must be used for objects serialized with the
| compression parameter set to True. Default is True for
| compatibility with previous versions of charm.
|
| encode(self, message)
|
| groupSetting(self)
|
| groupType(self)
|
| hash(self, args, type=0)
| hashes objects into ZR, G1 or G2 depending on the pairing curve
|
| init(self, type, value=None)
| initializes an object with a specified type and value
|
| ismember(self, obj)
| membership test for a pairing object
|
| ismemberDict(self, obj)
| membership test for a dict of pairing objects
|
| ismemberList(self, obj)
| membership test for a list of pairing objects
|
| messageSize(self)
|
| order(self)
| returns the order of the group
|
| pair_prod(self, lhs, rhs)
| takes two lists of G1 & G2 and computes a pairing product
|
| paramgen(self, qbits, rbits)
|
| random(self, _type=0, count=1, seed=None)
| selects a random element in ZR, G1, G2 and GT
|
| serialize(self, obj, compression=True)
| Serialize a pairing object into bytes.
|
| :param compression: serialize the compressed representation of the
| curve element, taking about half the space but potentially
| incurring in non-negligible computation costs when
| deserializing. Default is True for compatibility with previous
| versions of charm.
|
| >>> p = PairingGroup('SS512')
| >>> v1 = p.random(G1)
| >>> b1 = p.serialize(v1)
| >>> b1 == p.serialize(v1, compression=True)
| True
| >>> v1 == p.deserialize(b1)
| True
| >>> b1 = p.serialize(v1, compression=False)
| >>> v1 == p.deserialize(b1, compression=False)
| True
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
charm.toolbox.pairinggroup中PairingGroup类的使用说明
最新推荐文章于 2025-04-27 11:24:03 发布