https://github.com/raphaelrrcoelho/commitment-scheme
In cryptography, 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. Commitment schemes are designed so that a party cannot change the value or statement after they have committed to it: that is, commitment schemes are binding.
https://github.com/raphaelrrcoelho/commitment-scheme
cryptography hashing python3
Last synced: 14 days ago
JSON representation
In cryptography, 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. Commitment schemes are designed so that a party cannot change the value or statement after they have committed to it: that is, commitment schemes are binding.
- Host: GitHub
- URL: https://github.com/raphaelrrcoelho/commitment-scheme
- Owner: raphaelrrcoelho
- Created: 2017-02-11T04:45:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-11T05:58:32.000Z (over 9 years ago)
- Last Synced: 2025-09-14T05:51:58.328Z (9 months ago)
- Topics: cryptography, hashing, python3
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Commitment Scheme API
```
commit(msg) -> (com, key)
veryfy(com, key, msg) -> boolean
```
Commitment Scheme API Implementation
```
commit(msg) -> (Hash(key | msg), key) // key = randon 256-bit value
veryfy(com, key, msg) -> com == Hash(key | msg)
```
Usage
```
python commitment.py [commit]
python commitment.py [verify]
```