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

Stephan Rudlof sr at evolgo.de
Tue May 30 14:59:28 UTC 2000


JArchibald at aol.com wrote:
> 
> All--
> 
> In attempting to further pursue the strange behavior of primitive plug-ins
> (the possible failure to properly link to a plug-in module when morphic has
> never been used), I decided to run some tests with DSA. This facility uses a
> plug-in module and also does not require the use of morphic facilities, so it
> seemed to be a natural for such tests.
> 
> The simplest test of DSA behavior is just to attempt to generate the keys.
> Among other things, this routine will nicely display its progress on the
> Transcript. When evaluating an expression which does a send to
> DigitalSignatureAlgorithm>>generateKeySet, I was confronted with errors in
> Behavior>>new: which was accompanied by the following back-chain:
> 
> ----------------------------------------------------------------
>     Error: a primitive has failed
> 
> LargePositiveInteger class(Object)>>error:
> LargePositiveInteger class(Object)>>primitiveFailed
> LargePositiveInteger class(Behavior)>>new:

Could you please - by using the debugger - take a view into this method
and look for the argument of this >>new: here?

This method has nothing to do with the LargeIntegers module:

Behavior>>
new: anInteger 
	"Primitive. Answer an instance of the receiver (which is a class) with
the 
	number of indexable variables specified by the argument, anInteger.
Fail 
	if the class is not indexable or if the argument is not a positive
Integer. 
	Essential. See Object documentation whatIsAPrimitive."

	<primitive: 71>
	self isVariable ifFalse: [
		self error: self printString, ' cannot have variable sized
instances'].
	(anInteger isInteger and: [anInteger >= 0]) ifTrue: [
		"arg okay; space must be low"
		Smalltalk signalLowSpace.
		^ self basicNew: anInteger  "retry if user proceeds"
	].
	self primitiveFailed

For me it is interesting, *why* this method fails for you.

Stephan

> DigitalSignatureAlgorithm>>remainder:mod:
> DigitalSignatureAlgorithm>>isProbablyPrime:
> DigitalSignatureAlgorithm>>generateSandQ
> DigitalSignatureAlgorithm>>generateQandP
> DigitalSignatureAlgorithm>>generateKeySet
> DigitalSignatureAlgorithm class>>generateKeySet
> UndefinedObject>>DoIt
> ----------------------------------------------------------------
> 
> This test failed every time, although the algorithm clearly pursued different
> twists in the logic (resulting from the use of a random seed). As a result,
> the back-chain is sometimes different, i.e., longer. I got the same results
> in both MVC as well as Morphic projects. An identical error occurs on both
> Mac and Windows platforms. This was run on Squeak2.7 at cs#2210.
> 
> I did have a copy of Squeak2.7 at cs#2005 (i.e., prior to cs#2163) sitting
> around, so I ran the same test there. It _did_ complete successfully.
> 
> Is there a possibility that this has resulted from the new implementation of
> LargeIntegers? If not that, can anyone figure out what it is?
> 
> Cheers,
> Jerry.
> ____________________________
> 
> Jerry L. Archibald
> systemObjectivesIncorporated
> ____________________________
> 
> "Sometimes you feel like a nut,
>  sometimes you are." :-o (this is one of the most remarkable, the famous
> self-palindromic smiley.  :-o is of course OIC)

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list