Commit Graph

154 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
0e9441df50 (krb5_crypto_get_params): check ivec length before returning it
add aes-oids


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 21:08:01 +00:00
Love Hörnquist Åstrand
4354a5a5dc add krb5_enctype_to_oid and krb5_oid_to_enctype
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13809 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 20:49:50 +00:00
Love Hörnquist Åstrand
a1bf15705c add krb5_crypto_set_params, aes aes-NNN-cbc-none
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13807 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 20:01:46 +00:00
Love Hörnquist Åstrand
054e0d01d6 add partial CMS parameter handling, this is needed for RC2
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13800 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 19:02:56 +00:00
Love Hörnquist Åstrand
b5a7b42a3a (krb5_crypto_init): clear return pointer on failure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13752 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-23 19:43:57 +00:00
Love Hörnquist Åstrand
497fcd1e8a (DES3_random_to_key): make it produce the right result
(DES3_postproc): use DES3_random_to_key
(krb5_random_to_key): check the required number of bits (not the size
of the key)


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13748 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-22 22:13:00 +00:00
Love Hörnquist Åstrand
fb27fb0d91 add des and DES3 random_to_key hooks, they need special processing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13742 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-22 11:53:12 +00:00
Love Hörnquist Åstrand
b17bf61cc0 (krb5_random_to_key): new function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13741 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-22 08:00:08 +00:00
Love Hörnquist Åstrand
9e2d1ab3e1 real return values for krb5_{enctype,cksumtype}_valid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13560 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-20 11:41:14 +00:00
Love Hörnquist Åstrand
49d345d693 add support for disabling checksum/encryption types
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13452 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-07 17:04:59 +00:00
Love Hörnquist Åstrand
5065dd4bc7 (decrypt_internal_special): do not not modify the original data
test case from Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13421 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-06 16:36:46 +00:00
Love Hörnquist Åstrand
38222b38b2 (_krb5_aes_cts_encrypt): out iv is the iv of the next to last block,
fix decryption case too


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13311 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-03 21:04:41 +00:00
Love Hörnquist Åstrand
290b1c07d8 (_krb5_aes_cts_encrypt): out iv is the iv of the next to last block
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13309 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-03 20:47:21 +00:00
Love Hörnquist Åstrand
dc82ab8fa2 (decrypt_internal_derived): move up padsize to avoid memory leak
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13178 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-12-03 13:07:41 +00:00
Love Hörnquist Åstrand
84ca0906cd require cipher-text to be padded to padsize
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13174 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-12-02 16:32:25 +00:00
Love Hörnquist Åstrand
0cb92c7056 (AES_string_to_key): fix memory leak
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13135 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-11-23 22:06:34 +00:00
Love Hörnquist Åstrand
33efaf1f26 switch from the des_ to the DES_ api
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12752 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-03 09:29:36 +00:00
Love Hörnquist Åstrand
1e1f234862 (usage2arcfour): simplify, only include special cases
From: Luke Howard <lukeh@PADL.COM>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12644 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-25 22:38:33 +00:00
Love Hörnquist Åstrand
61413db01f (arcfour_checksum_p): return true when is arcfour, not when its not
pointed out by Luke Howard


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12627 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-25 11:09:19 +00:00
Love Hörnquist Åstrand
d250fe4e0c (krb5_crypto_getpadsize, krb5_crypto_getconfoundersize): added
From: Luke Howard <lukeh@PADL.COM>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12621 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-24 03:32:48 +00:00
Love Hörnquist Åstrand
71bc13390a (krb5_crypto_get_checksum_type): fix format string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12613 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-23 11:36:00 +00:00
Love Hörnquist Åstrand
2eaeba1f93 add krb5_crypto_get_checksum_type
From: Luke Howard <lukeh@PADL


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12612 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-23 11:33:53 +00:00
Love Hörnquist Åstrand
c2680f2373 Do the arcfour checksum mapping for krb5_create_checksum and
krb5_verify_checksum, From: Luke Howard <lukeh@PADL.COM>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12590 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-20 15:09:39 +00:00
Love Hörnquist Åstrand
78d1c49923 (hmac): make it return an error when out of memory, update callsites
to either return error or use krb5_abortx
(krb5_hmac): expose hmac


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12510 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-23 13:06:24 +00:00
Love Hörnquist Åstrand
6d719817e4 (krb5_cksumtype_valid): check is checksum type is a valid one
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12481 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-22 10:14:05 +00:00
Love Hörnquist Åstrand
e62ea35927 (krb5_checksum_is_keyed): only set extented error string when there is a context
(krb5_checksum_is_collision_proof): ditto


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12480 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-22 10:08:50 +00:00
Love Hörnquist Åstrand
2b396ee7e8 (krb5_crypto_getenctype): new function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12475 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-21 20:21:34 +00:00
Love Hörnquist Åstrand
ea7327e39d (wrapped_length/wrapped_length_derived): when calculating the length
of the encrypted data, use the keyed checksum length if the enctype
supports a keyed checksum. This only matter for aes, for all other
enctypes the key and unkeyed checksum have the same length.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12450 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-19 07:34:12 +00:00
Love Hörnquist Åstrand
edd4885b10 clean up AES code to use a structure instead of a key array
(_krb5_AES_string_to_default_iterator): set to 4096 as described in
aes draft -04
(derive_key): always remove the key->schedule since its
will contain the wrong (parent key) info


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12382 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-06-21 05:41:55 +00:00
Love Hörnquist Åstrand
4644344231 add _krb5_AES_string_to_default_iterator
add krb5_string_to_key_salt_opaque()
fix keylengh for keytype_aes256


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12373 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-06-17 04:20:18 +00:00
Love Hörnquist Åstrand
8b3ba5532c protect the random initiator with a mutex
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12305 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-16 20:44:55 +00:00
Love Hörnquist Åstrand
c81674f22e unexport krb5_PKCS5_PBKDF2
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12153 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-04-26 11:40:56 +00:00
Love Hörnquist Åstrand
399e0ab56d (krb5_DES_AFS3_CMU_string_to_key): used p1 instead of the "illegal"
salt #~, same change as kth-krb did 1999. Problems occur with crypt()
that behaves like AT&T crypt (openssl does this). Pointed out by
Marcus Watts.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11952 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-04-01 16:51:54 +00:00
Love Hörnquist Åstrand
221041ca22 (usage2arcfour): map KRB5_KU_TICKET to 2, rom Harald Joerg <harald.joerg@fujitsu-siemens.com>. (enctype_arcfour_hmac_md5): disable checksum_hmac_md5_enc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11934 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-03-28 10:33:54 +00:00
Love Hörnquist Åstrand
a629c76a6c (krb5_enctype_keysize): return key size of encyption type, inspired by
Aidan Cully <aidan@kublai.com>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11930 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-03-28 01:00:06 +00:00
Love Hörnquist Åstrand
ea94038288 (_krb5_aes_cts_encrypt): make key argument a 'const void *' to avoid
AES_KEY being exposed in krb5-private.h


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11610 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-01-23 19:05:52 +00:00
Love Hörnquist Åstrand
7a2c854c80 Add support for AES (draft-raeburn-krb-rijndael-krb-02), not enabled
by default.
(HMAC_SHA1_DES3_checksum): rename to SP_HMAC_SHA1_checksum and modify
to support checksumtype that are have a shorter wireformat then their
output block size.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11583 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-01-15 04:24:05 +00:00
Love Hörnquist Åstrand
1f6debd562 (struct encryption_type): split the blocksize into blocksize and
padsize, padsize is the minimum padding size. they are the same for now
(enctype_*): add padsize
(encrypt_internal): use padsize
(encrypt_internal_derived): use padsize
(wrapped_length): use padsize
(wrapped_length_dervied): use padsize


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11582 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-01-15 03:54:51 +00:00
Love Hörnquist Åstrand
e96bdba80d add extra `opaque' argument to string_to_key function for each enctype
in preparation enctypes that uses `Encryption and Checksum
Specifications for Kerberos 5' draft


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11581 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-01-15 03:26:46 +00:00
Johan Danielsson
ae784bda45 add function krb5_crypto_getblocksize that extracts the required
blocksize from a crypto context


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11347 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-09-03 19:58:15 +00:00
Johan Danielsson
2ccdee74a3 get rid of DES3_CBC_encrypt_ivec, just use zero ivec in
DES3_CBC_encrypt if passed ivec is NULL


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11341 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-09-03 17:31:12 +00:00
Johan Danielsson
7ec3e75760 (usage2arcfour): don't abort if the usage is unknown
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10953 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-29 16:31:54 +00:00
Johan Danielsson
f9059789e8 constify some
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 09:03:27 +00:00
Johan Danielsson
a0428d8b6c (krb5_crypto_init): check that the key size matches the expected length
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10902 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-16 15:58:13 +00:00
Assar Westerlund
ccfd657692 rename functions DES_* to krb5_* to avoid colliding with modern
openssl


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10867 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-03-10 23:10:12 +00:00
Assar Westerlund
4f21111c96 (create_checksum): make usage `unsigned' (it's not really a
krb5_key_usage).  From Ben Harris <bjh21@netbsd.org>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10806 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-01-06 23:12:51 +00:00
Assar Westerlund
9f1c66fe5f use krb5_enctype consistently. From Ben Harris <bjh21@netbsd.org>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10804 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-01-06 23:10:06 +00:00
Johan Danielsson
d71eccdf57 use our own des string-to-key function, since the one from openssl
sometimes generates wrong output


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10802 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-12-20 22:28:45 +00:00
Assar Westerlund
6ec3f169e0 remove old comment
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10769 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-10-22 12:45:43 +00:00
Assar Westerlund
2d5ce19c5f make all high-level encrypting and decrypting functions check the
return value of the underlying function and handle errors more
consistently.  noted by Sam Hartman <hartmans@mit.edu>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10767 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-10-22 01:20:34 +00:00