extend_info_st.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef EXTEND_INFO_ST_H
  7. #define EXTEND_INFO_ST_H
  8. #include "lib/crypt_ops/crypto_curve25519.h"
  9. #include "lib/crypt_ops/crypto_ed25519.h"
  10. /** Information on router used when extending a circuit. We don't need a
  11. * full routerinfo_t to extend: we only need addr:port:keyid to build an OR
  12. * connection, and onion_key to create the onionskin. Note that for onehop
  13. * general-purpose tunnels, the onion_key is NULL. */
  14. struct extend_info_t {
  15. char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for
  16. * display. */
  17. /** Hash of this router's RSA identity key. */
  18. char identity_digest[DIGEST_LEN];
  19. /** Ed25519 identity for this router, if any. */
  20. ed25519_public_key_t ed_identity;
  21. uint16_t port; /**< OR port. */
  22. tor_addr_t addr; /**< IP address. */
  23. crypto_pk_t *onion_key; /**< Current onionskin key. */
  24. curve25519_public_key_t curve25519_onion_key;
  25. };
  26. #endif