blob: f9271e9617845c77c1d0df0f050bf6610aaf07a7 [file] [log] [blame]
Andrew Scull70934312018-01-03 11:51:54 +00001#include "AuthSecret.h"
2
3namespace android {
4namespace hardware {
5namespace authsecret {
6namespace V1_0 {
7namespace implementation {
8
9// Methods from ::android::hardware::authsecret::V1_0::IAuthSecret follow.
10Return<void> AuthSecret::primaryUserCredential(const hidl_vec<uint8_t>& secret) {
11 (void)secret;
12
13 // To create a dependency on the credential, it is recommended to derive a
14 // different value from the provided secret for each purpose e.g.
15 //
16 // purpose1_secret = hash( "purpose1" || secret )
17 // purpose2_secret = hash( "purpose2" || secret )
18 //
19 // The derived values can then be used as cryptographic keys or stored
20 // securely for comparison in a future call.
21 //
22 // For example, a security module might require that the credential has been
23 // entered before it applies any updates. This can be achieved by storing a
24 // derived value in the module and only applying updates when the same
25 // derived value is presented again.
26 //
27 // This implementation does nothing.
28
29 return Void();
30}
31
Andrew Scullbd4e48c2018-01-19 19:17:56 +000032// Note: on factory reset, clear all dependency on the secret.
33//
34// With the example of updating a security module, the stored value must be
35// cleared so that the new primary user enrolled as the approver of updates.
36//
37// This implementation does nothing as there is no dependence on the secret.
Andrew Scull70934312018-01-03 11:51:54 +000038
39} // namespace implementation
40} // namespace V1_0
41} // namespace authsecret
42} // namespace hardware
43} // namespace android