TAVELURE
Menu
Request pre-order

BIOMETRICS & AI · · 7 MIN READ

Can AI guess your PIN? What the research says about keypads

Can AI guess your PIN? People pick predictable codes, and AI models read covered hands, smudges and keystroke sounds. What studies show, and how to pick a PIN.

Can AI guess your PIN? Often it does not need to. People choose PINs so predictably that a short list of guesses opens a noticeable share of keypads, and machine-learning models can recover digits from video of a covered hand or typing sounds. For a keypad safe, the code is only as private as the moment you enter it.

Can AI guess your PIN, or just guess people?

A four-digit PIN has 10,000 possible values. If everyone picked at random, a thief with three tries would succeed three times in 10,000. The research below shows why the real odds are much worse, and AI is only part of the reason. Most of the weakness comes from human habit: birthdays, years, repeated digits and shapes on the keypad. What AI adds is a set of new ways to observe a PIN being entered and turn that observation into a shortlist.

It helps to separate the two. A guessing attack uses statistics about what people tend to choose. A side-channel attack uses evidence left behind when you type: smudges, heat, hand movement or sound. Machine learning has made the second kind cheaper and more accurate.

What are the most common PINs?

In 2012 Nick Berry of DataGenetics analysed almost 3.4 million four-digit passwords taken from leaked password tables, as a stand-in for real PINs.[1] The code 1234 made up 10.713% of them, 1111 accounted for 6.016% and 0000 for 1.881%.[1] Trying just the 20 most popular codes would have unlocked 26.83% of the set, and every code of the form 19-something, the shape of a birth year, appeared in the most popular fifth.[1] Berry was careful to note that these are proxies rather than bank card PINs.

Researchers at the University of Cambridge went further with a survey of more than 1,100 banking customers.[2] They found that about 23% of users chose a PIN based on a date, and among those, 29% used their own birth date.[2] Because almost everyone carries a document showing their birth date, a thief with a stolen wallet could use the card once for every 11 to 18 wallets, depending on whether the bank blocks weak PINs such as 1234.[2] With six guesses, success against an unknown banking PIN was estimated at 1.9%; knowing the birth date raised that to 8.2%.[2] The authors noted that four-digit PINs are also used for electronic door locks, which is where this research meets home security.[2]

Is a six-digit PIN safer than four?

Less than you would expect. A 2020 study of 1,220 user-chosen smartphone PINs found that, against an attacker limited to 10, 30 or 100 guesses, six-digit PINs offered little to no extra security over four-digit ones.[3] The blocklists used by iOS, 274 four-digit and 2,910 six-digit PINs, gave little or no benefit against that kind of throttled attack, and the authors suggested a blocklist covering about 10% of the possible PINs as the best balance.[3] Length helps only if the extra digits are not a date or a pattern.

Smudge attack on a keypad: what fingers leave behind

In 2010 a University of Pennsylvania team photographed the oily traces left on smartphone screens after users drew their Android unlock patterns.[4] In one experiment the pattern was partially identifiable in 92% of the lighting and camera setups and fully identifiable in 68%; even in their worst case, under poor conditions, it was partly recoverable in 37% of setups.[4]

A physical keypad leaks in a similar way, through grease, wear and fading on the most-used buttons. Smudges reveal which digits are in the code but not their order. If four distinct keys are marked, there are only 24 possible orderings, a small number for anyone with time alone at the safe. Repeated digits make the set smaller still.

Thermal camera PIN attack

Fingers also leave heat. University of Glasgow researchers paired a thermal camera with an AI model to read which keys had been pressed shortly after someone typed, and found short codes especially exposed.[5] We covered their results, and how quickly the heat trace fades, in can fingerprint locks be hacked. The practical points for a keypad safe are the same: longer codes resist better, and an attacker needs to reach the keypad within a minute or so of use.

Shoulder surfing a PIN, now with machine learning

Covering the keypad with your other hand is the standard advice against someone looking over your shoulder. Researchers tested whether that is enough against a camera and a neural network. In a study of 58 users entering PINs on an ATM-style keypad, a deep-learning model inferred 30% of five-digit PINs within three attempts from video of the typing hand, even though the other hand covered it.[6] Human volunteers shown the same footage averaged 7.92% accuracy.[6] The attack assumed the attacker had a keypad of the same model to train on, which is easy for a mass-produced lock or safe.

Sound is another channel. A 2023 study trained a deep-learning model on recorded keystrokes and classified them with 95% accuracy from a nearby phone recording and 93% from a Zoom call.[7] That work used a laptop keyboard rather than a safe keypad, but it shows the direction of travel: anything that makes a distinctive sound or movement can be modelled.

What this means for keypad safes

How a keypad PIN can be inferred, and what limits each attack
AttackWhat the attacker needsWhat it revealsWhat limits it
Statistical guessingA few attempts at the keypadCommon codes and birth dates[1][2]A random PIN; lockout after failed attempts
Smudges and wearGood light and a close look or photoWhich keys are used, not the order[4]Wiping the keypad; a code with more distinct digits
Thermal imagingA thermal camera soon after entryKeys pressed, sometimes the orderLonger codes; time
Video of the handA hidden camera and a matching keypadProbable digits, even with a covering hand[6]Full shielding; checking for cameras
Sound of keystrokesA recording of the typingProbable keys on some devices[7]Keypads without distinct key sounds

Inside a home, the realistic observer is rarely a stranger with a thermal camera. It is someone who is already present: a visitor, a contractor, a member of staff, or a phone camera pointed in the wrong direction. Our comparison of digital, biometric and key lockers covers the other weak points of keypad safes, such as factory master codes and override keys.

How to choose a secure PIN

  1. Generate it randomly. Use dice or a random number generator rather than picking digits yourself.
  2. Avoid anything with meaning. No birthdays, anniversaries, years, house numbers, vehicle numbers or parts of a phone number. The Cambridge study’s first lesson was never to use your date of birth.[2]
  3. Avoid shapes and repeats. Straight lines, corners and repeated digits are among the first guesses.[1]
  4. Use the longest code the lock allows, as long as it stays random.[3]
  5. Do not reuse it. Your safe code should not match your card PIN or phone unlock code.
  6. Shield the whole keypad with your body as well as your hand, and look for cameras, including phones, before you type.
  7. Change it after anyone may have watched, and whenever staff or contractors who had access leave.
  8. Prefer locks that delay or lock out after a few wrong entries, which blunts statistical guessing.

A lock with no code to observe

Every attack above works because a PIN is information: something typed, seen, heard or warmed, which a model can learn to read. Tavelure, a home safe in development, removes that layer. It has no PIN, no code and no keypad. It opens only with a wearable metal key whose coating is sealed with millions of nanoparticles placed at random when it is made, read by a laser as a unique speckle pattern of light. Tavelure is based on two patents and PhD research conducted at the University of Strasbourg and CNRS. See how the technology works, or our overview of AI threats to home security.

Frequently asked questions

Can AI guess your PIN?

AI does not need to break a random PIN; it exploits how people choose and enter them. Predictable codes fall to short guess lists, and a deep-learning model inferred 30% of five-digit PINs within three attempts from video of a covered typing hand.[6] A random code, entered fully shielded, removes most of that advantage.

What are the most common PINs?

In an analysis of about 3.4 million four-digit codes from leaked password tables, 1234 made up 10.713%, followed by 1111 and 0000.[1] The top 20 codes covered 26.83% of the set, and years starting with 19 were heavily over-represented.[1]

What is a smudge attack on a keypad?

It means reading the oily marks or wear that fingers leave to work out which keys are used. Researchers recovered Android unlock patterns fully in 68% of setups in one experiment.[4] On a physical keypad, smudges reveal the digits but not their order, so wiping the keypad helps.

Is a 6-digit PIN more secure than a 4-digit PIN?

Only if it is random. A 2020 study of user-chosen smartphone PINs found six-digit codes gave little to no extra protection against an attacker allowed a limited number of guesses, because people pick predictable longer codes too.[3]

How do I stop shoulder surfing at a keypad?

Block the keypad with your body as well as a covering hand, check for cameras and phones, and change the code if you suspect anyone watched. Research shows a covering hand alone can still leak digits to a camera and a trained model.[6]

ABOUT THE AUTHOR

Dr Saeel Momin, founder of Tavelure, is a materials scientist with a PhD in Polymer Chemistry from CNRS and the University of Strasbourg. Tavelure is based on two patents and PhD research conducted at the University of Strasbourg and CNRS. Meet the team · LinkedIn.

Related reading

More in Biometrics & AI

Sources

  1. PIN number analysis, DataGenetics (Nick Berry)
  2. A birthday present every eleven wallets? The security of customer-chosen banking PINs, Financial Cryptography 2012 (Bonneau, Preibusch and Anderson, University of Cambridge)
  3. This PIN Can Be Easily Guessed: Analyzing the Security of Smartphone Unlock PINs, IEEE Symposium on Security and Privacy 2020 (Markert, Bailey, Golla, Dürmuth and Aviv)
  4. Smudge Attacks on Smartphone Touch Screens, USENIX WOOT 2010 (Aviv, Gibson, Mossop, Blaze and Smith, University of Pennsylvania)
  5. AI-driven ‘thermal attack’ system reveals passwords in seconds, University of Glasgow
  6. Hand Me Your PIN! Inferring ATM PINs of Users Typing with a Covered Hand, arXiv (Cardaioli, Cecconello, Conti, Milani, Picek and Saraci)
  7. A Practical Deep Learning-Based Acoustic Side Channel Attack on Keyboards, arXiv / IEEE EuroS&P Workshops 2023 (Harrison, Toreini and Mehrnezhad)

PRIVATE WAITLIST

Be among the first to own a Tavelure.

Early access is limited. No deposit, no obligation. Customer verification comes before payment.

Join the waitlist ↗