crypto.c (cdd38c5f1ce4398ec58fec95904b75824daab7b5) crypto.c (3fcc8a25e39171a48b8025835942571b84455fd9)
1// SPDX-License-Identifier: GPL-2.0
2/* Multipath TCP cryptographic functions
3 * Copyright (c) 2017 - 2019, Intel Corporation.
4 *
5 * Note: This code is based on mptcp_ctrl.c, mptcp_ipv4.c, and
6 * mptcp_ipv6 from multipath-tcp.org, authored by:
7 *
8 * Sébastien Barré <sebastien.barre@uclouvain.be>

--- 64 unchanged lines hidden (view full) ---

73 for (i = 0; i < 8; i++)
74 input[i] ^= key1be[i];
75 for (i = 0; i < 8; i++)
76 input[i + 8] ^= key2be[i];
77
78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac);
79}
80
1// SPDX-License-Identifier: GPL-2.0
2/* Multipath TCP cryptographic functions
3 * Copyright (c) 2017 - 2019, Intel Corporation.
4 *
5 * Note: This code is based on mptcp_ctrl.c, mptcp_ipv4.c, and
6 * mptcp_ipv6 from multipath-tcp.org, authored by:
7 *
8 * Sébastien Barré <sebastien.barre@uclouvain.be>

--- 64 unchanged lines hidden (view full) ---

73 for (i = 0; i < 8; i++)
74 input[i] ^= key1be[i];
75 for (i = 0; i < 8; i++)
76 input[i + 8] ^= key2be[i];
77
78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac);
79}
80
81#if IS_MODULE(CONFIG_MPTCP_KUNIT_TESTS)
81#if IS_MODULE(CONFIG_MPTCP_KUNIT_TEST)
82EXPORT_SYMBOL_GPL(mptcp_crypto_hmac_sha);
83#endif
82EXPORT_SYMBOL_GPL(mptcp_crypto_hmac_sha);
83#endif