▲ | A pure Python cryptographic commitment scheme with no dependencies(github.com) | |
1 points by RayanROghabian 10 hours ago | 1 comments | ||
▲ | RayanROghabian 10 hours ago | parent [-] | |
This code produces deterministic HMAC-SHA256 digests with domain separation (b"commitment:v1") using only the Python standard library. It allows: • Sealing a message with a secret key using hmac.new() • Verifying a message/key/commitment triplet with hmac.compare_digest() • Randomized key generation via os.urandom(32) It outputs a verifiable commitment that can later be checked against the original message and key. No third-party libraries or infrastructure required. |