The 4bit Settable Lock

CNOX_FATALITY's picture
Build image: 
In-game name (NO VISITORS! Must be LEARNER rank or higher!): 
CNOX_FATALITY
Builder name(s) and current ranks: 
CNOX_FATALITY : Learners
Creation location: 
754 100 -487
Machine Features: 

It feature a whopping 4 bits of RAM

6 Inputs :
- 4 Input for the code
- 1 Input to set or try the code
- 1 Input to enter the code ( To prevent malfunction)

2 Outputs :
- 1 If the code is right
- 1 If the code isn't right

For more customisation plug your locked device to the green redstone wire its the output of the lock
Sorry if its not compact i was to lazy

How To Use: 

If you want to set a new code :
- Switch the lever on the right side to "Enter New Password"
- Switch the levers in the middle its the bits of your code
- Then when you finished switch the lever on the left side "Enter"
- The "Right Password"" indicator should light up
- Flip The Enter Lever to off position and that it

If you want to try your code :
- Switch the lever on the right side to "Enter Code"
- Switch the levers in the middle its the bits of your code you seted earlier
- Swtch the left side lever to On
- if you entered the right password the "Right Password" indicator should light up but if you failed to remeber the password the "Wrong Password" indicator should light up

Request status: 
Not approved

Comments

All the valuables of your house got stolen, as someone easily bypassed your code lock!

Redstone improvements:
- You should use buttons to set a new code and enter a code, as flicking a lever twice is double the work.
- If you used horizontal (flat) XOR gates, the whole build would become more compact.

Complexity improvements:
- One should only be able to change the code, after first entering the correct code.
- The lever to input the code, should be a button, so that one cannot keep it on and simply flick levers until it is cracked. With a button it is more work.
- Simply checking a number is too simple and too easy to brute force. Having to input a sequential combination of inputs, increases the difficulty much more. Elaborated next:

Input complexity

No-Sequential input:
- With 4 levers, you have 16 possibilities to guess.
- With 8 levers, you have 256 possibilities to guess.
But who wants 8 levers on their machine - one would have to unflip them every time again. This is like pressing the right of 256 buttons...
The amount of inputs or input combinations makes up the possibilities to guess, when breaking in.

Sequential input:
- A normal 4 digit code lock with decimal digits is 10*10*10*10 = 10000 possibilities (That is 14 levers).
- A code lock with 6 digits (apple lock screen default) is 10*10*10*10*10*10 = 1000000 possibilities (20 levers).
^10 input possibilities can be entered with 4 levers (or 10 buttons). But 4 levers allow up to 16 values per digit/input (hex).
- A code lock with 4 hex digits is 16*16*16*16 = 65536 possibilities (16 levers).

Point being, 16 input combinations for a code lock, is not really enough.
And simply increasing the amount of levers to increase the amount of bits for the possibility number is too easy (for a PR) and bulky (annoying to use).

Having a 4-bit input, in form of levers or 10 or 16 buttons, is much easier to use and more natural as we humans are used to that kind of input.

That however requires 4 sequential inputs, so that the possibilities become big.

In general what really counts is the possible values of the input and the sequential amount.
Like one could use 2 buttons for binary input and require 8 inputs, which again is 256.

For a PR approval, I would at least require 256 combinations, with sequential input.

Feel free to ask me questions as reply here, or preferably in #help on our Discord.

By Ecconia