In: Computer Science
How is a combination lock with two numbers (0 and 1) similar to bit encryption, given we had the ability to add as many wheels as we wanted?
How is a combination lock with two numbers (0 and 1) similar to bit encryption, given we had the ability to add as many wheels as we wanted?
Working of a combination lock in simplistic terms:
The most common implementation of a combination lock involves a serried of the wheel which is connected to the dial with a horizontal rod-shaped component called SPINDLE. Internally is runs through all the wheels and end at the DRIVER CAM. When we turn the dial spindle which turns the driver cam present at the end. On the driver cam, there is a outward structure called DRIVE PIN which comes into the similar structure of the wheel called FLYWHEEL. When that happens, wheel adjacent to the driver cam rotates and that propagates to the wheel adjacent to the initial one and so on for the rest of the wheels as well.
Now for every rotation made in the dial has a number and a wheel associated with it in the end when the right combination is dialed in all the wheels and their notched lines up exactly. Meanwhile, there is another piece of the lock called FENCE, this sits in between the dial and the drive cams and clocks the path of the bolt that secures the safe door.
When all wheels line up, their notches align and form a gap. In this gap, gravity does its job and fence drops into it. As the combination is right and nothing blocking the lock’s pathway the lock unlocks.
Now coming to the bit encryption, there is a clear analogy of the encryption to the combination lock where instead of physical wheel and spindle we have series of 0s and 1s placed in specific combination following certain random algorithm which can be deciphered only by specific sequence of key(s) and receiver(s). Also, we should understand the power of the bit combination which could not be very intimidating at first glance as it’s just a combination of merely two numbers (0 and 1) instead of fancy mathematical constants. The power of the encryption comes from the number of operations required to guess possible variation of the key, with is 2 exp n where n is the length of the key. Just to give an example 2 exp 10 means 1024 tries and that’s tries required by 10-bit key, in real-world we deploy north of 128-bit encryption which is 2 exp 128 1.8 followed by 55 zeroes number of tries. By this, we could clearly see the power of the bit when combined in mere 128 combinations.
Now if we reverse the analogy where we want to increase the security of dial combination the more the number of wheels we have lesser is the chance of a random guess and we can theoretically take this to level where It’s not feasible for anybody in the world(even a computer!) to crack the safe.