• Chuck Lever's avatar
    SUNRPC: Add RFC 8009 encryption and decryption functions · 0d5b5a0f
    Chuck Lever authored
    RFC 8009 enctypes use different crypt formulae than previous
    Kerberos 5 encryption types. Section 1 of RFC 8009 explains the
    reason for this change:
    
    > The new types conform to the framework specified in [RFC3961],
    > but do not use the simplified profile, as the simplified profile
    > is not compliant with modern cryptographic best practices such as
    > calculating Message Authentication Codes (MACs) over ciphertext
    > rather than plaintext.
    
    Add new .encrypt and .decrypt functions to handle this variation.
    
    The new approach described above is referred to as Encrypt-then-MAC
    (or EtM). Hence the names of the new functions added here are
    prefixed with "krb5_etm_".
    
    A critical second difference with previous crypt formulae is that
    the cipher state is included in the computed HMAC. Note however that
    for RPCSEC, the initial cipher state is easy to compute on both
    initiator and acceptor because it is always all zeroes.
    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>
    0d5b5a0f
gss_krb5_mech.c 21.9 KB