![]() |
|
|
#12 |
|
"Mihai Preda"
Apr 2015
101010110112 Posts |
|
|
|
|
|
|
#13 |
|
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
23×1,223 Posts |
It is best not to delete the thread. We learn from our own (and others') failures. If someone sees that this path leads nowhere, then they can walk a different path.
|
|
|
|
|
|
#14 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
27148 Posts |
Quote:
Code:
Let s(p)=sum(i=1,p-2,f(p,i)) where say (this is only an example) f(p,i)=997*(i+2)^(2^64)+15*(i/2)+19*(i%3)+3*i*sqrtint(i+11)+6*nb(i+5)*(p/64) mod p , where nb(x)=is the number of ones in the binary expansion of x. To make it more messy instead of constant 997,15,19,3,6 use multipliers that depends on p. if you want to save the residue at iteration=it, then ofcourse you need to save also the partial sum(i=1,it,f(p,i)) for the possible rollback for Jacobi/strong error check. At the end you return the standard, or extended res value and other stuff, with the s(p) value. And knowing the function you could check it in O(p) time (assuming that you can compute each f(p,i) in O(1) time, like above). If the check fails, then the user cheated, or (and this is also possible) in the check or at the user's side there was an error in the computation of s(p), note that computing s(p) doesn't use FFT. How hard would be to crack s(p) ? Very hard, if you make a mess function. How hard would be to skip only a single iteration? Very hard, for this you would need to guess f(p,i) mod p. The same is true for skipping any length of iterations. If we'd like the life/checking easier you could use use such functions, where computing f(p,i) is still O(1), but computing s(p) is O(1). The above f(p,i) is such one (at least with some precomputation) ! ps. for a "hard" function use also non-polynomial terms, like sqrtint(i), nb(i) or for other base>2. (and avoid terms that involves non-integer arithmetic). Last fiddled with by R. Gerbicz on 2018-09-24 at 19:39 |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Double checking | gd_barnes | Riesel Prime Search | 69 | 2021-03-21 00:54 |
| What about double-checking TF/P-1? | 137ben | PrimeNet | 6 | 2012-03-13 04:01 |
| Double checking | Unregistered | Information & Answers | 19 | 2011-07-29 09:57 |
| Double-checking milestone? | jobhoti | Math | 17 | 2004-05-21 05:02 |
| Any glory in double checking? | Quacky | Lounge | 5 | 2003-12-03 02:20 |