Lock Picking 101 Forum
A community dedicated to the fun and ethical hobby of lock picking.
       

Lock Picking 101 Home
Login
Profile
Members
Forum Rules
Frequent Forum Questions
SEARCH
View New Posts
View Active Topics


Live Chat on Discord
LP101 Forum Chat
Keypicking Forum Chat
Reddit r/lockpicking Chat



Learn How to Pick Locks
FAQs & General Questions
Got Beginner Questions?
Pick-Fu [Intermediate Level]


Ask a Locksmith
This Old Lock
This Old Safe
What Lock Should I Buy?



Hardware
Locks
Lock Patents
Lock Picks
Lock Bumping
Lock Impressioning
Lock Pick Guns, Snappers
European Locks & Picks
The Machine Shop
The Open Source Lock
Handcuffs


Member Spotlight
Member Introductions
Member Lock Collections
Member Social Media


Off Topic
General Chatter
Other Puzzles


Locksmith Business Info
Training & Licensing
Running a Business
Keyways & Key Blanks
Key Machines
Master Keyed Systems
Closers and Crash Bars
Life Safety Compliance
Electronic Locks & Access
Locksmith Supplies
Locksmith Lounge


Buy Sell Trade
Buy - Sell - Trade
It came from Ebay!


Advanced Topics
Membership Information
Special Access Required:
High Security Locks
Vending Locks
Advanced Lock Pick Tools
Bypass Techniques
Safes & Safe Locks
Automotive Entry & Tools
Advanced Buy/Sell/Trade


Locksport Groups
Locksport Local
Chapter President's Office
Locksport Board Room
 

Predicting a Master Key (probability)

Information about locks themselves. Questions, tips and lock diagram information should be posted here.

Predicting a Master Key (probability)

Postby runbackwards » 2 Nov 2014 18:09

Hello,

I'm new to locks and have this theoretical probability question I want to explore. If I have X change keys, with what probability can I predict the master key? What variables must I track to create a mathematical relation?

If I understand locks correctly, this is only possible with a Rotating Constant scheme since then we know some keys do share the master key bitting.

Variables:
T - total possible change keys
X - the number of change keys we have access to
P - Number of pin stacks
H - number of possible cut depths
M - number of master keys in a given system (We're looking for the local master key, not the Top Master Key)

Am i missing other factors, or some of the variables i listed above irrelevant or not-applicable?

Thanks
runbackwards
 
Posts: 2
Joined: 2 Nov 2014 17:31

Re: Predicting a Master Key (probability)

Postby globallockytoo » 2 Nov 2014 18:14

it depends on the type of system.

inline pin tumbler, 5,6 or 7 pin

Wafer tumbler (although this is much simpler)

High Security like Protec, Abloy Classic, Bilock, Medeco, Evva, MTL, etc

There are many variables.

Are you asking how many change keys you need to be able to accurately determine the master key?
One One was a race horse, one one won one race, one two was a racehorse, one two won one too.

Disclaimer: Do not pull tag off mattress. Not responsible for legal advice while laughing.
Bilock - The Original True Bump Proof Pin Tumbler System!
globallockytoo
 
Posts: 2269
Joined: 26 Jul 2006 13:33

Re: Predicting a Master Key (probability)

Postby runbackwards » 2 Nov 2014 18:24

I'm not interested in advanced systems, so a basic inline tumbler system with one master cut per pin in a rotating constant scheme.

I don't think you could ever 100% determine the master key, correct? i'm curious can you establish that given X change keys there are Y potential master keys.
runbackwards
 
Posts: 2
Joined: 2 Nov 2014 17:31

Re: Predicting a Master Key (probability)

Postby globallockytoo » 2 Nov 2014 18:46

assuming a standard 5 pin inline system using Schlage depths with a 2 step increment....potentially 10000 codes in a given system. Just 1 mk and say 20 change keys, you could potentially determine the most likely mk, but accuracy and if a system was built to factory spec are all important.
One One was a race horse, one one won one race, one two was a racehorse, one two won one too.

Disclaimer: Do not pull tag off mattress. Not responsible for legal advice while laughing.
Bilock - The Original True Bump Proof Pin Tumbler System!
globallockytoo
 
Posts: 2269
Joined: 26 Jul 2006 13:33

Re: Predicting a Master Key (probability)

Postby Squelchtone » 2 Nov 2014 20:12

haha, this is like the 3rd thread in a month about determining master keys.. are you guys all taking the same locksmith class or something? :lol:
Image
User avatar
Squelchtone
Site Admin
 
Posts: 11307
Joined: 11 May 2006 0:41
Location: right behind you.

Re: Predicting a Master Key (probability)

Postby peterwn » 4 Nov 2014 4:08

runbackwards wrote:Hello,

I'm new to locks and have this theoretical probability question I want to explore. If I have X change keys, with what probability can I predict the master key? What variables must I track to create a mathematical relation? .......

You would end up with an immensely complex formula. MACS limitations would add to the complexity. It would probably be easier to program up a Monte-Carlo simulation - generate a large number of hypothetical valid change keys (say all possible ones ), select X of them at random and see if the MK can be determined from them. Repeat say 1000 times to get the overall probability.
peterwn
 
Posts: 161
Joined: 22 Aug 2010 23:31

Re: Predicting a Master Key (probability)

Postby xylac » 8 Nov 2014 22:13

The answer to this question is not easy or straightforward. In cases like this, it's a good idea to simplify the problem as much as possible in order to understand what's going on. Let's say we have a system with two pins, three depths, one master key, and one position held constant in the RC keying scheme. We'll ignore MACS concerns now, because they really complicate things. Since the bitting at each position is independent, all master keys behave the same way by symmetry, so we can assume we have the master key 11 (we'll also ignore practical concerns about why this would be a bad master key bitting to use).

If we're given a single change key under this system, it gives us information about what the master key might be. For example, a master key of 23 could never give us a change key of 12 under this system, so if we ever see the change key 12 we know the master key isn't 23. So given a change key, we can write out a list of the possible master keys which could have given us that change key. If we have multiple change keys, the master key has to exist in each list. For the system described, we are able to enumerate the possibilities. Format is "CK_ID:CK_bitting:{set of possible master keys}"

MK = 11
A:12:{11,13,22,32}
B:13:{11,12,23,33}
C:21:{11,22,23,31}
D:31:{11,21,32,33}

If we're given change keys A and B, the only possible master key in both lists is 11, so we have found the master key.
If we're given change keys A and C, the master key could be 11 or 22, so we have not found the master key for sure.

Thus, given T=4,X=2,P=2,H=3,M=1, we can't say for sure what the probability is that we can predict the master key. It could be 100% or it could be 50%. You could compute the expected probability, which would lie somewhere between 0.5 and 1.0 (in this case it happens to be 66%), and you might even be able to get an equation in terms of X. I would expect this expression to be rather complicated, however.

Perhaps a better question would be "What is the expected number of unique change keys I must observe before I know the master key with 100% certainty?" In the example above, we can again examine the entire set of possibilities. The format is "Sequence of received change keys:length of that sequence:probability that the sequence occurs"

AB:2:1/(4*3)
ACB:3:1/(4*3*2)
ACD:3:1/(4*3*2)
ADB:3:1/(4*3*2)
ADC:3:1/(4*3*2)
BA:2:1/(4*3)
BCA:3:1/(4*3*2)
BCD:3:1/(4*3*2)
...and so on. The pattern is fairly consistent.

Thus we can compute the expected length as 4*(2*1/12+3*1/24+3*1/24+3*1/24+3*1/24) = 8/3.
That is, in this simple system, we would have to examine 8/3~=2.67 change keys on average before we knew the master key with 100% certainty.

To return to your original question, check out viewtopic.php?f=9&t=57939.
It might be better (and would probably be simpler mathematically) to analyze TPP first, since then we know every bitting on the change key is different from the master key.

This isn't an easy problem, and looks like it has a lot of fun details to consider. I recommend keeping the details to an absolute minimum as you go through your analysis, then generalizing. Perhaps only consider systems with 3 depths, or systems with only 2 pins. Even that could get fairly in depth.

Best of luck!
xylac
 
Posts: 40
Joined: 25 Feb 2013 22:27

Re: Predicting a Master Key (probability)

Postby Evan » 9 Nov 2014 1:12

runbackwards wrote:I'm new to locks and have this theoretical probability question I want to explore. If I have X change keys, with what probability can I predict the master key? What variables must I track to create a mathematical relation?

If I understand locks correctly, this is only possible with a Rotating Constant scheme since then we know some keys do share the master key bitting.

Variables:
T - total possible change keys
X - the number of change keys we have access to
P - Number of pin stacks
H - number of possible cut depths
M - number of master keys in a given system (We're looking for the local master key, not the Top Master Key)

Am i missing other factors, or some of the variables i listed above irrelevant or not-applicable?


Ok, what you are trying to do -- formulate a one-size-fits-all calculation that will give you an answer for every master key puzzle you come across... The problem is that you can't do that...

You understand some of the variables you would need to consider:

The total number of change keys possible.
The number of pin stacks in the lock.
The number of possible bitting depths.

But how these bits of data are used can vary greatly depending on the type. size and complexity of the master keying system in question.

One of the biggest barriers to understanding how a master key system works that you seem to have appears to be a common misconception that a lower level master key is something that can and should be solved for... This is non-sense... In a keying system there is the TOP MASTER KEY and there are change keys -- intermediate level "master keys" share cuts from both... When solving the puzzle you are always looking to determine the top master key, period...

How the key is divided in the system is an important factor in being able to usefully interpret your observations... How a key is divided to progress the different levels of keying in a master key system is different for each system based on how complex it is required to be...

Let's consider a moment the thread that xylac linked to in his reply: http://www.lockpicking101.com/viewtopic.php?f=9&t=57939

You asked how many keys would you need to determine the master key bitting... The answer using that data set is "as few as two, as long as they are the correct pair"...

I understand this is not the answer you are trying to find, but aside from exploring really high level math involving probability using permutations and as xylac joked being able to win at gambling being an easier equation to solve, master keying is both an art and a science at the same time... The question you posed is about as easy to solve as this one: "given X pieces of a puzzle, how many total pieces are there ?"

I know this might not have been the most helpful of responses, and I am by no means attempting to discourage you from your explorations, but you really do need to understand a thing or two about how master keying systems work and are put together before you would be able to see and understand that there is not one plug-and-chug equation you can develop which will give you the answer you desire for any keying system beyond the one you used as an example to figure out the equation...

~~ Evan
Evan
 
Posts: 1489
Joined: 5 Apr 2010 17:09
Location: Rhode Island


Return to Locks

Who is online

Users browsing this forum: No registered users and 11 guests