Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #6963
Closed
Open
Issue created Sep 24, 2012 by Trac@tracbot

Contradiction between specs and code to detect a V2 handshake

This is a contradiction on how to differentiate V1 and V2 handshake. It's confusing if someone wants to implement his own version of Tor (JTor, silvertunnel,...).

tor-spec (and 130-v2-conn-protocol):

In "certificates up-front" (a.k.a "the v1 handshake"),
[...]  The initiator's ClientHello MUST NOT include any
    ciphersuites other than:
      TLS_DHE_RSA_WITH_AES_256_CBC_SHA
      TLS_DHE_RSA_WITH_AES_128_CBC_SHA
      SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
      SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA

The actual implementation:

   /* Now we need to see if there are any ciphers whose presence means we're
    * dealing with an updated Tor. */
   for (i = 0; i < sk_SSL_CIPHER_num(session->ciphers); ++i) {
     SSL_CIPHER *cipher = sk_SSL_CIPHER_value(session->ciphers, i);
     const char *ciphername = SSL_CIPHER_get_name(cipher);
     if (strcmp(ciphername, TLS1_TXT_DHE_RSA_WITH_AES_128_SHA) &&
         strcmp(ciphername, TLS1_TXT_DHE_RSA_WITH_AES_256_SHA) &&
         strcmp(ciphername, SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA) &&
         strcmp(ciphername, "(NONE)")) {
       log_debug(LD_NET, "Got a non-version-1 cipher called '%s'", ciphername);
       // return 1;
       goto dump_list;
     }
   }

So, in practice, the use of the SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA (SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA) cipher suite is considered as a sign of the use of the V2 handshake. This contradicts all specifications.

(According to 124-tls-certificates and tor.git history, two of these cipher suites {AES_256 and DSS} have never been used in Tor v0/1, they seem to be include for better censorship resistance).

Trac:
Username: cced

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking