tree: 7f715a6408b7c44aacefada57dcea179d6ae73a0 [path history] [tgz]
  1. algorithms/
  2. algorithm_dispatch.cc
  3. algorithm_dispatch.h
  4. algorithm_implementation.cc
  5. algorithm_implementation.h
  6. algorithm_implementations.h
  7. algorithm_registry.cc
  8. algorithm_registry.h
  9. blink_key_handle.cc
  10. blink_key_handle.h
  11. BUILD.gn
  12. crypto_data.cc
  13. crypto_data.h
  14. DEPS
  15. DIR_METADATA
  16. ec_import_key_pkcs8_fuzzer.cc
  17. ec_import_key_raw_fuzzer.cc
  18. ec_import_key_spki_fuzzer.cc
  19. fuzzer_support.cc
  20. fuzzer_support.h
  21. generate_key_result.cc
  22. generate_key_result.h
  23. jwk.cc
  24. jwk.h
  25. OWNERS
  26. README.md
  27. rsa_import_key_pkcs8_fuzzer.cc
  28. rsa_import_key_spki_fuzzer.cc
  29. status.cc
  30. status.h
  31. status_unittest.cc
  32. webcrypto_impl.cc
  33. webcrypto_impl.h
components/webcrypto/README.md

Web Crypto

This directory contains the cryptographic code for Chromium's Web Crypto implementation.

The Web Crypto implementation is split between Blink and this directory.

Blink is responsible for parsing Web Crypto's Web IDL, and translating requests into method calls on blink::WebCrypto, which in turn is implemented here by WebCryptoImpl.

WebCryptoImpl is what carries out the actual cryptographic operations. Crypto is done directly in the renderer process, in software, using BoringSSL. There is intentionally no support for hardware backed tokens.

Threading:

The Web Crypto API expects asynchronous completion of operations, even when used from Web Workers. WebCryptoImpl takes a blanket approach of dispatching incoming work to a small worker pool. This favors main thread responsiveness/simplicity over throughput. Operations minimally take two thread hops.

The split of responsibilities between Blink and content (content is what registers blink::WebCrypto to the Blink Platform) is dated and could be simplified. See also crbug.com/614385.