relay_crypto_st.h 963 B

12345678910111213141516171819202122232425262728293031
  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 RELAY_CRYPTO_ST_H
  7. #define RELAY_CRYPTO_ST_H
  8. #define crypto_cipher_t aes_cnt_cipher
  9. struct crypto_cipher_t;
  10. struct crypto_digest_t;
  11. struct relay_crypto_t {
  12. /* crypto environments */
  13. /** Encryption key and counter for cells heading towards the OR at this
  14. * step. */
  15. struct crypto_cipher_t *f_crypto;
  16. /** Encryption key and counter for cells heading back from the OR at this
  17. * step. */
  18. struct crypto_cipher_t *b_crypto;
  19. /** Digest state for cells heading towards the OR at this step. */
  20. struct crypto_digest_t *f_digest; /* for integrity checking */
  21. /** Digest state for cells heading away from the OR at this step. */
  22. struct crypto_digest_t *b_digest;
  23. };
  24. #undef crypto_cipher_t
  25. #endif