From 6c0c08bbb506f47bf97bba82e4421592f71455d7 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 29 Aug 2018 15:04:54 -0400 Subject: [PATCH] Expand the comments on ASN.1-encoded TAP keys --- src/feature/nodelist/microdesc_st.h | 6 +++++- src/feature/nodelist/routerinfo_st.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/feature/nodelist/microdesc_st.h b/src/feature/nodelist/microdesc_st.h index 40b562f265..d23da13137 100644 --- a/src/feature/nodelist/microdesc_st.h +++ b/src/feature/nodelist/microdesc_st.h @@ -53,8 +53,12 @@ struct microdesc_t { /* Fields in the microdescriptor. */ - /* Public RSA key for onions in ASN.1 encoded. */ + /** + * Public RSA TAP key for onions, ASN.1 encoded. We store this + * in its encoded format since storing it as a crypto_pk_t uses + * significantly more memory. */ char *onion_pkey; + /** Length of onion_pkey, in bytes. */ size_t onion_pkey_len; /** As routerinfo_t.onion_curve25519_pkey */ diff --git a/src/feature/nodelist/routerinfo_st.h b/src/feature/nodelist/routerinfo_st.h index 18ea0fade3..6d4d118ad2 100644 --- a/src/feature/nodelist/routerinfo_st.h +++ b/src/feature/nodelist/routerinfo_st.h @@ -27,8 +27,12 @@ struct routerinfo_t { tor_addr_t ipv6_addr; uint16_t ipv6_orport; - /* Public RSA key for onions in ASN.1 encoded. */ + /** + * Public RSA TAP key for onions, ASN.1 encoded. We store this + * in its encoded format since storing it as a crypto_pk_t uses + * significantly more memory. */ char *onion_pkey; + /** Length of onion_pkey, in bytes. */ size_t onion_pkey_len; crypto_pk_t *identity_pkey; /**< Public RSA key for signing. */