relay_crypto_st.h 825 B

123456789101112131415161718192021222324252627
  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-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef RELAY_CRYPTO_ST_H
  7. #define RELAY_CRYPTO_ST_H
  8. struct relay_crypto_t {
  9. /* crypto environments */
  10. /** Encryption key and counter for cells heading towards the OR at this
  11. * step. */
  12. crypto_cipher_t *f_crypto;
  13. /** Encryption key and counter for cells heading back from the OR at this
  14. * step. */
  15. crypto_cipher_t *b_crypto;
  16. /** Digest state for cells heading towards the OR at this step. */
  17. crypto_digest_t *f_digest; /* for integrity checking */
  18. /** Digest state for cells heading away from the OR at this step. */
  19. crypto_digest_t *b_digest;
  20. };
  21. #endif