Article View: comp.security.unix
Article #152Does SSLeay's libcrypto have problems ?
From: Administrator
Date: Sun, 27 Sep 1998 00:00
Date: Sun, 27 Sep 1998 00:00
54 lines
3062 bytes
3062 bytes
I was having my first look at libcrypto that comes with SSleay on the linux platform. The RC2 and RC4 ciphers do not work, at least not as said in the documentation. For example the RC4 cipher does not work as directed. there are just two functions here RC4_set_key and RC4. Now the documentation does say that the key must be set everytime you do the encryption. But this does not work. I had to lok at the rc4.h file and replace the two int members in the RC4_KEY manually to zero. Then I started to read x bytes from a file and do: read x bytes from file into in RC4(key,x,in,out) do key reset and zero setting as mentioned above RC4(key,x,out,out1) I collected the results into the results into a file and compared it with the original file. This only worked with a files. It did not work when I tried it with some some zip and binary files (basically). Observe that the second time I use RC4 to decrypt I use x as the length not the length of out. When I tried using the length of "out" the second time instead of x the process never worked. This latter approach is what the documentation seems to suggest. There were instances where the length of "in" and "out" were not the same and infact with what I saw length(in) >= length(out). Now this is a stream cipher right ? How do I output the encrypted stream ? With the lengths used in the original encrypt ? The approach I tried failed completely when I stopped the immediate decryption and tried to save the encrypted data to a file and then decrypting it. And lastly assuming that I do find a solution how do you work with binary files ? Do uuencode or something ? RC2 can be used similarly in cbc64 mode as per the documentation. The documentation of these routines actually gives less information than the header files themselves. I would greatly appreciate it if someone replies and guides me. Thanx -tl201
Technical Details
Message-ID:
<360E147F.5BEED8A5@hotmail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,87edaa2edde0b9c3,start X-Google-Attributes: gid10952f,public X-Google-Thread: 101175,87edaa2edde0b9c3,start X-Google-Attributes: gid101175,public X-Google-Thread: 109d1b,87edaa2edde0b9c3,start X-Google-Attributes: gid109d1b,public X-Google-Thread: 1133d0,87edaa2edde0b9c3,start X-Google-Attributes: gid1133d0,public X-Google-Thread: faa64,87edaa2edde0b9c3,start X-Google-Attributes: gidfaa64,public X-Google-Thread: 10a997,87edaa2edde0b9c3,start X-Google-Attributes: gid10a997,public From: Administrator <tl201@hotmail.com> Subject: Does SSLeay's libcrypto have problems ? Date: 1998/09/27 Message-ID: <360E147F.5BEED8A5@hotmail.com> X-Deja-AN: 395350288 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@visi.com X-Trace: ptah.visi.com 906914128 209.98.12.66 (Sun, 27 Sep 1998 11:35:28 CDT) MIME-Version: 1.0 NNTP-Posting-Date: Sun, 27 Sep 1998 11:35:28 CDT Newsgroups: comp.security.unix,alt.os.linux,alt.uu.comp.os.linux.questions,comp.security.ssh,cern.security.unix,alt.security