Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by gus_massa on Sunday August 11, 2019 @10:42AM
(#20668375)
They are using the "rule of nines" (i.e. the sum of the digits, perhaps iterated). It is very handy when you have the decimal representation of the number to operate on paper, but it's not as handy when you have the numbers in the computer. I "translated" that to "modulo 9" because it is equivalent and is easier to understand for not native English speakers. [Hi from Argentina!]
Also, they are using the last digit of the number, that I translated to "modulo 10".
Another reason for the translation is that the mathematical structure is more clear in "modulo 10, modulo 9 and modulo 24" than in the version "last digit, nines rule and modulo 24".
In a computer is much more efficient to use modulo that transforming the number to a string and then operating with the digits, so I hope they have an efficient implementation but it is not clear from the pdf.
Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by qtplatypus on Sunday August 11, 2019 @07:16PM
(#20671159)
It looks like a pen and paper algorithm adapted to computing. Though even then it sucks. Mod 2, mod 5, mod 3 would eliminate more non primes and require less steps in pen and paper.
Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by YeGoblynQueenne on Sunday August 11, 2019 @08:39AM
(#20667904)
Try typing two asterisks with a space in between: *
Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by thaumasiotes on Sunday August 11, 2019 @09:26AM
(#20668076)
> Checking for 9 might be easier in decimal
It isn't. The test is the same in both cases.
Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by rurban on Sunday August 11, 2019 @09:50AM
(#20668162)
It is. The sum of decimals is much faster than the modulo.
Re:Black Hat Talk About ‘Time AI’ Causes Uproar, Is Deleted ...
by thaumasiotes on Sunday August 11, 2019 @06:17PM
(#20670900)
Huh? You need modulus either way. n is zero (mod 3) iff its digit sum is zero (mod 3), and it's zero (mod 9) iff its digit sum is zero (mod 9).
> First check the remainder modulo 10, modulo 9 and modulo 24.
This makes zero sense already. First, 9=3 x 3, so checking for 3 is sufficient. (Checking for 9 might be easier in decimal, but why the hell would you do cryptography in decimal?) Then there’s the 24=2 x 2 x 2 x 3. Again, why not just use 6, but even worse, there’s no new factor here that’s not already covered by 10 and 9.
(And as you mentioned, even if this works, much better primality Tests are readily available.)
(Off-topic: Is there a good way to indicate multiplication on HN? I can’t figure out how to escape asterisks, and Unicode symbols seem to be simply filtered out, which is a bit crazy in 2019.)