how to use libgcrypt library
Thu, 24 Jul 2003 21:58:30 -0700
Content-Type: text/plain; delsp=yes; charset=US-ASCII; format=flowed
I don't know what operating system you're using. And I don't know how
to solve your linking problem; perhaps it is solved by running "ldd
./sig_neil" and if it doesn't find libgcrypt, setting the
LD_LIBRARY_PATH environment variable to /usr/local/bin.
And what you copy in your message is the expected output of the dinky
test program -- the s-expression that includes the signature dumped to
the screen. It is not useful output, just enough to demonstrate that a
signature was constructed. You'll have to figure out how to use that
value, presumably using the gcry_mpi_* functions to extract it in a
convenient form, in whatever data you sign. Using the gcry_sexp_dump()
function to print all of them out helps to understand how data flows
through the program.
If you are a beginner with encryption, a few posts ago mentioned the
handbook of applied cryptography at (
http://www.cacr.math.uwaterloo.ca/hac/ ). Of course, gcrypt still lets
novices (including me) write insecure systems, so knowing what you're
doing and why is important.
On Thursday, Jul 24, 2003, at 21:04 US/Pacific, Zen wrote:
> Thanks for your help again. Your programe is very useful, and it can
> work well.
> I have a question when i want to use it out of libgcrypte library. I
> named it sig_neil.c temporarily. It can be compiled, my compile
> command : 'gcc sig_neil.c -g -O2 -Wall -o sig_neil -L/usr/local/lib
> -lgcrypt -lnsl ', but its runing message: 'error while loading shared
> libraries: libgcrypt.so.1: cannot open shared object file: No such
> file or directory.'
> In /usr/local/lib and ./ directory, there has libgcrypt.so.1 file
> ,which is a link file.
> Whether my compile command is incorrect? What it should be?
> By the way,in the inner of libgcrypte library, i modified original
> Makefile, then 'make',
> run './sig_neil',its runing result is correct, but its output has:
> not enough random bytes available (need 268 bytes)
> please do some other work to give the OS a chance to collect more
> What's it mean? Can i look it over?
> I am a beginner in the filed of encrpytion techniques, so i am very
> sorry for my questions may be very childish. I wish they will not
> waste your too much time.
> Thanks for your help.
> Best regards,
content-type: application/pgp-signature; x-mac-type=70674453;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
-----END PGP SIGNATURE-----