diff options
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index de0cec5d0..4b4cfbf52 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -2,20 +2,18 @@ | |||
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2007 - 2017 GNUnet e.V. | 3 | Copyright (C) 2007 - 2017 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | it under the terms of the GNU General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation; either version 3, or (at your | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
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 | 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 General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 17 | */ |
20 | 18 | ||
21 | /** | 19 | /** |
@@ -28,6 +26,14 @@ | |||
28 | #ifndef CADET_PROTOCOL_H_ | 26 | #ifndef CADET_PROTOCOL_H_ |
29 | #define CADET_PROTOCOL_H_ | 27 | #define CADET_PROTOCOL_H_ |
30 | 28 | ||
29 | /** | ||
30 | * At best, enable when debugging #5328! | ||
31 | */ | ||
32 | #define DEBUG_KX 0 | ||
33 | #if DEBUG_KX | ||
34 | #warning NEVER run this in production! KX debugging is on! | ||
35 | #endif | ||
36 | |||
31 | #include "platform.h" | 37 | #include "platform.h" |
32 | #include "gnunet_util_lib.h" | 38 | #include "gnunet_util_lib.h" |
33 | #include "cadet.h" | 39 | #include "cadet.h" |
@@ -234,6 +240,22 @@ struct GNUNET_CADET_TunnelKeyExchangeMessage | |||
234 | */ | 240 | */ |
235 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; | 241 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; |
236 | 242 | ||
243 | #if DEBUG_KX | ||
244 | /** | ||
245 | * Sender's ephemeral public ECC key encoded in a | ||
246 | * format suitable for network transmission, as created | ||
247 | * using 'gcry_sexp_sprint'. | ||
248 | */ | ||
249 | struct GNUNET_CRYPTO_EcdhePrivateKey ephemeral_key_XXX; // for debugging KX-crypto! | ||
250 | |||
251 | /** | ||
252 | * Sender's ephemeral public ECC key encoded in a | ||
253 | * format suitable for network transmission, as created | ||
254 | * using 'gcry_sexp_sprint'. | ||
255 | */ | ||
256 | struct GNUNET_CRYPTO_EddsaPrivateKey private_key_XXX; // for debugging KX-crypto! | ||
257 | #endif | ||
258 | |||
237 | /** | 259 | /** |
238 | * Sender's next ephemeral public ECC key encoded in a | 260 | * Sender's next ephemeral public ECC key encoded in a |
239 | * format suitable for network transmission, as created | 261 | * format suitable for network transmission, as created |
@@ -256,6 +278,15 @@ struct GNUNET_CADET_TunnelKeyExchangeAuthMessage | |||
256 | */ | 278 | */ |
257 | struct GNUNET_CADET_TunnelKeyExchangeMessage kx; | 279 | struct GNUNET_CADET_TunnelKeyExchangeMessage kx; |
258 | 280 | ||
281 | #if DEBUG_KX | ||
282 | /** | ||
283 | * Received ephemeral public ECC key encoded in a | ||
284 | * format suitable for network transmission, as created | ||
285 | * using 'gcry_sexp_sprint'. | ||
286 | */ | ||
287 | struct GNUNET_CRYPTO_EcdhePublicKey r_ephemeral_key_XXX; // for debugging KX-crypto! | ||
288 | #endif | ||
289 | |||
259 | /** | 290 | /** |
260 | * KDF-proof that sender could compute the 3-DH, used in lieu of a | 291 | * KDF-proof that sender could compute the 3-DH, used in lieu of a |
261 | * signature or payload data. | 292 | * signature or payload data. |