mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   Wheel factorization: Efficient? (https://www.mersenneforum.org/showthread.php?t=13609)

CRGreathouse 2010-07-20 13:00

[QUOTE=3.14159;222077]How about if you generate via PARI? Is it equally weak as the internet generator?[/QUOTE]

I don't know of an attack on that particular implementation, but it's a linear feedback shift register, which has known vulnerabilities (e.g., the Berlekamp-Massey algorithm).

retina 2010-07-20 13:21

[QUOTE=3.14159;222077]How about if you generate via PARI? Is it equally weak as the internet generator?[/QUOTE]LFSRs are not cryptographically secure. Simple as that. If you want the primes for crypto work then the entire generating chain must be cryptographically secure. No shortcuts allowed. But the devil is in the details. Making good crypto is very hard. I suggest you buy a few books, I recommend this one: Bruce Schneier's "Practical Cryptography".

3.14159 2010-07-20 15:20

[QUOTE]But the devil is in the details. Making good crypto is very hard. I suggest you buy a few books, I recommend this one: Bruce Schneier's "Practical Cryptography".[/QUOTE]

.. Alternatively, an Internet search + Some reading on the subject via the internet.

CRGreathouse 2010-07-20 15:50

[QUOTE=3.14159;222098].. Alternatively, an Internet search + Some reading on the subject via the internet.[/QUOTE]

That will suffice to tell you the details, but I hope you don't write a cryptosystem on that basis!:smile:

R.D. Silverman 2010-07-20 16:25

[QUOTE=CRGreathouse;222081]I don't know of an attack on that particular implementation, but it's a linear feedback shift register, which has known vulnerabilities (e.g., the Berlekamp-Massey algorithm).[/QUOTE]

If speed is not a requirement, then use BBS.

CRGreathouse 2010-07-20 18:12

[QUOTE=R.D. Silverman;222121]If speed is not a requirement, then use BBS.[/QUOTE]

You mean instead of a LFSR? Yes, Blum Blum Shub is much more suitable to crypto (i.e., actually has value).

jasonp 2010-07-21 11:06

There are many ways to build a cryptographically secure random number generator, assuming you have a good cryptographic primitive and a source that can supply sufficient entropy to seed it every so often. See NIST Special Publication 800-90 [url="http://csrc.nist.gov/publications/nistpubs/800-90/SP800-90revised_March2007.pdf"]here[/url]. There's also been a lot of research into building a good entropy source when all you have is software, [url="http://www.cypherpunks.to/~peter/06_random.pdf"]this[/url] is an excellent introduction.

3.14159 2010-07-21 19:04

[QUOTE]That will suffice to tell you the details, but I hope you don't write a cryptosystem on that basis![/QUOTE]

Here's a bunny with a pancake on its head:

:oolong:

3.14159 2010-07-21 20:23

Coding my test??
 
Now that I know a bit of PARI, maybe I should attempt coding my test methods?

CRGreathouse 2010-07-21 23:37

Sure, go for it.

3.14159 2010-07-22 00:49

Alright: Here we go:

It works:
[code]isSPRP(n,b=2) = {
forprime(p=2, nextprime(10^6),
if(n%p==0,return(p))
);
my(s=valuation(n-1,2),d=n>>s);
n = Mod(b, n)^d;
if (n == 1, return(n));
while(s--,
if (n == -1, return(n));
n = n^2;
);
n == -1
};
[/code]

Timings:
For a composite that passes the trial division: 16 ms. :smile:


All times are UTC. The time now is 22:06.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.