blob: 46a3ec121ebd842d3f0d9bab519660a4586184a5 [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
32Return<void> AuthSecret::factoryReset() {
33 // Clear all dependency on the secret.
34 //
35 // With the example of updating a security module, the stored value must be
36 // cleared so that the new primary user enrolled as the approver of updates.
37 //
38 // This implementation does nothing as there is no dependence on the secret.
39
40 return Void();
41}
42
43} // namespace implementation
44} // namespace V1_0
45} // namespace authsecret
46} // namespace hardware
47} // namespace android