[squeak-dev] Re:
[CryptographyTeam]Re:DigitalSignatureAlgorithm>>#initRandomNonInteractivelyisnotrandom
Rob Withers
reefedjib at gmail.com
Fri Sep 3 09:20:07 UTC 2010
--------------------------------------------------
From: "Nicolas Cellier" <nicolas.cellier.aka.nice at gmail.com>
Sent: Friday, September 03, 2010 1:43 AM
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] Re:
[CryptographyTeam]Re:DigitalSignatureAlgorithm>>#initRandomNonInteractivelyisnotrandom
> I recompiled http://bugs.squeak.org/view.php?id=7120, and also 7109 in
> COG along with recent changes of recoprocalModulo:, I get a decent
> speed up at least for in trunk DSA.
Nicolas, I am sorry to report that performance is way, way, WAY too slow
with your montgomery algorithm.
I run this code:
| secrets dh msg |
secrets := VatTPEncryptionSecrets new.
dh := DiffieHellman prime: secrets dhPrime generator: secrets dhGenerator.
[msg := dh sendMessage.
dh receiveMessage: msg] timeToRun.
where the generator is 2 and the prime is:
119737914775462509838170437650443916377511571523280127227899447719294084320704253537978070284126826302859486033998465467188646855777933154987304015680716743916472238051242730320539605643481248526686248310127334173449056014874439925491652836615915938029029782321539388697349613396698017627677439533107752978203.
With the version of raisedTo:modulo: with Crypto-Core, I get 312 ms.
With your montgomery algorithm, I get 26616 ms.
Profiling, my leafs are:
79.5% {21696ms} SmallInteger(Integer)>>digitMontgomeryTimes:modulo:mInvModB:
20.3% {5540ms} SmallInteger(Integer)>>>>
HTH,
Rob
More information about the Squeak-dev
mailing list
|