also, I should mention that nkec is not needed at all for rsa, and the call in newkeys (last line in proc above it) can be changed to:
p nkrsa y ----- Original Message ----- From: Pascal Jasmin <godspiral2...@yahoo.ca> To: "programm...@jsoftware.com" <programm...@jsoftware.com> Cc: Sent: Tuesday, January 28, 2014 5:17:39 PM Subject: Re: [Jprogramming] An RSA encryption implementation in nkec, check that the following 3 lines have the (") in place. In my first reply, I mentioned that I fixed up the listing, and that is one of the things I remember changing. _1 fork SSLE , ' ecparam -out "', y ,'par.pem" -name secp256k1 -conv_form compressed -genkey' NB. delete unencrypted later _1 fork SSLE , ' ec -in "', y ,'par.pem" -bf-cbc -passout pass:',p,' -out "', y,'ec.pem"' _1 fork SSLE , ' ec -in "', y,'ec.pem" -passin pass:',p,' -pubout -out "',y,'ecpub.pem"' also, if you get that error, you would have seen smoutput/pD on screen from previous line. A boxed list that is the result of spawn, and should contain the key data, but if openssl has any error, it will contain those errors (.cfg file not found can be ignored_ ----- Original Message ----- From: Raul Miller <rauldmil...@gmail.com> To: Programming forum <programm...@jsoftware.com> Cc: Sent: Tuesday, January 28, 2014 5:01:39 PM Subject: Re: [Jprogramming] An RSA encryption implementation I changed my initial require statement to be: require 'convert files task' and, I made sure the path was absolute, and it still fails for me. Here's J6: 'd n'=: 'mruJfgd0RG' newandgetrsa jpath '~temp\pascaljamin' |index error: nkec | privh=.,>}:^:(':'={:)each(#~0,@:-.@:=$&>),;:>2 3 4 {l That's the same error I was getting from J7 with a relative path. Thoughts? Thanks, -- Raul On Tue, Jan 28, 2014 at 10:20 AM, Pascal Jasmin <godspiral2...@yahoo.ca> wrote: > 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 <rauldmil...@gmail.com> > To: Programming forum <programm...@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 <godspiral2...@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 <rauldmil...@gmail.com> >> To: Programming forum <programm...@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 <godspiral2...@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 > > ---------------------------------------------------------------------- > 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