Skip to content
Snippets Groups Projects
  1. Oct 31, 2018
    • tholenst's avatar
      Remove the semi-circular dependency between keyset_handle and registry. · 898f0d9b
      tholenst authored
      Previously, the keyset_handle and registry would depend on each other, but in a way which could be handled. If we want to introduce the method keyset_handle.GetPrimitive<P>, doing this becomes at the very least very hard and confusing (I would have to split the header into two parts, essentially).
      
      Instead, Bartosz pointed out that an option is to make the keyset_handle depend on the registry, and move the method GetPrimitives from the registry to the keyset_handle. I believe that this is the better option. However, it breaks clients who access GetPrimitives in the registry directly. There are no such clients within google; and I hope that there are non in the outside world either.
      
      In any case, what needs to be done by any user is to replace all calls
        Registry::GetPrimitives(keyset_handle, keymanager);
      with
        keyset_handle.GetPrimitives(keymanager);
      
      PiperOrigin-RevId: 219093515
      GitOrigin-RevId: efcd8ce66a94459a073b30f9818008a85904dc52
      898f0d9b
  2. Oct 25, 2018
    • tholenst's avatar
      Add registry functions for PrimitiveWrapper's. · 8e19ab5b
      tholenst authored
      We create a class PrimitiveWrapper with a method Wrap which essentially replaces the static function [Primitive]SetWrapper::New[Primitive] for each Primitive. We then allow registering this object in the registry and add a method Wrap to the registry.
      
      This allows us to replace the function AeadFactory::GetPrimitive with a completely templatized one, which means we will be able to remove the factories. As Thai suggested, I think later we should add a function GetPrimitive<P> to the KeysetHandle.
      
      I added a call to register to the AeadFactory; this ensures that it works the same way as before.
      
      PiperOrigin-RevId: 218659629
      GitOrigin-RevId: 4b99c6356f158c94d7e6d1497f483ea32062940f
      8e19ab5b
  3. Oct 04, 2018
  4. Oct 02, 2018
    • Thomas Holenstein's avatar
      Remove the recursive mutex from the registry. · 5d91b986
      Thomas Holenstein authored
      This is fairly straightforward -- the only change is that the functions get_new_key_allowed and get_key_factory are internal anyhow, and hence should *not* be guarded by the mutex.
      
      Also, there's a pre-existing clang-tidy warning because of all the global variables which are illegal. We should make the registry a class and properly "static-initialize" it.
      
      PiperOrigin-RevId: 214780540
      GitOrigin-RevId: ae98b3f64affd4ca770fb31fa2c1c4d46086228c
      5d91b986
  5. Aug 30, 2018
  6. Jul 27, 2018
  7. Jul 11, 2018
  8. Jul 06, 2018
  9. Jul 03, 2018
  10. Apr 18, 2018
    • Haris Andrianakis's avatar
      Use Portable Protocol Buffers (go/portableproto) for Tink C++. · 290eb9ad
      Haris Andrianakis authored
      Changes:
      - Renamed all references of something_cc_proto to something_portable_proto.
      - Added //cc/util/protobuf_helper which creates a namespace portable_port that maps to the correct namespace.
      - Replaced all deps to //net/proto2/ with //cc/util:protobuf_helper.
      - Replaced all instances of the proto2:: namespace with portable_proto::
      - Deleted the line 'namespace util = crypto::tink::util' because it was conflicting with //util/task/status.h (a dependency of portable_proto_lib). Also, it wasn't really used in any of the files.
      
      Notes:
      - When adding a new proto you will need to whitelist it in proto/portable_tink_filter.asciipb
      - For google3 (BUILD) we should use portable_proto_lib, for opensource (BUILD.bazel) we should use cc_proto_lib.
      PiperOrigin-RevId: 193084414
      GitOrigin-RevId: 266a0dbb7f66549655e521350b70b10d4a872286
      290eb9ad
  11. Mar 18, 2018
  12. Nov 09, 2017
    • Bartosz Przydatek's avatar
      Adding C++ KeysetManager. · d0bd5007
      Bartosz Przydatek authored
      Change-Id: If71775ddc160f4ba3b3e6c194b589ebd903f7ef4
      ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com>
      GitOrigin-RevId: 434de034db10383329ec23ef7b872b8a0586073e
      d0bd5007
  13. Oct 26, 2017
    • Thai Duong's avatar
      Replacing StringPiece with const std::string& when it makes sense. · 34de6dd9
      Thai Duong authored
      This makes sense if the StringPiece is converted to std::string
      with StringPiece.ToString() which does copy the string, thus should
      be avoided.
      
      This also makes the migration to absl::string_view easier. Somehow
      one cannot pass a string_view to methods that take const std::string&
      (it's possible to do that with StringPiece so I guess it's because
      string_view does not provide an implicit conversion to const std::string&,
      but I'm not sure).
      
      Change-Id: Ic905a78752c63ac60f25d73ba7898f723e41d9df
      ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
      GitOrigin-RevId: fbd1fb69494ac4b9b982804c86fcae1f2902aef7
      34de6dd9
    • Thai Duong's avatar
      Adding AesCtrHmacAeadKeyManager. · 0df23c2d
      Thai Duong authored
      Deleting AesCtrHmacAeadParams proto as it's not used anywhere.
      
      Change-Id: I069b6ee749ce3522c4a5935fb7b8628921bc6f0b
      ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
      GitOrigin-RevId: e958abc862f4f4fce1b6d55ce1bb0dc3e12bf4dc
      0df23c2d
  14. Oct 14, 2017
    • Bartosz Przydatek's avatar
      Adding C++ KeysetReader. · 9fb56133
      Bartosz Przydatek authored
      Change-Id: I33c2a09d2983cd5aee28a1eec886eb22e31bf9f9
      ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com>
      GitOrigin-RevId: e6763b4edc0b874dec4e7056bd124271eeca9f2d
      9fb56133
  15. Oct 06, 2017
  16. Sep 01, 2017
    • Bartosz Przydatek's avatar
      Style cleanup after sync. · 1913b433
      Bartosz Przydatek authored
      Change-Id: Ic497392503b9e6ffb129b039895fc5a2fc5a02ac
      ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com>
      GitOrigin-RevId: 19648fdb4d66c4d93db5e85125cacc87ea3b9485
      1913b433
    • Thai Duong's avatar
      Move util to crypto::tink::util. · 14f57e6f
      Thai Duong authored
      Change-Id: I2e628298c31e26da0067196634b5dc4d3bd5ed84
      ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
      GitOrigin-RevId: 9b88cb7f7aad68ff16094ab7ff6a3a1620f58cd5
      14f57e6f
  17. Jun 23, 2017
  18. May 26, 2017
    • Thai Duong's avatar
      Move C++ to google::crypto::tink. · 2675d260
      Thai Duong authored
      Change-Id: I115b64a1d4a3e4eadb330ed707c9206efd42ae31
      ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
      GitOrigin-RevId: 58c9c7744df883bbbe906d3928027607208a7d1a
      2675d260
  19. May 10, 2017
  20. May 04, 2017
    • Thai Duong's avatar
      Fix Lint errors. · ce6cffc0
      Thai Duong authored
      Change-Id: I246a1d31cb02adc3def4404ff694892e76151c13
      ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
      GitOrigin-RevId: 2d6ceb9bd716d1ece5a9a953b27ce98f7089685b
      ce6cffc0
  21. Apr 13, 2017
  22. Apr 12, 2017
  23. Mar 29, 2017
  24. Mar 27, 2017
  25. Mar 23, 2017
Loading