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
Assar Westerlund
d9aedd0fd1
(enctype_arcfour_hmac_md5): actually use a non-keyed checksum when it
...
should be non-keyed
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10763 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-10-20 22:02:30 +00:00
Assar Westerlund
5c99ba3d29
use des functions to avoid generating warnings with openssl's
...
prototypes
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10700 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-16 04:48:05 +00:00
Assar Westerlund
aad564d1c2
re-write the handling of crypto libraries. try to use the one of
...
openssl's libcrypto or krb4's libdes that has all the required
functionality (md4, md5, sha1, des, rc4). if there is no such
library, the included lib/des is built.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10519 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-22 20:30:33 +00:00
Assar Westerlund
05b44561ca
remove an unused variable and add a const
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10175 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-23 22:33:10 +00:00
Johan Danielsson
dbe9dbe36e
(krb5_string_to_key_derived): leak less memory
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10118 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-18 16:55:41 +00:00
Assar Westerlund
d27aa3b62e
add some krb5_{set,clear}_error_string
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9937 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:14:52 +00:00
Assar Westerlund
780b387de7
(encryption_type): make field names more consistent
...
(create_checksum): separate usage and type
(krb5_create_checksum): add a separate type parameter
(encrypt_internal): only free once on mismatched checksum length
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9868 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-09 07:06:47 +00:00
Johan Danielsson
3937ac0261
make checksum_types into an array of pointers
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9829 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-02 08:58:14 +00:00