You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Kevin Froman ebcc2ed632 bump version and add info in changelog/readme about c impl 9 months ago
mimcvdf bump version and add info in changelog/readme about c impl 9 months ago
tests C implementation of MIMC using GMP (~10x faster than Python) 9 months ago
.gitignore C implementation of MIMC using GMP (~10x faster than Python) 9 months ago
CHANGELOG.md bump version and add info in changelog/readme about c impl 9 months ago
LICENSE initial commit 2 years ago
Makefile initial commit 2 years ago
README.md bump version and add info in changelog/readme about c impl 9 months ago
run_tests.sh initial commit 2 years ago
setup.py bump version and add info in changelog/readme about c impl 9 months ago

README.md

mimcvdf ⏲️

Simple Verifiable Delay Function using MiMC

Applications

This module was created for use in reducing spam in a similar manner to HashCash. However, some potential uses for VDFs include blockchains and verifiable lotteries.

Usage

from mimcvdf import vdf_create, vdf_verify


# Get a mimc hash of a byte sequence

vdf_create(byte_data, round_count) # Returns hex string


# Verify a mimc hash (must use same round count)

vdf_verify(same_bytes_data, vdf_create_result, rounds)

For high speed, you need GMP installed. Otherwise, the module will fall back to a Python implementation that is significantly slower.

Security

This code has not been audited for security. It is not currently recommended for protecting against anything but denial of service, even though MiMC is able to do much more. If used, make sure it is not protecting anything critical.

In addition, since this is a Python implementation, attackers can be faster than typical users of an application by using faster language implementations or even FPGAs.