tree: d3c6f7c66b30dbcaedc4222ce4b245cbb9e08807 [path history] [tgz]
  1. dbus/
  2. dbus_bindings/
  3. init/
  4. pkcs11/
  5. attributes.cc
  6. attributes.h
  7. attributes.proto
  8. attributes_fuzzer.cc
  9. BUILD.gn
  10. chaps.cc
  11. chaps.h
  12. chaps_adaptor.cc
  13. chaps_adaptor.h
  14. chaps_client.cc
  15. chaps_factory.h
  16. chaps_factory_impl.cc
  17. chaps_factory_impl.h
  18. chaps_factory_mock.cc
  19. chaps_factory_mock.h
  20. chaps_interface.h
  21. chaps_pam_module.cc
  22. chaps_pam_module_test.cc
  23. chaps_proxy.cc
  24. chaps_proxy.h
  25. chaps_proxy_mock.h
  26. chaps_service.cc
  27. chaps_service.h
  28. chaps_service_test.cc
  29. chaps_test.cc
  30. chaps_utility.cc
  31. chaps_utility.h
  32. chapsd.cc
  33. chapsd_test.cc
  34. CPPLINT.cfg
  35. handle_generator.h
  36. handle_generator_mock.h
  37. isolate.h
  38. isolate_chromeos.cc
  39. isolate_linux.cc
  40. isolate_login_client.cc
  41. isolate_login_client.h
  42. isolate_login_client_mock.h
  43. isolate_login_client_test.cc
  44. isolate_mock.h
  45. object.h
  46. object_impl.cc
  47. object_impl.h
  48. object_importer.h
  49. object_importer_mock.cc
  50. object_importer_mock.h
  51. object_mock.cc
  52. object_mock.h
  53. object_policy.h
  54. object_policy_cert.cc
  55. object_policy_cert.h
  56. object_policy_common.cc
  57. object_policy_common.h
  58. object_policy_data.cc
  59. object_policy_data.h
  60. object_policy_key.cc
  61. object_policy_key.h
  62. object_policy_mock.cc
  63. object_policy_mock.h
  64. object_policy_private_key.cc
  65. object_policy_private_key.h
  66. object_policy_public_key.cc
  67. object_policy_public_key.h
  68. object_policy_secret_key.cc
  69. object_policy_secret_key.h
  70. object_policy_test.cc
  71. object_pool.h
  72. object_pool_impl.cc
  73. object_pool_impl.h
  74. object_pool_mock.cc
  75. object_pool_mock.h
  76. object_pool_test.cc
  77. object_store.h
  78. object_store_fake.h
  79. object_store_fuzzer.cc
  80. object_store_impl.cc
  81. object_store_impl.h
  82. object_store_mock.cc
  83. object_store_mock.h
  84. object_store_test.cc
  85. object_test.cc
  86. opencryptoki_importer.cc
  87. opencryptoki_importer.h
  88. opencryptoki_importer_test.cc
  89. opencryptoki_sample_token.tgz
  90. org.chromium.Chaps.conf.in
  91. org.chromium.Chaps.service
  92. OWNERS
  93. p11_replay.cc
  94. pam_chaps.cfg
  95. pam_helper.cc
  96. pam_helper.h
  97. pam_helper_mock.cc
  98. pam_helper_mock.h
  99. platform_globals.h
  100. platform_globals_chromeos.cc
  101. platform_globals_linux.cc
  102. proto_conversion.cc
  103. proto_conversion.h
  104. README.md
  105. session.h
  106. session_impl.cc
  107. session_impl.h
  108. session_mock.cc
  109. session_mock.h
  110. session_test.cc
  111. slot_manager.h
  112. slot_manager_impl.cc
  113. slot_manager_impl.h
  114. slot_manager_mock.cc
  115. slot_manager_mock.h
  116. slot_manager_test.cc
  117. system_shutdown_blocker.cc
  118. system_shutdown_blocker.h
  119. token_file_manager.h
  120. token_file_manager_chromeos.cc
  121. token_file_manager_linux.cc
  122. token_file_manager_mock.h
  123. token_manager_client.cc
  124. token_manager_client.h
  125. token_manager_client_mock.h
  126. token_manager_interface.h
  127. tpm2_utility_impl.cc
  128. tpm2_utility_impl.h
  129. tpm2_utility_test.cc
  130. tpm_utility.h
  131. tpm_utility_impl.cc
  132. tpm_utility_impl.h
  133. tpm_utility_mock.cc
  134. tpm_utility_mock.h
  135. tpm_utility_test.cc
chaps/README.md

Chaps

Chaps is a PKCS #11 implementation for Chromium OS. This document clarifies how the PKCS #11 standard is supported for TPM-backed tokens and what a calling application can expect from Chaps.

Token Initialization

Token initialization is performed on demand and does not need to be initiated by any application. If files associated with a token are corrupt that token will be reinitialized automatically.

Roles and Authentication

Chaps does not manage roles or authentication. Rather, it integrates with other parts of the Chromium OS system which manages the authentication of users. A user does not log in or log out of an inserted token; instead an inserted token implies that a user has logged in and now their token is available. Since users are managed outside of Chaps, there is no need for a Security Officer (SO) role and so Chaps has no notion of a SO.

This approach has the following implications for PKCS #11 applications:

  • C_GetTokenInfo reports the flag CKF_PROTECTED_AUTHENTICATION_PATH.
  • C_InitToken always returns CKR_PIN_INCORRECT.
  • C_InitPIN always returns CKR_USER_NOT_LOGGED_IN.
  • C_SetPIN always returns CKR_PIN_INVALID.
  • C_Login will return success if the protected authentication path is used (i.e. the PIN argument is NULL). It will also return success if the legacy PIN ‘111111’ is used. Otherwise, it will return CKR_PIN_INCORRECT. In any case the call has no effect and the token remains logged in. When the user actually logs out of the system, that user's token will be removed.
  • C_Logout always returns success but has no effect.

Operation State

Operation state cannot be saved and restored. Operation state information is never provided to calling applications.

  • C_GetOperationState will return CKR_STATE_UNSAVEABLE.
  • C_SetOperationState will return CKR_SAVED_STATE_INVALID.

Unsupported Functions

The following functions are not supported and will always return CKR_FUNCTION_NOT_SUPPORTED:

  • C_DigestKey
  • C_SignRecoverInit
  • C_SignRecover
  • C_VerifyRecoverInit
  • C_VerifyRecover
  • C_DigestEncryptUpdate
  • C_DecryptDigestUpdate
  • C_SignEncryptUpdate
  • C_DecryptVerifyUpdate
  • C_WrapKey
  • C_UnwrapKey
  • C_DeriveKey