tree: 1566fa4ace023191e7222009984047ac11e165a4 [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. DIR_METADATA
  4. OWNERS
  5. README.md
  6. algorithm_dispatch.cc
  7. algorithm_dispatch.h
  8. algorithm_implementation.cc
  9. algorithm_implementation.h
  10. algorithm_implementations.h
  11. algorithm_registry.cc
  12. algorithm_registry.h
  13. algorithms/
  14. blink_key_handle.cc
  15. blink_key_handle.h
  16. crypto_data.cc
  17. crypto_data.h
  18. ec_import_key_pkcs8_fuzzer.cc
  19. ec_import_key_raw_fuzzer.cc
  20. ec_import_key_spki_fuzzer.cc
  21. fuzzer_support.cc
  22. fuzzer_support.h
  23. generate_key_result.cc
  24. generate_key_result.h
  25. jwk.cc
  26. jwk.h
  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.