newbie needs helps
steven_n_truong at yahoo.com
Fri Jun 11 23:59:19 CEST 2004
Hi, everybody. I am interested in developing some
multi-threaded apps that would use the AES in Linux
Fedora FC2 PC. However, I have not been able to use
AES alone just to encrypt some files for testing.
Here is what I do:
After setting the handle I would pick the cipher and
specified CBC mode and CBC_CTS for AES256 using
cipher_open. Then do a get_algo_keylen, and setkey (my
key is of 128/8 bits. Then I would setiv(handle, HDD,
NULL, 0) and then read from file and do encrypting. I
would ask if this is the right sequence because I
studies the tests/basic.c to do this. I think it is
right. However, since I also set CBC_CTS, but I got
error for the last block of the file that is less than
16 bytes and I have to pad it up with something to
have 16 byte block. What is wrong? Did I miss
something or misunderstand anything? For decryption,
I followed the same sequence, except I don't worry
about the last block size since ....
My other question is I plan to use Pthread, however,
after reading the mailing list about
>> > gnunetd: ath.c:181: _gcry_ath_mutex_lock:
Assertion `*lock ==
>> > ((ath_mutex_t) 0)' failed.
I saw that we have this file ath.c (thread-safeness
library). So what this file and the api? Only for
internal use right because no exported apis in the
gcrypt.info and etc...
I would like to see more examples of how to use
symmetric encryption/decryption as well as how to use
Pthread to work with libgcrypt-1.20. Could you please
give me some pointers to what sources with these
information so I can learn more?
Thank you very much.
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
More information about the Gcrypt-devel