The keypad at an office I worked at about 10 years ago had an electronic display that randomized the key positions. The display's viewing angle was artificially narrowed as well. I thought that all of this was to prevent shoulder-surfing -- the wear and buildup issue never crossed my mind.
I've never come across a keypad lock that would be vulnerable to this. You either have to press # at the end of the code, or the codes are significantly longer than 4 digits. Of course, even in the first category, entering 24 codes (50% chance of entering 12 or fewer) isn't a huge barrier once you know the four digits.
Wow, I just finished implementing a couple algorithms for binary De Brujin sequences in haskell and was working on a blog post when I read this. You can check out mine here if you want:<p><a href="http://coder.bsimmons.name/blog/2009/09/cracking-a-lock-in-haskell-with-the-de-bruijn-sequence-pt-1/" rel="nofollow">http://coder.bsimmons.name/blog/2009/09/cracking-a-lock-in-h...</a><p>We must have been reading the same articles on reddit which lead us to the same tengentially-related wikipedia page or something.
Sounds like having an enter or # key increases the number of attempts needed significantly.<p>So why would anyone make keypads without them? Ease of use over security?
From the 'obvious wear' or 'tracking substance added' risks mentioned, it also seems you should, after entering the proper code, touch every other number redundantly as well.<p>I suppose with 10 transparent markers that are distinguishable under detailed inspection (such as fluorescing to different colors under UV light), you could even work out the right order on the first try: "traces of orange have transferred to 3 other keys, so the orange key was pressed first; traces of green to 2 other... (etc.)"
I made a couple of very bad mistakes in that article. Hopefully I got it right in the sequel. <a href="http://alicebobandmallory.com/articles/2009/09/27/a-case-for-using-only-three-different-digits-in-keypad-codes" rel="nofollow">http://alicebobandmallory.com/articles/2009/09/27/a-case-for...</a>
If you knew that everyone used four different digits for keypad locks, that would dramatically reduce the number of possible combinations you had to try...<p>How about "use something random, change the keys before they wear down, and wipe them before and after use if you're paranoid."