[BUG] DSA failure in LargePositiveInteger in #new: <primitive: 71>

Bob Arning arning at charm.net
Tue May 30 20:31:09 UTC 2000


On Tue, 30 May 2000 20:47:09 +0200 Stephan Rudlof <sr at evolgo.de> wrote:
>It would be interesting to implement the DSA algorithm in plain ST by
>using - indirectly by arithmetic operations - the LargeIntegers module
>and *not* using the DSA module. Then to compare the speed of this
>implementation with - an older running - DSA module using
>implementation.

I took three of the existing routines that compared DSA math to Squeak math and converted them to run either one or the other. Here are the results

the dsa plugin results:
100,000  multiply took 11,751 ms
100,000  remainder took 14,296 ms
100,000  divide took 15,318 ms

the large integer plugin results:
100,000  multiply took 10,600 ms
100,000  remainder took 16,298 ms
100,000  divide took 20,248 ms

Note that each iteration of the loop above includes the creation of new random input numbers. With that moved outside the loop (and hoping that neither plugin is particularly sensitive to the exact data used) reveals:

dsa plugin
100,000  multiply took 1,656 ms
100,000  remainder took 3,546 ms
100,000  divide took 4,577 ms

integer plugin
100,000  multiply took 1,142 ms
100,000  remainder took 5,986 ms
100,000  divide took 9,565 ms

The integer plugin times are considerably longer since I included both c // d and c \\ d to parallel the fact that DSA returns both when doing a divide.

I have also modified the normal DSA methods to use standard Squeak arithmetic, but beyond the single test "DigitalSignatureAlgorithm example" which was successful, I'm not sure how else to validate the changes.

Cheers,
Bob





More information about the Squeak-dev mailing list