Hash

class Hash.ChamHash[source]

Bases: Hash.Hash

Notes: This class implements an interface for a chameleon hash function. A standard charmeleon hash scheme has two algorithms paramgen and hash. paramgen accepts a security parameter and the length of p and q. Hash accepts public key, label, a message and a random element.

hash(pk, prefix, message, r)[source]
paramgen(secparam, p=None, q=None)[source]
class Hash.Hash[source]

Bases: charm.toolbox.schemebase.SchemeBase

Base class for Hash functions

Notes: This class implements an interface for a standard hash function scheme. A hash function consists of two algorithms: (paramgen or keygen and hash).

hash(*args)[source]
paramgen(*args)[source]