From: Alexey Shabalin <shaba@altlinux.org>
To: devel-kernel@altlinux.org
Subject: [d-kernel] [PATCH v2 6.12/sisyphus 01/29] crypto/krb5: Add some constants out of sunrpc headers
Date: Wed, 18 Nov 2026 17:49:07 +0300
Message-ID: <20261118144935.3872281-2-shaba@altlinux.org> (raw)
In-Reply-To: <20261118144935.3872281-1-shaba@altlinux.org>
From: David Howells <dhowells@redhat.com>
Add some constants from the sunrpc headers.
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
(cherry picked from commit 2ac92fedb6369a1a17ff995198b8e84ec0cf7a4e)
Signed-off-by: Alexey Shabalin <shaba@altlinux.org>
---
include/crypto/krb5.h | 51 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 include/crypto/krb5.h
diff --git a/include/crypto/krb5.h b/include/crypto/krb5.h
new file mode 100644
index 000000000000..44a6342471d7
--- /dev/null
+++ b/include/crypto/krb5.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Kerberos 5 crypto
+ *
+ * Copyright (C) 2025 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ */
+
+#ifndef _CRYPTO_KRB5_H
+#define _CRYPTO_KRB5_H
+
+/*
+ * Per Kerberos v5 protocol spec crypto types from the wire. These get mapped
+ * to linux kernel crypto routines.
+ */
+#define KRB5_ENCTYPE_NULL 0x0000
+#define KRB5_ENCTYPE_DES_CBC_CRC 0x0001 /* DES cbc mode with CRC-32 */
+#define KRB5_ENCTYPE_DES_CBC_MD4 0x0002 /* DES cbc mode with RSA-MD4 */
+#define KRB5_ENCTYPE_DES_CBC_MD5 0x0003 /* DES cbc mode with RSA-MD5 */
+#define KRB5_ENCTYPE_DES_CBC_RAW 0x0004 /* DES cbc mode raw */
+/* XXX deprecated? */
+#define KRB5_ENCTYPE_DES3_CBC_SHA 0x0005 /* DES-3 cbc mode with NIST-SHA */
+#define KRB5_ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */
+#define KRB5_ENCTYPE_DES_HMAC_SHA1 0x0008
+#define KRB5_ENCTYPE_DES3_CBC_SHA1 0x0010
+#define KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011
+#define KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012
+#define KRB5_ENCTYPE_ARCFOUR_HMAC 0x0017
+#define KRB5_ENCTYPE_ARCFOUR_HMAC_EXP 0x0018
+#define KRB5_ENCTYPE_UNKNOWN 0x01ff
+
+#define KRB5_CKSUMTYPE_CRC32 0x0001
+#define KRB5_CKSUMTYPE_RSA_MD4 0x0002
+#define KRB5_CKSUMTYPE_RSA_MD4_DES 0x0003
+#define KRB5_CKSUMTYPE_DESCBC 0x0004
+#define KRB5_CKSUMTYPE_RSA_MD5 0x0007
+#define KRB5_CKSUMTYPE_RSA_MD5_DES 0x0008
+#define KRB5_CKSUMTYPE_NIST_SHA 0x0009
+#define KRB5_CKSUMTYPE_HMAC_SHA1_DES3 0x000c
+#define KRB5_CKSUMTYPE_HMAC_SHA1_96_AES128 0x000f
+#define KRB5_CKSUMTYPE_HMAC_SHA1_96_AES256 0x0010
+#define KRB5_CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /* Microsoft md5 hmac cksumtype */
+
+/*
+ * Constants used for key derivation
+ */
+/* from rfc3961 */
+#define KEY_USAGE_SEED_CHECKSUM (0x99)
+#define KEY_USAGE_SEED_ENCRYPTION (0xAA)
+#define KEY_USAGE_SEED_INTEGRITY (0x55)
+
+#endif /* _CRYPTO_KRB5_H */
--
2.50.1
next prev parent reply other threads:[~2026-11-18 14:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 14:49 [d-kernel] [PATCH v2 6.12/sisyphus 0/29] libceph: add support for AES256KRB5 (aes256k) cephx keys Alexey Shabalin
2026-11-18 14:49 ` Alexey Shabalin [this message]
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 02/29] crypto/krb5: Implement Kerberos crypto core Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 03/29] crypto/krb5: Add an API to query the layout of the crypto section Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 04/29] crypto/krb5: Add an API to alloc and prepare a crypto object Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 05/29] crypto/krb5: Add an API to perform requests Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 06/29] crypto/krb5: Provide infrastructure and key derivation Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 07/29] crypto/krb5: Implement the Kerberos5 rfc3961 " Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 08/29] crypto/krb5: Provide RFC3961 setkey packaging functions Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 09/29] crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 10/29] crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 11/29] crypto/krb5: Implement the AES enctypes from rfc3962 Alexey Shabalin
2026-11-20 16:45 ` Ivan A. Melnikov
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 12/29] crypto/krb5: Implement the AES enctypes from rfc8009 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 13/29] crypto/krb5: Implement the Camellia enctypes from rfc6803 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 14/29] crypto/krb5: Implement crypto self-testing Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 15/29] lib/scatterlist: Add SG_MITER_LOCAL and use it Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 16/29] crypto: krb5 - Use SG miter instead of doing it by hand Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 17/29] crypto/krb5: Fix change to use SG miter to use offset Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 18/29] crypto: krb5 - Fix memory leak in krb5_test_one_prf() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 19/29] crypto/krb5: Add API Documentation Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 20/29] crypto/krb5, rxrpc: Fix lack of pre-decrypt/pre-verify length checks Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 21/29] crypto: krb5 - filter out async aead implementations at alloc Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 22/29] crypto: krb5 - use kfree_sensitive() for derived key buffers Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 23/29] libceph: Rename hmac_sha256() to ceph_hmac_sha256() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 24/29] libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 25/29] libceph: Remove unused ceph_crypto_key_encode Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 26/29] libceph: introduce ceph_crypto_key_prepare() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 27/29] libceph: add support for CEPH_CRYPTO_AES256KRB5 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 28/29] libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 29/29] config: enable CONFIG_CRYPTO_KRB5 Alexey Shabalin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118144935.3872281-2-shaba@altlinux.org \
--to=shaba@altlinux.org \
--cc=devel-kernel@altlinux.org \
--cc=devel-kernel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git