I just committed a fix to CryptographyRandom, and while working on it noticed another problem which I don't know how to fix.
(PrimesFinder candidate: 11) nextPrime "2003"
Obviously, it should be 13. The issue appears to be with PrimesWheel>>#+=, original code since 2002, but I can't quite follow what or why the method is trying to accomplish. "residues"?
- Chris
Hey Chris,
Thanks much for your investigations. I took a look and it is an issue with PrimesWheel>>#+= where the satisfied variable is counter-logic.
I defaulted to false, set to true when a Zero is found in the residue (such that the pertinent prime candidate residue is added with the provided term (+ 2) modulo the prime candidate is ZERO).
I merged with your CryptographyRandom change to SecureRandom.
*••• **Config Maps **•••*
I updated the following config maps:
* /*ProCrypto.release.2*/ * /*ProCrypto.release.3*/ * /*ESqueak.release.1*/
*••• Packages****•••*
*••• **CryptographyRandom **•••*
Name: CryptographyRandom-rabbt.24
Author: rabbt Time: 4 January 2023, 10:06:57.026992 pm UUID: c9bd4f75-e822-4b25-96e3-7ff0f0734067 Ancestors: CryptographyRandom-rabbt.23
extended to #*=
Name: CryptographyRandom-rabbt.23 Author: rabbt
Fixed PrimesWheel to satify isZero for the residue and allowed for growth of the wheel when the primes exceeds the current primes array.
*••• **CryptographyRandomTests **•••*
Name: CryptographyRandomTests-rabbt.2
Author: rabbt Time: 4 January 2023, 10:03:17.773586 pm UUID: 1f0afa87-8c19-4ba2-9653-e982886dc8b4 Ancestors: CryptographyRandomTests-rww.1
Added CryptoPrimesTest, testing PrimesFinder, next after 11 is 13 and Wheel growth and exceeding the base 2000.
Fixed PrimesWheel to satify isZero for the residue and allowed for growth of the wheel when the primes exceeds the current primes array.
On 1/3/23 20:04, Chris Muller wrote:
I just committed a fix to CryptographyRandom, and while working on it noticed another problem which I don't know how to fix.
(PrimesFinder candidate: 11) nextPrime "2003"
Obviously, it should be 13. The issue appears to be with PrimesWheel>>#+=, original code since 2002, but I can't quite follow what or why the method is trying to accomplish. "residues"?
- Chris
Cryptography mailing list Cryptography@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
cryptography@lists.squeakfoundation.org