x25519_sizes.h 800 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 TOR_X25519_SIZES_H
  7. #define TOR_X25519_SIZES_H
  8. /** Length of a curve25519 public key when encoded. */
  9. #define CURVE25519_PUBKEY_LEN 32
  10. /** Length of a curve25519 secret key when encoded. */
  11. #define CURVE25519_SECKEY_LEN 32
  12. /** Length of the result of a curve25519 handshake. */
  13. #define CURVE25519_OUTPUT_LEN 32
  14. #define ED25519_PUBKEY_LEN 32
  15. #define ED25519_SECKEY_LEN 64
  16. #define ED25519_SECKEY_SEED_LEN 32
  17. #define ED25519_SIG_LEN 64
  18. #define CURVE25519_BASE64_PADDED_LEN 44
  19. #define ED25519_BASE64_LEN 43
  20. #define ED25519_SIG_BASE64_LEN 86
  21. #endif