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

Adaptations for use. #1

Open
wmacevoy opened this issue Apr 17, 2017 · 1 comment
Open

Adaptations for use. #1

wmacevoy opened this issue Apr 17, 2017 · 1 comment

Comments

@wmacevoy
Copy link

I have an application with a set of numbers (all large potential composites, some obviously not). Can QS be adapted to commit a certain amount of work to factor, and then give up? I see your basic use just asks for a factoring, but there will be hard factor problems in the set; I just want to eliminate the simple composite cases.

An example of how do do this would be great, say with a range of b-bit numbers.

int n = 10000;
int b = 256;
SecureRandom rng = new SecureRandom();
BigInteger x0 = new BigInteger("2").pow(b-1);
BigInteger [] a = new BigInteger[n];
for (int i=0; i<n; ++i) {
  a[i]=x0.add(new BigInteger(b-1,rng));
}
// .... sieve(a, work/time limit)?
@wmacevoy
Copy link
Author

This is also a theory question -- does QS do well at discovering composites that are not products of two large primes --- I really just want to eliminate unlikely choices. Thanks again...

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

1 participant