mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2018-03-11, 13:11   #254
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

101101011002 Posts
Default detection of fake/malicious PRP results

Quote:
Originally Posted by Prime95 View Post
Challenge #2
We've convinced ourselves that a Gerbicz PRP reduces the chance of a hardware error to practically zero. We can use checksums to reduce human error in posting results to near zero.

Is there any way to reduce the malicious user error to near zero? I'm trying to imagine some side calculation that the user reports that can be quickly verified but can only be generated if the user did the full PRP test. If such a test existed I'd consider accepting Gerbicz PRP tests as a primality test that did not require a double-check.
The solution is not as elegant as I'd like, but maybe its an idea to be improved upon ("brainstorming")

The goal is:
the client states that he computed 3^(2^p). We want to verify this by doing less work than 100% all over again (which would be a classical double-check).

In brief, the client sends a complete (but sparse) "Gerbicz chain". This chain can be probabilistically verified by the server in [much] less than 100% time.

Now, in a bit more detail:
choosing a step "L" of the chain.
the client sends the N "data bits" at all the Gerbicz points of step L:
d0 = 3^(2^L)
d1 = 3^(2^(2L))
etc., up to
d(N) = 3^(2^(N*L)), such that N*L > exponent.

The server can easily compute the corresponding "check bits" of the chain with N multiplications:
c0 = 3
c(k) = d(k-1) * c(k-1)

And the server can verify any link it chooses in this chain with L multiplications:

c(k-1)^(2^L) * 3 == c(k)

The important point of this probabilistic verification is: if the client spent much less that 100% time to produce the fake data, the server will detect it in exponentially less than 100% time too.

A sizing example:
for a 90M exponent, choosing L = 10M, we have a chain with 10 links.
The client sends 10 "data bits" blocks (each 13MB in size).
The server computes the 10 "check bits" with 10 multiplications (trivial).
The server [randomly] chooses a link (among the 10) to verify, and verifies it with L multiplications (10% of the total-work-time).

Assuming the client faked everything, at this point the server detects the fake. Assuming the client did invest 10% of the full-work-time and computed one link genuinely, the server has 90% chances to detect the fake at this point.

After a successfully verified link, the server can verify a second random link.

There is a trade-off between the amount of data the client sends to the server (the "data-bits" for each of L links) and the amount of compute the server has to do (less verification work with lower L).

Last fiddled with by preda on 2018-03-11 at 13:15
preda is offline   Reply With Quote
Old 2018-03-11, 13:19   #255
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

22·3·112 Posts
Default

Before others point this out, I am aware, as per past discussion, that having the client send large amounts of data to the server may be a problem.

My point is: IMO, this is what is needed/required in order to do "fake checking" in less time than a double check; it may not be practical though.

Or maybe somebody proposes a better solution..

Last fiddled with by preda on 2018-03-11 at 13:20
preda is offline   Reply With Quote
Old 2018-03-12, 10:51   #256
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

3·23·89 Posts
Default

Is this equivalent in size to sending save files?
henryzz is offline   Reply With Quote
Old 2018-03-12, 13:54   #257
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

24×3×163 Posts
Default

Quote:
Originally Posted by henryzz View Post
Is this equivalent in size to sending save files?
Yes, nearly; multiple checkpoint files per exponent; at 4M fft length, gpuOwL v1.9 save files are about 19MB each, vs. the 13MB he stated for Gerbicz data for 91M (presumably for V2.0). Ten 13MB files is about comparable to 7 of the 4M save files.

It might be practical to do it more concisely. by a factor of 2 or so. clLucas checkpoint files are rather large; 28.6MB for M62.8m., vs. gpuOwL v 1.9 at 19MB for M78m; CUDALucas 2.06 10.2MB at M83.6m. Those correspond to clLucas 0.455B/p; gpuOwL 0.244B/p; CUDALucas 0.122B/p; relative size 3.73, 2, 1.

Last fiddled with by kriesel on 2018-03-12 at 14:42
kriesel is online now   Reply With Quote
Old 2018-03-15, 22:19   #258
GP2
 
GP2's Avatar
 
Sep 2003

2·5·7·37 Posts
Default

Do we have a rough theoretical idea of the odds of a bad PRP result despite Gerbicz error checking? I wonder if it might be higher than expected.

There are about 340,000 PRP cofactor results for exponents under 4.5M where the shift count is nonzero. That reduces to 190,000 results if you exclude the ones done by me using AWS cloud servers with ECC memory which so far have a perfect track record for a few thousand LL double-check tests.

Out of those 190,000 results, there are two bad results that I'm aware of:

There are three more bad results with zero shift count (M37,811, M1,132,997 and M3,167,573) but I'm not counting these since these were presumably done with an older version that didn't do Gerbicz checking.

Two erroneous results out of about 190,000 = 1 in 95,000 which isn't bad at all, but these are for the very small exponents in PRP cofactor testing. For the much larger exponents used in PRP primality testing, would that imply a correspondingly higher error rate?

Would the error rate go up roughly linearly with the exponent size, or would it increase a bit more than quadratically, as the calculation time does?

So the error rate of 1 in 95,000 for tiny exponents under 4.5M might balloon to, say 1 in a few thousand, or even more, for exponents in high 70M range. That would be too many to allow us to avoid double-checking.

This needs more data, but the PRP cofactor double-checking wavefront is only at about 4.7M at the moment. And for PRP primality testing itself, we only have less than 200 double-checked results at the moment.
GP2 is offline   Reply With Quote
Old 2018-03-16, 03:00   #259
axn
 
axn's Avatar
 
Jun 2003

23·683 Posts
Default

Quote:
Originally Posted by GP2 View Post
Out of those 190,000 results, there are two bad results that I'm aware of:
Was Gerbicz PRP checking implemented with Type 1 residues? I thought only Type 5 was using that check?

Or maybe all Types are possible with that check
axn is offline   Reply With Quote
Old 2018-03-16, 03:26   #260
GP2
 
GP2's Avatar
 
Sep 2003

2×5×7×37 Posts
Default

Quote:
Originally Posted by axn View Post
Was Gerbicz PRP checking implemented with Type 1 residues? I thought only Type 5 was using that check?
Older versions of mprime/Prime95 only implemented Type 1, and didn't do Gerbicz checks.

The latest versions do Gerbicz checks.

If it's a PRP cofactor test, they mostly do Type 5 now but will do a Type 1 if it's a double check of a Type 1 first time result.

If it's a PRP primality test, they mostly do Type 1 unless it's a double-check of a very early gpuOwL result, which used Type 4.

So I think Gerbicz checks are indeed done for Type 1.
GP2 is offline   Reply With Quote
Old 2018-03-16, 03:45   #261
axn
 
axn's Avatar
 
Jun 2003

546410 Posts
Default

Quote:
Originally Posted by GP2 View Post
So I think Gerbicz checks are indeed done for Type 1.
Ok. How can we be sure that these particular tests had Gerbicz check done? Are all P95 versions capable of getting Cofactor tests from primenet also set to do Gerbicz check? Or are there exceptions?
axn is offline   Reply With Quote
Old 2018-03-16, 04:30   #262
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

17×487 Posts
Default

Type 1 does not do Gerbicz error-checking.
Prime95 is offline   Reply With Quote
Old 2018-03-16, 04:39   #263
GP2
 
GP2's Avatar
 
Sep 2003

2·5·7·37 Posts
Default

Quote:
Originally Posted by Prime95 View Post
Type 1 does not do Gerbicz error-checking.
But I'm looking at preda's recent PRP primality tests, for example for M78424979, and they are all Type 1. And gpuOwL has implemented Gerbicz checks since v 1.0 last August.

Or does Type 1 mean something different for PRP primality vs. PRP cofactor testing?

Last fiddled with by GP2 on 2018-03-16 at 04:44
GP2 is offline   Reply With Quote
Old 2018-03-16, 04:54   #264
axn
 
axn's Avatar
 
Jun 2003

23·683 Posts
Default

Quote:
Originally Posted by GP2 View Post
But I'm looking at preda's recent PRP primality tests, for example for M78424979, and they are all Type 1. And gpuOwL has implemented Gerbicz checks since v 1.0 last August.

Or does Type 1 mean something different for PRP primality vs. PRP cofactor testing?
Found it. http://www.mersenneforum.org/showthr...due#post468378

Type 5 is specifically for cofactor, and uses "Gerbicz check"-friendly math. Type 1 is applicable for all, but is not GC-friendly for mersenne cofactors.
axn is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stockfish / Lutefisk game, move 14 poll. Hungry for fish and black pieces. MooMoo2 Other Chess Games 0 2016-11-26 06:52
Redoing factoring work done by unreliable machines tha Lone Mersenne Hunters 23 2016-11-02 08:51
Unreliable AMD Phenom 9850 xilman Hardware 4 2014-08-02 18:08
[new fish check in] heloo mwxdbcr Lounge 0 2009-01-14 04:55
The Happy Fish thread xilman Hobbies 24 2006-08-22 11:44

All times are UTC. The time now is 15:25.


Fri Jul 7 15:25:25 UTC 2023 up 323 days, 12:53, 0 users, load averages: 1.32, 1.16, 1.11

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔