Skip to content
  1. Nov 15, 2019
    • Damian Johnson's avatar
      Skip tests that create HSv3 descriptors · 97eebb5b
      Damian Johnson authored
      Ooph, slow_ed25519.py warns that this shouldn't be run in production and
      now I see why.
      
      Each blinded key creation and signing takes three seconds, raising our unit
      test runtime from 6s to 51s. This complicates working on this branch so
      disabling these tests until I can sort this out.
      
        % ./run_tests.py --unit --test descriptor.hidden_service_v3 --verbose
      
        ======================================================================
         test.unit.descriptor.hidden_service_v3.TestHiddenServiceDescriptorV3
        ======================================================================
      
        test_address_from_public_key                           0 ms  [SUCCESS]
        test_decryption                                        3 ms  [SUCCESS]
        test_encode_decode_descriptor                         2.94s  [SUCCESS]
        test_inner_layer                                       0 ms  [SUCCESS]
        test_inner_layer_creation                              3 ms  [SUCCESS]
        test_intro_point_creation                              0 ms  [SUCCESS]
        test_intro_point_crypto                                0 ms  [SUCCESS]
        test_intro_point_crypto_without_prereq                 0 ms  [SUCCESS]
        test_intro_point_encode                                0 ms  [SUCCESS]
        test_intro_point_parse                                 0 ms  [SUCCESS]
        test_invalid_lifetime                                 9.05s  [SUCCESS]
        test_invalid_revision_counter                         9.12s  [SUCCESS]
        test_invalid_version                                  8.98s  [SUCCESS]
        test_outer_layer                                       0 ms  [SUCCESS]
        test_outer_layer_creation                              3 ms  [SUCCESS]
        test_public_key_from_address                           0 ms  [SUCCESS]
        test_real_descriptor                                   1 ms  [SUCCESS]
        test_required_fields                                 18.31s  [SUCCESS]
      
        ----------------------------------------------------------------------
      97eebb5b
    • Damian Johnson's avatar
      Fix python 3.x support · 8530ad6f
      Damian Johnson authored
      This might *not* fully fix python3 support, but closer. I don't quite grok why
      but my openssl bindings have ed25519 support with python 2.7 but not 3.5. Oh
      well, fixing what I can for now.
      
        % python
        Python 2.7.12 (default, Oct  8 2019, 14:14:10)
      
        >>> import cryptography
        >>> cryptography.__version__
        '2.7'
      
        >>> from cryptography.hazmat.backends.openssl.backend import backend
        >>> backend.ed25519_supported()
        True
      
        ------------------------------------------------------------
      
        % python3
        Python 3.5.2 (default, Oct  8 2019, 13:06:37)
      
        >>> import cryptography
        >>> cryptography.__version__
        '2.8'
      
        >>> from cryptography.hazmat.backends.openssl.backend import backend
        >>> backend.ed25519_supported()
        False
      8530ad6f
  2. Nov 14, 2019
    • Damian Johnson's avatar
      Rewrite HSv3 descriptor construction · a8c2a431
      Damian Johnson authored
      Now that we have all the building blocks in place we can tackle HSv3 descriptor
      creation itself. Two main changes are...
      
        1. More flexibility. All parameters are now customizable.
      
        2. Simpler. All parameters have defaults so simply calling
           HiddenServiceDescriptorV3.create() once again works.
      a8c2a431
  3. Nov 13, 2019
  4. Nov 11, 2019
  5. Nov 09, 2019
    • Damian Johnson's avatar
      Refactor and move layer encryption · 33a96a6a
      Damian Johnson authored
      We already had a _decrypt_layer() helper from the last branch. While doing the
      same for encryption it became evedent that these helpers are mostly identical
      so refactoring the common crypto into a third function.
      
      Still not perfectly happy, but closer. :P
      33a96a6a
  6. Nov 08, 2019
    • Damian Johnson's avatar
      Test introduction point creation · 1c3f49c8
      Damian Johnson authored
      I love that test_encode_decode_descriptor() exercises re-parsing a descriptor
      we create. Adding a more targeted test to do this only for introduction points.
      We can then add companion tests once the InnerLayer and OuterLayer classes have
      creation methods.
      1c3f49c8
  7. Nov 07, 2019
  8. Nov 06, 2019
  9. Nov 04, 2019
    • Damian Johnson's avatar
      Simplified introduction point constructor · 76fe67b0
      Damian Johnson authored
      Our test's _helper_get_intro() provided a good recipie for creating
      introduction points. Productionizing this into a helper we can provide
      to make these without worrying about too many details.
      76fe67b0
  10. Nov 01, 2019
  11. Oct 31, 2019
  12. Oct 30, 2019
  13. Oct 27, 2019
  14. Oct 25, 2019
  15. Oct 23, 2019
  16. Oct 21, 2019
  17. Oct 20, 2019
    • Damian Johnson's avatar
      Reduce Ed25519CertificateV1 constructor arguments · ed496353
      Damian Johnson authored
      Why did I have a 'version' argument? The version is part of the class name - if
      it ever *isn't* one that's a problem. ;P
      
      Also, having separate encoded/decoded constructor arguments for the exact same
      thing was silly. Decoding base64 twice is cheap, and having two arguments risks
      having them mismatch (which would be a frustrating headache to troubleshoot).
      ed496353
    • Damian Johnson's avatar
      Test requirement annotations · 632ba7f6
      Damian Johnson authored
      Oops, forgot that we have these test requirement annotations.
      632ba7f6
  18. Oct 19, 2019
    • Damian Johnson's avatar
      IntroductionPointV3 key methods · a13cafd7
      Damian Johnson authored
      Simple helpers for cryptographic keys and a few tests. George's test still
      passes, but I haven't yet added the encoding support his class has.
      a13cafd7
    • Damian Johnson's avatar
      Fork IntroductionPointV3 class · f550f7a2
      Damian Johnson authored
      I'm unsure exactly how we'd care to constitute our IntroductionPointV3 class.
      Likely it will be a hybrid of what we had and the revisions. Simply forking the
      class to start with so I can better understand the operative bits of the new
      variant.
      f550f7a2
    • Damian Johnson's avatar
      Drop crypto from test_required_fields · 60fa68f6
      Damian Johnson authored
      The test at present passes without a 'ed25519_private_identity_key' argument.
      That was not part of what this is testing so reverting to what we had.
      60fa68f6
  19. Oct 18, 2019