Restructure the crypto checksum implementation to minimize
authorGreg Hudson <ghudson@mit.edu>
Thu, 10 Dec 2009 17:10:10 +0000 (17:10 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 10 Dec 2009 17:10:10 +0000 (17:10 +0000)
commitbad149c2a94f20df57f9d51810aff23aeb0921a4
tree9a023564d65fe8c46bcc330f950b37b919599c03
parent009463e22f989a287835228459487c64dcb0b8b3
Restructure the crypto checksum implementation to minimize
dependencies on the internals of modules.

* Keyhash providers are gone.
* The cksumtypes table contains checksum and verify functions,
  similar to the etypes encrypt and decrypt functions.  New checksum
  functions parallel the old keyhash providers, and there are also
  functions for unkeyed and derived-key HMAC checksums.
* The flags field is now used to indicate whether a checksum is
  unkeyed, but not whether it is a derived-key HMAC checksum.
* The descbc checksum is handled through a new enc_provider function
  which calculates a CBC MAC.

The OpenSSL module does not implement the CBC MAC function (it didn't
implement descbc before).  builtin/des could probably get rid of
f_cksum.c (the old DES CBC routine) with some alterations to
string2key.c.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23462 dc483132-0cff-0310-8789-dd5450dbe970
46 files changed:
src/configure.in
src/include/k5-int.h
src/lib/crypto/Makefile.in
src/lib/crypto/builtin/des/des_int.h
src/lib/crypto/builtin/des/f_aead.c
src/lib/crypto/builtin/enc_provider/aes.c
src/lib/crypto/builtin/enc_provider/des.c
src/lib/crypto/builtin/enc_provider/des3.c
src/lib/crypto/builtin/enc_provider/rc4.c
src/lib/crypto/crypto_tests/t_cksum.c
src/lib/crypto/krb/Makefile.in
src/lib/crypto/krb/aead.c
src/lib/crypto/krb/aead.h
src/lib/crypto/krb/checksum/Makefile.in [new file with mode: 0644]
src/lib/crypto/krb/checksum/cbc.c [moved from src/lib/crypto/krb/keyhash_provider/md5_hmac.c with 53% similarity]
src/lib/crypto/krb/checksum/confounder.c [new file with mode: 0644]
src/lib/crypto/krb/checksum/deps [moved from src/lib/crypto/krb/keyhash_provider/deps with 52% similarity]
src/lib/crypto/krb/checksum/hmac_md5.c [new file with mode: 0644]
src/lib/crypto/krb/checksum/unkeyed.c [new file with mode: 0644]
src/lib/crypto/krb/checksum_length.c
src/lib/crypto/krb/cksumtype_to_string.c
src/lib/crypto/krb/cksumtypes.c
src/lib/crypto/krb/cksumtypes.h
src/lib/crypto/krb/coll_proof_cksum.c
src/lib/crypto/krb/deps
src/lib/crypto/krb/dk/checksum.c
src/lib/crypto/krb/dk/deps
src/lib/crypto/krb/dk/dk.h
src/lib/crypto/krb/keyed_checksum_types.c
src/lib/crypto/krb/keyed_cksum.c
src/lib/crypto/krb/keyhash_provider/Makefile.in [deleted file]
src/lib/crypto/krb/keyhash_provider/descbc.c [deleted file]
src/lib/crypto/krb/keyhash_provider/hmac_md5.c [deleted file]
src/lib/crypto/krb/keyhash_provider/k5_md4des.c [deleted file]
src/lib/crypto/krb/keyhash_provider/k5_md5des.c [deleted file]
src/lib/crypto/krb/keyhash_provider/keyhash_provider.h [deleted file]
src/lib/crypto/krb/make_checksum.c
src/lib/crypto/krb/make_checksum_iov.c
src/lib/crypto/krb/valid_cksumtype.c
src/lib/crypto/krb/verify_checksum.c
src/lib/crypto/krb/verify_checksum_iov.c
src/lib/crypto/libk5crypto.exports
src/lib/crypto/openssl/enc_provider/aes.c
src/lib/crypto/openssl/enc_provider/des.c
src/lib/crypto/openssl/enc_provider/des3.c
src/lib/crypto/openssl/enc_provider/rc4.c