Skip to content

Latest commit

 

History

History

commit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Elliptic Curve Commitment Schemes

a commitment scheme allows one to commit to a chosen value (or chosen statement) while keeping it hidden to others, with the ability to reveal the committed value later. A commitment scheme allows one to commit to a chosen value (or chosen statement) while keeping it hidden to others, with the ability to reveal the committed value later.

Basic example of the Pedersen commitment scheme using elliptic curves to create a binding and computationally hiding scheme.

testCommit :: IO ()
testCommit = do
  let a = 0xCAFEBEEF -- setup param
  let x = 42         -- secret
  cm <- commit a x
  print $ open a cm          -- should succeed
  print $ open 0xDEADBEEF cm -- should fail