• Chuck Lever's avatar
    SUNRPC: Parametrize the key length passed to context_v2_alloc_cipher() · 8b3a09f3
    Chuck Lever authored
    Although the Kerberos specs have always listed separate subkey
    lengths, the Linux kernel's SunRPC GSS Kerberos enctype profiles
    assume the base key and the derived keys have identical lengths.
    
    The aes256-cts-hmac-sha384-192 enctype specifies the length of its
    checksum and integrity subkeys as 192 bits, but the length of its
    encryption subkey (Ke) as 256 bits.
    
    To support that enctype, parametrize context_v2_alloc_cipher() so
    that each of its call sites can pass in its desired key length. For
    now it will be the same length as before (gk5e->keylength), but a
    subsequent patch will change this.
    Tested-by: default avatarScott Mayhew <smayhew@redhat.com>
    Reviewed-by: default avatarSimo Sorce <simo@redhat.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    8b3a09f3
gss_krb5_mech.c 20 KB