[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] prop224: Update hs identifier circuit
commit 2b9575a9c0ecf6e3880654be16d103326788cecf
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Mon Jul 24 13:45:01 2017 -0400
prop224: Update hs identifier circuit
Remove the legacy intro point key because both service and client only uses
the ed25519 key even though the intro point chosen is a legacy one.
This also adds the CLIENT_PK key that is needed for the ntor handshake.
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
src/or/hs_ident.c | 3 ---
src/or/hs_ident.h | 21 ++++++++++++---------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/or/hs_ident.c b/src/or/hs_ident.c
index 5b5dc9aaf..c3f789db5 100644
--- a/src/or/hs_ident.c
+++ b/src/or/hs_ident.c
@@ -30,9 +30,6 @@ hs_ident_circuit_free(hs_ident_circuit_t *ident)
if (ident == NULL) {
return;
}
- if (ident->auth_key_type == HS_AUTH_KEY_TYPE_LEGACY) {
- crypto_pk_free(ident->auth_rsa_pk);
- }
memwipe(ident, 0, sizeof(hs_ident_circuit_t));
tor_free(ident);
}
diff --git a/src/or/hs_ident.h b/src/or/hs_ident.h
index 8a7c3598c..ca1fa3d70 100644
--- a/src/or/hs_ident.h
+++ b/src/or/hs_ident.h
@@ -52,27 +52,30 @@ typedef struct hs_ident_circuit_t {
* set when an object is initialized in its constructor. */
hs_ident_circuit_type_t circuit_type;
- /* (Only intro point circuit) Which type of authentication key this
- * circuit identifier is using. */
- hs_auth_key_type_t auth_key_type;
+ /* (All circuit) Introduction point authentication key. It's also needed on
+ * the rendezvous circuit for the ntor handshake. */
+ ed25519_public_key_t intro_auth_pk;
- /* (Only intro point circuit) Introduction point authentication key. In
- * legacy mode, we use an RSA key else an ed25519 public key. */
- crypto_pk_t *auth_rsa_pk;
- ed25519_public_key_t auth_ed25519_pk;
+ /* (Only client rendezvous circuit) Introduction point encryption public
+ * key. We keep it in the rendezvous identifier for the ntor handshake. */
+ curve25519_public_key_t intro_enc_pk;
/* (Only rendezvous circuit) Rendezvous cookie sent from the client to the
* service with an INTRODUCE1 cell and used by the service in an
* RENDEZVOUS1 cell. */
uint8_t rendezvous_cookie[HS_REND_COOKIE_LEN];
- /* (Only rendezvous circuit) The HANDSHAKE_INFO needed in the RENDEZVOUS1
- * cell of the service. The construction is as follows:
+ /* (Only service rendezvous circuit) The HANDSHAKE_INFO needed in the
+ * RENDEZVOUS1 cell of the service. The construction is as follows:
* SERVER_PK [32 bytes]
* AUTH_MAC [32 bytes]
*/
uint8_t rendezvous_handshake_info[CURVE25519_PUBKEY_LEN + DIGEST256_LEN];
+ /* (Only client rendezvous circuit) Client ephemeral keypair needed for the
+ * e2e encryption with the service. */
+ curve25519_keypair_t rendezvous_client_kp;
+
/* (Only rendezvous circuit) The NTOR_KEY_SEED needed for key derivation for
* the e2e encryption with the client on the circuit. */
uint8_t rendezvous_ntor_key_seed[DIGEST256_LEN];
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits