There's some function f() which has some "error", so "error" grows when decryption is failed every time and then finally it won't be able to decrypt. But, the "error" will be initialized when its decryption is succeed.
Is there any kind of crypto functions like this?
To prevent getting access grant in the password-based scheme from adversary, one of considerable option is using limit login attempts. This works only if the adversary can access via providing way such as APIs. When the attacker takes raw data from Database, it's useless. If there's a function like I mentioned above, it could be helpful to keep users' password.