aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-communicator-udp.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-07-15 12:57:46 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-07-15 12:57:46 +0200
commita9bf216b6cd281f3157256eade90ea7157f8b902 (patch)
treeac857f5939758f10664a9d72df1f5748c7fc818e /src/transport/gnunet-communicator-udp.c
parent722bb062cb3e46c3ed3c800c8a63041fc02d343b (diff)
downloadgnunet-a9bf216b6cd281f3157256eade90ea7157f8b902.tar.gz
gnunet-a9bf216b6cd281f3157256eade90ea7157f8b902.zip
TNG: Use KEM API throughout. Simplify code.
Diffstat (limited to 'src/transport/gnunet-communicator-udp.c')
-rw-r--r--src/transport/gnunet-communicator-udp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 5f40d2b38..8fcf5ac46 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14 :
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -1405,9 +1405,9 @@ setup_shared_secret_from_k (struct GNUNET_HashCode *k,
1405 1405
1406 1406
1407/** 1407/**
1408 * Setup shared secret for encryption. 1408 * Setup new shared secret for encryption using KEM.
1409 * 1409 *
1410 * @param ephemeral ephemeral key we are sending to the other peer 1410 * @param[out] ephemeral ephemeral key to be sent to other peer (encapsulated key from KEM)
1411 * @param[in,out] receiver queue to initialize encryption key for 1411 * @param[in,out] receiver queue to initialize encryption key for
1412 * @return new shared secret 1412 * @return new shared secret
1413 */ 1413 */
@@ -1426,9 +1426,8 @@ setup_shared_secret_ephemeral (struct GNUNET_CRYPTO_EcdhePublicKey *ephemeral,
1426 1426
1427 1427
1428/** 1428/**
1429 * Setup shared secret for encryption. 1429 * Setup new random shared secret for encryption.
1430 * 1430 *
1431 * @param ephemeral ephemeral key we are sending to the other peer
1432 * @param[in,out] receiver queue to initialize encryption key for 1431 * @param[in,out] receiver queue to initialize encryption key for
1433 * @return new shared secret 1432 * @return new shared secret
1434 */ 1433 */
@@ -2668,7 +2667,6 @@ mq_send_kx (struct GNUNET_MQ_Handle *mq,
2668 size_t dpos; 2667 size_t dpos;
2669 gcry_cipher_hd_t out_cipher; 2668 gcry_cipher_hd_t out_cipher;
2670 struct SharedSecret *ss; 2669 struct SharedSecret *ss;
2671 struct GNUNET_HashCode k;
2672 2670
2673 GNUNET_assert (mq == receiver->kx_mq); 2671 GNUNET_assert (mq == receiver->kx_mq);
2674 if (msize > receiver->kx_mtu) 2672 if (msize > receiver->kx_mtu)