Love Hörnquist Åstrand
4651d05136
(krb5_random_to_key): cast size_t to int to make %d work
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14571 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-09 09:55:44 +00:00
Love Hörnquist Åstrand
5dc0e19c59
drop krb5_{checksum,enctype}_isdisabled
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14489 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-08 21:06:04 +00:00
Love Hörnquist Åstrand
bc190e1f9c
make lots of crypto related variables static
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14417 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-29 01:49:45 +00:00
Love Hörnquist Åstrand
6c3270b0eb
add enctype_des3_cbc_none_cms
...
add cms padding for rc2
don't to padding for blocksize 1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14301 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-12 21:23:48 +00:00
Love Hörnquist Åstrand
d6cb6af31e
support padding as its done in CMS
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14283 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-03 17:19:53 +00:00
Love Hörnquist Åstrand
6af75bb33b
(seed_something): avoid poking at memory that is uninitialized, make
...
valgrind unhappy. Pointd out by abartlet@samba.org . While where, plug
the fd leak.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14193 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-09-06 06:45:12 +00:00
Love Hörnquist Åstrand
91351971f7
add KRB5_LIB_FUNCTION to all exported functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Love Hörnquist Åstrand
15ac7dcf54
add set_param for RC2
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13818 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 22:03:02 +00:00
Love Hörnquist Åstrand
51a769716d
(krb5_oid_to_enctype): make sure oid exists before we compare with it
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 21:17:19 +00:00
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