cell_rendezvous.trunnel 933 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * This contains the definition of the RENDEZVOUS1/2 cell for onion service
  3. * version 3 and onward. The following format is specified in proposal 224
  4. * section 4.2.
  5. */
  6. /* Rendezvous cookie length. */
  7. const TRUNNEL_REND_COOKIE_LEN = 20;
  8. /* The HANDSHAKE_INFO field layout is as follow:
  9. * SERVER_PK [PK_PUBKEY_LEN bytes]
  10. * AUTH [MAC_LEN bytes]
  11. * This means, the size is 32 bytes + 32 bytes. */
  12. const TRUNNEL_HANDSHAKE_INFO_LEN = 64;
  13. /* RENDEZVOUS1 payload. See details in section 4.2. */
  14. struct trn_cell_rendezvous1 {
  15. /* The RENDEZVOUS_COOKIE field. */
  16. u8 rendezvous_cookie[TRUNNEL_REND_COOKIE_LEN];
  17. /* The HANDSHAKE_INFO field which has a variable length depending on the
  18. * handshake type used. */
  19. u8 handshake_info[];
  20. };
  21. /* RENDEZVOUS2 payload. See details in section 4.2. */
  22. struct trn_cell_rendezvous2 {
  23. /* The HANDSHAKE_INFO field. */
  24. u8 handshake_info[TRUNNEL_HANDSHAKE_INFO_LEN];
  25. };