Fix DES3 PRF
commitcdf39f13699e1a8ad972d70e33ce31f1bbc5f497
authorGreg Hudson <ghudson@mit.edu>
Sat, 15 Mar 2014 18:48:01 +0000 (15 14:48 -0400)
committerNicolas Williams <nico@cryptonector.com>
Mon, 17 Mar 2014 03:56:48 +0000 (16 22:56 -0500)
treea6e8d3151d060f565b4e522a67b481869f94b2f2
parent9269a4428a40a5a462abf2279050f1d983bf5da3
Fix DES3 PRF

RFC 3961 says the simplified profile PRF should truncate the hash
output to "multiple of m", which MIT krb5 interprets as the largest
possible multiple of m.  RFC 6113 appendix A also uses that
interpretation for the KRB-FX-CF2 test vector.  So the DES3 PRF should
truncate the 20-byte SHA-1 result to 16 bytes, not 8.  Also make
krb5_crypto_prf_length work with DES3 by giving the DES3 enctype a
non-zero PRF length.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
lib/krb5/crypto-des3.c