diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-12-15 07:18:02 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-12-15 07:18:02 +0000 |
commit | 1f39de8b391b77e1da35cfcad3db0ad40e506d80 (patch) | |
tree | e96f4807aa16881c83a89250602172688d89c562 /src/cadet/cadet_protocol.h | |
parent | 9b961dae3220a2f2ed4fc16513d92b4f54360091 (diff) | |
download | gnunet-1f39de8b391b77e1da35cfcad3db0ad40e506d80.tar.gz gnunet-1f39de8b391b77e1da35cfcad3db0ad40e506d80.zip |
Fuse PING into KX_EPHEMERAL
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index 19cdfe4a0..f5e684af6 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -150,43 +150,24 @@ struct GNUNET_CADET_KX_Ephemeral | |||
150 | struct GNUNET_TIME_AbsoluteNBO expiration_time; | 150 | struct GNUNET_TIME_AbsoluteNBO expiration_time; |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable | 153 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format |
154 | * for network transmission as created using 'gcry_sexp_sprint'. | 154 | * suitable for network transmission as created using 'gcry_sexp_sprint'. |
155 | */ | 155 | */ |
156 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; | 156 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; |
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Public key of the signing peer (persistent version, not the ephemeral public key). | 159 | * Public key of the signing peer |
160 | * (persistent version, not the ephemeral public key). | ||
160 | */ | 161 | */ |
161 | struct GNUNET_PeerIdentity origin_identity; | 162 | struct GNUNET_PeerIdentity origin_identity; |
162 | }; | ||
163 | |||
164 | 163 | ||
165 | /** | ||
166 | * We're sending an (encrypted) PING to the other peer to check if he | ||
167 | * can decrypt. The other peer should respond with a PONG with the | ||
168 | * same content, except this time encrypted with the receiver's key. | ||
169 | */ | ||
170 | struct GNUNET_CADET_KX_Ping | ||
171 | { | ||
172 | /** | 164 | /** |
173 | * Message type is GNUNET_MESSAGE_TYPE_CADET_KX_PING. | 165 | * Seed for the IV of nonce. |
174 | */ | ||
175 | struct GNUNET_MessageHeader header; | ||
176 | |||
177 | /** | ||
178 | * Seed for the IV | ||
179 | */ | 166 | */ |
180 | uint32_t iv GNUNET_PACKED; | 167 | uint32_t iv GNUNET_PACKED; |
181 | 168 | ||
182 | /** | 169 | /** |
183 | * Intended target of the PING, used primarily to check | 170 | * Nonce to check liveness of peer. |
184 | * that decryption actually worked. | ||
185 | */ | ||
186 | struct GNUNET_PeerIdentity target; | ||
187 | |||
188 | /** | ||
189 | * Random number chosen to make reply harder. | ||
190 | */ | 171 | */ |
191 | uint32_t nonce GNUNET_PACKED; | 172 | uint32_t nonce GNUNET_PACKED; |
192 | }; | 173 | }; |