[Jprogramming] An RSA encryption implementation
Pascal Jasmin
godspiral2000 at yahoo.ca
Tue Jan 28 15:20:58 UTC 2014
dfh is decimalfromhex. can either change the line to dfhx, or copy the dfhx definition, and change 16x to 16.
the following should work:
'd n'=: 'mruJfgd0RG' newandgetrsa 'C:\path that exists\ spaces ok\pascaljasmin'
in the calls to openssl, many files are created. There needs to be a full path because some further files are created outside of openssl calls. Calling with a: will put files in '~system' that are extremely unlikely to exist.
----- Original Message -----
From: Raul Miller <rauldmiller at gmail.com>
To: Programming forum <programming at jsoftware.com>
Cc:
Sent: Tuesday, January 28, 2014 9:47:54 AM
Subject: Re: [Jprogramming] An RSA encryption implementation
I added the line
require 'files task'
to the code from your listing.
The result fails under J6 and J7 (I have not tried J8 beta):
J6 fails like this:
'd n'=: 'mruJfgd0RG' newandgetrsa 'pascaljasmin.txt'
|value error: dfh
| pD pubrsa=.a.{~_2
dfh\,>}:^:(':'={:)each(#~0,@:-.@:=$&>),;:>('-----BEGIN PUBLIC
KEY-----'Boxlink'-----END PUBLIC KEY-----')(}.@:}:@:takerange{])l
J7 fails like this:
'd n'=: 'mruJfgd0RG' newandgetrsa 'pascaljasmin.txt'
|index error: nkec
| privh=.,>}:^:(':'={:)each(#~0,@:-.@:=$&>),;:>2 3 4 {l
I am also wondering about those blank lines I am seeing.
(And, yes, that is a random and arbitrary example password - one which
I have no intention of using.)
Thoughts?
Thanks,
--
Raul
On Tue, Jan 28, 2014 at 9:29 AM, Pascal Jasmin <godspiral2000 at yahoo.ca> wrote:
> fixed listing, as it was messing up on J32, and on fresh loads.
>
> J6 needs to load system/main/files and system/packages/mist/task
>
> Also J6 can in fact do signatures, or at least can with upto 768bit long keys. (earlier Problem was unrelated to j32. fixed in listing)
>
>
>
>
> ----- Original Message -----
> From: Raul Miller <rauldmiller at gmail.com>
> To: Programming forum <programming at jsoftware.com>
> Cc:
> Sent: Tuesday, January 28, 2014 9:02:54 AM
> Subject: Re: [Jprogramming] An RSA encryption implementation
>
> you are missing a require statement, if you expect this to work on
> older J versions (such as version 6).
>
> Still, so far at least, this looks nice.
>
> Thanks,
>
> --
> Raul
>
>
>
> On Tue, Jan 28, 2014 at 8:53 AM, Pascal Jasmin <godspiral2000 at yahoo.ca> wrote:
>> J has been able to encrypt/decrypt (verify/sign) rsa signatures for some time, with special code.
>>
>> http://www.jsoftware.com/jwiki/PascalJasmin/RSA%20native%20and%20openssl%20control
>>
>>
>>
>> includes code to generate and retrieve key parameters by spawning openssl commanline tools. The first line of script is the openssl path.
>>
>> on 32bit system, verify works, but RSAsign has a limit error at 960 bitlength.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list