Source code for Commit

''' Base class for commitment schemes 
 
 Notes: This class implements an interface for a standard commitment scheme.
	 A commitment scheme consists of three algorithms: (setup, commit, decommit).
	 
 Allows one to commit to a value while keeping it hidden, with the ability
 to reveal the committed value later (wiki).
'''
from charm.toolbox.schemebase import *

[docs]class Commitment(SchemeBase): def __init__(self): SchemeBase.__init__(self) SchemeBase._setProperty(self, scheme='Commitment') self.baseSecDefs = None
[docs] def setup(self, securityparam): raise NotImplementedError
[docs] def commit(self, *args): raise NotImplementedError
[docs] def decommit(self, *args): raise NotImplementedError