openssl.exe is in c:\cygwin64\bin which is the value of sslp. Turns out I also had to change SSLE to explicitly include the .exe in the name (I was mildly surprised by that, since usually the extension can be ignored. I must never have tried that with the tasks api though.) Anyways, changing SSLE seems to have made it work.
Thanks, -- Raul On Tue, Jan 28, 2014 at 8:17 PM, Pascal Jasmin <godspiral2...@yahoo.ca> wrote: > Did you change the top line in the script to point to where openssl is > installed?: > > sslp =: 'D:\OpenSSL-Win64\bin' > I would guess that this works with linux, with the right path. fork and > spawn I assume work. > > its possible that I'm using too recent of an openssl version and using extra > features of eliptic curves (ec). I only included the ec generation because > it was done. As suggested, newkeys can be modified to not call nkec. I > modified listing to call just rsa. > > > ----- Original Message ----- > From: Raul Miller <rauldmil...@gmail.com> > To: Programming forum <programm...@jsoftware.com> > Cc: > Sent: Tuesday, January 28, 2014 7:52:02 PM > Subject: Re: [Jprogramming] An RSA encryption implementation > > Perhaps my issue is that I am using the cygwin64 openssl? Binary > interfaces are notoriously fussy. > > Thanks, > > -- > Raul > > > On Tue, Jan 28, 2014 at 7:45 PM, Raul Miller <rauldmil...@gmail.com> wrote: >> They do have the double quotes in place, both to the left of ',y and >> to the right of .pem >> >> And, as I displayed in my previous messages, my smoutput lines were blank. >> >> Thanks, >> >> -- >> Raul >> >> >> On Tue, Jan 28, 2014 at 5:17 PM, Pascal Jasmin <godspiral2...@yahoo.ca> >> wrote: >>> 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 > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm