Add ability to toggle KeepKey PIN caching
0xApotheosis opened this issue · comments
Required to meet the requirement specified in the screenshot below:
Open question for @pastaghost: is this actually something that can be "enabled", or is the KeepKey functionality just referring to the state of the PIN being cached during a session?
@pastaghost I have a suspicion this is an invalid requirement, and that we might be conflating with the data in the line below in messages.proto - can you confirm?
optional bool pin_cached = 16; // is PIN already cached in session?
Unless there actually is some mechanism to "enable PIN caching"?
@0xApotheosis That's right. Pin caching isn't something that can be "enabled/disabled" selectively - the pin_cached
parameter in the Features
protobuf message indicates whether or not the user has recently unlocked the device with a manual PIN entry. In this case, the PIN is cached for the duration of the session so that it doesn't have to be re-entered on each operation.
There is a "Pin Caching" policy, which is a flag stored on the device and I expect it's gettable and settable like other policies, but I'm pretty sure it's not actually used anywhere internally. (The only policies I think are actually used are "Advanced" and "ExperimentalMode".)
(n.b.: in KK terms, "policy" == a config flag.)
@mrnerdhair That's right, but the "Pin Caching" policy is permanently enabled in the storage config and doesn't have exposed getter/setter functions AFAIK.
This clears everything up, thank you sers.