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