Mailing List Archive

Starting with libgrypt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm currently starting with libgrypt. I want to use the public key algorithms
(DSA 1024 bit). I looked into the docs (version 1.1.11), but did not find any
info about the public key functions.

Are there any examples on how to generate the keys and how to en-/decrypt
texts/files?

I would like to know:
How can I tell the lib which pk algorithm to use?
Is there no open function for the pk algorithms?
How does the GcrySexp struct work?

Best regards,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/EnJ57YyyfykA0YkRAssYAJ9XGGJABNkoRFGUPyu+J8JjlWE7UwCfXVNC
uiI1zypsCAaPGINC69W0RyU=
=y2ta
-----END PGP SIGNATURE-----
Re: Starting with libgrypt [ In reply to ]
Ralf Schneider <ralf@tapfere-schneiderleins.de> writes:

Hi,

> I'm currently starting with libgrypt. I want to use the public key
> algorithms (DSA 1024 bit). I looked into the docs (version 1.1.11),
> but did not find any info about the public key functions.

Oh, 1.1.11 is really ancient. The last release was 1.1.12 and the
next release, with several fundamental changes, will follow quite
soon. I suggest you have a look at the CVS version.

> Are there any examples on how to generate the keys and how to
> en-/decrypt texts/files?

Since you are talking about the generation of keys, I assume you are
referring to asymmetric cryptography. The CVS version contains two
files showing how to generate new key pairs: pubkey.c, which uses the
S-Expression based gcry_pk_* Interface and ac.c, which uses the new
gcry_ac_* interface, that might be much easier to use, since it is not
based on S-Expressions, that have to be constructed/extracted by the
user.

Both interfaces, and of course the gcry_cipher_* interface for
symmetric cryptography, are documented in the Texinfo manual.

> How can I tell the lib which pk algorithm to use?

When using the gcry_pk interface, the name of the algorithm to use is
embedded in S-Expressions; when using the gcry_ac interface, the name
is specified as a numeric constant when creating a new handle.

> Is there no open function for the pk algorithms?

For the gcry_pk interface, there is no open function, for the gcry_ac
interface there is one.

> How does the GcrySexp struct work?

This is also documented in the manual.

moritz
--
((gpg-key-id . "6F984199")
(email . "moritz@duesseldorf.ccc.de")
(webpage . "http://duesseldorf.ccc.de/~moritz/"))
RE: Starting with libgrypt [ In reply to ]
Ralf,

The documentation is greatly improved in 1.1.12. (I don't know why the
source page only has 1.1.11 on it - I got version 1.1.12 from this link
in the announce list:
http://lists.gnupg.org/pipermail/gnupg-announce/2003q1/000265.html

And there are some test programs that give a general idea of the process
in:
tests/ and src/benchmark.c

Essentially, the path goes: data -> MPI -> SEXP -> pk encryption
(still in SEXP)... The decryption process is basically the same in
reverse.

Certainly there are people on this list who can help you with specific
problems much better than I, but it would be worth your time to browse
through this list, as many common problems have been asked and resolved
already.

Good luck!

--
Tony Warren
Prairie Systems
garbaj@prairiesys.com

<}-:



-----Original Message-----
From: Ralf Schneider [mailto:ralf@tapfere-schneiderleins.de]
Sent: Monday, July 14, 2003 4:06 AM
To: gcrypt-devel@gnupg.org
Subject: Starting with libgrypt


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm currently starting with libgrypt. I want to use the public key
algorithms
(DSA 1024 bit). I looked into the docs (version 1.1.11), but did not
find any
info about the public key functions.

Are there any examples on how to generate the keys and how to
en-/decrypt
texts/files?

I would like to know:
How can I tell the lib which pk algorithm to use?
Is there no open function for the pk algorithms?
How does the GcrySexp struct work?

Best regards,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/EnJ57YyyfykA0YkRAssYAJ9XGGJABNkoRFGUPyu+J8JjlWE7UwCfXVNC
uiI1zypsCAaPGINC69W0RyU=
=y2ta
-----END PGP SIGNATURE-----


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel