Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku Newsgroups: comp.programming Subject: Re: bike locks and encryption Date: Tue, 7 Oct 2014 21:10:43 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 23 Message-ID: <20141007135925.603@kylheku.com> References: <144e68c8-e88b-47a4-af78-8129ad2557c7@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:4815 On 2014-10-07, RichD wrote: > Something occurred to me recntly - bicycle locks > as examples of one way functions, so useful in > encryption. What type of bike locks? All the bicycle locks with which I am familiar are not one-way functions in any sense. To open the lock, you must show that you either know a secret (the combination) or that you posess a secret object (the key whose pattern has the imprint of a combination). The lock itself also contains a representation of the secret (the configuartion of tumblers, wheels or whatever) in such a way that this is not externally visible. The secret is not functionally derived from something else. Locks do, however, as you suspect, compute a function. Namely, they compute the boolean function "matches?(lock, key)" or "matches?(lock, combination)": in other words, they evaluate the predicate whether the secret matches the lock. Mechanical locks evaluate this function mechanically, powered by the user. For instance, you rotate some dials to bring them to some configuration, and then have the lock evaluate the matches? predicate by trying to pull the lock open. The lock either says "True" by separating or "No" by refusing to separate.