tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

dh_sizes.h (730B)


      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-2021, The Tor Project, Inc. */
      5 /* See LICENSE for licensing information */
      6 
      7 /**
      8 * \file dh_sizes.h
      9 
     10 * \brief Definitions for sizes of Diffie-Hellman groups elements in Z_p.
     11 *
     12 * Tor uses these definitions throughout its codebase, even in parts that
     13 * don't actually do any Diffie-Hellman calculations.
     14 **/
     15 
     16 #ifndef TOR_DH_SIZES_H
     17 #define TOR_DH_SIZES_H
     18 
     19 /** Length of our legacy DH keys, in bytes. */
     20 #define DH1024_KEY_LEN (1024/8)
     21 
     22 /** Length of our current TLS DH keys, in bytes. */
     23 #define DH2048_KEY_LEN (2048/8)
     24 
     25 #endif /* !defined(TOR_DH_SIZES_H) */