Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In case ARGTYPE=3; the register functions do not work #474

Closed
3 tasks done
danzadok opened this issue Dec 29, 2018 · 6 comments
Closed
3 tasks done

In case ARGTYPE=3; the register functions do not work #474

danzadok opened this issue Dec 29, 2018 · 6 comments

Comments

@danzadok
Copy link

danzadok commented Dec 29, 2018

Prerequisites

Description

[Description of the issue]

Steps to Reproduce

Version

You can get this information from the define SCRYPT in src/include/tomcrypt.h or your local git repository by running git describe --always --tags --dirty.
Also, please include the compiler, the compiler version, the architecture and (if applicable) the MPI provider, the OS and what version of the OS you're experiencing the issue.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@danzadok
Copy link
Author

This is a macro definition error

@sjaeckel
Copy link
Member

  1. can you please write proper bug reports and not just an issue line? those templates exist for a reason.
  2. ARGTYPE=3 is a very bad idea
  3. I've created a fix/474 branch which should fix the issue when ARGTYPE=3
  4. there seems to be a regression somewhere in either ECC (ping @karel-m) or the updated prime checking in libtommath (ping @czurnieden)! currently the latest libtommath can't be used to run the ltc ECC tests!

@karel-m
Copy link
Member

karel-m commented Dec 29, 2018

I confirm that with current libtommath/develop the ecc_tests and dh_test are failing

@karel-m
Copy link
Member

karel-m commented Dec 29, 2018

libtommath's mp_prime_is_prime considers the following prime as a non-prime

15525180923007089351309181312584817556313340494345143132023511949029662399491021
07258669453876591642442910007680288864229150803718918046342632727613031282983744
380820890196288509170691316593175367469551763119843371637221007210577919

FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22
514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6
F44C42E9A63A3620FFFFFFFFFFFFFFFF

@czurnieden
Copy link

@karel-m libtommath has been compiled how exactly for that test?

There are a bunch of defines to include/exclude algorithms. the default is M-R with bases 2 and 3, mp_prime_strong_lucas_selfridge and at least one M-R test with a random base.

The API changed for mp_prime_is_prime, too, although it should be down-compatible, so how did you call it?

I have no problem with the develop branch in my fork (v1.0.1-181-g48c95f2), where that prime (it is a certified prime, just if somebody asks) gets detected as a prime when checked with testme.sh (actually the whole bunch of tests from .travis.yml ). mp_prime_is_prime has been called for that prime with t = 8, that means M-R with bases 2,3, strong-lucas, and 8 M-R tests with random bases.

Great.
And I was already thinking: "Oh, that get's a bit too smoothly, doesn't it?"
*grrr*
*sigh*

@sjaeckel
Copy link
Member

#476 should've fixed this... and some more :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants