gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Crypto] Documentation


From: Casey Marshall
Subject: Re: [GNU Crypto] Documentation
Date: Fri, 23 May 2003 20:41:56 -0700
User-agent: Mutt/1.4i

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

On Fri, May 23, 2003 at 10:27:28PM +0100, baz wrote:
> Hi,
> 
> Can someone tell me if there exists some basic design documentation for
> gnu-crypto?
> 
> I've been looking at the gnu crypto project for a couple of days now and it
> seems to me that there is not much for a newcomer to go on.
> 
> Documentation is limited to the source code/javadoc and the references on
> the home page to the details of the algorithms, but nothing on the basics of
> going about using the library.
> 

See <http://metastatic.org/text/Documentation/gnu-crypto/manual.html>,
or <http://metastatic.org/text/Documentation/gnu-crypto/manual.pdf>.

This documentation is not complete, and really isn't official yet, but
may still give some insight even as a rough draft. I haven't had time to
work on it lately, but may try to get working on it again soon.

The basic usage of GNU Crypto objects is typically:

   1. Create an object with a factory method.
   2. Initialize the object with an attributes Map.
   3. Use the object.
   4. Reset the object and go to step 2.

Also note that many algorithms are low-level, e.g. with block ciphers it
is up to you to break the input data into block-sized chunks before you
feed them to the {en,de}cryptBlock methods.

> I have some experience of using the sun JCE and so have gone about trying to
> use this library in the same way. (Incidentally I always seem to get
> 'NoSuchAlgorithmException's when trying to create gnu-crypto keys or
> ciphers, despite installing the gnu provider.)
> 

You cannot use the GNU Crypto JCE classes with Sun's 1.4 JRE -- and I
think the same goes for IBM's and others -- since their JCE requires
that all JCE provider JARs be signed with their private key. If the JAR
is not signed (as is the case with GNU Crypto) then the getInstance
methods will throw exceptions when trying to get implementations from
that provider. I think this also goes for the "exportable" JCE that they
distribute.

The work around here is to either (1) replace Sun's jce.jar with the one
included in GNU Crypto, or (2) use GNU Crypto's own API.

Hope this helps.

- -- 
Casey Marshall || address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+zumkgAuWMgRGsWsRAuZIAJ4gg2wGkjlH/BOf6WUvdizQwfKq3wCfWLfo
6rZsQxjoUBtusSOMsiiJHac=
=48zU
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]