diff options
| author | David Howells <dhowells@redhat.com> | 2020-09-24 10:23:48 +0100 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2025-03-02 21:51:47 +0000 |
| commit | 348f5669d1f6c1c210b9017ebb8b82282eca6f25 (patch) | |
| tree | 94fb4c231e6be350c6f4600faedb05bd0a220cfc /crypto/krb5/internal.h | |
| parent | crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions (diff) | |
| download | linux-348f5669d1f6c1c210b9017ebb8b82282eca6f25.tar.gz linux-348f5669d1f6c1c210b9017ebb8b82282eca6f25.zip | |
crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic
Add functions that sign and verify a message according to rfc3961 sec 5.4,
using Kc to generate a checksum and insert it into the MIC field in the
skbuff in the sign phase then checksum the data and compare it to the MIC
in the verify phase.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
Diffstat (limited to 'crypto/krb5/internal.h')
| -rw-r--r-- | crypto/krb5/internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/krb5/internal.h b/crypto/krb5/internal.h index c8deb112b604..07a47ddf3ea9 100644 --- a/crypto/krb5/internal.h +++ b/crypto/krb5/internal.h @@ -169,3 +169,13 @@ int krb5_aead_decrypt(const struct krb5_enctype *krb5, struct crypto_aead *aead, struct scatterlist *sg, unsigned int nr_sg, size_t *_offset, size_t *_len); +ssize_t rfc3961_get_mic(const struct krb5_enctype *krb5, + struct crypto_shash *shash, + const struct krb5_buffer *metadata, + struct scatterlist *sg, unsigned int nr_sg, size_t sg_len, + size_t data_offset, size_t data_len); +int rfc3961_verify_mic(const struct krb5_enctype *krb5, + struct crypto_shash *shash, + const struct krb5_buffer *metadata, + struct scatterlist *sg, unsigned int nr_sg, + size_t *_offset, size_t *_len); |
