Debian Codegraph @

cipher/ChangeLog-2011

raw
1 2011-12-01 Werner Koch <[email protected]>
2
3 NB: ChangeLog files are no longer manually maintained. Starting
4 on December 1st, 2011 we put change information only in the GIT
5 commit log, and generate a top-level ChangeLog file from logs at
6 "make dist". See doc/HACKING for details.
7
8 2011-09-16 Werner Koch <[email protected]>
9
10 * primegen.c (_gcry_primegen_init): New.
11
12 2011-09-15 Werner Koch <[email protected]>
13
14 * cipher-cbc.c, cipher-cfb.c, cipher-ofb.c, cipher-ctr.c: New.
15 * cipher-aeswrap.c: New.
16 * cipher-internal.h: New.
17 * cipher.c (cipher_context_alignment_t, struct gcry_cipher_handle)
18 (CTX_MAGIC_NORMAL, CTX_MAGIC_SECURE, NEED_16BYTE_ALIGNED_CONTEXT)
19 (MAX_BLOCKSIZE): Move to cipher-internal.h.
20 (do_aeswrap_encrypt, do_aeswrap_encrypt)
21 (do_cbc_encrypt, do_cbc_decrypt, do_ctr_encrypt, do_ctr_decrypt)
22 (do_ofb_encrypt, do_ofb_decrypt, do_ctr_encrypt): Move to the
23 respective new cipher-foo.c files.
24 (do_ctr_decrypt): Remove.
25
26 2011-09-15 Werner Koch <[email protected]>
27
28 * pubkey.c (gcry_pk_list): Remove.
29 (gcry_pk_unregister): Remove.
30 * md.c (gcry_md_list): Remove.
31 (gcry_md_unregister): Remove.
32 * cipher.c (gcry_cipher_list): Remove.
33 (gcry_cipher_unregister): Remove.
34 * ac.c: Remove.
35
36 2011-06-29 Werner Koch <[email protected]>
37
38 * cipher.c (cipher_get_keylen): Return zero for an invalid algorithm.
39 (cipher_get_blocksize): Ditto.
40
41 2011-06-13 Werner Koch <[email protected]>
42
43 * dsa.c (selftest_sign_1024): Use the raw and not the pkcs1 flag.
44
45 * pubkey.c (gcry_pk_sign): Special case output generation for PKCS1.
46 (sexp_data_to_mpi): Parse "random-override" for pkcs1 encryption.
47 (pkcs1_encode_for_encryption): Add args RANDOM_OVERRIDE and
48 RANDOM_OVERRIDE_LEN.
49 (gcry_pk_encrypt): Special case output generation for PKCS1.
50 (sexp_data_to_mpi): Use GCRYMPI_FMT_USG for raw encoding.
51
52 2011-06-10 Werner Koch <[email protected]>
53
54 * pubkey.c (gcry_pk_sign): Use format specifier '%M' to avoid
55 leading zeroes. Special case output generation for PSS.
56 (gcry_pk_encrypt): Special case output generation for OAEP.
57 (sexp_data_to_mpi): Use GCRYMPI_FMT_USG for PSS verify.
58
59 2011-06-09 Werner Koch <[email protected]>
60
61 * pubkey.c (oaep_decode): Make use of octet_string_from_mpi.
62 (sexp_to_enc): Skip "random-override".
63
64 * pubkey.c (oaep_encode, pss_encode): Add args RANDOM_OVERRIDE and
65 RANDOM_OVERRIDE_LEN.
66 (sexp_data_to_mpi): Extract new random-override parameter.
67
68 * pubkey.c (pss_encode, pss_verify): Use VALUE verbatim for MHASH.
69 (octet_string_from_mpi): Add arg SPACE.
70
71 2011-06-08 Werner Koch <[email protected]>
72
73 * pubkey.c (pss_encode, pss_verify): Restructure and comment code
74 to match rfc-3447. Replace secure allocs by plain allocs and
75 wipememory. Use gcry_md_hash_buffer.
76 (octet_string_from_mpi): New.
77
78 2011-06-03 Werner Koch <[email protected]>
79
80 * pubkey.c (oaep_decode): Add more comments and restructure to
81 match the description in RFC-3447.
82 (oaep_encode): Check for mgf1 error. s/dlen/hlen/.
83
84 2011-05-31 Werner Koch <[email protected]>
85
86 * pubkey.c (mgf1): Optimize by using gcry_md_reset. Re-implement
87 for easier readability.
88 (oaep_encode): Add more comments and restructure to match the
89 description in RFC-3447.
90
91 * pubkey.c (pkcs1_encode_for_signature, oaep_decode): Change
92 return value from one MPI to a buffer.
93 (gcry_pk_decrypt): Adjust for this change.
94
95 2011-05-30 Werner Koch <[email protected]>
96
97 * pubkey.c (pkcs1_decode_for_encryption): Change handling of
98 leading zero byte.
99
100 2011-05-27 Daiki Ueno <[email protected]>
101
102 * pubkey.c (gcry_pk_decrypt): Fix double-free when un-padding
103 invalid data. Thanks to Tom Ritter.
104
105 2011-05-24 Daiki Ueno <[email protected]>
106
107 * rsa.c (rsa_verify): Use CMP if given, to check the decrypted
108 sig.
109
110 * pubkey.c (sexp_to_enc, sexp_data_to_mpi): Factor out
111 CTX initialization to ...
112 (init_encoding_ctx): .. new.
113 (gcry_pk_verify): Pass verify func and the arg to pubkey_verify.
114 (pss_encode, pss_verify, pss_verify_cmp): New.
115
116 2011-05-23 Daiki Ueno <[email protected]>
117
118 * pubkey.c (pkcs1_decode_for_encryption, oaep_decode): Fix memleak
119 when gcry_mpi_print fails.
120
121 2011-05-18 Daiki Ueno <[email protected]>
122
123 * pubkey.c (sexp_data_to_mpi): Factor some code out to ...
124 (pkcs1_encode_for_encryption): .. new,
125 (pkcs1_encode_for_signature): .. new.
126 (pkcs1_decode_for_encryption): New.
127 (gcry_pk_decrypt): Do un-padding for PKCS#1 as well as OAEP.
128 (sexp_to_enc): Abolish "unpad" flag, which is not necessary since
129 we can do un-padding implicitly when "pkcs1" or "oaep" is given.
130
131 2011-05-11 Werner Koch <[email protected]>
132
133 * pubkey.c (sexp_to_enc, sexp_data_to_mpi): Set LABEL to NULL
134 after free.
135 (sexp_to_enc, sexp_data_to_mpi): Do not allow multiple encoding
136 flags.
137 (oaep_encode, oaep_decode, sexp_to_key, sexp_to_sig)
138 (sexp_to_enc, sexp_data_to_mpi, gcry_pk_encrypt, gcry_pk_sign)
139 (gcry_pk_genkey, _gcry_pk_get_elements): Replace access to ERRNO
140 by gpg_err_code_from_syserror.
141
142 2011-05-11 Daiki Ueno <[email protected]>
143
144 * pubkey.c (sexp_data_to_mpi): Factor some code out to ...
145 (get_hash_algo): .. new.
146 (mgf1, oaep_encode, oaep_decode): New.
147 (sexp_to_enc): Add arg CTX. Remove arg RET_WANT_PKCS1. Support
148 OAEP.
149 (sexp_data_to_mpi): Add arg CTX. Support OAEP.
150 (gcry_pk_encrypt): Pass a CTX to sexp_data_to_mpi.
151 (gcry_pk_decrypt): Pass a CTX tp sexp_to_enc and replace
152 WANT_PKCS1. Implement unpadding for OAEP.
153 (gcry_pk_sign): Pass NULL for CTX arg of sexp_data_to_mpi.
154 (gcry_pk_verify): Ditto.
155
156 2011-04-19 Werner Koch <[email protected]>
157
158 * cipher.c (gcry_cipher_open): Replace gpg_err_code_from_errno by
159 gpg_err_code_from_syserror.
160
161 2011-04-11 Werner Koch <[email protected]>
162
163 * pubkey.c (gcry_pk_get_keygrip): Avoid double free of L2.
164
165 * cipher.c (_gcry_cipher_setctr): Clear unused lastiv info.
166 (gcry_cipher_ctl) <GCRYCTL_SET_CTR>: Implement by calling
167 _gcry_cipher_setctr.
168 (do_ctr_encrypt): Save last counter and reuse it.
169
170 * cipher.c (do_ctr_encrypt): Allow arbitrary length inputs to
171 match the 1.4 behaviour.
172
173 2011-04-04 Werner Koch <[email protected]>
174
175 * ecc.c (compute_keygrip): Release L1 while parsing "curve".
176
177 * pubkey.c (gcry_pk_get_keygrip): Always release NAME and L2.
178 Reported by Ben Kibbey.
179
180 2011-03-28 Werner Koch <[email protected]>
181
182 * primegen.c (_gcry_generate_elg_prime): Make sure that PRIME is
183 NULL if the called func ever returns an error.
184
185 * pubkey.c (gcry_pk_decrypt): Remove unused var PUBKEY.
186
187 2011-03-09 Werner Koch <[email protected]>
188
189 * kdf.c: New.
190
191 2011-02-22 Werner Koch <[email protected]>
192
193 * rijndael.c (aesni_cleanup_2_4): New.
194 (aesenc_xmm1_xmm0, do_aesni_ctr_4): New.
195 (_gcry_aes_ctr_enc): New.
196 * cipher.c (struct gcry_cipher_handle): Add CTR_ENC. Move field
197 CTR into an u_ctr union and adjust all users.
198 (gcry_cipher_open): Use _gcry_aes_ctr_enc.
199 (do_ctr_encrypt): Use bulk mode.
200
201 2011-02-18 Werner Koch <[email protected]>
202
203 * rijndael.c (u32_a_t): New.
204 (do_encrypt_aligned, do_encrypt_aligned): Use the new type to
205 avoid problems with strict aliasing rules.
206
207 2011-02-16 Werner Koch <[email protected]>
208
209 * rijndael.c (do_aesni_cfb) [USE_AESNI]: New.
210 (_gcry_aes_cfb_enc, _gcry_aes_cfb_dec) [USE_AESNI]: Use new fucntion.
211
212 2011-02-15 Werner Koch <[email protected]>
213
214 * rijndael.c (do_aesni_enc_aligned, do_aesni_dec_aligned): Use
215 movdqa for the key but keep using movdqu for the data.
216 (do_aesni): Remove alignment detection. Don't burn the stack.
217 (aesni_prepare, aesni_cleanup): New macros.
218 (rijndael_encrypt, _gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
219 (rijndael_decrypt, _gcry_aes_cfb_dec, _gcry_aes_cbc_dec): Use
220 these macros. Don't burn the stack in the USE_AESNI case.
221 (do_setkey): Add disabled code to use aeskeygenassist.
222
223 2011-02-14 Werner Koch <[email protected]>
224
225 * rijndael.c (ATTR_ALIGNED_16): New
226 (do_aesni): Do not copy if already aligned.
227 (do_encrypt, do_decrypt): Ditto.
228 (rijndael_decrypt, rijndael_encrypt): Increase stack burning amount.
229
230 * rijndael.c (RIJNDAEL_context): Reorder fields. Change fieldname
231 ROUNDS to rounds. Move padlock_key into u1.
232 (keySched, keySched2): Rename macros to keyscherr and keyschdec
233 and change all users.
234 (padlockkey): New macro. Change all users of padlock_key.
235 * cipher.c (NEED_16BYTE_ALIGNED_CONTEXT): Always define if using gcc.
236 (struct gcry_cipher_handle): Align U_IV to at least 16 byte.
237
238 2011-02-13 Werner Koch <[email protected]>
239
240 * rijndael.c (USE_AESNI): New. Define for ia32 and gcc >= 4.
241 (m128i_t) [USE_AESNI]: New.
242 (RIJNDAEL_context) [USE_AESNI]: Add field use_aesni.
243 (do_setkey): Set USE_AESNI for all key lengths.
244 (prepare_decryption) [USE_AESNI]: Use aesimc instn if requested.
245 (do_aesni_enc_aligned, do_aesni_dec_aligned)
246 (do_aesni) [USE_AESNI]: New.
247 (rijndael_encrypt, _gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
248 (rijndael_decrypt, _gcry_aes_cfb_dec)
249 (_gcry_aes_cbc_dec) [USE_AESNI]: Use do_aesni.
250
251 2011-02-01 Werner Koch <[email protected]>
252
253 * pubkey.c (gcry_pk_get_curve): New.
254 (sexp_to_key): Add arg OVERRIDE_ELEMS.
255 (sexp_elements_extract_ecc): Allow for params only.
256 (gcry_pk_get_param): New.
257 * ecc.c (ecc_get_curve): New.
258 (ecc_get_param_sexp): New.
259
260 2011-01-28 Werner Koch <[email protected]>
261
262 * pubkey.c (gcry_pk_genkey): Hack to insert the used curve name.
263
264 2011-01-27 Werner Koch <[email protected]>
265
266 * ecc.c (fill_in_curve): Remove.
267 (generate_curve): Rename to ..
268 (fill_in_curve): this. Remove setting of NAME_OID.
269 (ecc_encrypt_raw): Change name of arg DATA to K for better
270 readability. Use ECC_public_key instead of ECC_secret_key.
271 Require a caller to pass a complete pkey array.
272 (ecc_decrypt_raw): Require a caller to pass a complete skey array.
273 (elliptic_curve_t): Add field NAME.
274 (fill_in_curve): Set field.
275 (generate_key): Add arg R_USED_CURVE.
276 (ecc_generate_ext): Return used curve name.
277
278 2011-01-13 Andrey Jivsov <[email protected]> (wk)
279
280 * ecc.c (ec2os): Do not free passed parameters X and Y. Adjust
281 callers.
282 (ecc_encrypt_raw, ecc_decrypt_raw): New.
283 (ecdh_names, _gcry_pubkey_spec_ecdh): New.
284 * pubkey.c (pubkey_table): Support ECDH.
285
286 2010-08-19 Werner Koch <[email protected]>
287
288 * cipher.c (gcry_cipher_open): Remove double release of the module.
289 Fixes bug#1263.
290
291 2010-06-10 Jeff Johnson <[email protected]> (wk)
292
293 * ecc.c (ecc_generate_ext): Parse transient-key flag.
294 (generate_key): Add arg TRANSIENT_KEY and use it to set the random
295 level.
296
297 2010-04-12 Brad Hards <[email protected]> (wk)
298
299 Spelling fixes.
300
301 2010-03-26 Werner Koch <[email protected]>
302
303 * tiger.c (asn): Unfetter the old TIGER from an OID.
304 (TIGER_CONTEXT): Add field VARIANT.
305 (tiger_init): Factor code out to ...
306 (do_init): New.
307 (tiger1_init, tiger2_init): New.
308 (_gcry_digest_spec_tiger1, _gcry_digest_spec_tiger2): New.
309 * md.c (digest_table): Add TIGER1 and TIGER2 variants.
310
311 2009-12-11 Werner Koch <[email protected]>
312
313 * sha256.c (Cho, Maj, Sum0, Sum1): Turn macros into inline
314 functions.
315 (transform): Partly unroll to interweave the chain variables
316
317 * sha512.c (ROTR, Ch, Maj, Sum0, Sum1): Turn macros into inline
318 functions.
319 (transform): Partly unroll to interweave the chain variables.
320 Suggested by Christian Grothoff.
321
322 2009-12-10 Werner Koch <[email protected]>
323
324 * Makefile.am (o_flag_munging): New.
325 (tiger.o, tiger.lo): Use it.
326
327 * cipher.c (do_ctr_encrypt): Add arg OUTBUFLEN. Check for
328 suitable value. Add check for valid inputlen. Wipe temporary
329 memory.
330 (do_ctr_decrypt): Likewise.
331 (do_cbc_encrypt, do_cbc_decrypt): Add arg OUTBUFLEN. Check for
332 suitable value. Move check for valid inputlen to here; change
333 returned error from INV_ARG to INV_LENGTH.
334 (do_ecb_encrypt, do_ecb_decrypt): Ditto.
335 (do_cfb_encrypt, do_cfb_decrypt): Ditto.
336 (do_ofb_encrypt, do_ofb_decrypt): Ditto.
337 (cipher_encrypt, cipher_encrypt): Adjust for above changes.
338 (gcry_cipher_encrypt, gcry_cipher_decrypt): Simplify.
339
340 2009-12-09 Werner Koch <[email protected]>
341
342 * cipher.c (gcry_cipher_open): Allow for GCRY_CIPHER_MODE_AESWRAP.
343 (cipher_encrypt, cipher_decrypt): Ditto.
344 (do_aeswrap_encrypt, do_aeswrap_decrypt): New.
345 (struct gcry_cipher_handle): Add field marks.
346 (cipher_setkey, cipher_setiv): Update marks flags.
347 (cipher_reset): Reset marks.
348 (cipher_encrypt, cipher_decrypt): Add new arg OUTBUFLEN.
349 (gcry_cipher_encrypt, gcry_cipher_decrypt): Pass outbuflen to
350 cipher_encrypt. Replace GPG_ERR_TOO_SHORT by
351 GPG_ERR_BUFFER_TOO_SHORT.
352
353 2009-08-21 Werner Koch <[email protected]>
354
355 * dsa.c (dsa_generate_ext): Release retfactors array before
356 setting it to NULL. Reported by Daiko Ueno.
357
358 2009-07-02 Werner Koch <[email protected]>
359
360 * md.c (md_read): Fix incomplete check for NULL.
361 Reported by Fabian Kail.
362
363 2009-03-31 Werner Koch <[email protected]>
364
365 * rsa.c (rsa_check_secret_key): Return GPG_ERR_BAD_SECKEY and not
366 GPG_ERR_PUBKEY_ALGO.
367
368 2009-02-16 Werner Koch <[email protected]>
369
370 * rsa.c (generate_x931): Do not initialize TBL with automatic
371 variables.
372 * whirlpool.c, tiger.c, sha256.c, sha1.c, rmd160.c, md5.c
373 * md4.c, crc.c: Remove memory.h. This is garbage from gnupg.
374 Reported by Dan Fandrich.
375
376 2009-01-22 Werner Koch <[email protected]>
377
378 * ecc.c (compute_keygrip): Remove superfluous const.
379
380 2009-01-06 Werner Koch <[email protected]>
381
382 * rmd160.c (oid_spec_rmd160): Add TeleTrust identifier.
383
384 2008-12-10 Werner Koch <[email protected]>
385
386 * dsa.c (generate): Add arg DOMAIN and use it if specified.
387 (generate_fips186): Ditto.
388 (dsa_generate_ext): Parse and check the optional "domain"
389 parameter and pass them to the generate functions.
390
391 * rijndael.c (rijndael_names): Add "AES128" and "AES-128".
392 (rijndael192_names): Add "AES-192".
393 (rijndael256_names): Add "AES-256".
394
395 2008-12-05 Werner Koch <[email protected]>
396
397 * dsa.c (generate): Add arg TRANSIENT_KEY and use it to detrmine
398 the RNG quality needed.
399 (dsa_generate_ext): Parse the transient-key flag und pass it to
400 generate.
401
402 2008-11-28 Werner Koch <[email protected]>
403
404 * dsa.c (generate_fips186): Add arg DERIVEPARMS and use the seed
405 value if available.
406
407 * primegen.c (_gcry_generate_fips186_2_prime): Fix inner p loop.
408
409 2008-11-26 Werner Koch <[email protected]>
410
411 * primegen.c (_gcry_generate_fips186_3_prime): New.
412 * dsa.c (generate_fips186): Add arg USE_FIPS186_2.
413 (dsa_generate_ext): Parse new flag use-fips183-2.
414
415 2008-11-25 Werner Koch <[email protected]>
416
417 * dsa.c (generate_fips186): New.
418 (dsa_generate_ext): Use new function if derive-parms are given or
419 if in FIPS mode.
420 * primegen.c (_gcry_generate_fips186_2_prime): New.
421
422 2008-11-24 Werner Koch <[email protected]>
423
424 * pubkey.c (gcry_pk_genkey): Insert code to output extrainfo.
425 (pubkey_generate): Add arg R_EXTRAINFO and pass it to the extended
426 key generation function.
427 * rsa.c (gen_x931_parm_xp, gen_x931_parm_xi): New.
428 (generate_x931): Generate params if not given.
429 (rsa_generate_ext): Parse use-x931 flag. Return p-q-swapped
430 indicator.
431 * dsa.c (dsa_generate_ext): Put RETFACTORS into R_EXTRAINFO if
432 possible.
433
434 * pubkey.c (gcry_pk_genkey): Remove parsing of almost all
435 parameters and pass the parameter S-expression to pubkey_generate.
436 (pubkey_generate): Simplify by requitring modules to parse the
437 parameters. Remove the special cases for Elgamal and ECC.
438 (sexp_elements_extract_ecc): Add arg EXTRASPEC and use it. Fix
439 small memory leak.
440 (sexp_to_key): Pass EXTRASPEC to sexp_elements_extract_ecc.
441 (pubkey_table) [USE_ELGAMAL]: Add real extraspec.
442 * rsa.c (rsa_generate_ext): Adjust for new calling convention.
443 * dsa.c (dsa_generate_ext): Ditto.
444 * elgamal.c (_gcry_elg_generate): Ditto. Rename to elg_generate_ext.
445 (elg_generate): New.
446 (_gcry_elg_generate_using_x): Remove after merging code with
447 elg_generate_ext.
448 (_gcry_pubkey_extraspec_elg): New.
449 (_gcry_elg_check_secret_key, _gcry_elg_encrypt, _gcry_elg_sign)
450 (_gcry_elg_verify, _gcry_elg_get_nbits): Make static and remove
451 _gcry_ prefix.
452 * ecc.c (_gcry_ecc_generate): Rename to ecc_generate_ext and
453 adjust for new calling convention.
454 (_gcry_ecc_get_param): Rename to ecc_get_param and make static.
455 (_gcry_pubkey_extraspec_ecdsa): Add ecc_generate_ext and
456 ecc_get_param.
457
458 2008-11-20 Werner Koch <[email protected]>
459
460 * pubkey.c (pubkey_generate): Add arg DERIVEPARMS.
461 (gcry_pk_genkey): Parse derive-parms and pass it to above.
462 * rsa.c (generate_x931): New.
463 (rsa_generate_ext): Add arg DERIVEPARMS and call new function in
464 fips mode or if DERIVEPARMS is given.
465 * primegen.c (_gcry_derive_x931_prime, find_x931_prime): New.
466
467 2008-11-19 Werner Koch <[email protected]>
468
469 * rsa.c (rsa_decrypt): Use gcry_create_nonce for blinding.
470 (generate): Rename to generate_std.
471
472 2008-11-05 Werner Koch <[email protected]>
473
474 * md.c (md_open): Use a switch to set the Bsize.
475 (prepare_macpads): Fix long key case for SHA384 and SHA512.
476
477 * cipher.c (gcry_cipher_handle): Add field EXTRASPEC.
478 (gcry_cipher_open): Set it.
479 (gcry_cipher_ctl): Add private control code to disable weak key
480 detection and to return the current input block.
481 * des.c (_tripledes_ctx): Add field FLAGS.
482 (do_tripledes_set_extra_info): New.
483 (_gcry_cipher_extraspec_tripledes): Add new function.
484 (do_tripledes_setkey): Disable weak key detection.
485
486 2008-10-24 Werner Koch <[email protected]>
487
488 * md.c (digest_table): Allow MD5 in fips mode.
489 (md_register_default): Take special action for MD5.
490 (md_enable, gcry_md_hash_buffer): Ditto.
491
492 2008-09-30 Werner Koch <[email protected]>
493
494 * rijndael.c (do_setkey): Properly align "t" and "tk".
495 (prepare_decryption): Properly align "w". Fixes bug #936.
496
497 2008-09-18 Werner Koch <[email protected]>
498
499 * pubkey.c (gcry_pk_genkey): Parse domain parameter.
500 (pubkey_generate): Add new arg DOMAIN and remove special case for
501 DSA with qbits.
502 * rsa.c (rsa_generate): Add dummy args QBITS, NAME and DOMAIN and
503 rename to rsa_generate_ext. Change caller.
504 (_gcry_rsa_generate, _gcry_rsa_check_secret_key)
505 (_gcry_rsa_encrypt, _gcry_rsa_decrypt, _gcry_rsa_sign)
506 (_gcry_rsa_verify, _gcry_rsa_get_nbits): Make static and remove
507 _gcry_ prefix.
508 (_gcry_pubkey_spec_rsa, _gcry_pubkey_extraspec_rsa): Adjust names.
509 * dsa.c (dsa_generate_ext): New.
510 (_gcry_dsa_generate): Replace code by a call to dsa_generate.
511 (_gcry_dsa_check_secret_key, _gcry_dsa_sign, _gcry_dsa_verify)
512 (_gcry_dsa_get_nbits): Make static and remove _gcry prefix.
513 (_gcry_dsa_generate2): Remove.
514 (_gcry_pubkey_spec_dsa): Adjust to name changes.
515 (_gcry_pubkey_extraspec_rsa): Add dsa_generate_ext.
516
517 2008-09-16 Werner Koch <[email protected]>
518
519 * ecc.c (run_selftests): Add arg EXTENDED.
520
521 2008-09-12 Werner Koch <[email protected]>
522
523 * rsa.c (test_keys): Do a bad case signature check.
524 * dsa.c (test_keys): Do a bad case check.
525
526 * cipher.c (_gcry_cipher_selftest): Add arg EXTENDED and pass it
527 to the called tests.
528 * md.c (_gcry_md_selftest): Ditto.
529 * pubkey.c (_gcry_pk_selftest): Ditto.
530 * rijndael.c (run_selftests): Add arg EXTENDED and pass it to the
531 called tests.
532 (selftest_fips_128): Add arg EXTENDED and run only one test
533 non-extended mode.
534 (selftest_fips_192): Add dummy arg EXTENDED.
535 (selftest_fips_256): Ditto.
536 * hmac-tests.c (_gcry_hmac_selftest): Ditto.
537 (run_selftests): Ditto.
538 (selftests_sha1): Add arg EXTENDED and run only one test
539 non-extended mode.
540 (selftests_sha224, selftests_sha256): Ditto.
541 (selftests_sha384, selftests_sha512): Ditto.
542 * sha1.c (run_selftests): Add arg EXTENDED and pass it to the
543 called test.
544 (selftests_sha1): Add arg EXTENDED and run only one test
545 non-extended mode.
546 * sha256.c (run_selftests): Add arg EXTENDED and pass it to the
547 called tests.
548 (selftests_sha224): Add arg EXTENDED and run only one test
549 non-extended mode.
550 (selftests_sha256): Ditto.
551 * sha512.c (run_selftests): Add arg EXTENDED and pass it to the
552 called tests.
553 (selftests_sha384): Add arg EXTENDED and run only one test
554 non-extended mode.
555 (selftests_sha512): Ditto.
556 * des.c (run_selftests): Add arg EXTENDED and pass it to the
557 called test.
558 (selftest_fips): Add dummy arg EXTENDED.
559 * rsa.c (run_selftests): Add dummy arg EXTENDED.
560
561 * dsa.c (run_selftests): Add dummy arg EXTENDED.
562
563 * rsa.c (extract_a_from_sexp): New.
564 (selftest_encr_1024): Check that the ciphertext does not match the
565 plaintext.
566 (test_keys): Improve tests and return an error status.
567 (generate): Return an error if test_keys fails.
568 * dsa.c (test_keys): Add comments and return an error status.
569 (generate): Return an error if test_keys failed.
570
571 2008-09-11 Werner Koch <[email protected]>
572
573 * rsa.c (_gcry_rsa_decrypt): Return an error instead of calling
574 BUG in case of a practically impossible condition.
575 (sample_secret_key, sample_public_key): New.
576 (selftest_sign_1024, selftest_encr_1024): New.
577 (selftests_rsa): Implement tests.
578 * dsa.c (sample_secret_key, sample_public_key): New.
579 (selftest_sign_1024): New.
580 (selftests_dsa): Implement tests.
581
582 2008-09-09 Werner Koch <[email protected]>
583
584 * hmac-tests.c (selftests_sha1): Add tests.
585 (selftests_sha224, selftests_sha384, selftests_sha512): Make up tests.
586
587 * hash-common.c, hash-common.h: New.
588 * sha1.c (selftests_sha1): Add 3 tests.
589 * sha256.c (selftests_sha256, selftests_sha224): Ditto.
590 * sha512.c (selftests_sha512, selftests_sha384): Ditto.
591
592 2008-08-29 Werner Koch <[email protected]>
593
594 * pubkey.c (gcry_pk_get_keygrip): Remove the special case for RSA
595 and check whether a custom computation function has been setup.
596 * rsa.c (compute_keygrip): New.
597 (_gcry_pubkey_extraspec_rsa): Setup this function.
598 * ecc.c (compute_keygrip): New.
599 (_gcry_pubkey_extraspec_ecdsa): Setup this function.
600
601 2008-08-28 Werner Koch <[email protected]>
602
603 * cipher.c (cipher_decrypt, cipher_encrypt): Return an error if
604 mode NONE is used.
605 (gcry_cipher_open): Allow mode NONE only with a debug flag set and
606 if not in FIPS mode.
607
608 2008-08-26 Werner Koch <[email protected]>
609
610 * pubkey.c (pubkey_generate): Add arg KEYGEN_FLAGS.
611 (gcry_pk_genkey): Implement new parameter "transient-key" and
612 pass it as flags to pubkey_generate.
613 (pubkey_generate): Make use of an ext_generate function.
614 * rsa.c (generate): Add new arg transient_key and pass appropriate
615 args to the prime generator.
616 (_gcry_rsa_generate): Factor all code out to ...
617 (rsa_generate): .. new func with extra arg KEYGEN_FLAGS.
618 (_gcry_pubkey_extraspec_ecdsa): Setup rsa_generate.
619 * primegen.c (_gcry_generate_secret_prime)
620 (_gcry_generate_public_prime): Add new arg RANDOM_LEVEL.
621
622 2008-08-21 Werner Koch <[email protected]>
623
624 * primegen.c (_gcry_generate_secret_prime)
625 (_gcry_generate_public_prime): Use a constant macro for the random
626 level.
627
628 2008-08-19 Werner Koch <[email protected]>
629
630 * pubkey.c (sexp_elements_extract_ecc) [!USE_ECC]: Do not allow
631 allow "curve" parameter.
632
633 2008-08-15 Werner Koch <[email protected]>
634
635 * pubkey.c (_gcry_pk_selftest): New.
636 * dsa.c (selftests_dsa, run_selftests): New.
637 * rsa.c (selftests_rsa, run_selftests): New.
638 * ecc.c (selftests_ecdsa, run_selftests): New.
639
640 * md.c (_gcry_md_selftest): New.
641 * sha1.c (run_selftests, selftests_sha1): New.
642 * sha256.c (selftests_sha224, selftests_sha256, run_selftests): New.
643 * sha512.c (selftests_sha384, selftests_sha512, run_selftests): New.
644
645 * des.c (selftest): Remove static variable form selftest.
646 (des_setkey): No on-the-fly self test in fips mode.
647 (tripledes_set3keys): Ditto.
648
649 * cipher.c (_gcry_cipher_setkey, _gcry_cipher_setiv):
650
651 * dsa.c (generate): Bail out in fips mode if NBITS is less than 1024.
652 * rsa.c (generate): Return an error code if the the requested size
653 is less than 1024 and we are in fpis mode.
654 (_gcry_rsa_generate): Take care of that error code.
655
656 * ecc.c (generate_curve): In fips mode enable only NIST curves.
657
658 * cipher.c (_gcry_cipher_selftest): New.
659
660 * sha512.c (_gcry_digest_extraspec_sha384)
661 (_gcry_digest_extraspec_sha512): New.
662 * sha256.c (_gcry_digest_extraspec_sha224)
663 (_gcry_digest_extraspec_sha256): New.
664 * sha1.c (_gcry_digest_extraspec_sha1): New.
665 * ecc.c (_gcry_pubkey_extraspec_ecdsa): New.
666 * dsa.c (_gcry_pubkey_extraspec_dsa): New.
667 * rsa.c (_gcry_pubkey_extraspec_rsa): New.
668 * rijndael.c (_gcry_cipher_extraspec_aes)
669 (_gcry_cipher_extraspec_aes192, _gcry_cipher_extraspec_aes256): New.
670 * des.c (_gcry_cipher_extraspec_tripledes): New.
671
672 * cipher.c (gcry_cipher_register): Rename to _gcry_cipher_register.
673 Add arg EXTRASPEC.
674 (dummy_extra_spec): New.
675 (cipher_table_entry): Add extraspec field.
676 * md.c (_gcry_md_register): Rename to _gcry_md_register. Add
677 arg EXTRASPEC.
678 (dummy_extra_spec): New.
679 (digest_table_entry): Add extraspec field.
680 * pubkey.c (gcry_pk_register): Rename to _gcry_pk_register. Add
681 arg EXTRASPEC.
682 (dummy_extra_spec): New.
683 (pubkey_table_entry): Add extraspec field.
684
685 * ac.c: Let most public functions return GPG_ERR_UNSUPPORTED in
686 fips mode.
687
688 * pubkey.c (pubkey_table_entry): Add field FIPS_ALLOWED and mark
689 appropriate algorithms.
690 (dummy_generate, dummy_check_secret_key, dummy_encrypt)
691 (dummy_decrypt, dummy_sign, dummy_verify, dummy_get_nbits): Signal
692 a fips error when used.
693 (gcry_pk_register): In fips mode do not allow to register new
694 algorithms.
695
696 * md.c (digest_table): Add field FIPS_ALLOWED and mark appropriate
697 algorithms.
698 (md_register_default): In fips mode register only fips algorithms.
699 (gcry_md_register): In fips mode do not allow to register new
700 algorithms.
701 (gcry_md_get): Signal a fips error if called.
702 (gcry_md_hash_buffer): Do not allow rmd160 when not in fips mode.
703 (md_start_debug): Disable in fips_mode.
704
705 * md.c (gcry_md_register_default): Rename to ..
706 (md_register_default): .. this.
707 (md_digest): Remove this commented fucntion.
708 * pubkey.c (gcry_pk_register_default): Rename to ..
709 (pk_register_default): .. this.
710
711 * cipher.c (cipher_table_entry): Add field FIPS_ALLOWED.
712 (gcry_cipher_register_default): Register only fips approved
713 algorithms.
714 (gcry_cipher_register): Do not allow to register new ciphers.
715 (cipher_setiv): Signal fips error.
716
717 * cipher (gcry_cipher_register_default): Rename to ..
718 (cipher_register_default): .. this.
719 (REGISTER_DEFAULT_CIPHERS): Adjust for that change.
720
721 2008-07-05 Werner Koch <[email protected]>
722
723 * random-daemon.c, random.h, rndhw.c, rndunix.c, rand-internal.h
724 * random.c, rndegd.c, rndlinux.c, rndw32.c: Move to ../cipher.
725 * Makefile.am: Remove random stuff.
726
727 2008-06-24 Szakats Istvan <[email protected]> (wk)
728
729 * ac.c (_gcry_ac_key_destroy, _gcry_ac_key_pair_generate): Relase
730 some more memory.
731
732 2008-04-22 Werner Koch <[email protected]>
733
734 * rijndael.c (_gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
735 (_gcry_aes_cfb_dec, _gcry_aes_cbc_dec): Use Padlock if possible.
736
737 2008-04-18 Werner Koch <[email protected]>
738
739 * sha1.c (transform_aligned): Remove. That is will obviosuly not
740 work because we need a scratch working area and our internal API
741 does not allow to modify the buffers.
742
743 * rijndael.c: Factor tables out to ..
744 * rijndael-tables.h: .. new.
745
746 * ac.c (ac_data_extract): Make static.
747
748 * camellia.h [HAVE_CONFIG_H]: Include config.h.
749
750 * rndw32.c (registry_poll): Only print the performance data
751 problem warning once. Suggested by Simon Josefsson.
752
753 2008-03-19 Werner Koch <[email protected]>
754
755 * cipher.c (gcry_cipher_open) [USE_AES]: Init bulk encryption only
756 if requested. Suggested by Dirk Stoecker.
757
758 2008-03-18 Werner Koch <[email protected]>
759
760 * sha1.c: Include stdint.h.
761 (transform): Add arg NBLOCKS so that we can work on more than one
762 block and avoid updates of the chaining variables. Changed all
763 callers to use 1.
764 (sha1_write): Replace loop around transform.
765 (transform_aligned) [WORDS_BIGENDIAN]: New.
766 (TRANSFORM): New macro to replace all direct calls of transform.
767
768 2008-03-17 Werner Koch <[email protected]>
769
770 * rijndael.c (_gcry_aes_cfb_dec): New.
771 (do_encrypt): Factor code out to ..
772 (do_encrypt_aligned): .. New.
773 (_gcry_aes_cfb_enc, _gcry_aes_cfb_dec): Use new function.
774 (do_decrypt): Factor code out to ..
775 (do_decrypt_aligned): .. new.
776 (_gcry_aes_cbc_enc, _gcry_aes_cbc_dec): New.
777 * cipher.c (struct gcry_cipher_handle): Put field IV into new
778 union U_IV to enforce proper alignment. Change all users.
779 (do_cfb_decrypt): Optimize.
780 (do_cbc_encrypt, do_cbc_decrypt): Optimize.
781
782 2008-03-15 Werner Koch <[email protected]>
783
784 * rijndael.c (_gcry_aes_cfb_enc): New.
785 * cipher.c (struct gcry_cipher_handle): Add field ALGO and BULK.
786 (gcry_cipher_open): Set ALGO and BULK.
787 (do_cfb_encrypt): Optimize.
788
789 2008-02-18 Werner Koch <[email protected]>
790
791 * rsa.c (_gcry_rsa_verify) [IS_DEVELOPMENT_VERSION]: Print
792 intermediate results.
793
794 2008-01-08 Werner Koch <[email protected]>
795
796 * random.c (add_randomness): Do not just increment
797 POOL_FILLED_COUNTER but update it by the actual amount of data.
798
799 2007-12-13 Werner Koch <[email protected]>
800
801 * pubkey.c (sexp_data_to_mpi): Support SHA-224.
802
803 2007-12-05 Werner Koch <[email protected]>
804
805 * rijndael.c (USE_PADLOCK): Depend on ENABLE_PADLOCK_SUPPORT.
806 * rndhw.c (USE_PADLOCK): Ditto
807
808 * rsa.c (secret): Fixed condition test for using CRT. Reported by
809 Dean Scarff. Fixes bug#864.
810 (_gcry_rsa_check_secret_key): Return an erro if the optional
811 parameters are missing.
812 * pubkey.c (sexp_elements_extract): Add arg ALGO_NAME. Changed all
813 callers to pass NULL. Add hack to allow for optional RSA
814 parameters.
815 (sexp_to_key): Pass algo name to sexp_elements_extract.
816
817 2007-12-03 Werner Koch <[email protected]>
818
819 * random.c (gcry_random_add_bytes): Implement it.
820 * rand-internal.h (RANDOM_ORIGIN_EXTERNAL): New.
821
822 2007-11-30 Werner Koch <[email protected]>
823
824 * rndhw.c: New.
825 * rndlinux.c (_gcry_rndlinux_gather_random): Try to read 50%
826 directly from the hwrng.
827 * random.c (do_fast_random_poll): Also run the hw rng fast poll.
828 (_gcry_random_dump_stats): Tell whether the hw rng failed.
829
830 2007-11-29 Werner Koch <[email protected]>
831
832 * rijndael.c (USE_PADLOCK): Define new macro used for ia32.
833 (RIJNDAEL_context) [USE_PADLOCK]: Add fields USE_PADLOCK and
834 PADLOCK_KEY.
835 (do_setkey) [USE_PADLOCK]: Enable padlock if available for 128 bit
836 AES.
837 (do_padlock) [USE_PADLOCK]: New.
838 (rijndael_encrypt, rijndael_decrypt) [USE_PADLOCK]: Divert to
839 do_padlock.
840 * cipher.c (cipher_context_alignment_t): New. Use it in this
841 module in place of PROPERLY_ALIGNED_TYPE.
842 (NEED_16BYTE_ALIGNED_CONTEXT): Define macro for ia32.
843 (struct gcry_cipher_handle): Add field HANDLE_OFFSET.
844 (gcry_cipher_open): Take care of increased alignment requirements.
845 (gcry_cipher_close): Ditto.
846
847 2007-11-28 Werner Koch <[email protected]>
848
849 * sha256.c (asn224): Fixed wrong template. It happened due to a
850 bug in RFC4880. SHA-224 is not in the stable version of libgcrypt
851 so the consequences are limited to users of this devel version.
852
853 2007-10-31 Werner Koch <[email protected]>
854
855 * ac.c (gcry_ac_data_new): Remove due to the visibility wrapper.
856 (gcry_ac_data_destroy, gcry_ac_data_copy, gcry_ac_data_length)
857 (gcry_ac_data_set, gcry_ac_data_get_name, gcry_ac_data_get_index)
858 (gcry_ac_data_to_sexp, gcry_ac_data_from_sexp)
859 (gcry_ac_data_clear, gcry_ac_io_init, gcry_ac_open)
860 (gcry_ac_close, gcry_ac_key_init, gcry_ac_key_pair_generate)
861 (gcry_ac_key_pair_extract, gcry_ac_key_destroy)
862 (gcry_ac_key_pair_destroy, gcry_ac_key_data_get)
863 (gcry_ac_key_test, gcry_ac_key_get_nbits, gcry_ac_key_get_grip)
864 (gcry_ac_data_encrypt, gcry_ac_data_decrypt, gcry_ac_data_sign)
865 (gcry_ac_data_verify, gcry_ac_data_encode, gcry_ac_data_decode)
866 (gcry_ac_mpi_to_os, gcry_ac_mpi_to_os_alloc, gcry_ac_os_to_mpi)
867 (gcry_ac_data_encrypt_scheme, gcry_ac_data_decrypt_scheme)
868 (gcry_ac_data_sign_scheme, gcry_ac_data_verify_scheme)
869 (gcry_ac_io_init_va): Ditto.
870 (gcry_ac_id_to_name, gcry_ac_name_to_id): Remove as these
871 deprecated functions are now implemented by visibility.c.
872
873 2007-10-26 Werner Koch <[email protected]>
874
875 * rndw32.c: Disable debug flag.
876
877 2007-10-25 Werner Koch <[email protected]>
878
879 * rndw32.c: Updated from current cryptlib snapshot and modified
880 for our use. Removed support from pre NT systems.
881 (slow_gatherer_windows95): Remove.
882 (_gcry_rndw32_gather_random): Require an NT platform.
883 (init_system_rng, read_system_rng, read_mbm_data): New.
884 (slow_gatherer_windowsNT): Rename to ...
885 (slow_gatherer): .. this. Read system RNG and MBM.
886 (registry_poll): New with code factored out from slow_gatherer.
887
888 2007-08-23 Werner Koch <[email protected]>
889
890 * random.c (pool_filled_counter): New.
891 (add_randomness): Use it.
892
893 2007-08-22 Werner Koch <[email protected]>
894
895 * rndw32.c, rndunix.c: Switched to LGPL.
896
897 2007-05-30 Werner Koch <[email protected]>
898
899 * camellia.h, camellia.c: Replace by new LGPL version and adjusted
900 camellia.h.
901
902 2007-05-09 Marcus Brinkmann <[email protected]>
903
904 * ac.c (_gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read):
905 Adjust users of gcry_ac_io_t because union is not anonymous
906 anymore.
907
908 2007-05-02 Werner Koch <[email protected]>
909
910 * camellia-glue.c (camellia_setkey, camellia_encrypt)
911 (camellia_decrypt): Recalculated used stack size in called
912 functions.
913 * camellia.h: Redefine external symbols.
914
915 2007-05-02 David Shaw <[email protected]>
916
917 * Makefile.am, cipher.c: Add Camellia.
918
919 * camellia-glue.c: New. The necessary glue to interface libgcrypt
920 to the stock NTT Camellia distribution.
921
922 * camellia.h, camellia.c: The stock NTT Camellia distribution
923 (GPL).
924
925 2007-04-30 David Shaw <[email protected]>
926
927 * cipher.c: Use #if instead of #ifdef as configure defines the
928 USE_cipher defines as 0 for disabled.
929
930 2007-04-30 Werner Koch <[email protected]>
931
932 * rndegd.c (_gcry_rndegd_set_socket_name): New.
933
934 2007-04-30 Marcus Brinkmann <[email protected]>
935
936 * ecc.c (ec2os): Fix relocation of short numbers.
937
938 * ecc.c (generate_key): Do not allocate D, which will be allocated
939 by GEN_K. Remove G. Fix test if g_x, g_y resp. q_x, q_y are
940 requested.
941 (_gcry_ecc_generate): Release unneeded members of SK.
942 * pubkey.c (sexp_to_key): Release NAME.
943
944 2007-04-28 Marcus Brinkmann <[email protected]>
945
946 * ac.c (gcry_ac_mpi): Remove member NAME_PROVIDED.
947 (ac_data_mpi_copy, _gcry_ac_data_set, _gcry_ac_data_get_name)
948 (_gcry_ac_data_get_index, ac_data_construct): Adjust handling of
949 NAME accordingly.
950
951 2007-04-20 Werner Koch <[email protected]>
952
953 * ecc.c (domain_parms): Add standard brainpool curves.
954
955 2007-04-18 Werner Koch <[email protected]>
956
957 * ecc.c (generate_curve): Implement alias mechanism.
958
959 * pubkey.c (sexp_elements_extract_ecc): New.
960 (sexp_to_key): Add special case for ecc.
961 (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_genkey): Replace
962 name_terminated stuff by a call to _gcry_sexp_nth_string.
963 (gcry_pk_get_keygrip): Ditto.
964
965 2007-04-16 Werner Koch <[email protected]>
966
967 * ecc.c (_gcry_ecc_generate): Renamed DUMMY to CURVE and use it.
968
969 2007-04-13 Marcus Brinkmann <[email protected]>
970
971 * ac.c (ac_data_construct): Cast const away to suppress compiler
972 warning.
973
974 * ecc.c (ecc_generate): Avoid compiler warning for unused argument
975 DUMMY.
976 (ecc_verify): Avoid compiler warning for unused arguments CMP and
977 OPAQUEV.
978
979 2007-04-06 Werner Koch <[email protected]>
980
981 * sha1.c (oid_spec_sha1): Add another oid from X9.62.
982
983 2007-03-28 Werner Koch <[email protected]>
984
985 * pubkey.c (gcry_pk_genkey): Do not issue misc-key-info if it is
986 empty.
987 (gcry_pk_genkey): New parameter "curve".
988
989 * ecc.c: Entirely rewritten with only a few traces of the old
990 code left.
991 (_gcry_ecc_generate): New.
992 (generate_key) New arg NAME.
993 (generate_curve): Ditto. Return actual number of NBITS.
994
995 2007-03-26 Werner Koch <[email protected]>
996
997 * pubkey.c (gcry_pk_genkey): Increase size of SKEY array and add a
998 runtime bounds check.
999
1000 2007-03-23 Werner Koch <[email protected]>
1001
1002 * ecc.c (ecc_ctx_init, ecc_ctx_free, ecc_mod, ecc_mulm): New.
1003 (duplicate_point, sum_points, escalar_mult): Don't use a
1004 copy of base->p. Replaced all mpi_mulm by ecc_mulm so that we can
1005 experiment with different algorithms.
1006 (generate_key, check_secret_key, sign, verify): Initialize a
1007 computation context for use by ecc_mulm.
1008
1009 2007-03-22 Werner Koch <[email protected]>
1010
1011 * pubkey.c (pubkey_table): Initialize ECC.
1012 * Makefile.am (EXTRA_libcipher_la_SOURCES): Add ecc.c.
1013 * ecc.c: New. Heavily reformatted and changed for use in libgcrypt.
1014 (point_init): New.
1015 (escalar_mult): Make arg R the first arg to be similar to the mpi
1016 functions.
1017 (duplicate_point): Ditto
1018 (sum_points): Ditto
1019 (sign, verify): Remove unneeded copy operations.
1020 (sum_points): Removed memory leaks and optimized some compares.
1021 (verify): Simplified input check.
1022
1023 2007-03-14 Werner Koch <[email protected]>
1024
1025 * random.c (MASK_LEVEL): Removed macro as it was used only at one
1026 place. Open coded it there.
1027 (gcry_randomize, _gcry_update_random_seed_file)
1028 (_gcry_fast_random_poll): Factor lock code out to ..
1029 (lock_pool, unlock_pool): .. new.
1030 (initialize): Look the pool while allocating.
1031 (read_random_source, do_fast_random_poll): Moved intialization to ...
1032 (initialize): .. here.
1033 (_gcry_enable_quick_random_gen): No more need for initialization.
1034 (is_initialized): Moved this global flag to ..
1035 (initialize): .. here and changed all users to unconditionally call
1036 initialize.
1037 (add_randomness): Remove initalization here. It simply can't
1038 happen.
1039
1040 * random.c (enum random_origins): Moved to ..
1041 * rand-internal.h: .. here.
1042 * rndunix.c (_gcry_rndunix_gather_random): Use enum in prototype
1043 for ORIGIN and renamed REQUESTOR to ORIGIN.
1044 * rndegd.c (_gcry_rndegd_gather_random): Ditto.
1045 * rndlinux.c (_gcry_rndlinux_gather_random): Ditto.
1046 * rndw32.c (_gcry_rndw32_gather_random): Ditto.
1047 (_gcry_rndw32_gather_random_fast): Ditto.
1048
1049 2007-03-13 Werner Koch <[email protected]>
1050
1051 * random.c (enum random_origins): New.
1052 (add_randomness): Renamed arg SOURCE to ORIGIN.
1053 (read_random_source): Renamed arg REQUESTOR to ORIGIN.
1054 (getfnc_gather_random): Removed static variable because this
1055 function is only called one and thus we don't need this
1056 optimization.
1057 (_gcry_quick_random_gen): Removed and replaced by..
1058 (_gcry_enable_quick_random_gen): .. this. It is onlyu used to
1059 enable it and it does not make sense to disable it later. Changed
1060 the only one caller too.
1061 (get_random_bytes): Removed.
1062 (gcry_random_bytes, gcry_random_bytes_secure): Implement in terms
1063 of gcry_randomize.
1064 * random-daemon.c (_gcry_daemon_get_random_bytes): Removed.
1065
1066 2007-02-23 Werner Koch <[email protected]>
1067
1068 * elgamal.c (generate): Removed unused variable TEMP.
1069 (test_keys): New arg NODIE.
1070 (generate_using_x, _gcry_elg_generate_using_x): New.
1071 * pubkey.c (pubkey_generate): New arg XVALUE and direct call to
1072 the new elgamal generate fucntion.
1073 (gcry_pk_genkey): Parse the new "xvalue" tag.
1074
1075 2007-02-22 Werner Koch <[email protected]>
1076
1077 * pubkey.c (sexp_data_to_mpi): Handle dynamically allocated
1078 algorithms. Suggested by Neil Dunbar. Fixes bug#596.
1079
1080 * rndw32.c (_gcry_rndw32_gather_random_fast): Make it return void.
1081
1082 * cipher.c (gcry_cipher_algo_name): Simplified.
1083
1084 * random.c: Use the daemon only if compiled with USE_RANDOM_DAEMON.
1085
1086 * Makefile.am (libcipher_la_SOURCES): Build random-daemon support
1087 only if requested.
1088
1089 2007-02-21 Werner Koch <[email protected]>
1090
1091 * random.c (rndpool, keypool): Make unsigned.
1092 (mix_pool): Change char* variables to unsigned char*.
1093 (gcry_randomize): Make arg BUFFER a void*.
1094 (gcry_create_nonce): Ditto.
1095
1096 * rmd160.c (gcry_rmd160_mixblock): Make BUFFER a void*.
1097 (_gcry_rmd160_hash_buffer): Make OUTBUF and BUFFER void*.
1098 * sha1.c (_gcry_sha1_hash_buffer): Ditto.
1099
1100 * cipher.c (gcry_cipher_encrypt, cry_cipher_decrypt): Change
1101 buffer args to void*.
1102 (gcry_cipher_register): Make ALGORITHM_ID a int *.
1103
1104 * md.c (md_start_debug): Make SUFFIX a const char*. Use snprintf.
1105 (gcry_md_debug): New.
1106 (gcry_md_ctl): Changed arg BUFFER from unsigned char*.
1107
1108 * md.c (md_write): Make INBUF a const void*.
1109 (gcry_md_write): Remove needless cast.
1110 * crc.c (crc32_write): Make INBUF a const void*
1111 (update_crc32, crc24rfc2440_write): Ditto.
1112 * sha512.c (sha512_write, transform): Ditto.
1113 * sha256.c (sha256_write, transform): Ditto.
1114 * rmd160.c (rmd160_write, transform): Ditto.
1115 * md5.c (md5_write, transform): Ditto.
1116 * md4.c (md4_write, transform): Ditto.
1117 * sha1.c (sha1_write, transform): Ditto.
1118
1119 * tiger.c (tiger_write, transform): Ditto.
1120 * whirlpool.c (whirlpool_write, whirlpool_add, transform): Ditto.
1121
1122 * elgamal.c (elg_names): Change to a const*.
1123 * dsa.c (dsa_names): Ditto.
1124 * rsa.c (rsa_names): Ditto.
1125 * pubkey.c (gcry_pk_lookup_func_name): Make ALIASES a const.
1126
1127 2007-02-20 Werner Koch <[email protected]>
1128
1129 * rndlinux.c (open_device): Remove unsused arg MINOR.
1130
1131 2007-01-30 Werner Koch <[email protected]>
1132
1133 * sha256.c (oid_spec_sha256): Add alias from pkcs#1.
1134 * sha512.c (oid_spec_sha512): Ditto.
1135 (oid_spec_sha384): Ditto.
1136
1137 2006-12-18 Werner Koch <[email protected]>
1138
1139 * rndlinux.c (set_cloexec_flag): New.
1140 (open_device): Set close-on-exit flags. Suggested by Max
1141 Kellermann. Fixes Debian#403613.
1142
1143 * Makefile.am (AM_CPPFLAGS, AM_CFLAGS): Splitted and merged
1144 Moritz' changes.
1145 (INCLUDES): Removed.
1146
1147 2006-11-30 Werner Koch <[email protected]>
1148
1149 * serpent.c (byte_swap_32): Remove trailing semicolon.
1150
1151 2006-11-15 Werner Koch <[email protected]>
1152
1153 * Makefile.am (INCLUDES): Include ../src/
1154
1155 2006-11-03 Werner Koch <[email protected]>
1156
1157 * random.c [HAVE_GETTIMEOFDAY]: Included sys/time.h and not
1158 sys/times.h. Reported by Rafaël Carré.
1159
1160 2006-11-05 Moritz Schulte <[email protected]>
1161
1162 * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the
1163 new gcrypt.h is used, not the one installed in the system.
1164
1165 2006-10-25 Werner Koch <[email protected]>
1166
1167 * primegen.c (prime_generate_internal): Tweaked use of secure
1168 memory and entropy use. Safe unused primes from the pool. Allocate
1169 at least a pool of 30.
1170 (save_pool_prime, get_pool_prime): New.
1171
1172 2006-10-23 Werner Koch <[email protected]>
1173
1174 * ac.c (_gcry_ac_data_from_sexp): Reset sexp_tmp for failsafe
1175 means. Release sexp_cur if needed. Reported by Dirk Stoecker.
1176
1177 * pubkey.c (pubkeys_registered_lock): Intialized it. It is not
1178 realy needed because this is a mere initialization to 0 anyway.
1179 Noted by Victor Stinner.
1180
1181 2006-10-17 Werner Koch <[email protected]>
1182
1183 * dsa.c (_gcry_dsa_generate2): New.
1184 (generate): New arg QBITS. Add sanity checks for reasonable qbits
1185 and nbits.
1186 * pubkey.c (gcry_pk_genkey): Parse an qbits element.
1187 (pubkey_generate): New arg QBITS. Pass it to the DSA generation.
1188
1189 2006-10-05 Werner Koch <[email protected]>
1190
1191 * md.c (gcry_md_algo_info) <get_asnoid>: Check that the algo is
1192 available.
1193
1194 2006-10-04 David Shaw <[email protected]> (wk)
1195
1196 * tiger.c (round): Rename to tiger_round as gcc 4 has a built-in
1197 round function that this conflicts with.
1198
1199 2006-09-11 Werner Koch <[email protected]>
1200
1201 * rndw32.c (slow_gatherer_windowsNT): While adding data use the
1202 size of the diskPerformance and not its address. Has been fixed in
1203 GnuPG more than a year ago. Noted by Lee Fisher.
1204
1205 2006-08-30 Werner Koch <[email protected]>
1206
1207 * pubkey.c (sexp_data_to_mpi): Need to allow "ripemd160" here as
1208 this is the canonical name.
1209
1210 2006-08-29 Hye-Shik Chang <[email protected]> (wk)
1211
1212 * seed.c: New.
1213
1214 2006-08-03 Werner Koch <[email protected]>
1215
1216 * random-daemon.c (_gcry_daemon_initialize_basics): Don't
1217 initialize the socket. Remove arg SOCKETNAME.
1218 (connect_to_socket): Make sure that daemon is set to -1 on error.
1219 (call_daemon): Initialize the socket on the first call.
1220 (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
1221 (_gcry_daemon_create_nonce): New arg SOCKETNAME.
1222 * random.c (initialize): Call new daemon initializator.
1223 (get_random_bytes, gcry_randomize, gcry_create_nonce): Pass socket
1224 name to daemon call and reset allow_daemon on failure.
1225
1226 2006-07-26 Werner Koch <[email protected]>
1227
1228 * rmd160.c (_gcry_rmd160_mixblock): Add cast to transform call.
1229
1230 * blowfish.c (selftest): Cast string to usnigned char*.
1231
1232 * primegen.c (prime_generate_internal): Cast unsigned/char*
1233 mismatch in calling m_out_of_n.
1234 (is_prime): Changed COUNT to unsigned int *.
1235
1236 * ac.c (_gcry_ac_data_copy): Initialize DATA_MPIS.
1237
1238 * random.c (gcry_create_nonce): Update the pid after a fork.
1239 Reported by Uoti Urpala.
1240
1241 2006-07-04 Marcus Brinkmann <[email protected]>
1242
1243 * sha512.c: Fix typo in copyright notice.
1244
1245 2006-06-21 Werner Koch <[email protected]>
1246
1247 * rsa.c (_gcry_rsa_generate): Replace xcalloc by calloc.
1248 * pubkey.c (gcry_pk_encrypt, gcry_pk_sign): Ditto.
1249 (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_encrypt)
1250 (gcry_pk_sign, gcry_pk_genkey, gcry_pk_get_keygrip): Ditto.
1251 * md.c (md_copy): Ditto.
1252
1253 2006-04-22 Moritz Schulte <[email protected]>
1254
1255 * random-daemon.c (_gcry_daemon_initialize_basics): New argument:
1256 SOCKETNAME. Passing on to connect_to_socket() if non-NULL.
1257 (connect_to_socket, writen, readn, call_daemon): New functions.
1258 (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
1259 (_gcry_daemon_create_nonce): Call call_daemon().
1260 (RANDOM_DAEMON_SOCKET): New symbol.
1261 (daemon_socket): New static variable.
1262
1263 * random.h (_gcry_daemon_initialize_basics): New parameter:
1264 SOCKETNAME.
1265 (_gcry_set_random_daemon_socket): New declaration.
1266
1267 * random.c (initialize_basics): Pass DAEMON_SOCKET_NAME to
1268 _gcry_daemon_initialize_basics.
1269 (_gcry_set_random_daemon_socket): New function, setting
1270 DAEMON_SOCKET_NAME.
1271
1272 2006-04-01 Moritz Schulte <[email protected]>
1273
1274 * ac.c (eme_pkcs_v1_5_encode): Use KEY_SIZE directly, no need to
1275 call gcry_ac_key_get_nbits.
1276 (eme_pkcs_v1_5_decode): Likewise.
1277 (ac_es_dencode_prepare_pkcs_v1_5): Fill options_em structure with
1278 key_size.
1279 (_gcry_ac_data_dump, gcry_ac_data_dump): New functions.
1280 (_gcry_ac_data_to_sexp, _gcry_ac_data_from_sexp): More or less
1281 rewritten; changed S-Expression format so that it matches the one
1282 used in pubkey.c.
1283
1284 2006-03-15 Werner Koch <[email protected]>
1285
1286 * random-daemon.c: New.
1287 * random.c (_gcry_use_random_daemon): New.
1288 (get_random_bytes, gcry_randomize, gcry_create_nonce): Try
1289 diverting to the daemon functions.
1290
1291 2006-03-14 Werner Koch <[email protected]>
1292
1293 * random.c (lock_seed_file): New.
1294 (read_seed_file, _gcry_update_random_seed_file): Use it.
1295
1296 * random.c (gcry_create_nonce): Detect a fork and re-seed.
1297 (read_pool): Fixed the fork detection; it used to work only for
1298 multi-threaded processes.
1299
1300 2006-03-12 Brad Hards <[email protected]> (wk)
1301
1302 * md.c (md_open): Use new variable macpads_Bsize instead of
1303 hardwiring the block size. Changed at all places.
1304
1305 2006-03-10 Brad Hards <[email protected]> (wk, patch 2005-04-22)
1306
1307 * md.c, sha256.c: Add support for SHA-224.
1308 (sha224_init): New.
1309
1310 2006-01-18 Brad Hards <[email protected]> (wk 2006-03-07)
1311
1312 * cipher.c (cipher_encrypt, cipher_decrypt, do_ofb_encrypt)
1313 (do_ofb_decrypt, gcry_cipher_open): Implement Output Feedback Mode.
1314
1315 2005-11-02 Moritz Schulte <[email protected]>
1316
1317 * pubkey.c (gcry_pk_algo_name): Return "?" instead of NULL for
1318 unknown algorithm IDs.
1319 * cipher.c (cipher_algo_to_string): Likewise.
1320
1321 2005-11-01 Moritz Schulte <[email protected]>
1322
1323 * pubkey.c (gcry_pk_algo_info): Don't forget to break after switch
1324 case.
1325
1326 2005-09-19 Werner Koch <[email protected]>
1327
1328 * dsa.c (generate): Add preliminary support for 2 and 4 keys.
1329 Return an error code if the key size is not supported.
1330 (_gcry_dsa_generate): Return an error.
1331
1332 2005-08-22 Werner Koch <[email protected]>
1333
1334 * primegen.c (check_prime): New arg RM_ROUNDS.
1335 (prime_generate_internal): Call it here with 5 rounds as used
1336 before.
1337 (gcry_prime_check): But here with 64 rounds.
1338 (is_prime): Make sure never to use less than 5 rounds.
1339
1340 2005-04-16 Moritz Schulte <[email protected]>
1341
1342 * ac.c (_gcry_ac_init): New function.
1343
1344 2005-04-12 Moritz Schulte <[email protected]>
1345
1346 * ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to
1347 make the compiler happy.
1348 Always use errno, now that gcry_malloc() is guaranteed to set
1349 errno on failure.
1350 (_gcry_ac_data_to_sexp): Don't forget to goto out after error in
1351 loop.
1352 (_gcry_ac_data_to_sexp): Remove unused variable: mpi_list;
1353 (_gcry_ac_data_to_sexp): Always deallocate sexp_buffer.
1354 (_gcry_ac_data_from_sexp): Don't forget to initialize data_set_new.
1355 (_gcry_ac_data_from_sexp): Handle special case, which is
1356 necessary, since gcry_sexp_nth() does not distinguish between
1357 "element does not exist" and "element is the empty list".
1358 (_gcry_ac_io_init_va): Use assert to make sure that mode and type
1359 are correct.
1360 Use gcry_error_t types where gcry_err_code_t types have been used
1361 before.
1362
1363 2005-04-11 Moritz Schulte <[email protected]>
1364
1365 * ac.c (_gcry_ac_data_sign_scheme): Don't forget to initialize
1366 buffer.
1367
1368 * whirlpool.c: New file.
1369 * md.c (digest_table): Add whirlpool.
1370 * Makefile.am (EXTRA_libcipher_la_SOURCES): Added: whirlpool.c.
1371
1372 2005-03-30 Moritz Schulte <[email protected]>
1373
1374 * ac.c (_gcry_ac_data_from_sexp): Use length of SEXP_CUR, not
1375 length of SEXP; do not forget to set SEXP_TMP to NULL after it has
1376 been released.
1377
1378 (struct gcry_ac_mpi): New member: name_provided.
1379 (_gcry_ac_data_set): Rename variable `name_final' to `name_cp';
1380 remove const qualifier; change code to not cast away const
1381 qualifiers; use name_provided member as well.
1382 (_gcry_ac_data_set, _gcry_ac_data_get_name): Use name_provided
1383 member of named mpi structure.
1384
1385 (gcry_ac_name_to_id): Do not forget to initialize err.
1386 (_gcry_ac_data_get_index): Do not forget to initialize mpi_return;
1387 use gcry_free() instead of free(); remove unnecessary cast; rename
1388 mpi_return and name_return to mpi_cp and name_cp; adjust code.
1389 (ac_data_mpi_copy): Do not cast away const qualifier.
1390 (ac_data_values_destroy): Likewise.
1391 (ac_data_construct): Likewise.
1392
1393 (ac_data_mpi_copy): Initialize flags to GCRY_AC_FLAG_DEALLOC.
1394 (ac_data_extract): Use GCRY_AC_FLAG_DEALLOC instead of
1395 GCRY_AC_FLAG_COPY.
1396
1397 (_gcry_ac_io_init_va, _gcry_ac_io_init, gcry_ac_io_init)
1398 (gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read)
1399 (_gcry_ac_io_read_all, _gcry_ac_io_process): New functions.
1400 (gry_ac_em_dencode_t): Use gcry_ac_io_t in prototype instead of
1401 memroy strings directly; adjust encode/decode functions to use io
1402 objects.
1403 (emsa_pkcs_v1_5_encode_data_cb): New function ...
1404 (emsa_pkcs_v1_5_encode): ... use it here.
1405 (ac_data_dencode): Use io objects.
1406 (_gcry_ac_data_encode, _gcry_ac_data_decode, gcry_ac_data_encode)
1407 (gcry_ac_data_decode): Likewise.
1408 (_gcry_ac_data_encrypt_scheme, gcry_ac_data_encrypt_scheme)
1409 (_gcry_ac_data_decrypt_scheme, gcry_ac_data_decrypt_scheme)
1410 (_gcry_ac_data_sign_scheme, gcry_ac_data_sign_scheme)
1411 (_gcry_ac_data_verify_scheme, gcry_ac_data_verify_scheme):
1412 Likewise.
1413
1414 2005-03-23 Werner Koch <[email protected]>
1415
1416 * rndw32.c (_gcry_rndw32_gather_random_fast): While adding data
1417 use the size of the object and not the one of its address. Bug
1418 reported by Sascha Kiefer.
1419
1420 2005-03-19 Moritz Schulte <[email protected]>
1421
1422 * cipher.c (do_cbc_encrypt): Be careful to not overwrite data,
1423 which is to be used later on. This happend, in case CTS is
1424 enabled and OUTBUF is equal to INBUF.
1425
1426 2005-02-25 Werner Koch <[email protected]>
1427
1428 * pubkey.c (gcry_pk_get_keygrip): Allow for shadowed-private-key.
1429
1430 2005-02-13 Moritz Schulte <[email protected]>
1431
1432 * serpent.c: Updated from 1.2 branch:
1433
1434 s/u32_t/u32/ and s/byte_t/byte/. Too match what we have always
1435 used and are using in all other files too
1436 (serpent_test): Moved prototype out of a fucntion.
1437
1438 2005-02-07 Moritz Schulte <[email protected]>
1439
1440 * ac.c: Major parts rewritten.
1441 * pubkey.c (_gcry_pk_get_elements): New function.
1442
1443 2004-12-09 Werner Koch <[email protected]>
1444
1445 * serpent.c (serpent_setkey): Moved prototype of serpent_test to
1446 outer scope.
1447
1448 2004-09-11 Moritz Schulte <[email protected]>
1449
1450 * pubkey.c (pubkey_table): Added an alias entry for GCRY_PK_ELG_E.
1451
1452 2004-08-23 Moritz Schulte <[email protected]>
1453
1454 * ac.c: Do not include <assert.h>.
1455 * rndegd.c: Likewise.
1456 * sha1.c: Likewise.
1457 * rndunix.c: Likewise.
1458 * rndlinux.c: Likewise.
1459 * rmd160.c: Likewise.
1460 * md5.c: Likewise.
1461 * md4.c: Likewise.
1462 * cipher.c: Likewise.
1463 * crc.c: Likewise.
1464 * blowfish.c: Likewise.
1465
1466 * pubkey.c (dummy_generate, dummy_check_secret_key)
1467 (dummy_encrypt, dummy_decrypt, dummy_sign, dummy_verify): Return
1468 err code GPG_ERR_NOT_IMPLEMENTED instead of aborting through
1469 log_bug().
1470 (dummy_get_nbits): Return 0 instead of aborting though log_bug().
1471
1472 2004-08-19 Werner Koch <[email protected]>
1473
1474 * pubkey.c (sexp_data_to_mpi): Changed the zero random byte
1475 substituting code to actually do clever things. Thanks to
1476 Matthias Urlichs for noting the implementation problem.
1477
1478 2004-08-09 Moritz Schulte <[email protected]>
1479
1480 * pubkey.c (gcry_pk_sign): Fixed memory leak; fix provided by
1481 Modestas Vainius.
1482
1483 2004-07-16 Werner Koch <[email protected]>
1484
1485 * rijndael.c (do_encrypt): Fix alignment problem. Bugs found by
1486 Matthias Urlichs.
1487 (do_decrypt): Ditto.
1488 (keySched, keySched2): Use 2 macros along with unions in the key
1489 schedule context.
1490
1491 2004-07-14 Moritz Schulte <[email protected]>
1492
1493 * rsa.c (_gcry_rsa_decrypt): Don't forget to free "a". Thanks to
1494 Nikos Mavroyanopoulos.
1495
1496 2004-05-09 Werner Koch <[email protected]>
1497
1498 * random.c (read_pool): Mix the PID in to better protect after a
1499 fork.
1500
1501 2004-07-04 Moritz Schulte <[email protected]>
1502
1503 * serpent.c: Use "u32_t" instead of "unsigned long", do not
1504 declare S-Box variables as "register". Fixes failure on
1505 OpenBSD/sparc64, reported by Nikolay Sturm.
1506
1507 2004-05-07 Werner Koch <[email protected]>
1508
1509 * random.c (initialize): Factored out some code to ..
1510 (initialize_basics): .. new function.
1511 (_gcry_random_initialize): Just call initialize_basics unless the
1512 new arg FULL is set to TRUE.
1513 (_gcry_fast_random_poll): Don't do anything unless the random
1514 system has been really initialized.
1515
1516 2004-05-07 Moritz Schulte <[email protected]>
1517
1518 * ac.c (gcry_ac_open): Do not dereference NULL pointer. Reported
1519 by Umberto Salsi.
1520
1521 2004-02-20 Werner Koch <[email protected]>
1522
1523 * primegen.c (check_prime): New args CB_FUNC and CB_ARG; call them
1524 at different stages. Pass these arguments through all callers.
1525
1526 2004-02-06 Werner Koch <[email protected]>
1527
1528 * des.c: Add a new OID as used by pkcs#12.
1529
1530 * rfc2268.c: New. Taken from libgcrypt.
1531 * cipher.c: Setup the rfc2268 algorithm.
1532
1533 2004-01-25 Moritz Schulte <[email protected]>
1534
1535 * primegen.c (prime_generate_internal): Do not forget to free
1536 `q_factor'; fixed by Brieuc Jeunhomme.
1537 (prime_generate_internal): Do not forget to free `prime'.
1538
1539 2004-01-14 Moritz Schulte <[email protected]>
1540
1541 * ac.c (gcry_ac_data_set): New argument: flags; slightly
1542 rewritten.
1543 (gcry_ac_data_get_name, gcry_ac_data_get_index): Likewise.
1544 (gcry_ac_key_pair_generate): New argument: misc_data; modified
1545 order of arguments.
1546 (gcry_ac_key_test): New argument: handle.
1547 (gcry_ac_key_get_nbits, gcry_ac_key_get_grip): Likewise.
1548 Use GCRY_AC_FLAG_NO_BLINDING instead of
1549 GCRY_AC_DATA_FLAG_NO_BLINDING.
1550 (gcry_ac_mpi): New member: flags.
1551 (gcry_ac_data_search, gcry_ac_data_add): Removed functions.
1552
1553 2003-12-22 Werner Koch <[email protected]>
1554
1555 * primegen.c (is_prime): Release A2.
1556
1557 2003-12-19 Werner Koch <[email protected]>
1558
1559 * md.c: Moved a couple of functions down below the data structure
1560 definitions.
1561 (struct gcry_md_context): New field ACTUAL_HANDLE_SIZE.
1562 (md_open): Set it here.
1563 (strcut gcry_md_list): New field ACTUAL_STRUCT_SIZE.
1564 (md_enable): Set it here.
1565 (md_close): Wipe the context memory.
1566 secure memory.
1567 * cipher.c (struct gcry_cipher_handle): New field ACTUAL_HANDLE_SIZE.
1568 (gcry_cipher_open): Set it here.
1569 (gcry_cipher_close): Use it to always wipe out the handle data.
1570
1571 * ac.c (gcry_ac_open): Make sure HANDLE gets initialized even when
1572 the function is not successful.
1573 (gcry_ac_close): Allow a NULL handle.
1574 (gcry_ac_key_destroy, gcry_ac_key_pair_destroy): Ditto.
1575 (gcry_ac_key_get_grip): Return INV_OBJ on error.
1576
1577 * primegen.c (prime_generate_internal): Fixed error code for
1578 failed malloc. Replaced the !err if chain by gotos.
1579 (gcry_prime_group_generator): Remove the extra sanity check.
1580
1581 * md.c: Minor code and comment cleanups.
1582
1583 2003-12-16 Werner Koch <[email protected]>
1584
1585 * primegen.c (gen_prime): Doc fix. Thanks to Newton Hammet.
1586
1587 2003-12-11 Werner Koch <[email protected]>
1588
1589 * rndunix.c (slow_poll): Don't use #warning but #error.
1590
1591 * rndegd.c: Changed indentation.
1592 (my_make_filename): Removd the var_arg cruft becuase we
1593 don't need it here. Changed caller.
1594
1595 * rndlinux.c: Changed indentation.
1596 (open_device): Remove the superfluous stat call and clarify
1597 comment.
1598
1599 * rsa.c: Changed indentation.
1600 (secret): Use the standard algorithm if p, q and u are not
1601 available.
1602 (rsa_blind, rsa_unblind): Renamed from _gcry_rsa_blind,
1603 _gcry_rsa_unblind and moved more to the top.
1604
1605 * md4.c: Changed indentation. Removed unnecessary casts.
1606 * md5.c, rmd160.c, sha1.c, tiger.c: Ditto.
1607 * rijndael.c, twofish.c: Ditto.
1608 * serpent.c: Removed unnecessary casts.
1609 * sha256.c, sha512.c: Ditto.
1610
1611 2003-12-09 Werner Koch <[email protected]>
1612
1613 * dsa.c: Unified indentation style.
1614 * elgamal.c: Ditto.
1615 * des.c (des_key_schedule): Code beautifications.
1616 * blowfish.c: Changed indentation style.
1617 * cast5.c (do_cast_setkey): Ditto.
1618
1619 * pubkey.c (gcry_pk_encrypt): Replaced the chain of if(!err) tests
1620 by straightforward gotos. Other cleanups.
1621 (gcry_pk_decrypt): Ditto.
1622 (gcry_pk_sign): Ditto.
1623 (gcry_pk_verify): Ditto.
1624 (gcry_pk_genkey): Ditto. Use strtoul instead of strtol.
1625 (gcry_pk_ctl): Use GPG_ERR_INV_ARG to indicate bad arguments.
1626
1627 2003-12-07 Werner Koch <[email protected]>
1628
1629 * pubkey.c (gcry_pk_register_default): Undef the helper macro.
1630 (gcry_pk_map_name): Allow NULL for string.
1631 (sexp_to_key): Use memcpy and not strncpy. Use gcry_free and not
1632 free.
1633 (sexp_to_sig): Ditto.
1634 (sexp_to_enc): Ditto. Replaced the chain of if(!err) tests by
1635 straightforward gotos.
1636
1637 2003-12-05 Werner Koch <[email protected]>
1638
1639 * cipher.c: Documentation cleanups.
1640 (gcry_cipher_mode_from_oid): Allow NULL for STRING.
1641
1642 2003-12-03 Werner Koch <[email protected]>
1643
1644 * elgamal.c (sign, do_encrypt, gen_k): Make sure that a small K is
1645 only used for encryption.
1646
1647 2003-11-18 Werner Koch <[email protected]>
1648
1649 * random.h (rndw32_set_dll_name): Removed unused prototype.
1650
1651 * Makefile.am (EXTRA_DIST): Added Manifest.
1652
1653 2003-11-11 Werner Koch <[email protected]>
1654
1655 * Manifest: New.
1656
1657 2003-11-04 Werner Koch <[email protected]>
1658
1659 * md.c (gcry_md_hash_buffer): Use shortcut for SHA1
1660 * sha1.c (_gcry_sha1_hash_buffer): New.
1661
1662 * random.c: Reformatted most functions.
1663 (mix_pool): Moved the failsafe_digest from global
1664 scope to here.
1665 (do_fast_random_poll): Use the generic fucntions even if a fast
1666 gathering function has been used.
1667 (read_pool): Detect a fork and retry.
1668 (gcry_randomize, get_random_bytes): Don't distinguish anymore
1669 between weak and strong random.
1670 (gcry_create_nonce): New.
1671
1672 2003-10-31 Werner Koch <[email protected]>
1673
1674 * rndw32.c (slow_gatherer_windowsNT): Use a plain buffer for the
1675 disk performance values and not the W32 API structure.
1676
1677 * dsa.c (verify): s/exp/ex/ due to shadowing of a builtin.
1678 * elgamal.c (verify): Ditto.
1679
1680 * ac.c (gcry_ac_data_get_index): s/index/idx/
1681 (gcry_ac_data_copy_internal): Remove the cast in _gcry_malloc.
1682 (gcry_ac_data_add): Must use gcry_realloc instead of realloc.
1683 * pubkey.c (sexp_elements_extract): s/index/idx/ as tribute to the
1684 forehackers.
1685 (gcry_pk_encrypt): Removed shadowed definition of I. Reordered
1686 arguments to malloc for clarity.
1687 (gcry_pk_sign, gcry_pk_genkey): Ditto.
1688 * primegen.c (prime_generate_internal): s/random/randomlevel/.
1689
1690 2003-10-27 Moritz Schulte <[email protected]>
1691
1692 * pubkey.c (gcry_pk_encrypt): Don't forget to deallocate pkey.
1693
1694 2003-10-27 Werner Koch <[email protected]>
1695
1696 * random.c (gcry_random_add_bytes): Return if buflen is zero to
1697 avoid gcc warning about unsed parameter.
1698 (MASK_LEVEL): Simplified; does now work for signed and unsigned
1699 w/o warnings.
1700
1701 * md.c (md_start_debug): Removed the const from SUFFIX, because
1702 this function is called from the control fucntion which does not
1703 require const.
1704
1705 Prefixed all (pubkey,digest,cipher}_spec_* globale variables with
1706 _gcry_.
1707
1708 * ac.c (ac_key_identifiers): Made static.
1709
1710 * random.c (getfnc_gather_random,getfnc_fast_random_poll): Move
1711 prototypes to ..
1712 * rand-internal.h: .. here
1713 * random.c (getfnc_gather_random): Include rndw32 gatherer.
1714 * rndunix.c, rndw32.c, rndegd.c: Include them here.
1715 * rndlinux.c (_gcry_rndlinux_gather_random): Prepend the _gcry_
1716 prefix. Changed all callers.
1717 * rndegd.c (_gcry_rndegd_gather_random): Likewise.
1718 (_gcry_rndegd_connect_socket): Likewise.
1719 * rndunix.c (_gcry_rndunix_gather_random): Likewise.
1720 (waitpid): Made static.
1721 * rndw32.c: Removed the old and unused winseed.dll cruft.
1722 (_gcry_rndw32_gather_random_fast): Renamed from
1723 gather_random_fast.
1724 (_gcry_rndw32_gather_random): Renamed from gather_random. Note,
1725 that the changes 2003-04-08 somehow got lost.
1726
1727 * sha512.c (sha512_init, sha384_init): Made static.
1728
1729 * cipher.c (do_ctr_decrypt): Removed "return" from this void
1730 function.
1731
1732 2003-10-24 Moritz Schulte <[email protected]>
1733
1734 * serpent.c: Fix an issue on big-endian systems.
1735
1736 * rndw32.c: Removed IS_MODULE -cruft.
1737 * rndlinux.c (rndlinux_gather_random): Likewise.
1738
1739 2003-10-10 Werner Koch <[email protected]>
1740
1741 * primegen.c (gen_prime): Bail out if NBITS is less than 16.
1742 (prime_generate_internal): Initialize prime variable to suppress
1743 compiler warning. Check pbits, initialize qbits when passed as
1744 zero.
1745
1746 * primegen.c (prime_generate_internal): New arg
1747 ALL_FACTORS. Changed all callers.
1748 (gcry_prime_generate): Make the factors arg optional. Request
1749 all_factors. Make sure PRIME is set to NULL even on error.
1750 (gcry_prime_group_generator): New.
1751 (gcry_prime_release_factors): New.
1752
1753 2003-10-06 Werner Koch <[email protected]>
1754
1755 * primegen.c (gen_prime): Assert that NBITS is never zero, it
1756 would cause a segv.
1757
1758 2003-09-28 Moritz Schulte <[email protected]>
1759
1760 * ac.c: Include "cipher.h".
1761
1762 2003-09-27 Moritz Schulte <[email protected]>
1763
1764 * rndegd.c (do_read): Return nread instead of nbytes; thanks to
1765 Michael Caerwyn.
1766
1767 2003-09-04 Werner Koch <[email protected]>
1768
1769 * pubkey.c (_gcry_pk_aliased_algo_name): New.
1770 * ac.c (gcry_ac_open): Use it here.
1771
1772 * Makefile.am (EXTRA_libcipher_la_SOURCES): Add serpent.c
1773
1774 2003-09-02 Moritz Schulte <[email protected]>
1775
1776 * primegen.c (gcry_prime_check, gcry_prime_generate): New
1777 functions.
1778 (prime_generate_internal): New function, based on
1779 _gcry_generate_elg_prime.
1780 (_gcry_generate_elg_prime): Rewritten as a wrapper for
1781 prime_generate_internal.
1782
1783 2003-08-28 Werner Koch <[email protected]>
1784
1785 * pubkey.c (gcry_pk_encrypt): Don't include the flags list in the
1786 return value. This does not make sense and breaks any programs
1787 parsing the output strictly (e.g. current gpgsm).
1788 (gcry_pk_encrypt): If aliases for the algorithm name exists, take
1789 the first one instead of the regular name to adhere to SPKI
1790 conventions.
1791 (gcry_pk_genkey): Ditto.
1792 (gcry_pk_sign): Ditto. Removed unused KEY_ALGO_NAME.
1793
1794 2003-08-19 Moritz Schulte <[email protected]>
1795
1796 * cipher.c: Add support for Serpent
1797 * serpent.c: New file.
1798
1799 2003-08-10 Moritz Schulte <[email protected]>
1800
1801 * rsa.c (_gcry_rsa_blind, _gcry_rsa_unblind): Declare static.
1802
1803 2003-08-09 Timo Schulz <[email protected]>
1804
1805 * random.c (getfnc_gather_random): Don't check NAME_OF_DEV_RANDOM
1806 two times, but also the NAME_OF_DEV_URANDOM device.
1807
1808 2003-08-08 Moritz Schulte <[email protected]>
1809
1810 * pubkey.c (sexp_to_enc): Fixed extraction of S-Expression: do not
1811 fail if no `flags' sub S-Expression is found.
1812
1813 2003-07-27 Werner Koch <[email protected]>
1814
1815 * md.c (gcry_md_lookup_func_oid): Allow for empty OID lists.
1816
1817 2003-07-23 Moritz Schulte <[email protected]>
1818
1819 * ac.c (gcry_ac_data_construct): New argument: include_flags, only
1820 include `flags' S-expression, if include_flags is true. Adjust
1821 callers. Thanks for triggering a bug caused by `flags'
1822 sub-S-expression where they are not expected to Ralf Schneider.
1823
1824 2003-07-21 Moritz Schulte <[email protected]>
1825
1826 * pubkey.c (gcry_pk_lookup_func_name): Use new member name
1827 `aliases' instead of `sexp_names'.
1828
1829 * ac.c (gcry_ac_key_data_get): New function.
1830
1831 * cipher.c (gcry_cipher_lookup_func_name): Fix return value.
1832
1833 2003-07-20 Moritz Schulte <[email protected]>
1834
1835 * blowfish.c: Adjusted for new gcry_cipher_spec_t structure.
1836 * cast5.c: Likewise.
1837 * twofish.c: Likewise.
1838 * arcfour.c: Likewise.
1839 * rijndael.c (rijndael_oids, rijndael192_oids, rijndael256_oids):
1840 New variables, adjust for new gcry_cipher_spec_t structure.
1841 * des.c (oids_tripledes): New variable, adjust for new
1842 gcry_cipher_spec_t structure.
1843
1844 * md.c (oid_table): Removed.
1845
1846 * tiger.c (oid_spec_tiger): New variable.
1847 (digest_spec_tiger): Adjusted for new gry_md_spec_t structure.
1848
1849 * sha512.c (oid_spec_sha512): New variable.
1850 (digest_spec_sha512): Adjusted for new gry_md_spec_t structure.
1851
1852 * sha512.c (oid_spec_sha384): New variable.
1853 (digest_spec_sha384): Adjusted for new gry_md_spec_t structure.
1854
1855 * sha256.c (oid_spec_sha256): New variable.
1856 (digest_spec_sha256): Adjusted for new gry_md_spec_t structure.
1857
1858 * sha1.c (oid_spec_sha1): New variable.
1859 (digest_spec_sha1): Adjusted for new gry_md_spec_t structure.
1860
1861 * rmd160.c (oid_spec_rmd160): New variable.
1862 (digest_spec_rnd160): Adjusted for new gry_md_spec_t structure.
1863
1864 * md5.c (oid_spec_md5): New variable.
1865 (digest_spec_md5): Adjusted for new gry_md_spec_t structure.
1866
1867 * md4.c (oid_spec_md4): New variable.
1868 (digest_spec_md4): Adjusted for new gry_md_spec_t structure.
1869
1870 * crc.c (digest_spec_crc32, digest_spec_crc32_rfc1510,
1871 digest_spec_crc32_rfc2440): Adjusted for new gry_md_spec_t
1872 structure.
1873
1874 2003-07-19 Moritz Schulte <[email protected]>
1875
1876 * md.c (gcry_md_lookup_func_oid): New function.
1877 (search_oid): New function, copied from cipher.c.
1878 (gcry_md_map_name): Adjust for new search_oid_interface.
1879
1880 * cipher.c (oid_table): Removed table.
1881 (gcry_cipher_lookup_func_oid): New function.
1882 (search_oid): Rewritten to use the module functions.
1883 (gcry_cipher_map_name): Adjust for new search_oid interface.
1884 (gcry_cipher_mode_from_oid): Likewise.
1885
1886 2003-07-18 Werner Koch <[email protected]>
1887
1888 * md.c (gcry_md_hash_buffer): Convert ERR to gpg_error_t in
1889 gpg_strerror.
1890
1891 2003-07-14 Moritz Schulte <[email protected]>
1892
1893 * cipher.c (gcry_cipher_lookup_func_name): Also check the cipher
1894 name aliases, not just the primary name.
1895 (gcry_cipher_map_name): Remove kludge for aliasing Rijndael to
1896 AES.
1897
1898 * arcfour.c, blowfish.c, cast5.c, des.c, twofish.c: Adjust cipher
1899 specification structures.
1900
1901 * rijndael.c (rijndael_names, rijndael192_names,
1902 rijndael256_names): New variables, use them in the cipher
1903 specifications.
1904
1905 * rmd160test.c: Removed file.
1906
1907 * ac.c, arcfour.c, blowfish.c, cast5.c, cipher.c, des.c, dsa.c,
1908 elgamal.c, md.c, pubkey.c, random.c, rijndael.c, rsa.c, twofish.c:
1909 Used gcry_err* wrappers for libgpg symbols.
1910
1911 * primegen.c (gen_prime): Correct the order arguments to
1912 extra_check.
1913
1914 2003-07-12 Moritz Schulte <[email protected]>
1915
1916 * ac.c: Replaced all public occurences of gpg_error_t with
1917 gcry_error_t.
1918 * cipher.c: Likewise.
1919 * md.c: Likewise.
1920 * pubkey.c: Likewise.
1921 * random.c: Likewise.
1922
1923 * cipher.c: Added support for TWOFISH128.
1924
1925 2003-07-08 Moritz Schulte <[email protected]>
1926
1927 * ac.c (gcry_ac_data_copy_internal): New function, based on
1928 gcry_ac_data_copy.
1929 (gcry_ac_data_copy): Made public, use gcry_ac_data_copy_internal.
1930 (gcry_ac_key_init): Use gcry_ac_data_copy_internal.
1931
1932 2003-07-07 Moritz Schulte <[email protected]>
1933
1934 * ac.c (gcry_ac_data_set): Only release old MPI value if it is
1935 different from the new value. Bug reported by Simon Josefsson
1936 <[email protected]>.
1937
1938 * pubkey.c (gcry_pk_list): New function.
1939 * md.c (gcry_md_list): New function.
1940
1941 * ac.c (gcry_ac_key_pair_generate): Fix calculation of format
1942 string size.
1943
1944 2003-07-05 Moritz Schulte <[email protected]>
1945
1946 * md.c: Named struct of digest_table `digest_table_entry'.
1947 (digest_table_entry): New member: algorithm; filled in.
1948 (digest_table_entry): Removed unused member: flags.
1949 (gcry_md_register): New argument: algorithm_id, filled in.
1950 (gcry_md_register_default): Used algorithm ID from module
1951 structure.
1952 (gcry_md_map_name): Likewise.
1953 (md_enable): Likewise.
1954 (md_read): Likewise.
1955 (gcry_md_info): Likewise.
1956
1957 * pubkey.c: Named truct for pubkey_table `pubkey_table_entry'.
1958 (pubkey_table_entry): New member: algorithm; filled in.
1959 (gcry_pk_register_default): Used algorithm ID from pubkey_table.
1960 (gcry_pk_register): New argument: algorithm_id, filled in.
1961 (gcry_pk_map_name): Used algorithm ID from module structure.
1962 (gcry_pk_decrypt): Likewise.
1963 (gcry_pk_encrypt): Likewise.
1964 (gcry_pk_verify): Likewise.
1965 (gcry_pk_sign): Likewise.
1966 (gcry_pk_testkey): Likewise.
1967 (gcry_pk_genkey): Likewise.
1968 (gcry_pk_get_nbits): Likewise.
1969 (sexp_to_key): Removed unused variable: algo.
1970 (sexp_to_sig): Likewise.
1971
1972 * cipher.c: Named struct for cipher_table `cipher_table_entry'.
1973 (cipher_table_entry): New member: algorithm; filled in.
1974 (gcry_cipher_register_default): Used algorithm ID from
1975 cipher_table.
1976 (gcry_cipher_register): New argument: algorithm_id, filled in.
1977 (gcry_cipher_map_name): Used algorithm ID from module structure.
1978
1979 * arcfour.c (cipher_spec_arcfour): Removed algorithm ID.
1980 * blowfish.c (cipher_spec_blowfish): Likewise.
1981 * cast5.c (cipher_spec_cast5): Likewise.
1982 * crc.c (digest_spec_crc32): Likewise.
1983 * crc.c (digest_spec_crc32_rfc1510): Likewise.
1984 * crc.c (digest_spec_crc32_rfc2440): Likewise.
1985 * des.c (cipher_spec_des): Likewise.
1986 * des.c (cipher_spec_tripledes): Likewise.
1987 * dsa.c (pubkey_spec_dsa): Likewise.
1988 * elgamal.c (pubkey_spec_elg): Likewise.
1989 * md4.c (digest_spec_md4): Likewise.
1990 * md5.c (digest_spec_md5): Likewise.
1991 * aes.c (cipher_spec_aes): Likewise.
1992 * aes.c (cipher_spec_aes192): Likewise.
1993 * aes.c (cipher_spec_aes256): Likewise.
1994 * rsa.c (pubkey_spec_rsa): Likewise.
1995 * sha1.c (digest_spec_sha1): Likewise.
1996 * sha256.c (digest_spec_sha256): Likewise.
1997 * sha512.c (digest_spec_sha512): Likewise.
1998 * tiger.c (digest_spec_tiger): Likewise.
1999 * twofish.c (cipher_spec_twofish): Likewise.
2000 * twofish.c (cipher_spec_twofish128): Likewise.
2001
2002 * Makefile.am (EXTRA_libcipher_la_SOURCES): Fix list of source
2003 files; reported by Simon Josefsson <[email protected]>.
2004
2005 * pubkey.c: Replaced all occurences of `id' with `algorithm',
2006 since `id' is a keyword in obj-c.
2007 * md.c: Likewise.
2008 * cipher.c: Likewise.
2009
2010 * crc.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, tiger.c:
2011 Replaced all occurences of gcry_digest_spec_t with gcry_md_spec_t.
2012
2013 * dsa.c, rsa.c, elgamal.c: Replaced all occurencens of
2014 gcry_pubkey_spec_t with gcry_pk_spec_t.
2015
2016 * md.c: Replaced all occurences of gcry_digest_spec_t with
2017 gcry_md_spec_t.
2018 (gcry_digest_register_default): Renamed to ...
2019 (gcry_md_register_default): ... this; adjusted callers.
2020 (gcry_digest_lookup_func_name): Renamed to ...
2021 (gcry_md_lookup_func_name): ... this; adjusted callers.
2022 (gcry_digest_lookup_name): Renamed to ...
2023 (gcry_md_lookup_name): ... this; adjusted callers.
2024 (gcry_digest_register): Renamed to ...
2025 (gcry_md_register): ... this.
2026 (gcry_digest_unregister): Renamed to ...
2027 (gcry_md_unregister): ... this.
2028
2029 * pubkey.c (gcry_pubkey_register): Renamed to ...
2030 (gcry_pk_register): ... this.
2031 (gcry_pubkey_unregister): Renamed to ...
2032 (gcry_pk_unregister): ... this.
2033 Replaced all occurences of gcry_pubkey_spec_t with gcry_pk_spec_t.
2034 (gcry_pubkey_register_default): Renamed to ...
2035 (gcry_pk_register_default): ... this; adjusted callers.
2036 (gcry_pubkey_lookup_func_name): Renamed to ...
2037 (gcry_pk_lookup_func_name): ... this; adjusted callers.
2038 (gcry_pubkey_lookup_name): Renamed to ...
2039 (gcry_pk_lookup_name): ... this; adjusted callers.
2040
2041 * md.c (gcry_md_hash_buffer): Fix error checking. Thanks to Simon
2042 Josefsson <[email protected]>.
2043
2044 2003-07-04 Moritz Schulte <[email protected]>
2045
2046 * cipher.c (gcry_cipher_list): New function.
2047
2048 2003-07-01 Moritz Schulte <[email protected]>
2049
2050 * pubkey.c (sexp_to_sig): Accept a `flags' S-expression to be more
2051 consistent with sexp_to_enc.
2052
2053 2003-06-30 Moritz Schulte <[email protected]>
2054
2055 * Makefile.am (libcipher_la_SOURCES): Added: ac.c.
2056
2057 * pubkey.c (_gcry_pk_module_lookup): New function.
2058 (_gcry_pk_module_release): New function.
2059
2060 2003-06-29 Moritz Schulte <[email protected]>
2061
2062 * ac.c: New file.
2063
2064 2003-06-26 Werner Koch <[email protected]>
2065
2066 * md.c (gcry_md_hash_buffer): Trigger BUG correcly with new API.
2067
2068 2003-06-19 Werner Koch <[email protected]>
2069
2070 * md.c (gcry_md_is_enabled): Fixed.
2071
2072 2003-06-18 Werner Koch <[email protected]>
2073
2074 * cipher.c (gcry_cipher_get_algo_keylen): New.
2075 (gcry_cipher_get_algo_blklen): New.
2076
2077 2003-06-18 Moritz Schulte <[email protected]>
2078
2079 * arcfour.c, cipher.c, blowfish.c, md.c, cast5.c, pubkey.c, crc.c,
2080 des.c, dsa.c, elgamal.c, md4.c, md5.c, random.c, rijndael.c,
2081 rmd160.c, rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c:
2082 Replaced older types GcryDigestSpec, GcryCipherSpec and
2083 GcryPubkeySpec with newer types: gcry_digest_spec_t,
2084 gcry_cipher_spec_t and gcry_pubkey_spec_t.
2085
2086 * md.c (gcry_digest_id_new): Removed function.
2087 (gcry_digest_register): Removed code for generating a new module
2088 ID.
2089
2090 * pubkey.c (gcry_pubkey_id_new): Removed function.
2091 (gcry_pubkey_register): Removed code for generating a new module
2092 ID.
2093
2094 * cipher.c, md.c, pubkey.c: Replace old type GcryModule with newer
2095 one: gcry_module_t.
2096 (gcry_cipher_id_new): Removed function.
2097 (gcry_cipher_register): Removed code for generating a new module
2098 ID.
2099
2100 * cipher.c (gcry_cipher_register): Adjust call to
2101 _gcry_module_add.
2102 (gcry_cipher_register_default): Likewise.
2103 * pubkey.c (gcry_pubkey_register_default): Likewise.
2104 (gcry_pubkey_register): Likewise.
2105 * md.c (gcry_digest_register_default): Likewise.
2106 (gcry_digest_register): Likewise.
2107
2108 * md.c (gcry_digest_lookup_func_id): Removed function.
2109 (gcry_digest_lookup_id): Likewise.
2110 (gcry_digest_id_new): Use _gcry_module_lookup_id instead of
2111 gcry_digest_lookup_id.
2112 (digest_algo_to_string): Likewise.
2113 (check_digest_algo): Likewise.
2114 (md_enable): Likewise.
2115 (md_digest_length): Likewise.
2116 (md_asn_oid): Likewise.
2117
2118 * pubkey.c (gcry_pubkey_lookup_id): Removed function.
2119 (gcry_pubkey_lookup_func_id): Likewise.
2120 (gcry_pubkey_id_new): Use _gcry_module_lookup_id instead of
2121 gcry_pubkey_id_new.
2122 (gcry_pk_algo_name): Likewise.
2123 (disable_pubkey_algo): Likewise.
2124 (check_pubkey_algo): Likewise.
2125 (pubkey_get_npkey): Likewise.
2126 (pubkey_get_nskey): Likewise.
2127 (pubkey_get_nsig): Likewise.
2128 (pubkey_get_nenc): Likewise.
2129 (pubkey_generate): Likewise.
2130 (pubkey_check_secret_key): Likewise.
2131 (pubkey_encrypt): Likewise.
2132 (pubkey_decrypt): Likewise.
2133 (pubkey_sign): Likewise.
2134 (pubkey_verify): Likewise.
2135 (gcry_pk_algo_info): Likewise.
2136
2137 * cipher.c (gcry_cipher_lookup_func_id): Removed function.
2138 (gcry_cipher_lookup_id): Likewise.
2139 (cipher_algo_to_string): use _gcry_module_lookup_id instead of
2140 gcry_cipher_lookup_id.
2141 (disable_cipher_algo): Likewise.
2142 (check_cipher_algo): Likewise.
2143 (cipher_get_blocksize): Likewise.
2144 (gcry_cipher_open): Likewise.
2145 (gcry_cipher_id_new): Likewise.
2146
2147 2003-06-17 Moritz Schulte <[email protected]>
2148
2149 * Makefile.am (GCRYPT_MODULES): Set to @GCRYPT_CIPHERS@,
2150 @GCRYPT_PUBKEY_CIPHERS@, @GCRYPT_DIGESTS@ and @GCRYPT_RANDOM@.
2151 (libcipher_la_DEPENDENCIES): Set to $(GCRYPT_MODULES).
2152 (libcipher_la_LIBADD): Likewise.
2153 (AM_CFLAGS): Added: @GPG_ERROR_CFLAGS@.
2154 (EXTRA_libcipher_la_SOURCES): Added all conditional sources.
2155
2156 * md.c (md_open): Use _gcry_fast_random_poll instead of
2157 fast_random_poll.
2158 * cipher.c (gcry_cipher_open): Likewise.
2159
2160 * random.h (fast_random_poll): Removed macro.
2161
2162 * blowfish.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c,
2163 tiger.c: Use Autoconf's WORDS_BIGENDIAN instead of our own
2164 BIG_ENDIAN_HOST.
2165
2166 2003-06-16 Moritz Schulte <[email protected]>
2167
2168 * random.c (getfnc_gather_random): Do not special-case
2169 USE_ALL_RANDOM_MODULES, make it the default.
2170
2171 * dsa.c: Replace last occurences of old type names with newer
2172 names (i.e. replace MPI with gcry_mpi_t).
2173 * elgamal.c: Likewise.
2174 * primegen.c: Likewise.
2175 * pubkey.c: Likewise.
2176 * rsa.c: Likewise.
2177
2178 2003-06-14 Moritz Schulte <[email protected]>
2179
2180 * des.c (des_setkey): Add selftest check.
2181 (tripledes_set3keys): Likewise.
2182 (do_tripledes_setkey): Remove selftest check.
2183 (do_des_setkey): Likewise.
2184
2185 2003-06-11 Moritz Schulte <[email protected]>
2186
2187 * md.c (_gcry_md_init): New function.
2188 * cipher.c (_gcry_cipher_init): New function.
2189 * pubkey.c (_gcry_pk_init): New function.
2190
2191 2003-06-13 Werner Koch <[email protected]>
2192
2193 * md.c (gcry_md_get_algo): Reverted to old API. This is a
2194 convenience function anyway and error checking is not approriate.
2195 (gcry_md_is_secure): New.
2196 (gcry_md_is_enabled): New.
2197
2198 2003-06-12 Werner Koch <[email protected]>
2199
2200 * cipher.c (gcry_cipher_open): Make sure HANDLE is set to NULL on
2201 error.
2202
2203 2003-06-11 Werner Koch <[email protected]>
2204
2205 * md.c (gcry_md_open): Make sure H receives either NULL or an
2206 valid handle.
2207 (gcry_md_copy): Swapped arguments so that it is more in lione with
2208 md_open and most other API fucntions like memcpy (destination
2209 comes first). Make sure HANDLE is set to NULL on error.
2210
2211 * rijndael.c (do_encrypt): Hack to force correct alignment. It
2212 seems not to be not sufficient, though. We should rework this
2213 fucntions and remove all these ugly casts. Let the compiler
2214 optimize or have an assembler implementation.
2215
2216 2003-06-09 Moritz Schulte <[email protected]>
2217
2218 * Makefile.am: Removed rules serpent, since that is not commited
2219 yet.
2220
2221 2003-06-08 Moritz Schulte <[email protected]>
2222
2223 * pubkey.c (gcry_pk_encrypt): Improve calculation for size of the
2224 format string.
2225
2226 2003-06-07 Moritz Schulte <[email protected]>
2227
2228 * arcfour.c, bithelp.h, blowfish.c, cast5.c, cipher.c, crc.c,
2229 des.c, dsa.c, elgamal.c, md4.c, md5.c, md.c, primegen.c, pubkey.c,
2230 rand-internal.h, random.c, random.h, rijndael.c, rmd160.c,
2231 rmd160test.c, rmd.h, rndeged.c, rndlinux.c, rndunix.c, rndw32.c,
2232 rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c: Edited all
2233 preprocessor instructions to remove whitespace before the '#'.
2234 This is not required by C89, but there are some compilers out
2235 there that don't like it. Replaced any occurence of the now
2236 deprecated type names with the new ones.
2237
2238 2003-06-04 Moritz Schulte <[email protected]>
2239
2240 * pubkey.c (gcry_pk_encrypt): Construct an arg_list and use
2241 gcry_sexp_build_array instead of gcry_sexp_build.
2242 (gcry_pk_sign): Likewise.
2243 (gcry_pk_genkey): Likewise.
2244
2245 2003-06-01 Moritz Schulte <[email protected]>
2246
2247 * dsa.c (_gcry_dsa_generate): Do not check wether the algorithm ID
2248 does indeed belong to DSA.
2249 (_gcry_dsa_sign): Likewise.
2250 (_gcry_dsa_verify): Likewise.
2251 (_gcry_dsa_get_nbits): Likewise.
2252
2253 * elgamal.c (_gcry_elg_check_secret_key): Do not check wether the
2254 algorithm ID does indeed belong to ElGamal.
2255 (_gcry_elg_encrypt): Likewise.
2256 (_gcry_elg_decrypt): Likewise.
2257 (_gcry_elg_sign): Likewise.
2258 (_gcry_elg_verify): Likewise.
2259 (_gcry_elg_get_nbits): Likewise.
2260 (_gcry_elg_generate): Likewise.
2261
2262 * rsa.c (_gcry_rsa_generate): Do not check wether the algorithm ID
2263 does indeed belong to RSA.
2264 (_gcry_rsa_encrypt): Likewise.
2265 (_gcry_rsa_decrypt): Likewise.
2266 (_gcry_rsa_sign): Likewise.
2267 (_gcry_rsa_verify): Likewise.
2268 (_gcry_rsa_get_nbits): Likewise.
2269
2270 2003-05-30 Moritz Schulte <[email protected]>
2271
2272 * md.c (md_get_algo): Return zero in case to algorithm is enabled.
2273
2274 * md.c (gcry_md_info): Adjusted for new no-errno-API.
2275 (md_final): Likewise.
2276 (gcry_md_get_algo): Likewise.
2277 * pubkey.c (gcry_pk_get_keygrip): Likewise.
2278 (gcry_pk_ctl): Likewise.
2279 (gcry_pk_algo_info): Likewise.
2280 * des.c (selftest): Likewise.
2281
2282 2003-05-29 Moritz Schulte <[email protected]>
2283
2284 * md.c (md_enable): Do not forget to release module on error.
2285 (gcry_md_open): Adjusted for new no-errno-API.
2286 (md_open): Likewise.
2287 (md_copy): Likewise.
2288 (gcry_md_copy): Likewise.
2289 (gcry_md_setkey): Likewise.
2290 (gcry_md_algo_info): Likewise.
2291
2292 * cipher.c (gcry_cipher_open): Adjusted for new no-errno-API and
2293 also fixed a locking bug.
2294 (gcry_cipher_encrypt): Adjusted for new no-errno-API.
2295 (gcry_cipher_decrypt): Likewise.
2296 (gcry_cipher_ctl): Likewise.
2297 (gcry_cipher_info): Likewise.
2298 (gcry_cipher_algo_info): Likewise.
2299
2300 2003-05-28 Moritz Schulte <[email protected]>
2301
2302 * md.c (md_enable): Adjusted for libgpg-error.
2303 (gcry_md_enable): Likewise.
2304 (gcry_digest_register_default): Likewise.
2305 (gcry_digest_register): Likewise.
2306 (check_digest_algo): Likewise.
2307 (prepare_macpads): Likewise.
2308 (gcry_md_setkey): Likewise.
2309 (gcry_md_ctl): Likewise.
2310 (gcry_md_get): Likewise.
2311 (gcry_md_algo_info): Likewise.
2312 (gcry_md_info): Likewise.
2313 * dsa.c (_gcry_dsa_generate): Likewise.
2314 (_gcry_dsa_check_secret_key): Likewise.
2315 (_gcry_dsa_sign): Likewie.
2316 (_gcry_dsa_verify): Likewise.
2317 * twofish.c (do_twofish_setkey): Likewise.
2318 (twofish_setkey): Likewise.
2319 * cipher.c (gcry_cipher_register): Likewise.
2320
2321 2003-05-25 Moritz Schulte <[email protected]>
2322
2323 * rijndael.c (do_setkey): Adjusted for libgpg-error.
2324 (rijndael_setkey): Likewise.
2325 * random.c (gcry_random_add_bytes): Likewise.
2326 * elgamal.c (_gcry_elg_generate): Likewise.
2327 (_gcry_elg_check_secret_key): Likewise.
2328 (_gcry_elg_encrypt): Likewise.
2329 (_gcry_elg_decrypt): Likewise.
2330 (_gcry_elg_sign): Likewise.
2331 (_gcry_elg_verify): Likewise.
2332 * rsa.c (_gcry_rsa_generate): Likewise.
2333 (_gcry_rsa_check_secret_key): Likewise.
2334 (_gcry_rsa_encrypt): Likewise.
2335 (_gcry_rsa_decrypt): Likewise.
2336 (_gcry_rsa_sign): Likewise.
2337 (_gcry_rsa_verify): Likewise.
2338 * pubkey.c (dummy_generate, dummy_check_secret_key, dummy_encrypt,
2339 dummy_decrypt, dummy_sign, dummy_verify): Likewise.
2340 (gcry_pubkey_register): Likewise.
2341 (check_pubkey_algo): Likewise.
2342 (pubkey_generate): Likewise.
2343 (pubkey_check_secret_key): Likewise.
2344 (pubkey_encrypt): Likewise.
2345 (pubkey_decrypt): Likewise.
2346 (pubkey_sign): Likewise.
2347 (pubkey_verify): Likewise.
2348 (sexp_elements_extract): Likewise.
2349 (sexp_to_key): Likewise.
2350 (sexp_to_sig): Likewise.
2351 (sexp_to_enc): Likewise.
2352 (sexp_data_to_mpi): Likewise.
2353 (gcry_pk_encrypt): Likewise.
2354 (gcry_pk_decrypt): Likewise.
2355 (gcry_pk_sign): Likewise.
2356 (gcry_pk_verify): Likewise.
2357 (gcry_pk_testkey): Likewise.
2358 (gcry_pk_genkey): Likewise.
2359 (gcry_pk_ctl): Likewise.
2360 * cipher.c (dummy_setkey): Likewise.
2361 (check_cipher_algo): Likewise.
2362 (gcry_cipher_open): Likewise.
2363 (cipher_setkey): Likewise.
2364 (gcry_cipher_ctl): Likewise.
2365 (cipher_encrypt): Likewise.
2366 (gcry_cipher_encrypt): Likewise.
2367 (cipher_decrypt): Likewise.
2368 (gcry_cipher_decrypt): Likewise.
2369 (gcry_cipher_info): Likewise.
2370 (gcry_cipher_algo_info): Likewise.
2371 * cast5.c (cast_setkey): Likewise.
2372 (do_cast_setkey): Likewise.
2373 * arcfour.c (arcfour_setkey): Likewise.
2374 (do_arcfour_setkey): Likewise.
2375 * blowfish.c (do_bf_setkey): Likewise.
2376 (bf_setkey): Likewise.
2377 * des.c (do_des_setkey): Likewise.
2378 (do_tripledes_setkey): Likewise.
2379
2380 2003-05-22 Moritz Schulte <[email protected]>
2381
2382 * tiger.c: Merged code ussing the U64_C macro from GnuPG.
2383
2384 * sha512.c: Likewise.
2385
2386 2003-05-17 Moritz Schulte <[email protected]>
2387
2388 * pubkey.c (gcry_pk_genkey): Fix type: acquire a lock, instead of
2389 releasing it.
2390
2391 2003-05-11 Moritz Schulte <[email protected]>
2392
2393 * pubkey.c (gcry_pk_testkey): Call REGISTER_DEFAULT_CIPHERS.
2394 (gcry_pk_ctl): Likewise.
2395
2396 2003-04-27 Moritz Schulte <[email protected]>
2397
2398 * pubkey.c (gcry_pk_genkey): Release sexp after extracted data has
2399 been used.
2400
2401 * md.c (gcry_md_get_algo_dlen): Simplified, simply call
2402 md_digest_length to do the job.
2403
2404 * des.c (do_des_setkey): Check for selftest failure not only
2405 during initialization.
2406 (do_tripledes_setkey): Include check for selftest failure.
2407
2408 * pubkey.c (gcry_pubkey_register_default): New macro
2409 `pubkey_use_dummy', use it.
2410
2411 * elgamal.c (elg_names): New variable.
2412 (pubkey_spec_elg): Include elg_names.
2413
2414 * dsa.c (dsa_names): New variable.
2415 (pubkey_spec_dsa): Include dsa_names.
2416
2417 * rsa.c (rsa_names): New variable.
2418 (pubkey_spec_rsa): Include rsa_names.
2419
2420 * pubkey.c (gcry_pubkey_lookup_func_name): Compare name also with
2421 the names listed in `sexp_names'.
2422
2423 2003-04-24 Moritz Schulte <[email protected]>
2424
2425 * pubkey.c (sexp_to_key): New variables: module, pubkey. Adjusted
2426 to new module interface.
2427 (sexp_to_key): Changend type of argument `retalgo' from `int *' to
2428 `GcryModule **'. Adjusted all callers. Removed argument:
2429 r_algotblidx.
2430 (sexp_to_sig): Changend type of argument `retalgo' from `int *' to
2431 `GcryModule **'. Adjusted all callers.
2432 (sexp_to_enc): Likewise.
2433
2434 (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig,
2435 pubkey_get_nenc): Use strlen to find out the number.
2436
2437 * rsa.c: Adjust pubkey_spec_rsa to new internal interface.
2438 * dsa.c: Likewise.
2439 * elgamal.c: Likewise.
2440
2441 2003-04-17 Moritz Schulte <[email protected]>
2442
2443 * pubkey.c (sexp_elements_extract): New function.
2444 * pubkey.c (sexp_to_key): Removed variable `idx', added `err', use
2445 sexp_elements_extract.
2446 (sexp_to_sig): Likewise.
2447 (sexp_to_enc): Likewise.
2448
2449 * pubkey.c: Terminate list correctly.
2450 * md.c: Include sha512/sha384 in digest_table.
2451
2452 2003-04-16 Moritz Schulte <[email protected]>
2453
2454 * Makefile.am: Include support for sha512.c.
2455
2456 * sha512.c: New file, merged from GnuPG, with few modifications
2457 for libgcrypt.
2458
2459 * rand-internal.h: Removed declarations for constructor functions.
2460
2461 * md.c (md_copy): Call _gcry_module_use for incrementing the usage
2462 counter of the digest modules.
2463
2464 * rsa.c: Do not include "rsa.h".
2465 * dsa.c: Do not include "dsa.h".
2466 * elgamal.c: Do not include "elgamal.h".
2467 * des.c: Do not include "des.h".
2468 * cast5.c: Do not include "cast5.h".
2469 * blowfish.c: Do not include "blowfish.h".
2470 * arcfour.c: Do not include "arcfour.h".
2471
2472 * Makefile.am (libcipher_la_DEPENDENCIES): Removed.
2473 (libcipher_la_LIBADD): Removed.
2474 Use Automake conditionals for conditional compilation.
2475
2476 2003-04-13 Moritz Schulte <[email protected]>
2477
2478 * cipher.c (gcry_cipher_open): Call REGISTER_DEFAULT_CIPHERS.
2479
2480 * md.c (gcry_md_list): New member: module.
2481 (md_enable): New variable: module, changed use of module and
2482 digest.
2483 (md_enable): Initialize member: module.
2484 (md_close): Call _gcry_module_release.
2485
2486 * cipher.c (gcry_cipher_open): New variable: module, changed use of
2487 module and cipher.
2488 (struct gcry_cipher_handle): New member: module.
2489 (gcry_cipher_open): Initialize member: module.
2490 (gcry_cipher_close): Call _gcry_module_release.
2491
2492 2003-04-09 Moritz Schulte <[email protected]>
2493
2494 * cipher.c: Include "ath.h".
2495 * md.c: Likewise.
2496 * pubkey.c: Likewise.
2497
2498 * cipher.c (ciphers_registered_lock): New variable.
2499 * md.c (digests_registered_lock): New variable.
2500 * pubkey.c (pubkeys_registered_lock): New variable.
2501
2502 * rndlinux.c (gnupgext_version, func_table): Removed definitions.
2503 (gnupgext_enum_func): Removed function.
2504 (_gcry_rndlinux_constructor): Removed function.
2505
2506 * rndegd.c (gnupgext_version, func_table): Removed definitions.
2507 (gnupgext_enum_func): Removed function.
2508 (_gcry_rndegd_constructor): Removed function.
2509
2510 * rndunix.c (gnupgext_version, func_table): Removed definitions.
2511 (gnupgext_enum_func): Removed function.
2512 (_gcry_rndunix_constructor): Removed function.
2513
2514 * rndw32.c (gnupgext_version, func_table): Removed definitions.
2515 (gnupgext_enum_func): Removed function.
2516 (_gcry_rndw32_constructor): Removed function.
2517
2518 * rndegd.c (rndegd_connect_socket): Simplify code for creating the
2519 egd socket address.
2520 (rndegd_connect_socket): Call log_fatal use instead of
2521 g10_log_fatal.
2522 (egd_gather_random): Renamed to ...
2523 (rndegd_gather_random): ... here.
2524
2525 2003-04-08 Moritz Schulte <[email protected]>
2526
2527 * rndlinux.c: Do not include "dynload.h".
2528 * rndunix.c: Likewise.
2529 * rndw32.c: Likewise.
2530
2531 * rndegd.c (rndegd_connect_socket): Factored out from ...
2532 (egd_gather_random): here; call it.
2533 (egd_socket): New variable.
2534 (egd_gather_random): Initialize fd with egd_socket, do not declare
2535 fd static.
2536 (do_read): Merged few changes from GnuPG. FIXME - not finished?
2537 Do not include "dynload.h".
2538
2539 * rndw32.c (gather_random): Renamed to rndw32_gather_random, do
2540 not declare static.
2541 (gather_random_fast): Renamed to rndw32_gather_random_fast, do not
2542 declare static.
2543
2544 * rndunix.c (gather_random): Renamed to rndunix_gather_random, do
2545 not declare static.
2546 * rndegd.c (gather_random): Renamed to rndegd_gather_random, do
2547 not declare static.
2548 * rndlinux.c (gather_random): Renamed to rndlinux_gather_random,
2549 do not declare static.
2550
2551 2003-04-07 Moritz Schulte <[email protected]>
2552
2553 * Makefile.am (libcipher_la_SOURCES): Removed construct.c.
2554 (libcipher_la_SOURCES): Added sha1.c, sha256.c, rmd160.c, md4.c,
2555 md5.c, tiger.c and crc.c
2556 (EXTRA_PROGRAMS): Removed sha1, sha256, rmd160, md4, md5, tiger
2557 and crc. Removed definitions: EXTRA_md4_SOURCES,
2558 EXTRA_md5_SOURCES, EXTRA_rmd160_SOURCES, EXTRA_sha1_SOURCES,
2559 EXTRA_sha256_SOURCES, EXTRA_tiger_SOURCES and EXTRA_crc_SOURCES,
2560 BUILT_SOURCES, DISTCLEANFILES.
2561
2562 * pubkey.c: Do not include "elgamal.h", "dsa.h" and "rsa.h".
2563
2564 * Makefile.am (libcipher_la_SOURCES): Removed rsa.h, elgamal.h,
2565 dsa.h, des.h, cast5.h, arcfour.h and blowfish.h.
2566
2567 * rsa.h: Removed file.
2568 * elgamal.h: Removed file.
2569 * dsa.h: Removed file.
2570 * des.h: Removed file.
2571 * cast5.h: Removed file.
2572 * arcfour.h: Removed file.
2573 * blowfish.h: Removed file.
2574
2575 * Makefile.am (libcipher_la_SOURCES): Removed dynload.c and
2576 dynload.h.
2577
2578 * rsa.c (pubkey_spec_rsa): New variable.
2579 * dsa.c (pubkey_spec_rsa): New variable.
2580 * elgamal.c (pubkey_spec_elg): New variable.
2581
2582 * rsa.c (_gcry_rsa_get_info): Removed function.
2583 * elgamal.c (_gcry_elg_get_info): Removed function.
2584 * dsa.c (_gcry_dsa_get_info): Removed function.
2585
2586 * tiger.c (tiger_get_info): Removed function.
2587 (gnupgext_version, func_table): Removed definitions.
2588 (gnupgext_enum_func): Removed function.
2589 (_gcry_tiger_constructor): Removed function.
2590
2591 * sha1.c (sha1_get_info): Removed function.
2592 (gnupgext_version, func_table): Removed definitions.
2593 (gnupgext_enum_func): Removed function.
2594 (_gcry_sha1_constructor): Removed function.
2595
2596 * sha256.c (sha256_get_info): Removed function.
2597 (gnupgext_version, func_table): Removed definitions.
2598 (gnupgext_enum_func): Removed function.
2599 (_gcry_sha256_constructor): Removed function.
2600
2601 * rmd160.c (rmd160_get_info): Removed function.
2602 (gnupgext_version, func_table): Removed definitions.
2603 (gnupgext_enum_func): Removed function.
2604 (_gcry_rmd160_constructor): Removed function.
2605
2606 * md5.c (md5_get_info): Removed function.
2607 (gnupgext_version, func_table): Removed definitions.
2608 (gnupgext_enum_func): Removed function.
2609 (_gcry_md5_constructor): Removed function.
2610
2611 * md4.c (md4_get_info): Removed function.
2612 (gnupgext_version, func_table): Removed definitions.
2613 (gnupgext_enum_func): Removed function.
2614 (_gcry_md4_constructor): Removed function.
2615
2616 * crc.c (crc_get_info): Removed function.
2617
2618 * arcfour.c (do_arcfour_setkey): Changed type of context argument
2619 to `void *', added local variable for cast, adjusted callers.
2620 (arcfour_setkey): Likewise.
2621 (encrypt_stream): Likewise.
2622 * cast5.c (cast_setkey): Likewise.
2623 (encrypt_block): Likewise.
2624 * rijndael.c (rijndael_setkey): Likewise.
2625 (rijndael_encrypt): Likewise.
2626 (rijndael_decrypt): Likewise.
2627 * twofish.c (twofish_setkey): Likewise.
2628 (twofish_encrypt): Likewise.
2629 (twofish_decrypt): Likewise.
2630 * des.c (do_des_setkey): Likewise.
2631 (do_des_encrypt): Likewise.
2632 (do_des_encrypt): Likewise.
2633 (do_tripledes_encrypt): Likewise.
2634 (do_tripledes_encrypt): Likewise.
2635 * blowfish.c (bf_setkey: Likewise.
2636 (encrypt_block): Likewise.
2637 (decrypt_block): Likewise.
2638
2639 * arcfour.c (encrypt_stream): Likewise.
2640
2641 * rijndael.c (gnupgext_version, func_table): Removed definitions.
2642 (gnupgext_enum_func) Removed function.
2643
2644 * twofish.c (gnupgext_version, func_table): Removed definitions.
2645 (gnupgext_enum_func) Removed function.
2646
2647 * cast5.c (CIPHER_ALGO_CAST5): Removed.
2648
2649 * blowfish.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
2650 (CIPHER_ALGO_BLOWFISH): Removed symbol.
2651 * cast5.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Likewise.
2652 * des.c (selftest_failed): Removed.
2653 (initialized): New variable.
2654 (do_des_setkey): Run selftest, if not yet done.
2655 (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
2656
2657 * arcfour.c (_gcry_arcfour_get_info): Removed function.
2658 * blowfish.c (_gcry_blowfish_get_info): Removed function.
2659 * cast5.c (_gcry_cast5_get_info): Removed function.
2660 * des.c (_gcry_des_get_info): Removed function.
2661 * rijndael.c (_gcry_rijndael_get_info): Removed function.
2662 * twofish.c (_gcry_twofish_get_info): Removed function.
2663
2664 * arcfour.c (cipher_spec_arcfour): New variable.
2665 * twofish.c (cipher_spec_twofish, cipher_spec_twofish128): New
2666 variables.
2667 * rijndael.c (cipher_spec_aes, cipher_spec_aes192,
2668 cipher_spec256): New variables.
2669 * des.c (cipher_spec_des, cipher_spec_tripledes): New variables.
2670 * cast5.c (cipher_spec_cast5): New variable.
2671 * blowfish.c (cipher_spec_blowfish): Likewise.
2672
2673 * twofish.c: Do not include "dynload.h".
2674 * rijndael.c: Likewise.
2675 * des.c: Likewise.
2676 * cast5.c: Likewise.
2677 * blowfish.c: Likewise.
2678 * cipher.c: Likewise.
2679 * crc.c: Likewise.
2680 * md4.c: Likewise.
2681 * md5.c: Likewise.
2682 * md.c: Likewise.
2683 * pubkey.c: Likewise.
2684 * rijndael.c: Likewise.
2685 * sha1.c: Likewise.
2686 * sha256.c: Likewise.
2687
2688 * arcfour.c: Include "cipher.h".
2689 * twofish.c: Likewise.
2690 * rijndael.c: Likewise.
2691 * des.c: Likewise.
2692 * cast5.c: Likewise.
2693 * blowfish.c: Likewise.
2694
2695 * twofish.c (twofish_setkey): Declared argument `key' const.
2696 (twofish_encrypt): Declared argument `inbuf' const.
2697 (twofish_decrypt): Likewise.
2698
2699 * rijndael.c (rijndael_setkey): Declared argument `key' const.
2700 (rijndael_encrypt): Declared argument `inbuf' const.
2701 (rijndael_decrypt): Likewise.
2702
2703 * des.c (do_des_setkey): Declared argument `key' const.
2704 (do_tripledes_setkey): Likewise.
2705 (do_des_encrypt): Declared argument `inbuf' const.
2706 (do_des_decrypt): Likewise.
2707 (do_tripledes_encrypt): Likewise.
2708 (do_tripledes_decrypt): Likewise.
2709
2710 * cast5.c (encrypt_block): Declared argument `inbuf' const.
2711 (decrypt_block): Likewise.
2712 (cast_setkey): Declared argument `key' const.
2713
2714 * blowfish.c (do_bf_setkey): Declared argument `key' const.
2715 (encrypt_block): Declared argument `inbuf' const.
2716 (encrypt_block): Likewise.
2717
2718
2719
2720 * cipher.c: Remove CIPHER_ALGO_DUMMY related code.
2721 Removed struct cipher_table_s.
2722 Changed definition of cipher_table.
2723 Removed definition of disabled_algos.
2724 (ciphers_registered, default_ciphers_registered): New variables.
2725 (REGISTER_DEFAULT_CIPHERS): New macro.
2726 (dummy_setkey): Declared argument `key' const.
2727 (dummy_encrypt_block): Declared argument `inbuf' const.
2728 (dummy_encrypt_block): Likewise.
2729 (dummy_encrypt_stream): Likewise.
2730 (dummy_encrypt_stream): Likewise.
2731 (dummy_setkey): Use `unsigned char' instead of `byte'.
2732 (dummy_encrypt_block): Likewise.
2733 (dummy_decrypt_block): Likewise.
2734 (dummy_encrypt_stream): Likewise.
2735 (dummy_decrypt_stream): Likewise.
2736 (gcry_cipher_register_default): New function.
2737 (gcry_cipher_lookup_func_id): New function.
2738 (gcry_cipher_lookup_func_name): New function.
2739 (gcry_cipher_lookup_id): New function.
2740 (gcry_cipher_lookup_name): New function.
2741 (gcry_cipher_id_new): New function.
2742 (gcry_cipher_register): New function.
2743 (gcry_cipher_unregister): New function.
2744 (setup_cipher_table): Removed function.
2745 (load_cipher_modules): Removed function.
2746 (gcry_cipher_map_name): Adjusted to use new module management.
2747 (cipher_algo_to_string): Likewise.
2748 (disable_cipher_algo): Likewise.
2749 (check_cipher_algo): Likewise.
2750 (cipher_get_keylen): Likewise.
2751 (cipher_get_blocksize): Likewise.
2752 (gcry_cipher_open): Likewise.
2753 (struct gcry_cipher_handle): Replaced members algo, algo_index,
2754 blocksize, setkey, encrypt, decrypt, stencrypt, stdecrypt with one
2755 member: cipher.
2756 (gcry_cipher_open): Adjusted code for new handle structure.
2757 (cipher_setkey): Likewise.
2758 (cipher_setiv): Likewise.
2759 (cipher_reset): Likewise.
2760 (do_ecb_encrypt): Likewise.
2761 (do_ecb_decrypt): Likewise.
2762 (do_cbc_encrypt): Likewise.
2763 (do_cbc_decrypt): Likewise.
2764 (do_cfb_encrypt): Likewise.
2765 (do_cfb_decrypt): Likewise.
2766 (do_ctr_encrypt): Likewise.
2767 (cipher_encrypt): Likewise.
2768 (gcry_cipher_encrypt): Likewise.
2769 (cipher_decrypt): Likewise.
2770 (gcry_cipher_decrypt): Likewise.
2771 (cipher_sync): Likewise.
2772 (gcry_cipher_ctl): Likewise.
2773
2774 * pubkey.c: Removed struct pubkey_table_s.
2775 Changed definition of pubkey_table.
2776 Removed definition of disabled_algos.
2777 (pubkeys_registered, default_pubkeys_registered): New variables.
2778 (REGISTER_DEFAULT_PUBKEYS): New macro.
2779 (setup_pubkey_table): Removed function.
2780 (load_pubkey_modules): Removed function.
2781 (gcry_pubkey_register_default): New function.
2782 (gcry_pubkey_lookup_func_id): New function.
2783 (gcry_pubkey_lookup_func_name): New function.
2784 (gcry_pubkey_lookup_id): New function.
2785 (gcry_pubkey_lookup_name): New function.
2786 (gcry_pubkey_id_new): New function.
2787 (gcry_pubkey_register): New function.
2788 (gcry_pubkey_unregister): New function.
2789 (gcry_pk_map_name): Adjusted to use new module management.
2790 (gcry_pk_algo_name): Likewise.
2791 (disable_pubkey_algo): Likewise.
2792 (check_pubkey_algo): Likewise.
2793 (pubkey_get_npkey): Likewise.
2794 (pubkey_get_nskey): Likewise.
2795 (pubkey_get_nsig): Likewise.
2796 (pubkey_get_nenc): Likewise.
2797 (pubkey_generate): Likewise.
2798 (pubkey_check_secret_key): Likewise.
2799 (pubkey_encrypt): Likewise.
2800 (pubkey_decrypt): Likewise.
2801 (pubkey_sign): Likewise.
2802 (pubkey_verify): Likewise.
2803 (gcry_pk_get_nbits): Likewise.
2804 (gcry_pk_algo_info): Likewise.
2805
2806 * md.c: Removed struct md_digest_list_s.
2807 (digest_list): Changed definition.
2808 (digests_registered, default_digests_registered): New variables.
2809 (REGISTER_DEFAULT_DIGESTS): New macro.
2810 (new_list_item): Removed function.
2811 (setup_md_table): Removed function.
2812 (load_digest_module): Removed function.
2813 (gcry_digest_register_default): New function.
2814 (gcry_digest_lookup_func_id): New function.
2815 (gcry_digest_lookup_func_name): New function.
2816 (gcry_digest_lookup_id): New function.
2817 (gcry_digest_lookup_name): New function.
2818 (gcry_digest_id_new): New function.
2819 (gcry_digest_register): New function.
2820 (gcry_digest_unregister): New function.
2821 (GcryDigestEntry): New type.
2822 (struct gcry_md_context): Adjusted type of `list'.
2823 (gcry_md_map_name): Adjusted to use new module management.
2824 (digest_algo_to_string): Likewise.
2825 (check_digest_algo): Likewise.
2826 (md_enable): Likewise.
2827 (md_digest_length): Likewise.
2828 (md_asn_oid): Likewise.
2829
2830 2003-04-07 Moritz Schulte <[email protected]>
2831
2832 * pubkey.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA,
2833 PUBKEY_ALGO_RSA with GCRY_PK_RSA and PUBKEY_ALGO_ELGAMAL with
2834 GCRY_PK_ELG.
2835
2836 * dsa.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA.
2837
2838 2003-04-01 Moritz Schulte <[email protected]>
2839
2840 * des.c: Removed checks for GCRY_CIPHER_3DES and GCRY_CIPHER_DES.
2841
2842 2003-03-31 Moritz Schulte <[email protected]>
2843
2844 * tiger.c (tiger_get_info): Do not declare static.
2845 * sha256.c (sha256_get_info): Likewise.
2846 * sha1.c (sha1_get_info): Likewise.
2847 * rmd160.c (rmd160_get_info): Likewise.
2848 * md5.c (md5_get_info): Likewise.
2849 * md4.c (md4_get_info): Likewise.
2850 * crc.c (crc_get_info): Likewise.
2851
2852 * md.c (load_digest_module): Call setup_md_table during
2853 initialization.
2854 (new_list_item): Link new element into digest_list.
2855
2856 * cipher.c (do_ctr_decrypt): Made do_ctr_encrypt act as a wrapper
2857 for do_ctr_encrypt, since these functions are identical.
2858
2859 2003-03-30 Simon Josefsson <[email protected]>
2860
2861 * cipher.c (struct gcry_cipher_handle): Add counter field.
2862 (gcry_cipher_open): Add CTR.
2863 (cipher_reset): Clear counter field.
2864 (do_ctr_encrypt, do_ctr_decrypt): New functions.
2865 (cipher_encrypt, cipher_decrypt): Call CTR functions.
2866 (gcry_cipher_ctl): Add SET_CTR to set counter.
2867
2868 2003-03-30 Moritz Schulte <[email protected]>
2869
2870 * rsa.c (_gcry_rsa_blind): New function.
2871 (_gcry_rsa_unblind): New function.
2872 (_gcry_rsa_decrypt): Use _gcry_rsa_blind and _gcry_rsa_decrypt.
2873
2874 2003-03-26 Moritz Schulte <[email protected]>
2875
2876 * dynload.c (_gcry_enum_gnupgext_pubkeys): Adjust `encrypt' and
2877 `decrypt' function arguments.
2878 (_gcry_enum_gnupgext_pubkeys): Likewise.
2879 * dynload.h: Likewise.
2880
2881 * pubkey.c (dummy_decrypt): Add argument: int flags.
2882 (dummy_encrypt): Likewise.
2883
2884 * elgamal.c (_gcry_elg_encrypt): Add argument: int flags.
2885 (_gcry_elg_decrypt): Likewise.
2886
2887 * rsa.c (_gcry_rsa_encrypt): Add argument: int flags.
2888 (_gcry_rsa_decrypt): Likewise.
2889
2890 * pubkey.c: Add `flags' argument to members `encrypt' and
2891 `decrypt' of struct `pubkey_table_s'.
2892
2893 * rsa.h: Add `flags' argument to function declarations.
2894 * elgamal.h: Likewise.
2895
2896 * pubkey.c (sexp_data_to_mpi): New variable: int parsed_flags.
2897 (sexp_data_to_mpi): Set `parsed_flags'.
2898 (sexp_data_to_mpi): New argument: int *flags.
2899 (gcry_pk_encrypt): New variable: int flags.
2900 (gcry_pk_encrypt): Pass `flags' to pubkey_encrypt.
2901 (pubkey_encrypt): New variable: int flags.
2902 (pubkey_encrypt): Pass `flags' to pubkey encrypt function.
2903 (pubkey_decrypt): Likewise.
2904 (pubkey_decrypt): Pass `flags' to pubkey encrypt function.
2905 (gcry_pk_encrypt): Include `flags' s-exp in return list.
2906 (sexp_to_enc): New argument: int *flags.
2907 (gcry_pk_decrypt): New variable: int flags.
2908 (gcry_pk_decrypt): Pass `flags' to pubkey_decrypt.
2909 (sexp_to_enc): New variable: int parsed_flags.
2910 (sexp_to_enc): Set `parsed_flags'.
2911
2912 2003-03-22 Simon Josefsson <[email protected]>
2913
2914 * cipher.c (gcry_cipher_open, do_cbc_encrypt)
2915 (gcry_cipher_encrypt): Support GCRY_CIPHER_CBC_MAC.
2916 (gcry_cipher_ctl): Support GCRYCTL_SET_CBC_MAC.
2917
2918 2003-03-19 Werner Koch <[email protected]>
2919
2920 * primegen.c (gen_prime): New args EXTRA_CHECK and EXTRA_CHECK_ARG
2921 to allow for a user callback. Changed all callers.
2922 (_gcry_generate_secret_prime)
2923 (_gcry_generate_public_prime): Ditto, pass them to gen_prime.
2924 * rsa.c (check_exponent): New.
2925 (generate): Use a callback to ensure that a given exponent is
2926 actually generated.
2927
2928 2003-03-12 Moritz Schulte <[email protected]>
2929
2930 * primegen.c: Initialize `no_of_small_prime_numbers' statically.
2931 (gen_prime): Remove calculation of `no_of_small_prime_numbers'.
2932
2933 2003-03-03 Moritz Schulte <[email protected]>
2934
2935 * md.c (gcry_md_ctl): Rewritten to use same style like the other
2936 functions dispatchers.
2937
2938 2003-03-02 Moritz Schulte <[email protected]>
2939
2940 * cipher.c (struct gcry_cipher_handle): New member: algo_index.
2941 (gcry_cipher_open): Allocate memory for two cipher contexts.
2942 Initialize algo_index.
2943 (cipher_setkey): Duplicate context into reserved memory.
2944 (cipher_reset): New function, which resets the context and clear
2945 the IV.
2946 (gcry_cipher_ctl): Call cipher_reset.
2947
2948 2003-02-23 Moritz Schulte <[email protected]>
2949
2950 * cipher.c: Remove (bogus) `digitp' macro definition.
2951 * md.c: Likewise.
2952
2953 * blowfish.c (burn_stack): Removed.
2954 * arcfour.c (burn_stack): Likewise.
2955 * cast5.c (burn_stack): Likewise.
2956 * des.c (burn_stack): Likewise.
2957 * md4.c (burn_stack): Likewise.
2958 * md5.c (burn_stack): Likewise.
2959 * random.c (burn_stack): Likewise.
2960 * rijndael.c (burn_stack): Likewise.
2961 * rmd160.c (burn_stack): Likewise.
2962 * sha1.c (burn_stack): Likewise.
2963 * sha256.c (burn_stack): Likewise.
2964 * tiger.c (burn_stack): Likewise.
2965 * twofish.c (burn_stack): Likewise.
2966
2967 * blowfish.c: Changed all occurences of burn_stack to
2968 _gcry_burn_stack.
2969 * arcfour.c: Likewise.
2970 * cast5.c: Likewise.
2971 * des.c: Likewise.
2972 * md4.c: Likewise.
2973 * md5.c: Likewise.
2974 * random.c: Likewise.
2975 * rijndael.c: Likewise.
2976 * rmd160.c: Likewise.
2977 * sha1.c: Likewise.
2978 * sha256.c: Likewise.
2979 * tiger.c: Likewise.
2980 * twofish.c: Likewise.
2981
2982 * arcfour.c (_gcry_arcfour_get_info): Use GCRY_CIPHER_ARCFOUR
2983 instead of hard-coded value `301'.
2984
2985 2003-01-24 Werner Koch <[email protected]>
2986
2987 * random.c (_gcry_register_random_progress): New.
2988 (_gcry_random_progress): New.
2989
2990 * rndlinux.c (gather_random): Call the random progress function.
2991
2992 2003-01-23 Werner Koch <[email protected]>
2993
2994 * rsa.c (generate): New arg USE_E to request a specific public
2995 exponent.
2996 (_gcry_rsa_generate): Ditto.
2997 * elgamal.c (_gcry_elg_generate): Must add an dummy argument
2998 instead of USE_E.
2999 * dsa.c (_gcry_dsa_generate): Ditto.
3000 * pubkey.c (dummy_generate): Ditto.
3001 (pubkey_generate): Add USE_E arg and pass it down.
3002 (gcry_pk_genkey): Detect "rsa-use-e" parameter and pass it to generate.
3003
3004 * pubkey.c (sexp_to_enc): New arg RET_MODERN.
3005 (gcry_pk_decrypt): Make use of it to return a real S-expression.
3006 Return better error codes.
3007 (gcry_pk_verify): Return better error codes.
3008
3009 2003-01-21 Werner Koch <[email protected]>
3010
3011 * random.c (gcry_random_add_bytes): Add QUALITY argument, let
3012 function return an error code and disable its core for now.
3013
3014 2003-01-21 Timo Schulz <[email protected]>
3015
3016 * random.c (gcry_random_add_bytes): New. Function to add external
3017 random to the pool.
3018
3019 2003-01-20 Simon Josefsson <[email protected]>
3020
3021 * crc.c: New.
3022 * Makefile.am (EXTRA_PROGRAMS, EXTRA_crc_SOURCES): Add crc.c.
3023 * md.c (gcry_md_get_algo_dlen): Add values for CRC.
3024
3025 2003-01-20 Werner Koch <[email protected]>
3026
3027 * sha256.c: New.
3028 * bithelp.h (ror): New.
3029 * Makfile.am: Add sha256.c.
3030 * md.c (oid_table): Add values for SHA256 et al.
3031 (gcry_md_get_algo_dlen): Likewise
3032
3033 2003-01-20 Werner Koch <[email protected]>
3034
3035 * pubkey.c (gcry_pk_get_keygrip): Implemented keygrips for DSA
3036 and ElGamal.
3037
3038 2003-01-17 Werner Koch <[email protected]>
3039
3040 * cipher.c (gcry_cipher_encrypt): Reworked so that the output will
3041 never contain the plaintext even if the caller did not checked the
3042 return value.
3043
3044 * md.c (gcry_md_get_algo): Changed error code to GCRYERR_GENERAL
3045 because we don't have an invalid md algo but no algorithm enabled.
3046
3047 * pubkey.c (gcry_pk_genkey): Changed error code for bounds check
3048 of table parameters to GCRYERR_INTERNAL.
3049
3050 * md.c (gcry_md_open): Partly reverted Timo's change from
3051 2002-10-10 by removing the check for the algorithm. An algorithm
3052 of 0 is allowed and anyway we should not double check it or check
3053 it using a different function. Also fixed the flags check.
3054
3055 * pubkey.c (gcry_pk_encrypt): Make sure that R_CIPH points to NULL
3056 on error.
3057 (gcry_pk_decrypt): Ditto for R_PLAIN.
3058 (gcry_pk_sign): Ditto for R_SIG.
3059 (gcry_pk_genkey): Ditto for R_KEY.
3060
3061 2003-01-16 Werner Koch <[email protected]>
3062
3063 * md.c (gcry_md_write): Changed 2nd argument type to void*.
3064 (gcry_md_hash_buffer): Changed type of boths buffers to void*.
3065 (gcry_md_setkey): Changed 2nd argument type to void*.
3066
3067 2003-01-15 Werner Koch <[email protected]>
3068
3069 * pubkey.c (sexp_data_to_mpi): New. This handles pkcs1 padding.
3070 (gcry_pk_sign, gcry_pk_verify): Use it here.
3071 (gcry_pk_encrypt): And here.
3072 (pubkey_verify): Add debug code.
3073 (sexp_to_enc): Handle flags in the input and return the pkcs1 flag
3074 in a new parameter.
3075 (gcry_pk_decrypt): Prepare for future pkcs1 handling.
3076
3077 2002-12-19 Werner Koch <[email protected]>
3078
3079 * random.c (_gcry_random_initialize): New.
3080
3081 2002-12-16 Werner Koch <[email protected]>
3082
3083 * cipher.c: Added a Teletrust specific OID for 3DES.
3084
3085 2002-12-12 Werner Koch <[email protected]>
3086
3087 * md.c: Added another oddball OIW OID (sha-1WithRSAEncryption).
3088
3089 2002-11-23 Werner Koch <[email protected]>
3090
3091 * md.c (load_digest_module): Enlarged checked_algos bitmap.
3092 * md4.c (func_table): Fixed entry for md4.
3093 Both by Simon Josephson.
3094 (transform): Copy data to get the alignment straight. Tested only
3095 on i386.
3096
3097 2002-11-10 Simon Josefsson <[email protected]>
3098
3099 * cipher.c (gcry_cipher_open): Don't reject CTS flag.
3100 (do_cbc_encrypt, do_cbc_decrypt, cipher_encrypt)
3101 (gcry_cipher_encrypt, cipher_decrypt)
3102 (gcry_cipher_decrypt): Support CTS flag.
3103 (gcry_cipher_ctl): Toggle CTS flag.
3104
3105 2002-11-10 Werner Koch <[email protected]>
3106
3107 * md4.c: New. By Simon Josefsson.
3108 * Makefile.am (EXTRA_PROGRAMS): Add md4.c.
3109 * md.c (oid_table,gcry_md_get_algo_dlen): MD4 support.
3110
3111 2002-10-14 Werner Koch <[email protected]>
3112
3113 * arcfour.c (do_encrypt_stream): Don't use increment op when
3114 assigning to the same variable.
3115
3116 2002-10-10 Timo Schulz <[email protected]>
3117
3118 * pubkey.c (gcry_pk_genkey): Check boundaries.
3119
3120 * md.c (gcry_md_open): Check that algo is available and only
3121 valid flag values are used.
3122 (gcry_md_get_algo): Add error handling.
3123
3124 2002-09-26 Werner Koch <[email protected]>
3125
3126 * md.c: Include an OID for TIGER.
3127 * tiger.c (tiger_get_info): Use a regular OID.
3128
3129 2002-09-17 Werner Koch <[email protected]>
3130
3131 * random.c: Replaced mutex.h by the new ath.h. Changed all calls.
3132
3133 2002-09-16 Werner Koch <[email protected]>
3134
3135 * arcfour.c (do_encrypt_stream): Use register modifier and modulo.
3136 According to Nikos Mavroyanopoulos this increases perfromace on
3137 i386 system noticable. And I always tought gcc is clever enough.
3138 * md5.c (transform): Use register modifier.
3139 * rmd160.c (transform): Ditto.
3140 * sha1.c (transform): Ditto. We hope that there are 6 free registers.
3141 * random.c (gcry_randomize): Rewrote to avoid malloc calls.
3142
3143 * rndlinux.c (gather_random): Replaced remaining fprintfs by log_*.
3144 * arcfour.c (do_arcfour_setkey): Ditto.
3145 * twofish.c (do_twofish_setkey): Ditto.
3146 * rndegd.c (gather_random): Ditto.
3147 * rijndael.c (do_setkey): Ditto.
3148 * random.c (_gcry_random_dump_stats): Ditto.
3149 * primegen.c (_gcry_generate_elg_prime): Ditto.
3150 * des.c (_gcry_des_get_info): Ditto.
3151 * cast5.c (do_cast_setkey): Ditto.
3152 * blowfish.c (do_bf_setkey): Ditto.
3153
3154 2002-08-26 Werner Koch <[email protected]>
3155
3156 * des.c (weak_keys): Fixed one entry in the table and compared
3157 all entries against the literature.
3158 (selftest): Checksum the weak key table.
3159
3160 2002-08-21 Werner Koch <[email protected]>
3161
3162 * pubkey.c: Enable keygrip calculation for "openpgp-rsa".
3163
3164 2002-08-17 Werner Koch <[email protected]>
3165
3166 * cipher.c (setup_cipher_table): Don't overwrite the DES entry
3167 with the entry for DUMMY.
3168
3169 2002-08-14 Werner Koch <[email protected]>
3170
3171 * des.c (do_des_setkey,do_des_encrypt, do_des_decrypt): New.
3172 (_gcry_des_get_info): Support plain old DES.
3173 * cipher.c (setup_cipher_table): Put DES into the table.
3174
3175 2002-07-25 Werner Koch <[email protected]>
3176
3177 * rndunix.c (_gcry_rndunix_constructor): Prefixed with _gcry_.
3178 Noted by Stephan Austermuehle.
3179
3180 2002-07-08 Timo Schulz <[email protected]>
3181
3182 * rndw32.c: Replaced the m_ memory functions with the real
3183 gcry_ functions. Renamed all g10_ prefixed functions to log_.
3184
3185 2002-06-12 Werner Koch <[email protected]>
3186
3187 * rsa.c (generate): Use e = 65537 for now.
3188
3189 2002-06-11 Werner Koch <[email protected]>
3190
3191 * pubkey.c (gcry_pk_get_keygrip): Allow a "protected-private-key".
3192
3193 2002-06-05 Timo Schulz <[email protected]>
3194
3195 * cipher.c (gcry_cipher_encrypt, gcry_cipher_decrypt):
3196 Check that the input size is a multiple of the blocksize.
3197
3198 2002-05-23 Werner Koch <[email protected]>
3199
3200 * md.c (oid_table): Add an rsadsi OID for MD5.
3201
3202 2002-05-21 Werner Koch <[email protected]>
3203
3204 * primegen.c, elgamal.c, dsa.c (progress): Do not print anything
3205 by default. Pass an extra identifying string to the callback and
3206 reserved 2 argumenst for current and total counters. Changed the
3207 register function prototype.
3208
3209 2002-05-17 Werner Koch <[email protected]>
3210
3211 * rndegd.c (rndegd_constructor): Fixed name of register function
3212 and prefixed the function name with _gcry_.
3213 * rndw32.c (rndw32_constructor): Ditto.
3214 * tiger.c (tiger_constructor): Ditto.
3215
3216 * Makefile.am: Removed all dynamic loading stuff.
3217 * dynload.c: Ditto. Now only used for the constructor system.
3218
3219 2002-05-15 Werner Koch <[email protected]>
3220
3221 * random.c (gcry_random_bytes,gcry_random_bytes_secure)
3222 (gcry_randomize): Make sure we are initialized.
3223
3224 2002-05-14 Werner Koch <[email protected]>
3225
3226 Changed license of most files to the LGPL.
3227
3228 2002-05-02 Werner Koch <[email protected]>
3229
3230 * random.c (_gcry_fast_random_poll): Initialize the module so the
3231 mutex can be used.
3232
3233 * primegen.c (small_prime_numbers): Moved table from smallprime.c
3234 * smallprime.c: File removed.
3235
3236 * des.c (leftkey_swap, rightkey_swap, working_memcmp): Made static.
3237
3238 * cipher.c (gcry_cipher_map_name): Map "RIJNDAEL" to "AES".
3239 * rijndael.c (rijndael_get_info): We do only support a 128 bit
3240 blocksize so it makes sense to change the algorithm strings to
3241 AES.
3242
3243 * tiger.c (tiger_final): Removed superfluous token pasting operators.
3244 * md5.c (md5_final): Ditto.
3245
3246 2002-04-30 Werner Koch <[email protected]>
3247
3248 * cipher.c: Fixed list of copyright years.
3249
3250 2002-03-18 Werner Koch <[email protected]>
3251
3252 * random.c (initialize): Initialize the new pool lock mutex.
3253 (_gcry_fast_random_poll): Add locking and moved main
3254 code out to...
3255 (do_fast_random_poll): new function.
3256 (read_pool): Use the new function here.
3257 (get_random_bytes): Add locking.
3258 (_gcry_update_random_seed_file): Ditto.
3259
3260 2002-03-11 Werner Koch <[email protected]>
3261
3262 * md.c: Add rsaSignatureWithripemd160 to OID table.
3263
3264 2002-02-20 Werner Koch <[email protected]>
3265
3266 * sha1.c: Removed a left over comment note. The code has been
3267 rewritten from scratch in 1998. Thanks to Niels Möller for
3268 reporting this misleading comment.
3269
3270 2002-02-18 Werner Koch <[email protected]>
3271
3272 * rndunix.c (rndunix_constructor): Use the the new prefixed
3273 function name. Reported by Jordi Mallach.
3274
3275 2002-02-10 Werner Koch <[email protected]>
3276
3277 * random.c (mix_pool): Carry an extra failsafe_digest buffer
3278 around to make the function more robust.
3279
3280 2002-02-08 Werner Koch <[email protected]>
3281
3282 * random.c (add_randomness): Xor new data into the pool and not
3283 just copy it. This avoids any choosen input attacks which are not
3284 serious in our setting because an outsider won't be able to mix
3285 data in and even then we keep going with a PRNG. Thanks to Stefan
3286 Keller for pointing this out.
3287
3288 2002-01-04 Werner Koch <[email protected]>
3289
3290 * pubkey.c (gcry_pk_genkey): Do not release skey - it is static.
3291
3292 * primegen.c (gen_prime): Of course we should use set_bit
3293 and not set_highbit to set the second high bit.
3294
3295 2001-12-18 Werner Koch <[email protected]>
3296
3297 * rsa.c (generate): Loop until we find the exact modulus size.
3298 Changed the exponent to 41.
3299 (rsa_get_info): s/usage/r_usage/ to avoid shadow warnings.
3300 * primegen.c (gen_prime): Set 2 high order bits for secret primes.
3301
3302 * Makefile.am (DISTCLEANFILES): Include construct.c.
3303
3304 2001-12-17 Werner Koch <[email protected]>
3305
3306 * pubkey.c (gcry_pk_get_keygrip): New - experimental.
3307
3308 2001-12-11 Werner Koch <[email protected]>
3309
3310 * cipher.c: Added OIDs for AES.
3311 (gcry_cipher_mode_from_oid): New.
3312 (gcry_cipher_map_name): Moved OID search code to ..
3313 (search_oid): .. new function.
3314
3315 2001-12-10 Werner Koch <[email protected]>
3316
3317 * pubkey.c (gcry_pk_encrypt): Find the signature algorithm by name
3318 and not by number.
3319
3320 * pubkey.c (gcry_pk_encrypt,gcry_pk_decrypt,gcry_pk_sign)
3321 (gcry_pk_verify,gcry_pk_testkey, gcry_pk_genkey)
3322 (gcry_pk_get_nbits): Release the arrays. Noted by Nikos
3323 Mavroyanopoulos.
3324
3325 2001-12-06 Werner Koch <[email protected]>
3326
3327 * cipher.c (gcry_cipher_map_name): Look also for OIDs prefixed
3328 with "oid." or "OID.".
3329
3330 2001-12-05 Werner Koch <[email protected]>
3331
3332 * pubkey.c (algo_info_table): Fixed entry for openpgp-rsa.
3333
3334 2001-11-24 Werner Koch <[email protected]>
3335
3336 * pubkey.c: Added the rsaEncryption OID to the tables.
3337 (sexp_to_key): Add an arg to return the index of the algorithm,
3338 changed all callers.
3339 (gcry_pk_sign): Find the signature algorithm by name and not by
3340 number.
3341 (gcry_pk_get_nbits): Fixed so that we can now really pass a secret
3342 key to get the result.
3343
3344 * md.c (gcry_md_map_name): Look also for OIDs prefixed with "oid."
3345 or "OID." so that an OID string can be used as an S-Exp token.
3346
3347 2001-11-20 Werner Koch <[email protected]>
3348
3349 * md.c (gcry_md_map_name): Lookup by OID if the the name begins
3350 with a digit.
3351 (oid_table): New.
3352
3353 2001-11-16 Werner Koch <[email protected]>
3354
3355 * md.c (gcry_md_info): New operator GCRYCTL_IS_ALGO_ENABLED.
3356
3357 2001-11-07 Werner Koch <[email protected]>
3358
3359 * md.c (gcry_md_hash_buffer): Close the handle which was left open
3360 for algorithms other than rmd160.
3361
3362 2001-08-08 Werner Koch <[email protected]>
3363
3364 * rndw32.c (gather_random): Use toolhelp in addition to the NT
3365 gatherer for Windows2000. Suggested by Sami Tolvanen.
3366
3367 * random.c (read_pool): Fixed length check, this used to be one
3368 byte to strict. Made an assert out of it because the caller has
3369 already made sure that only poolsize bytes are requested.
3370 Reported by Marcus Brinkmann.
3371
3372 2001-08-03 Werner Koch <[email protected]>
3373
3374 * cipher.c (cipher_encrypt, cipher_decrypt): Prepare to return
3375 errors. We have to change the interface to all ciphers to make
3376 this really work but we should do so to prepare for hardware
3377 encryption modules.
3378 (gcry_cipher_encrypt, gcry_cipher_decrypt): Return the error and
3379 set lasterr.
3380 (gcry_cipher_ctl): Make sure that errors from setkey are returned.
3381
3382 2001-08-02 Werner Koch <[email protected]>
3383
3384 * rndlinux.c (gather_random): casted a size_t arg to int so that
3385 the format string is correct. Casting is okay here and avoids
3386 translation changes.
3387
3388 * random.c (fast_random_poll): Do not check the return code of
3389 getrusage.
3390
3391 * rndunix.c: Add a signal.h header to avoid warnings on Solaris 7
3392 and 8.
3393
3394 * tiger.c (print_abc,print_data): Removed.
3395
3396 * rijndael.c, des.c, blowfish.c, twofish.c, cast5.c, arcfour.c
3397 (burn_stack): New. Add wrappers for most functions to be able to
3398 call burn_stack after the function invocation. This methods seems
3399 to be the most portable way to zeroise the stack used. It does
3400 only work on stack frame based machines but it is highly portable
3401 and has no side effects. Just setting the automatic variables at
3402 the end of a function to zero does not work well because the
3403 compiler will optimize them away - marking them as volatile would
3404 be bad for performance.
3405 * md5.c, sha1.c, rmd160.c, tiger.c (burn_stack): Likewise.
3406 * random.c (burn_stack): New.
3407 (mix_pool): Use it here to burn the stack of the mixblock function.
3408
3409 * primegen.c (_gcry_generate_elg_prime): Freed q at 3 places.
3410 Thanks to Tommi Komulainen.
3411
3412 * arcfour.c (arcfour_setkey): Check the minimim keylength against
3413 bytes and not bits.
3414 (selftest): Must reset the key before decryption.
3415
3416 2001-05-31 Werner Koch <[email protected]>
3417
3418 * sha1.c (sha1_init): Made static.
3419
3420 Changed all g10_ prefixed function names as well as some mpi_
3421 function names to cope with the introduced naming changes.
3422
3423 * md.c (prepare_macpads): Made key const.
3424
3425 2001-05-28 Werner Koch <[email protected]>
3426
3427 * rndegd.c (gather_random): Removed the use of tty_printf.
3428
3429 2001-03-29 Werner Koch <[email protected]>
3430
3431 * md5.c (md5_final): Fixed calculation of hashed length. Thanks
3432 to [email protected] for pointing out that it was horrible wrong
3433 for more than 512MB of input.
3434 * sha1.c (sha1_final): Ditto.
3435 * rmd160.c (rmd160_final): Ditto.
3436 * tiger.c (tiger_final): Ditto.
3437
3438 * blowfish.c (encrypt,do_encrypt): Changed name to do_encrypt to
3439 avoid name clashes with an encrypt function in stdlib.h of
3440 Dynix/PIX. Thanks to Gene Carter.
3441 * elgamal.c (encrypt,do_encrypt): Ditto.
3442
3443 * twofish.c (gnupgext_enum_func): Use only when when compiled as a
3444 module.
3445 * rijndael.c (gnupgext_enum_func): Ditto.
3446
3447 * tiger.c (tiger_get_info): Return "TIGER192" and not just
3448 "TIGER". By Edwin Woudt.
3449
3450 * random.c: Always include time.h - standard requirement. Thanks
3451 to James Troup.
3452
3453 * rndw32.c: Fixes to the macros.
3454
3455 2001-01-11 Werner Koch <[email protected]>
3456
3457 * cipher.c (cipher_encrypt,gcry_cipher_encrypt): Use blocksize and
3458 not 8.
3459
3460 2000-12-19 Werner Koch <[email protected]>
3461
3462 Major change:
3463 Removed all GnuPG stuff and renamed this piece of software
3464 to gcrypt.
3465
3466 2000-11-14 Werner Koch <[email protected]>
3467
3468 * dsa.c (test_keys): Replaced mpi_alloc by gcry_mpi_new and
3469 mpi_free by gcry_mpi_release.
3470 * elgamal.c (test_keys,generate): Ditto, also for mpi_alloc_secure.
3471 * rsa.c (test_keys,generate,rsa_verify): Ditto.
3472 * primegen.c (generate_elg_prime): Ditto.
3473 (gen_prime): Ditto and removed nlimbs.
3474
3475 * rsa.c (generate): Allocate 2 more vars in secure memory.
3476
3477 * Makefile.am (OMIT_DEPENDENCIES): Hack to work around dependency
3478 problems.
3479
3480 2000-10-09 Werner Koch <[email protected]>
3481
3482 * arcfour.c, arcfour.h: New.
3483 * cipher.c (cipher_encrypt, cipher_decrypt): Add stream mode.
3484 (setup_cipher_table): Add Arcfour.
3485 (gcry_cipher_open): Kludge to allow stream mode.
3486
3487 Wed Oct 4 13:16:18 CEST 2000 Werner Koch <[email protected]>
3488
3489 * sha1.c (transform): Use rol() macro. Actually this is not needed
3490 for a newer gcc but there are still aoter compilers.
3491
3492 * rsa.c (test_keys): Use new random function.
3493
3494 * md.c (gcry_md_setkey): New function to overcome problems with
3495 const conflics.
3496 (gcry_md_ctl): Pass set key to the new functions.
3497
3498 * rijndael.c: New.
3499 * cipher.c: Add Rijndael support.
3500
3501 Mon Sep 18 16:35:45 CEST 2000 Werner Koch <[email protected]>
3502
3503 * rndlinux.c (open_device): Loose random device checking.
3504 By Nils Ellmenreich.
3505
3506 * random.c (fast_random_poll): Check ENOSYS for getrusage.
3507 * rndunix.c: Add 2 sources for QNX. By Sam Roberts.
3508
3509 * pubkey.c (gcry_pk_algo_info): Add GCRYCTL_GET_ALGO_USAGE.
3510
3511 * rsa.c: Changed the comment about the patent.
3512 (secret): Speed up by using the CRT. For a 2k keys this
3513 is about 3 times faster.
3514 (stronger_key_check): New but unused code to check the secret key.
3515 * Makefile.am: Included rsa.[ch].
3516 * pubkey.c: Enabled RSA support.
3517 (pubkey_get_npkey): Removed RSA workaround.
3518
3519 Mon Jul 31 10:04:47 CEST 2000 Werner Koch <[email protected]>
3520
3521 * pubkey.c: Replaced all gcry_sexp_{car,cdr}_{data,mpi} by the new
3522 gcry_sexp_nth_{data,mpi} functions.
3523
3524 Tue Jul 25 17:44:15 CEST 2000 Werner Koch <[email protected]>
3525
3526 * pubkey.c (exp_to_key,sexp_to_sig,sexp_to_enc,gcry_pk_encrypt,
3527 gcry_pk_decrypt,gcry_pk_sign,gcry_pk_genkey): Changed to work with
3528 the new S-Exp interface.
3529
3530 Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
3531
3532 * random.c (gather_faked): Replaced make_timestamp by time(2) again.
3533
3534 Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
3535
3536 * md.c (gcry_md_ctl): Support GCRYCTL_{START,STOP}_DUMP.
3537
3538 * Makefile.am: Never compile mingw32 as module.
3539
3540 * Makefile.am: Tweaked module build and removed libtool
3541
3542 * Makefile.am: Replaced -O1 by -O. Suggested by Alec Habig.
3543
3544 * elgamal.c (sign): Removed inactive code.
3545
3546 * rsa.c, rsa.h: New based on the old module version (only in CVS for now).
3547 * pubkey.c (setup_pubkey_table): Added commented support for RSA.
3548
3549 * rndunix.c (waitpid): New. For UTS 2.1. All by Dave Dykstra.
3550 (my_popen): Do the FD_CLOEXEC only if it is available
3551 (start_gatherer): Cope with missing _SC_OPEN_MAX
3552
3553 * rndunix.c: Add some more headers for QNX. By Sam Roberts.
3554
3555 * rndegd.c (gather_random): Shortcut level 0.
3556 * rndunix.c (gather_random): Ditto.
3557 * rndw32.c (gather_random): Ditto.
3558
3559 * rndw32.c: Replaced with code from Cryptlib and commented the old stuff.
3560 * rndw32.c: Add some debuging code enabled by an environment variable.
3561
3562 * random.c (read_seed_file): Binary open for DOSish system
3563 (update_random_seed_file): Ditto.
3564 * random.c [MINGW32]: Include process.h for getpid.
3565 * random.c (fast_random_poll): Add clock_gettime() as fallback for
3566 system which support this POSIX.4 fucntion. By Sam Roberts.
3567
3568 * random.c (read_seed_file): Removed the S_ISLNK test becuase it
3569 is already covered by !S_ISREG and is not defined in Unixware.
3570 Reported by Dave Dykstra.
3571 (update_random_seed_file): Silently ignore update request when pool
3572 is not filled.
3573
3574 * random.c (read_seed_file): New.
3575 (set_random_seed_file): New.
3576 (read_pool): Try to read the seeding file.
3577 (update_random_seed_file): New.
3578
3579 (read_pool): Do an initial extra seeding when level 2 quality random
3580 is requested the first time. This requestes at least POOLSIZE/2 bytes
3581 of entropy. Compined with the seeding file this should make normal
3582 random bytes cheaper and increase the quality of the random bytes
3583 used for key generation.
3584
3585 * random.c (read_pool): Print a more friendly error message in
3586 cases when too much random is requested in one call.
3587
3588 * random.c (fast_random_poll): Check whether RUSAGE_SELF is defined;
3589 this is not the case for some ESIX and Unixware, although they have
3590 getrusage().
3591
3592 * primegen.c (generate_elg_prime): All primes are now generated with
3593 the lowest random quality level. Because they are public anyway we
3594 don't need stronger random and by this we do not drain the systems
3595 entropy so much.
3596
3597 * primegen.c (register_primegen_progress): New.
3598 * dsa.c (register_pk_dsa_progress): New.
3599 * elgamal.c (register_pk_elg_progress): New.
3600
3601 * elgamal.c (wiener_map): New.
3602 (gen_k): Use a much smaller k.
3603 (generate): Calculate the qbits using the wiener map and
3604 choose an x at a size comparable to the one choosen in gen_k
3605
3606 * rmd160.c (rmd160_get_info): Moved casting to the left side due to a
3607 problem with UTS4.3. Suggested by Dave Dykstra.
3608 * sha1.c (sha1_get_info): Ditto.
3609 * tiger.c (tiger_get_info): Ditto.
3610 * md5.c (md5_get_info): Ditto
3611 * des.c (des_get_info): Ditto.
3612 * blowfish.c (blowfish_get_info): Ditto.
3613 * cast5.c (cast5_get_info): Ditto.
3614 * twofish.c (twofish_get_info): Ditto.
3615
3616 Fri Mar 24 11:25:45 CET 2000 Werner Koch <[email protected]>
3617
3618 * md.c (md_open): Add hmac arg and allocate space for the pads.
3619 (md_finalize): Add HMAC support.
3620 (md_copy): Ditto.
3621 (md_close): Ditto.
3622 (gcry_md_reset): Ditto.
3623 (gcry_md_ctl): Ditto.
3624 (prepare_macpdas): New.
3625
3626 Mon Mar 13 19:22:46 CET 2000 Werner Koch <[email protected]>
3627
3628 * md.c (gcry_md_hash_buffer): Add support for the other algorithms.
3629
3630 Mon Jan 31 16:37:34 CET 2000 Werner Koch <[email protected]>
3631
3632 * genprime.c (generate_elg_prime): Fixed returned factors which never
3633 worked for non-DSA keys.
3634
3635 Thu Jan 27 18:00:44 CET 2000 Werner Koch <[email protected]>
3636
3637 * pubkey.c (sexp_to_key): Fixed mem leaks in case of errors.
3638
3639 Mon Jan 24 22:24:38 CET 2000 Werner Koch <[email protected]>
3640
3641 * pubkey.c (gcry_pk_decrypt): Implemented.
3642 (gcry_pk_encrypt): Implemented.
3643 (gcry_pk_testkey): New.
3644 (gcry_pk_genkey): New.
3645 (pubkey_decrypt): Made static.
3646 (pubkey_encrypt): Ditto.
3647 (pubkey_check_secret_key): Ditto.
3648 (pubkey_generate): Ditto.
3649
3650 Mon Jan 24 13:04:28 CET 2000 Werner Koch <[email protected]>
3651
3652 * pubkey.c (pubkey_nbits): Removed and replaced by ...
3653 (gcry_pk_get_nbits): this new one.
3654
3655 Wed Dec 8 21:58:32 CET 1999 Werner Koch <[email protected]>
3656
3657 * dsa.c: s/mpi_powm/gcry_mpi_powm/g
3658 * elgamal.c: Ditto.
3659 * primegen.c: Ditto.
3660
3661 * : Replaced g10_opt_verbose by g10_log_verbosity().
3662
3663 * Makefile.am (INCLUDES): removed intl, add ../gcrypt
3664
3665 Fri Nov 19 17:15:20 CET 1999 Werner Koch <[email protected]>
3666
3667 * dynload.c (cmp_filenames): New to replaced compare_filename() in
3668 module.
3669 (register_cipher_extension): Removed the tilde expansion stuff.
3670 * rndeg.c (my_make_filename): New.
3671
3672 * : Replaced header util.h by g10lib.h
3673
3674 * random.c (gather_faked): Replaced make_timestamp by time(2).
3675 Disabled wrning printed with tty_printf.
3676 * rndlinux.c (gather_random): Always use fprintf instead of tty_xxx;
3677 this should be replaced by a callback function.
3678
3679 * primegen.c (gen_prime): Use gcry_mpi_randomize.
3680 (is_prime): Ditto.
3681 * elgamal.c (test_keys): Ditto.
3682 * dsa.c (test_keys): Ditto.
3683
3684 * cipher.c (gcry_cipher_close): Die on invalid handle.
3685
3686 Mon Nov 15 21:36:02 CET 1999 Werner Koch <[email protected]>
3687
3688 * elgamal.c (gen_k): Use the new random API.
3689 (generate): Ditto.
3690 * dsa.c (gen_k): Ditto.
3691 (generate): Ditto.
3692
3693 Sat Nov 13 17:44:23 CET 1999 Werner Koch <[email protected]>
3694
3695 * pubkey.c (disable_pubkey_algo): Made static.
3696 (gcry_pk_ctl): New.
3697
3698 * random.c (get_random_bits): Renamed to ...
3699 (get_random_bytes): ... this and made static.
3700 (gcry_random_bytes): New.
3701 (gcry_random_bytes_secure): New.
3702 (randomize_buffer): Renamed to ...
3703 (gcry_randomize): ...this.
3704
3705 * md.c (gcry_md_hash_buffer): New.
3706
3707 * pubkey.c (gcry_pk_algo_info): 4 new commands.
3708 (pubkey_get_npkey): Made static.
3709 (pubkey_get_nskey): Made static.
3710 (pubkey_get_nsig): Made static.
3711 (pubkey_get_nenc): Made static.
3712
3713 * pubkey.c: Removed all G10ERR_xxx.
3714 * cipher.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_CIPHER_ALGO.
3715 * md.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_MD_ALGO.
3716 * cast5.c (cast_setkey): Changed errocodes to GCRYERR_xxx.
3717 * blowfish.c: Ditto.
3718 * des.c: Ditto.
3719 * twofish.c: Ditto.
3720 * dsa.c: Ditto.
3721 * elgamal.c: Ditto.
3722
3723 * g10c.c: Removed
3724
3725 * cipher.c (gcry_cipher_open): Replaced alloc functions and return NULL
3726 if we are out of core.
3727 * dynload.c: Replaced all memory allocation functions.
3728 * md.c: Ditto.
3729 * primegen.c: Ditto.
3730 * pubkey.c: Ditto.
3731 * random.c: Ditto.
3732 * rndw32.c: Ditto.
3733 * elgamal.c: Ditto.
3734 * dsa.c: Ditto.
3735
3736 Tue Oct 26 14:10:21 CEST 1999 Werner Koch <[email protected]>
3737
3738 * elgamal.c (sign): Hugh found strange code here. Replaced by BUG().
3739
3740 * cipher.c: Merged with gcrypt/symapi.c.
3741
3742 * pubkey.c (string_to_pubkey_algo): Renamed function to ...
3743 (gcry_pk_map_name): ... this.
3744 (pubkey_algo_to_string): Renamed function to ...
3745 (gcry_pk_algo_name): ... this.
3746 (gcry_pk_algo_info): New.
3747 * pubkey.c: Merged with gcrypt/pkapi.c.
3748
3749 * md.c (md_reset): Clear finalized; thanks to Ulf Moeller for
3750 fixing this bug.
3751
3752 * md.c: Merged with gcrypt/mdapi.c
3753
3754 Wed Sep 15 14:39:59 CEST 1999 Michael Roth <[email protected]>
3755
3756 * des.c: Various speed improvements: One bit pre rotation
3757 trick after initial permutation (Richard Outerbridge).
3758 Finished test of SSLeay Tripple-DES patterns.
3759
3760 Wed Sep 15 16:22:17 CEST 1999 Werner Koch <[email protected]>
3761
3762 * rndw32.c: New.
3763
3764 Mon Sep 13 10:51:29 CEST 1999 Werner Koch <[email protected]>
3765
3766 * bithelp.h: New.
3767 * rmd160.h, sha1.h, md5.h: Use the rol macro from bithelp.h
3768
3769 Tue Sep 7 16:23:36 CEST 1999 Werner Koch <[email protected]>
3770
3771 * Makefile.am: Fixed seds for latest egcc. By Ollivier Robert.
3772
3773 Mon Sep 6 19:59:08 CEST 1999 Werner Koch <[email protected]>
3774
3775 * des.c (selftest): Add some testpattern
3776
3777 Mon Aug 30 20:38:33 CEST 1999 Werner Koch <[email protected]>
3778
3779 * cipher.c (do_cbc_encrypt): Fixed serious bug occuring when not using
3780 in place encryption. Pointed out by Frank Stajano.
3781
3782 Mon Jul 26 09:34:46 CEST 1999 Werner Koch <[email protected]>
3783
3784 * md5.c (md5_final): Fix for a SCO cpp bug.
3785
3786 Thu Jul 15 10:15:35 CEST 1999 Werner Koch <[email protected]>
3787
3788 * elgamal.c (elg_check_secret_key,elg_encrypt
3789 elg_decrypt,elg_sign,elg_verify): Sanity check on the args.
3790 * dsa.c (dsa_check_secret_key,dsa_sign,dsa_verify): Ditto.
3791
3792 * pubkey.c (disable_pubkey_algo): New.
3793 (check_pubkey_algo2): Look at disabled algo table.
3794 * cipher.c (disable_cipher_algo): New.
3795 (check_cipher_algo): Look at disabled algo table.
3796
3797 Wed Jul 7 13:08:40 CEST 1999 Werner Koch <[email protected]>
3798
3799 * Makefile.am: Support for libtool.
3800
3801 Fri Jul 2 11:45:54 CEST 1999 Werner Koch <[email protected]>
3802
3803 * dsa.c (gen_k): Changed algorithm to consume less random bytes
3804 * elgamal.c (gen_k): Ditto.
3805
3806 * random.c (random_dump_stats): New.
3807
3808 Thu Jul 1 12:47:31 CEST 1999 Werner Koch <[email protected]>
3809
3810 * primegen.c, elgamal.c, dsa.c (progess): New and replaced all
3811 fputc with a call to this function.
3812
3813 Sat Jun 26 12:15:59 CEST 1999 Werner Koch <[email protected]>
3814
3815 * rndegd.c (do_write): s/ssize_t/int/ due to SunOS 4.1 probs.
3816
3817 * cipher.c (do_cbc_encrypt, do_cbc_decrypt): New.
3818
3819 * dynload.c (HAVE_DL_SHL_LOAD): Map hpux API to dlopen (Dave Dykstra).
3820 * Makefile.am (install-exec-hook): Removed.
3821
3822 Sun May 23 14:20:22 CEST 1999 Werner Koch <[email protected]>
3823
3824 * cipher.c (setup_cipher_table): Enable Twofish
3825
3826 * random.c (fast_random_poll): Disable use of times() for mingw32.
3827
3828 Mon May 17 21:54:43 CEST 1999 Werner Koch <[email protected]>
3829
3830 * dynload.c (register_internal_cipher_extension): Minor init fix.
3831
3832 Tue May 4 15:47:53 CEST 1999 Werner Koch <[email protected]>
3833
3834 * primegen.c (gen_prime): Readded the Fermat test. Fixed the bug
3835 that we didn't correct for step when passing the prime to the
3836 Rabin-Miller test which led to bad performance (Stefan Keller).
3837 (check_prime): Add a first Fermat test.
3838
3839 Sun Apr 18 10:11:28 CEST 1999 Werner Koch <[email protected]>
3840
3841 * cipher.c (cipher_setiv): Add ivlen arg, changed all callers.
3842
3843 * random.c (randomize_buffer): alway use secure memory because
3844 we can't use m_is_secure() on a statically allocated buffer.
3845
3846 * twofish.c: Replaced some macros by a loop to reduce text size.
3847 * Makefile.am (twofish): No more need for sed editing.
3848
3849 Fri Apr 9 12:26:25 CEST 1999 Werner Koch <[email protected]>
3850
3851 * cipher.c (cipher_open): Reversed the changes for AUTO_CFB.
3852
3853 * blowfish.c: Dropped the Blowfish 160 mode.
3854 * cipher.c (cipher_open): Ditto.
3855 (setup_cipher_table): Ditto. And removed support of twofish128
3856
3857 Wed Apr 7 20:51:39 CEST 1999 Werner Koch <[email protected]>
3858
3859 * random.c (get_random_bits): Can now handle requests > POOLSIZE
3860
3861 * cipher.c (cipher_open): Now uses standard CFB for automode if
3862 the blocksize is gt 8 (according to rfc2440).
3863
3864 * twofish.c: Applied Matthew Skala's patches for 256 bit key.
3865
3866 Tue Apr 6 19:58:12 CEST 1999 Werner Koch <[email protected]>
3867
3868 * random.c (get_random_bits): Can now handle requests > POOLSIZE
3869
3870 * cipher.c (cipher_open): Now uses standard CFB for automode if
3871 the blocksize is gt 8 (according to rfc2440).
3872
3873 Sat Mar 20 11:44:21 CET 1999 Werner Koch <[email protected]>
3874
3875 * rndlinux.c (tty_printf) [IS_MODULE]: Removed.
3876
3877 * rndegd.c (gather_random): Some fixes.
3878
3879 Wed Mar 17 13:09:03 CET 1999 Werner Koch <[email protected]>
3880
3881 * rndegd.c (do_read): New.
3882 (gather_random): Changed the implementation.
3883
3884 Mon Mar 8 20:47:17 CET 1999 Werner Koch <[email protected]>
3885
3886 * dynload.c (DLSYM_NEEDS_UNDERSCORE): Renamed.
3887
3888 Fri Feb 26 17:55:41 CET 1999 Werner Koch <[email protected]>
3889
3890 * md.c: Nearly a total rewrote.
3891
3892 Wed Feb 24 11:07:27 CET 1999 Werner Koch <[email protected]>
3893
3894 * cipher.c (context): Fixed alignment
3895 * md.c: Ditto.
3896
3897 * rndegd.c: New
3898
3899 Mon Feb 22 20:04:00 CET 1999 Werner Koch <[email protected]>
3900
3901 * rndegd.c: New.
3902
3903 Wed Feb 10 17:15:39 CET 1999 Werner Koch <[email protected]>
3904
3905 * Makefile.am: Modules are now figured out by configure
3906 * construct.c: New. Generated by configure. Changed all modules
3907 to work with that.
3908 * sha1.h: Removed.
3909 * md5.h: Removed.
3910
3911 * twofish.c: Changed interface to allow Twofish/256
3912
3913 * rndunix.c (start_gatherer): Die on SIGPIPE.
3914
3915 Wed Jan 20 18:59:49 CET 1999 Werner Koch <[email protected]>
3916
3917 * rndunix.c (gather_random): Fix to avoid infinite loop.
3918
3919 Sun Jan 17 11:04:33 CET 1999 Werner Koch <[email protected]>
3920
3921 * des.c (is_weak_key): Replace system memcmp due to bugs
3922 in SunOS's memcmp.
3923 (des_get_info): Return error on failed selftest.
3924 * twofish.c (twofish_setkey): Return error on failed selftest or
3925 invalid keylength.
3926 * cast5.c (cast_setkey): Ditto.
3927 * blowfish.c (bf_setkey): Return error on failed selftest.
3928
3929 Tue Jan 12 11:17:18 CET 1999 Werner Koch <[email protected]>
3930
3931 * random.c (random_is_faked): New.
3932
3933 * tiger.c: Only compile if we have the u64 type
3934
3935 Sat Jan 9 16:02:23 CET 1999 Werner Koch <[email protected]>
3936
3937 * rndunix.c (gather_random): check for setuid.
3938
3939 * Makefile.am: Add a way to staically link random modules
3940
3941 Thu Jan 7 18:00:58 CET 1999 Werner Koch <[email protected]>
3942
3943 * md.c (md_stop_debug): Do a flush first.
3944 (md_open): size of buffer now depends on the secure parameter
3945
3946 Sun Jan 3 15:28:44 CET 1999 Werner Koch <[email protected]>
3947
3948 * rndunix.c (start_gatherer): Fixed stupid ==/= bug
3949
3950 1998-12-31 Geoff Keating <[email protected]>
3951
3952 * des.c (is_weak_key): Rewrite loop end condition.
3953
3954 Tue Dec 29 14:41:47 CET 1998 Werner Koch <[email protected]>
3955
3956 * random.c: add unistd.h for getpid().
3957 (RAND_MAX): Fallback value for Sun.
3958
3959 Wed Dec 23 17:12:24 CET 1998 Werner Koch <[email protected]>
3960
3961 * md.c (md_copy): Reset debug.
3962
3963 Mon Dec 14 21:18:49 CET 1998 Werner Koch <[email protected]>
3964
3965 * random.c (read_random_source): Changed the interface to the
3966 random gathering function.
3967 (gather_faked): Use new interface.
3968 * dynload.c (dynload_getfnc_fast_random_poll): Ditto.
3969 (dynload_getfnc_gather_random): Ditto.
3970 * rndlinux.c (gather_random): Ditto.
3971 * rndunix.c (gather_random): Ditto.
3972
3973 Sat Dec 12 18:40:32 CET 1998 Werner Koch <[email protected]>
3974
3975 * dynload.c (SYMBOL_VERSION): New to cope with system which needs
3976 underscores.
3977
3978 * rndunix.c: Rewrote large parts
3979
3980 Thu Dec 10 20:15:36 CET 1998 Werner Koch <[email protected]>
3981
3982 * dynload.c (load_extension): increased needed verbosity level.
3983
3984 * random.c (fast_random_poll): Fallback to a default fast random
3985 poll function.
3986 (read_random_source): Always use the faked entroy gatherer if no
3987 gather module is available.
3988 * rndlinux.c (fast_poll): Removed.
3989 * rndunix.c (fast_poll): Removed.
3990
3991
3992 Wed Nov 25 12:33:41 1998 Werner Koch ([email protected])
3993
3994 * rand-*.c: Removed.
3995 * rndlinux.c : New.
3996 * rndunix.c : New.
3997 * random.c : Restructured the interface to the gather modules.
3998 (intialize): Call constructor functions
3999 (read_radnom_source): Moved to here.
4000 * dynload.c (dynload_getfnc_gather_random): New.
4001 (dynload_getfnc_fast_random_poll): New.
4002 (register_internal_cipher_extension): New.
4003 (register_cipher_extension): Support of internal modules.
4004
4005 Sun Nov 8 17:44:36 1998 Werner Koch ([email protected])
4006
4007 * rand-unix.c (read_random_source): Removed the assert.
4008
4009 Mon Oct 19 18:34:30 1998 me,,, (wk@tobold)
4010
4011 * pubkey.c: Hack to allow us to give some info about RSA keys back.
4012
4013 Thu Oct 15 11:47:57 1998 Werner Koch ([email protected])
4014
4015 * dynload.c: Support for DLD
4016
4017 Wed Oct 14 12:13:07 1998 Werner Koch ([email protected])
4018
4019 * rand-unix.c: Now uses names from configure for /dev/random.
4020
4021 1998-10-10 SL Baur <[email protected]>
4022
4023 * Makefile.am: fix sed -O substitutions to catch -O6, etc.
4024
4025 Tue Oct 6 10:06:32 1998 Werner Koch ([email protected])
4026
4027 * rand-unix.c (HAVE_GETTIMEOFDAY): Fixed (was ..GETTIMEOFTIME :-)
4028 * rand-dummy.c (HAVE_GETTIMEOFDAY): Ditto.
4029
4030 Mon Sep 28 13:23:09 1998 Werner Koch ([email protected])
4031
4032 * md.c (md_digest): New.
4033 (md_reset): New.
4034
4035 Wed Sep 23 12:27:02 1998 Werner Koch ([email protected])
4036
4037 * tiger.c (TIGER_CONTEXT): moved "buf", so that it is 64 bit aligned.
4038
4039 Mon Sep 21 06:22:53 1998 Werner Koch (wk@(none))
4040
4041 * des.c: Some patches from Michael.
4042
4043 Thu Sep 17 19:00:06 1998 Werner Koch (wk@(none))
4044
4045 * des.c : New file from Michael Roth <[email protected]>
4046
4047 Mon Sep 14 11:10:55 1998 Werner Koch (wk@(none))
4048
4049 * blowfish.c (bf_setkey): Niklas Hernaeus patch to detect weak keys.
4050
4051 Mon Sep 14 09:19:25 1998 Werner Koch (wk@(none))
4052
4053 * dynload.c (RTLD_NOW): Now defined to 1 if it is undefined.
4054
4055 Mon Sep 7 17:04:33 1998 Werner Koch (wk@(none))
4056
4057 * Makefile.am: Fixes to allow a different build directory
4058
4059 Thu Aug 6 17:25:38 1998 Werner Koch,mobil,,, (wk@tobold)
4060
4061 * random.c (get_random_byte): Removed and changed all callers
4062 to use get_random_bits()
4063
4064 Mon Jul 27 10:30:22 1998 Werner Koch (wk@(none))
4065
4066 * cipher.c : Support for other blocksizes
4067 (cipher_get_blocksize): New.
4068 * twofish.c: New.
4069 * Makefile.am: Add twofish module.
4070
4071 Mon Jul 13 21:30:52 1998 Werner Koch ([email protected])
4072
4073 * random.c (read_pool): Simple alloc if secure_alloc is not set.
4074 (get_random_bits): Ditto.
4075
4076 Thu Jul 9 13:01:14 1998 Werner Koch ([email protected])
4077
4078 * dynload.c (load_extension): Function now nbails out if
4079 the program is run setuid.
4080
4081 Wed Jul 8 18:58:23 1998 Werner Koch ([email protected])
4082
4083 * rmd160.c (rmd160_hash_buffer): New.
4084
4085 Thu Jul 2 10:50:30 1998 Werner Koch ([email protected])
4086
4087 * cipher.c (cipher_open): algos >=100 use standard CFB
4088
4089 Thu Jun 25 11:18:25 1998 Werner Koch ([email protected])
4090
4091 * Makefile.am: Support for extensions
4092
4093 Thu Jun 18 12:09:38 1998 Werner Koch ([email protected])
4094
4095 * random.c (mix_pool): simpler handling for level 0
4096
4097 Mon Jun 15 14:40:48 1998 Werner Koch ([email protected])
4098
4099 * tiger.c: Removed from dist, will reappear as dynload module
4100
4101 Sat Jun 13 14:16:57 1998 Werner Koch ([email protected])
4102
4103 * pubkey.c: Major changes to allow extensions. Changed the inteface
4104 of all public key ciphers and added the ability to load extensions
4105 on demand.
4106
4107 * misc.c: Removed.
4108
4109 Wed Jun 10 07:52:08 1998 Werner Koch,mobil,,, (wk@tobold)
4110
4111 * dynload.c: New.
4112 * cipher.c: Major changes to allow extensions.
4113
4114 Mon Jun 8 22:43:00 1998 Werner Koch ([email protected])
4115
4116 * cipher.c: Major internal chnages to support extensions.
4117 * blowfish.c (blowfish_get_info): New and made all internal
4118 functions static, changed heder.
4119 * cast5.c (cast5_get_info): Likewise.
4120
4121 Mon Jun 8 12:27:52 1998 Werner Koch ([email protected])
4122
4123 * tiger.c (transform): Fix for big endian
4124
4125 * cipher.c (do_cfb_decrypt): Big endian fix.
4126
4127 Fri May 22 07:30:39 1998 Werner Koch ([email protected])
4128
4129 * md.c (md_get_oid): Add a new one for TIGER.
4130
4131 Thu May 21 13:24:52 1998 Werner Koch ([email protected])
4132
4133 * cipher.c: Add support for a dummy cipher
4134
4135 Thu May 14 15:40:36 1998 Werner Koch ([email protected])
4136
4137 * rmd160.c (transform): fixed sigbus - I should better
4138 add Christian von Roques's new implemenation of rmd160_write.
4139
4140 Fri May 8 18:07:44 1998 Werner Koch ([email protected])
4141
4142 * rand-internal.h, rand-unix.c, rand-w32.c, rand_dummy.c: New
4143 * random.c: Moved system specific functions to rand-****.c
4144
4145 Fri May 8 14:01:17 1998 Werner Koch ([email protected])
4146
4147 * random.c (fast_random_poll): add call to gethrtime.
4148
4149 Tue May 5 21:28:55 1998 Werner Koch ([email protected])
4150
4151 * elgamal.c (elg_generate): choosing x was not correct, could
4152 yield 6 bytes which are not from the random pool, tsss, tsss..
4153
4154 Tue May 5 14:09:06 1998 Werner Koch ([email protected])
4155
4156 * primegen.c (generate_elg_prime): Add arg mode, changed all
4157 callers and implemented mode 1.
4158
4159 Mon Apr 27 14:41:58 1998 Werner Koch ([email protected])
4160
4161 * cipher.c (cipher_get_keylen): New.
4162
4163 Sun Apr 26 14:44:52 1998 Werner Koch ([email protected])
4164
4165 * tiger.c, tiger.h: New.
4166
4167 Wed Apr 8 14:57:11 1998 Werner Koch ([email protected])
4168
4169 * misc.c (check_pubkey_algo2): New.
4170
4171 Tue Apr 7 18:46:49 1998 Werner Koch ([email protected])
4172
4173 * cipher.c: New
4174 * misc.c (check_cipher_algo): Moved to cipher.c
4175 * cast5.c: Moved many functions to cipher.c
4176 * blowfish.c: Likewise.
4177
4178 Sat Apr 4 19:52:08 1998 Werner Koch ([email protected])
4179
4180 * cast5.c: Implemented and tested.
4181
4182 Wed Apr 1 16:38:27 1998 Werner Koch ([email protected])
4183
4184 * elgamal.c (elg_generate): Faster generation of x in some cases.
4185
4186 Thu Mar 19 13:54:48 1998 Werner Koch ([email protected])
4187
4188 * blowfish.c (blowfish_decode_cfb): changed XOR operation
4189 (blowfish_encode_cfb): Ditto.
4190
4191 Thu Mar 12 14:04:05 1998 Werner Koch ([email protected])
4192
4193 * sha1.c (transform): Rewrote
4194
4195 * blowfish.c (encrypt): Unrolled for rounds == 16
4196 (decrypt): Ditto.
4197
4198 Tue Mar 10 16:32:08 1998 Werner Koch ([email protected])
4199
4200 * rmd160.c (transform): Unrolled the loop.
4201
4202 Tue Mar 10 13:05:14 1998 Werner Koch ([email protected])
4203
4204 * random.c (read_pool): Add pool_balance stuff.
4205 (get_random_bits): New.
4206
4207 * elgamal.c (elg_generate): Now uses get_random_bits to generate x.
4208
4209
4210 Tue Mar 10 11:33:51 1998 Werner Koch ([email protected])
4211
4212 * md.c (md_digest_length): New.
4213
4214 Tue Mar 10 11:27:41 1998 Werner Koch ([email protected])
4215
4216 * dsa.c (dsa_verify): Works.
4217
4218 Mon Mar 9 12:59:08 1998 Werner Koch ([email protected])
4219
4220 * dsa.c, dsa.h: Removed some unused code.
4221
4222 Wed Mar 4 10:39:22 1998 Werner Koch ([email protected])
4223
4224 * md.c (md_open): Add call to fast_random_poll.
4225 blowfish.c (blowfish_setkey): Ditto.
4226
4227 Tue Mar 3 13:32:54 1998 Werner Koch ([email protected])
4228
4229 * rmd160.c (rmd160_mixblock): New.
4230 * random.c: Restructured to start with a new RNG implementation.
4231 * random.h: New.
4232
4233 Mon Mar 2 19:21:46 1998 Werner Koch ([email protected])
4234
4235 * gost.c, gost.h: Removed because they did only contain trash.
4236
4237 Sun Mar 1 16:42:29 1998 Werner Koch ([email protected])
4238
4239 * random.c (fill_buffer): removed error message if n == -1.
4240
4241 Fri Feb 27 16:39:34 1998 Werner Koch ([email protected])
4242
4243 * md.c (md_enable): No init if called twice.
4244
4245 Thu Feb 26 07:57:02 1998 Werner Koch ([email protected])
4246
4247 * primegen.c (generate_elg_prime): Changed the progress printing.
4248 (gen_prime): Ditto.
4249
4250 Tue Feb 24 12:28:42 1998 Werner Koch ([email protected])
4251
4252 * md5.c, md.5 : Replaced by a modified version of md5.c from
4253 GNU textutils 1.22.
4254
4255 Wed Feb 18 14:08:30 1998 Werner Koch ([email protected])
4256
4257 * md.c, md.h : New debugging support
4258
4259 Mon Feb 16 10:08:47 1998 Werner Koch ([email protected])
4260
4261 * misc.c (cipher_algo_to_string): New
4262 (pubkey_algo_to_string): New.
4263 (digest_algo_to_string): New.
4264
4265
4266 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
4267 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4268
4269 This file is free software; as a special exception the author gives
4270 unlimited permission to copy and/or distribute it, with or without
4271 modifications, as long as this notice is preserved.
4272
4273 This file is distributed in the hope that it will be useful, but
4274 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
4275 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4276
4277 Local Variables:
4278 buffer-read-only: t
4279 End: