mimcvdf/README.md

35 lines
1.1 KiB
Markdown
Raw Normal View History

2020-03-18 06:10:19 +00:00
<h1 align="center">mimcvdf ⏲️</h1>
2020-03-19 04:20:55 +00:00
<p align="center"><i>Simple <a href="https://eprint.iacr.org/2018/601.pdf">Verifiable Delay Function</a> using <a href="https://eprint.iacr.org/2016/492.pdf">MiMC</a></i></p>
2020-03-18 06:19:42 +00:00
## Applications
This module was created for use in reducing spam in a similar manner to [HashCash](https://en.wikipedia.org/wiki/Hashcash). However, some potential uses for VDFs include blockchains and verifiable lotteries.
2020-03-18 06:19:42 +00:00
2020-03-19 04:20:55 +00:00
## Usage
```
2020-03-19 04:28:14 +00:00
from mimcvdf import vdf_create, vdf_verify
2020-03-19 04:20:55 +00:00
# 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)
```
2020-03-18 06:19:42 +00:00
## 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.
2020-03-18 06:19:42 +00:00