Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku Newsgroups: comp.programming Subject: Re: bike locks and encryption Date: Tue, 7 Oct 2014 21:21:11 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 33 Message-ID: <20141007141104.666@kylheku.com> References: <144e68c8-e88b-47a4-af78-8129ad2557c7@googlegroups.com> <7089a0c1-d357-457f-b8f9-2b81a1fec736@googlegroups.com> NNTP-Posting-Host: X+c6YNb3AaWMPA3YfA4opg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: slrn/pre1.0.0-18 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.programming:4816 On 2014-10-07, RichD wrote: > On October 6, RichD wrote: >> bicycle locks as examples of one way function... >> Specifically, the combination type: 4 dials, >> numbered 0..9, the cylinder mates with the receptacle >> with the correct combination. > > To be precise, the cable type, with the ends > that mate, not the U lock. There is less difference between these than you think. With a cable lock, you manually arrange some dials into a configuration. With a keyed U-lock, there is still a combination: that combination is imprinted as a machined pattern on the key. When the key is inserted, it moves some pins into a configuration, which is equivalent to turning the dials, except that since you have only one key, you can only express one combination. Ordinary residential entrance keys are also combinations. The keys have teeth, and these teeth arise because "valleys" between the teeth are machined to different depths. The depths are quantized, typically to 10 possibilities, which can be represented by the digits 0 to 9. So a key with four "valleys" between five teeth represents a combination somewhere between 0000 and 9999. If you know the combination number, you can machine a key which will open the lock, and in principle, you could have all 10,000 keys made which match that lock's "key way", and do a brute force by trying them one by one. When you buy a lock re-keying kit which consists of replacement tumblers for the lock, together with matching keys, you will probably see that there is a combination number written on the packaging. That number could be used to order additional matching tumblers, which, if installed into additional locks, will all work with the same key.