b6b438
From 47f922c797006a3158fa3e077a7086086917b5e4 Mon Sep 17 00:00:00 2001
b6b438
From: Andreas Schneider <asn@samba.org>
b6b438
Date: Thu, 18 Jul 2019 13:33:54 +0200
b6b438
Subject: [PATCH 007/187] lib:crypto: Document
b6b438
 samba_gnutls_arcfour_confounded_md5()
b6b438
b6b438
Signed-off-by: Andreas Schneider <asn@samba.org>
b6b438
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
b6b438
(cherry picked from commit baa96ef20945638fb5ee76b03543c7b611e9c7d7)
b6b438
---
b6b438
 lib/crypto/gnutls_helpers.h | 18 ++++++++++++++++++
b6b438
 1 file changed, 18 insertions(+)
b6b438
b6b438
diff --git a/lib/crypto/gnutls_helpers.h b/lib/crypto/gnutls_helpers.h
b6b438
index debaa701554..d6000c7b316 100644
b6b438
--- a/lib/crypto/gnutls_helpers.h
b6b438
+++ b/lib/crypto/gnutls_helpers.h
b6b438
@@ -69,6 +69,24 @@ enum samba_gnutls_direction {
b6b438
 	SAMBA_GNUTLS_DECRYPT
b6b438
 };
b6b438
 
b6b438
+/**
b6b438
+ * @brief Encrypt or decrypt a data blob using RC4 with a key and salt.
b6b438
+ *
b6b438
+ * One of the key input should be a session key and the other a confounder
b6b438
+ * (aka salt). Which one depends on the implementation details of the
b6b438
+ * protocol.
b6b438
+ *
b6b438
+ * @param[in]  key_input1 Either a session_key or a confounder.
b6b438
+ *
b6b438
+ * @param[in]  key_input2 Either a session_key or a confounder.
b6b438
+ *
b6b438
+ * @param[in]  data       The data blob ot either encrypt or decrypt. The data
b6b438
+ *                        will be encrypted or decrypted in place.
b6b438
+ *
b6b438
+ * @param[in]  encrypt    The encryption direction.
b6b438
+ *
b6b438
+ * @return A gnutls error code.
b6b438
+ */
b6b438
 int samba_gnutls_arcfour_confounded_md5(const DATA_BLOB *key_input1,
b6b438
 					const DATA_BLOB *key_input2,
b6b438
 					DATA_BLOB *data,
b6b438
-- 
b6b438
2.23.0
b6b438