diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-08-02 03:49:54 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-08-02 03:49:54 +0000 |
commit | 6a6092fe00b799ab172d28233e77452a5ef43328 (patch) | |
tree | 4d1a873d43deaf4c80ec736e8e9df47e392c7325 /src/lib/crypto/krb/dk/dk_ccm.c | |
parent | f45f4fb0a07c68643bc5164f839a2b4331c219b6 (diff) | |
download | krb5-6a6092fe00b799ab172d28233e77452a5ef43328.zip krb5-6a6092fe00b799ab172d28233e77452a5ef43328.tar.gz krb5-6a6092fe00b799ab172d28233e77452a5ef43328.tar.bz2 |
Parameterize krb5int_derive_random() instead of guessing which
algorithm to use based on the enc provider methods. Add an
encrypt_block() helper function, since the introduce of counter-mode
enc providers makes it a little trickier to do simple block
encryption.
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/camellia-ccm@24223 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/krb/dk/dk_ccm.c')
-rw-r--r-- | src/lib/crypto/krb/dk/dk_ccm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/crypto/krb/dk/dk_ccm.c b/src/lib/crypto/krb/dk/dk_ccm.c index 7157024..a598389 100644 --- a/src/lib/crypto/krb/dk/dk_ccm.c +++ b/src/lib/crypto/krb/dk/dk_ccm.c @@ -410,7 +410,7 @@ krb5int_dk_ccm_encrypt(const struct krb5_keytypes *ktp, d1.data[4] = 0xCC; - ret = krb5int_derive_key(ktp->enc, key, &kc, &d1); + ret = krb5int_derive_key(ktp->enc, key, &kc, &d1, DERIVE_SP800_108_CMAC); if (ret != 0) return ret; @@ -587,7 +587,7 @@ krb5int_dk_ccm_decrypt(const struct krb5_keytypes *ktp, d1.data[4] = 0xCC; - ret = krb5int_derive_key(ktp->enc, key, &kc, &d1); + ret = krb5int_derive_key(ktp->enc, key, &kc, &d1, DERIVE_SP800_108_CMAC); if (ret != 0) return ret; |