Skip to content
  • David Goulet's avatar
    router: Keep RSA onion public key in ASN.1 format · 2f6bc749
    David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
    
    
    The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding
    which is 140 for a 1024 RSA key.
    
    We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor
    (microdesc_t). Scaling this to 6000 relays, and considering client usually
    only have microdescriptors, we save 1.608 MB of RAM which is considerable for
    mobile client.
    
    This commit makes it that we keep the RSA onion public key (used for TAP
    handshake) in ASN.1 format instead of an OpenSSL RSA object.
    
    Changes is done in both routerinfo_t and microdesc_t.
    
    Closes #27246
    
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
    2f6bc749