Fixed in https://github.com/badbundle/vault-app/pull/705 (merged as c9d56c69), as decided above: any password that opens a vault, a duress one included, now resets the waits along with the count towards erasing after 10.
AppLockPasswordAttemptCounterkeeps one count again, of attempts in a row. The recent count (recentWrong,recentWrongAt, the hourly decay) is removed. A keychain record that still has those fields decodes, and reads as its attempts in a row.- A right password calls
reset(), which removes the record, so the next attempt has no wait.noteRightAttempt()andresetCountInARow()are gone. Turning the password back on resets the counter too, and the "Turning it back on" paragraph says why that clears nothing new. - The accepted limit is stated in G19 and a new "Accepted limits" entry in
docs/security-model.md, in the design doc's counter section and consequence 11, and in the Duress Password FAQ: someone with a duress password can make 4 wrong guesses, open the duress vault, and repeat, held back only by the key derivation. G21 and G26 were reworded to match. The on-screen wording is unchanged: "The right password starts the count again" now covers the waits too. - Tests: new
reset_theNextWrongAttemptDoesntWait(a wrong attempt right after a right one has no wait),countAttempt_rightAttemptsBetweenWrongOnes_neverWaitOrReachTheEraseThreshold,recordWithARecentCount_readsAsItsAttemptsInARowandunlock_wrongPasswordsEitherSideOfADuressPassword_startTheWaitsAgain. The recent-count tests listed in this ticket are replaced.make validatepassed.