6
6
===> Under construction <=======
11
Anonymous read-only CVS access is available:
13
cvs -z3 -d :pserver:anoncvs@cvs.gnupg.org:/cvs/gnupg login
15
use the password "anoncvs". To check out the the complete
18
cvs -z3 -d :pserver:anoncvs@cvs.gnupg.org:/cvs/gnupg \
19
checkout -R STABLE-BRANCH-1-0 gnupg
21
This service is provided to help you in hunting bugs and not to deliver
22
stable snapshots; it may happen that it even does not compile, so please
23
don't complain. CVS may put a high load on a server, so please don't poll
24
poll for new updates but wait for an announcement; to receive this you may
27
gnupg-commit-watchers@gnupg.org
29
by sending a mail with subject "subscribe" to
31
gnupg-commit-watchers-request@gnupg.org
34
You must run scripts/autogen.sh before doing the ./configure,
35
as this creates some needed while which are not in the CVS.
36
autogen.sh should checks that you have all required tools
42
The FTP archive is also available by anonymous rsync. A daily snapshot
43
of the CVS head revision is also available. See rsync(1) and try
44
"rsync ftp.gnupg.org::" to see available resources.
50
Documentation is based on the docbook DTD. Actually we have only the
51
man page for now. To build a man page you need the docbook-to-man
52
tool and all the other thinks needed for SGML processing. Debian
53
comes with the docbook tools and you only need this docbook-to-man
54
script which is comes with gtk-doc or download it from
55
ftp.openit.de:/pub/devel/sgml. If you don't have it everything
56
should still work fine but you will have only a dummy man page.
83
Use the option "--debug n" to output debug information. This option
84
can be used multiple times, all values are ORed; n maybe prefixed with
88
----- ----------------------------------------------
89
1 packet reading/writing
91
4 ciphers and primes (may reveal sensitive data)
92
8 iobuf filter functions
94
32 memory allocation stuff
96
128 show memory statistics at exit
97
256 trust verification stuff
105
./scripts Scripts needed by configure and others
107
./util General purpose utility function
108
./mpi Multi precision integer library
109
./cipher Cryptographic functions
110
./g10 GnuPG application
111
./tools Some helper and demo programs
112
./keybox The keybox library (under construction)
113
./gcrypt Stuff needed to build libgcrypt (under construction)
34
./agent Gpg-agent and related tools
37
./g10 Gpg program here called gpg2
38
./jnlib Utility functions
40
./scd Smartcard daemon
41
./scripts Scripts needed by configure and others
118
g10/g10.c Main module with option parsing and all the stuff you have
47
g10/gpg.c Main module with option parsing and all the stuff you have
119
48
to do on startup. Also has the exout handler and some
121
50
g10/sign.c Create signature and optionally encrypt
188
117
-----------------
189
118
Use only the functions:
196
If you want to store a passphrase or some other sensitive data you may
197
want to use m_alloc_secure() instead of m_alloc(), as this puts the data
198
into a memory region which is protected from swapping (on some platforms).
199
m_free() works for both. This functions will not return if there is not
200
enough memory available.
135
The *secure versions allocated memory in the secure memory. That is,
136
swapping out of this memory is avoided and is gets overwritten on
137
free. Use this for passphrases, session keys and other sensitive
138
material. This memory set aside for secure memory is linited to a few
139
k. In general the function don't print a memeory message and
140
terminate the process if there is not enough memory available. The
141
"try" versions of the functions return NULL instead.
234
174
easier to understand.
237
How to use the message digest functions
238
---------------------------------------
239
cipher/md.c implements an interface to hash (message digest functions).
241
a) If you have a common part of data and some variable parts
242
and you need to hash of the concatenated parts, you can use this:
244
md_write( md, common_part )
248
digest1 = md_read(md1)
252
digest2 = md_read(md2)
254
An example are key signatures; the key packet is the common part
255
and the user-id packets are the variable parts.
257
b) If you need a running digest you should use this:
259
md_write( md, part1 )
260
digest_of_part1 = md_digest( md );
261
md_write( md, part2 )
262
digest_of_part1_cat_part2 = md_digest( md );
265
Both methods may be combined. [Please see the source for the real syntax]
270
How to use the cipher functions
271
-------------------------------
272
cipher/cipher.c implements the interface to symmetric encryption functions.
273
As usual you have a function to open a cipher (which returns a handle to be used
274
with all other functions), some functions to set the key and other stuff and
275
a encrypt and decrypt function which does the real work. You probably know
276
how to work with files - so it should really be easy to work with these
277
functions. Here is an example:
281
hd = cipher_open( CIPHER_ALGO_TWOFISH, CIPHER_MODE_CFB, 0 );
283
oops( use other function to check for the real error );
284
rc = cipher_setkey( hd, key256bit, 32 ) )
286
oops( weak key or something like this );
287
cipher_setiv( hd, some_IV_or_NULL_for_all_zeroes );
288
cipher_encrypt( hd, plain, cipher, size );
293
How to use the public key functions
294
-----------------------------------
295
cipher/pubkey.c implements the interface to asymmetric encryption and
296
signature functions. This is basically the same as with the symmetric
297
counterparts, but due to their nature it is a little bit more complicated.