Commit Graph

63 Commits

Author SHA1 Message Date
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
Assar Westerlund
b201faa9a6 (create_checksum): change so that `type == 0' means pick from the
`crypto' (context) and otherwise use that type.  this is not a large
change in practice and allows callers to specify the exact checksum
algorithm to use


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9760 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-03-26 00:49:12 +00:00
Assar Westerlund
42a66c6903 (krb5_derive_key): new function, used by derived-key-test.c
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9744 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-03-12 07:44:05 +00:00
Assar Westerlund
3ec01acc28 add blank lines to make make-proto happier
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9708 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-20 01:51:48 +00:00
Assar Westerlund
2aefcf796c try to use handle using openssl instead of libdes better. based on patches from GOMBAS Gabor <gombasg@inf.elte.hu> and Brian May <bam@snoopy.apana.org.au>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9681 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-15 04:20:54 +00:00
Assar Westerlund
5761d220bb (decrypt_internal_derived): check that there's enough data
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9622 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-01-30 17:10:55 +00:00
Assar Westerlund
59a594bad4 use the openssl api for md4/md5/sha. handle openssl/*.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9559 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-01-29 02:09:01 +00:00
Assar Westerlund
633782864b (main): handle krb5_init_context failure consistently
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9443 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-31 08:05:03 +00:00
Assar Westerlund
978cb24ac3 (DES_AFS3_CMU_string_to_key): always treat cell names as lower case
(krb5_encrypt_ivec, krb5_decrypt_ivec): new functions that allow an
explicit ivec to be specified.  fix all sub-functions.
(DES3_CBC_encrypt_ivec): new function that takes an explicit ivec


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9310 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-08 05:01:31 +00:00
Assar Westerlund
be8dcb7ae5 (_key_schedule): re-use an existing schedule
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9027 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-09-09 16:49:06 +00:00
Assar Westerlund
cedc89c0f3 remove trailing commas
(KRB5_KU_USAGE_SEQ): renamed from KRB5_KU_USAGE_MIC


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8998 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-27 03:32:31 +00:00
Assar Westerlund
dcac4bde92 (encrypt_internal_derived): free the checksum after use
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8946 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-16 07:39:10 +00:00
Assar Westerlund
97817f4b13 extra braces
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8849 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-27 05:30:22 +00:00
Johan Danielsson
6d5c7680fd typo in previous
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8621 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-08 16:30:37 +00:00
Johan Danielsson
14799a4363 fix type in des3-cbc-none
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8614 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-08 16:04:25 +00:00
Assar Westerlund
6c81500e59 introduce the `special' encryption methods that are not like all other
encryption methods and implement arcfour-hmac-md5


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8560 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-06 00:06:58 +00:00
Johan Danielsson
cec6004120 add some more pseudo crypto types
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8544 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-05 13:06:08 +00:00
Assar Westerlund
211c70f9ba (krb5_get_wrapped_length): rewrite into different parts for the
derived and non-derived cases


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8170 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-04-11 17:30:22 +00:00
Assar Westerlund
7046d9605a (krb5_get_wrapped_length): the padding should be done after having
added confounder and checksum


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8168 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-04-11 02:12:29 +00:00
Assar Westerlund
94e1d9abee update to pseudo-standard APIs for md4,md5,sha.
some changes to libdes calls to make them more portable.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7817 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-01-25 23:06:55 +00:00
Assar Westerlund
b2cf20bac2 (ARCFOUR_string_to_key): correct signature
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7739 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-01-06 20:21:13 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Johan Danielsson
b75cfd368f ARCFOUR_set_key -> RC4_set_key
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7461 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 15:03:06 +00:00
Assar Westerlund
3eeca33e57 (ARCFOUR_string_to_key): change order of bytes within unicode
characters.  this should probably be done in some arbitrarly complex
way to do it properly and you would have to know what character
encoding was used for the password and salt string.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7426 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-23 09:01:15 +00:00
Johan Danielsson
48b2840818 rc4->arcfour
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7422 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-22 14:57:13 +00:00
Assar Westerlund
032a510b3e some code for doing RC4/MD5/HMAC which might not be totally different
from some small company up in the north-west corner of the US


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7408 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-17 16:36:48 +00:00
Johan Danielsson
9372950a30 remove DES3_postproc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7342 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-09 18:18:02 +00:00
Assar Westerlund
477dea8523 (krb5_keytype_to_enctypes_default): new function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7301 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-04 01:56:50 +00:00
Assar Westerlund
1d35aa3ab8 (krb5_get_wrapped_length): more correct calculation
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7150 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-17 06:41:35 +00:00
Johan Danielsson
afb9f7f509 (krb5_enctype_to_keytype): remove warning
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7138 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-12 09:29:10 +00:00
Assar Westerlund
78e6a32f6e (krb5_string_to_salttype): new function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7127 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-10 04:53:44 +00:00
Assar Westerlund
4bd83e662f (krb5_enctypes_compatible_keys): spell correctly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7099 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-03 20:03:14 +00:00
Assar Westerlund
00498d48e2 (etypes): remove NEW_DES3_CODE, enable des3-cbc-sha1 and keep
old-des3-cbc-sha1 for backwards compatability


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6834 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-18 19:33:31 +00:00
Assar Westerlund
9230f6de40 (*): do some malloc return-value checks properly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6397 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-07-03 02:32:51 +00:00