ethresear.ch post proposes Encrypted Account, an ERC-4337 smart account that keeps a PIN encrypted in the contract using Zama's FHE
The design lets a wallet check a PIN and count guesses onchain without any server holding either, using encryption that works on data without decrypting it.