The Black Box Example

### The Black Box Demonstration.

Suppose we have a black box. In the box is a variable which we are not allowed to know anything about, ie this value is meant to be secure. As this value is meant to have a high level security, ie nothing outside of the box should know anything about the value of the variable, we shall call this value H.
Now if we say there is a public function that we can call on the box, ie we can send the box a request, and it will send us back an answer. When we request an answer from the box, the box will give us back a low security variable, ie everyone could see the variable that the box gave out, which we shall call L.

We also know the method used by the box to generate L, and that L is dependent upon the value of H to some extent. The method used to generate L was originally:

L = H mod 2

However, as we can see, we would be immediately able to determine whether or not H is an odd number or an even number, eg. If H is odd, L = 1. So, in an attempt to make the value of H more secure, the actual algorithm for generating L is:

L = H mod 2 ^ ( L = 0 ^ L = 1)

So now, if H is odd, we can still see that L can take a value of 0 or if L is even it can still have a value of one. If we know a value of L, we are no longer able to determine whether or not H is odd or even. What happens if we generate multiple values of L? Can this help us in determining any attributes of H?
On the next page, we have implemented the above scenario. A value of H will be randomly generated for you, and you will be able to request values of L from the website. Try generating several values for L and see if a pattern emerges.

next: The Black Box Demonstration >>