[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about implementation
On Wed, 15 Aug 2001, lam wai wm wrote:
> Hi all,
>
> I'm the student who want to encrypt, decrypt some data in
> kernel mode. I've stuck for serveral days, but I still cannot
> figure it out why I can't really encrypt the data. Could you
> please point out what's problem that I've made.
well, you messed up pointers :-)
> static int init_cipher()
> {
> char plain_text[11] = "readline26\n";
[..]
> __u32 input1 = 0;
[..]
> input1 = (__u32)plain_text;
[..]
> dump_u32_buffer(&input1, sizeof(input1));
> ci->encrypt(cx, (u8 *)&input1, (u8 *) &output1, sizeof(&input1));
...see what I mean?
--
Herbert Valerio Riedel / Phone: (EUROPE) +43-1-58801-18840
Email: hvr@hvrlab.org / Finger hvr@gnu.org for GnuPG Public Key
GnuPG Key Fingerprint: 7BB9 2D6C D485 CE64 4748 5F65 4981 E064 883F 4142
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/