[FIX][BUG] RSAEncryptionScheme>>decode:parameter: MsgNotUndrstd: SmallInteger>>asByteArraOfSize:

Rob Withers reefedjib at yahoo.com
Sun Apr 11 22:01:18 UTC 2004


Jack, this seems to fix it.

I am using DSA in SqueakElib, but only with partial certificates, if 
that helps you any.  There is x509 code floating about that needs 
integration into the Crypto package.

Rob


-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSA-fixes.2.cs
Type: application/text
Size: 3385 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040411/0cd9da79/RSA-fixes.2.bin
-------------- next part --------------



On Sunday, April 11, 2004, at 11:12 AM, Jack Keel wrote:

> Hi,
>
> I tried the example of using RSA in the Cryptography package in Squeak 
> 3.6 and get a MessageNotUnderstood SmallInteger>>asByteArrayOfSize:.  
> The asByteArrayOfSize: method is used in 
> RSAEncryptionScheme>>encode:parameter:length: , decode:parameter:  and 
> maskOfLength:fromString:
>
> I looked in a few older releases of Squeak but can not find 
> asByteArrayOfSize:    I also looked in RSA.cs (circa 1999) and 
> RSArevisited-lc.cs on Luciano Notarfrancesco's home site and they 
> don't use asByteArrayOfSize but they also don't seem to contain much 
> of the same code that is currently on SqueakMap.  Is anybody familiar 
> with the code for this method and in which Class it was actually 
> implemented?
>
> The unit test of RSA works but it only tests encoding a number not a 
> string.
>
> Thanks,
>
> Jack
>
> The example I used (as directly extracted from the comments):
>
> rsa _ RSAKeyPairGenerator new.
> rsa bits: 1024.
> pub _ rsa publicKey.
> priv _ rsa privateKey.
>
> rsaes _ RSAEncryptionScheme new.
> rsaes setPublicKey: pub privateKey: priv parameter: 'p'.
>
> c _ rsaes encrypt: 'hola'.
> rsaes decrypt: c.
>
> And an example of how the missing method is used:
> 	pHash _ (hash hashMessage: parameter) asByteArrayOfSize: hashLen.
>


More information about the Squeak-dev mailing list