diff --git a/CHANGELOG.md b/CHANGELOG.md index 863ff32..6f4efdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This project uses Semantic Versioning +## 1.2.0 + ++ Accepted C+gmp implementation of MiMC from @cartr ++ Added is_fast in mimcvdf to tell which implementation is being used + + ## 1.1.0 Added support for decimal output diff --git a/README.md b/README.md index 4b068c4..0ac2ae1 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ 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 diff --git a/mimcvdf/__init__.py b/mimcvdf/__init__.py index ce2dff6..6598f0b 100644 --- a/mimcvdf/__init__.py +++ b/mimcvdf/__init__.py @@ -5,7 +5,7 @@ import time from statistics import mean from math import ceil -from .mimc import forward_mimc, reverse_mimc +from .mimc import forward_mimc, reverse_mimc, is_fast """ Kevin Froman 2020 diff --git a/mimcvdf/mimc/native.c b/mimcvdf/mimc/native.c index dc6441c..76db663 100644 --- a/mimcvdf/mimc/native.c +++ b/mimcvdf/mimc/native.c @@ -5,6 +5,7 @@ #include /* +C Version by github.com/cartr This module adapted from https://github.com/OlegJakushkin/deepblockchains/blob/master/vdf/mimc/python/mimc.py by Sourabh Niyogi https://github.com/sourabhniyogi This program is free software: you can redistribute it and/or modify @@ -43,7 +44,7 @@ mimc_init_constants() // Set LITTLE_FERMAT_EXPT to hex((MODULUS * 2 - 1) // 3) mpz_init(LITTLE_FERMAT_EXPT); - mpz_set_str(LITTLE_FERMAT_EXPT, + mpz_set_str(LITTLE_FERMAT_EXPT, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaa9c0aaaaaaab", 16); diff --git a/setup.py b/setup.py index dbe9fab..962ae31 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ from setuptools import setup, find_packages, Extension setup(name='mimcvdf', - version='1.1.0', + version='1.2.0', description='Generic high level VDF using MiMC', author='Kevin Froman', author_email='beardog@mailbox.org', - url='https://www.chaoswebs.net/', + url='https://github.com/beardog108/mimcvdf/', packages=find_packages(exclude=['contrib', 'docs', 'tests']), install_requires=[], ext_package="mimcvdf",