wrong key is generated by krb5_c_string_to_key

Ashi1986 vermaashish_mca at hotmail.com
Fri Jun 2 08:29:08 EDT 2017

Hi All ,

This is my setup .

windows 8.1 64 bit
windows 2012 R2 server AD and KDC .
BS2000 with MIT kerberos 1.13.2

I generate keytab for  SPN using this command  :

ktpass -princ host/<Host name>@domain name -mapuser <domain name\domain user
pass> pass <password> -crypto RC4-HMAC-NT -ptype KRB5_NT_PRINCIPAL -out

I am trying to decrypt AP_REQ using this keytab.
I looked at kvno, encryption type and everything else matches.

while configuring the DES-CBC-CRC and DES-CBC-MD5 it works fine and Kerberos
connection established.

while decrypting the packet in krb5_c_decrypt -> krb5_k_decrypt ->

In case of encryption type RC4-HMAC, AES128-SHA1 and AES256-SHA1, It is
noticed that keys generated from the password by using the function
[lib/crypto/krb/string_to_key.c\*krb5_c_string_to_key*] is different from
the key generated with the same password with KTPASS command.

In case of DES-CBC-CRC and DES-CBC-MD5, generated keys are exactly matched
with the keys generated by KTPASS command.

Therefore kerberos connection becomes successful with the encryption type
DES-CBC-CRC and DES-CBC-MD5 and connection gets failed with error code
KRB5KRB_AP_ERR_BAD_INTEGRITY with the encryption type RC4-HMAC, AES128-SHA1
and AES256-SHA1.

Please suggest how to fix this problem.

Any help would be appreciated !!!

Thanks & Regards 

View this message in context: http://kerberos.996246.n3.nabble.com/wrong-key-is-generated-by-krb5-c-string-to-key-tp47082.html
Sent from the Kerberos - General mailing list archive at Nabble.com.

More information about the Kerberos mailing list