tree: 5b30a353e2f23b55cbec591074afadd2a0d01aa7 [path history] [tgz]
  1. BUILD.gn
  2. CPPLINT.cfg
  3. OWNERS
  4. README.md
  5. attributes.cc
  6. attributes.h
  7. attributes.proto
  8. chaps.cc
  9. chaps.h
  10. chaps_adaptor.cc
  11. chaps_adaptor.h
  12. chaps_client.cc
  13. chaps_factory.h
  14. chaps_factory_impl.cc
  15. chaps_factory_impl.h
  16. chaps_factory_mock.cc
  17. chaps_factory_mock.h
  18. chaps_interface.h
  19. chaps_pam_module.cc
  20. chaps_pam_module_test.cc
  21. chaps_proxy.cc
  22. chaps_proxy.h
  23. chaps_proxy_mock.h
  24. chaps_service.cc
  25. chaps_service.h
  26. chaps_service_test.cc
  27. chaps_test.cc
  28. chaps_utility.cc
  29. chaps_utility.h
  30. chapsd.cc
  31. chapsd_test.cc
  32. dbus/
  33. dbus_bindings/
  34. handle_generator.h
  35. handle_generator_mock.h
  36. init/
  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_impl.cc
  80. object_store_impl.h
  81. object_store_mock.cc
  82. object_store_mock.h
  83. object_store_test.cc
  84. object_test.cc
  85. opencryptoki_importer.cc
  86. opencryptoki_importer.h
  87. opencryptoki_importer_test.cc
  88. opencryptoki_sample_token.tgz
  89. org.chromium.Chaps.conf.in
  90. org.chromium.Chaps.service
  91. p11_replay.cc
  92. pam_chaps.cfg
  93. pam_helper.cc
  94. pam_helper.h
  95. pam_helper_mock.cc
  96. pam_helper_mock.h
  97. pkcs11/
  98. platform_globals.h
  99. platform_globals_chromeos.cc
  100. platform_globals_linux.cc
  101. proto_conversion.cc
  102. proto_conversion.h
  103. session.h
  104. session_impl.cc
  105. session_impl.h
  106. session_mock.cc
  107. session_mock.h
  108. session_test.cc
  109. slot_manager.h
  110. slot_manager_impl.cc
  111. slot_manager_impl.h
  112. slot_manager_mock.cc
  113. slot_manager_mock.h
  114. slot_manager_test.cc
  115. system_shutdown_blocker.cc
  116. system_shutdown_blocker.h
  117. token_file_manager.h
  118. token_file_manager_chromeos.cc
  119. token_file_manager_linux.cc
  120. token_file_manager_mock.h
  121. token_manager_client.cc
  122. token_manager_client.h
  123. token_manager_client_mock.h
  124. token_manager_interface.h
  125. tpm2_utility_impl.cc
  126. tpm2_utility_impl.h
  127. tpm2_utility_test.cc
  128. tpm_utility.h
  129. tpm_utility_impl.cc
  130. tpm_utility_impl.h
  131. tpm_utility_mock.cc
  132. tpm_utility_mock.h
  133. 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