Commit Graph

130 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
5cebb7986f (krb5_generate_random_block): check return value from RAND_bytes
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16748 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-16 10:10:59 +00:00
Love Hörnquist Åstrand
eb0369c938 (krb5_derive_key): Free more of the allocated memory, this function is
only used by the test program.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16343 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-02 14:47:44 +00:00
Love Hörnquist Åstrand
ce7c2af147 (krb5_DES_string_to_key): If the opaque length it set to 1, and
content is 0x01, use the afs3 string-to-key.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16078 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-19 22:13:54 +00:00
Love Hörnquist Åstrand
a15603afa7 (_krb5_pk_octetstring2key): make sha1 output unsigned char to match openssl
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15681 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-20 07:22:43 +00:00
Love Hörnquist Åstrand
cba53a17f2 (_krb5_pk_octetstring2key): fix arguments
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15628 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 22:29:52 +00:00
Love Hörnquist Åstrand
a70cf1c3a6 (_krb5_pk_octetstring2key): string2key function used in pk-init-25
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15622 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 13:34:47 +00:00
Love Hörnquist Åstrand
3283e2cb08 make input data to krb5_encrypt{,_ivec} const
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15604 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-09 12:33:36 +00:00
Love Hörnquist Åstrand
1f25cc530f (wrapped_length): the underived encrypted types checksum are all
unkeyed (matches the code in encrypt_internal() and
encrypt_internal_special())


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15598 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-09 01:35:31 +00:00
Love Hörnquist Åstrand
1dcdb9c1a0 optionally compile in support for string2key
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15527 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-29 22:20:33 +00:00
Love Hörnquist Åstrand
85588d6046 (krb5_string_to_key): unconst password
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15479 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 05:03:45 +00:00
Love Hörnquist Åstrand
d83bcde1e8 rename `encrypt' to avoid shadow warning
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15462 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 22:54:33 +00:00
Love Hörnquist Åstrand
9b38bf74d1 Don't declare des_salt &c as static with incomplete type (invalid in
c89, at least).


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15053 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-02 14:11:59 +00:00
Love Hörnquist Åstrand
f8c1fbfbe4 unexport the oid_to_enctype function, not for external consumers
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14921 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-24 14:14:17 +00:00
Love Hörnquist Åstrand
e502ee6379 AES is enabled by default, remove ifdefs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-17 00:42:05 +00:00
Love Hörnquist Åstrand
00c5d0af9f more static and unsigned issues
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14639 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-15 19:11:25 +00:00
Love Hörnquist Åstrand
256ec57f94 fix signedness issues, prompted by report of Magnus Ahltorp
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14638 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-15 14:49:04 +00:00
Love Hörnquist Åstrand
6084387c52 (DES_string_to_key_int): must check for weak keys after doing the
DES_cbc_cksum


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14592 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-23 18:41:40 +00:00
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