Digital Signatures allow Verification

With the computers, data is mostly anonymous being just bits and bytes everybody could have produced. This allows anybody to create a file and pretend you did that.

In the real world signatures, seals and similar have been invented to guarantee that something originates by a concrete person and that there was nobody to add anything unless the seal is broken. This works quite good although there are of course always people that may fake signatures or seals of other persons, it is normally a perfect protection.

Now if you have a file you distribute to your customers, how will they know that the email they receive is from you, that the patch files was created by you and that not somebody else sent this email introducing a virus or some other malicious thing into their systems? Well, the answer is sign it. It sounds unlikely if you are not familiar with it already, but there is software that allows you to ensure that exactly you are the creator of a file and that no modification happened.

How that? Basically it relies on that you add some more data called the signature, that only you can create and that people can verify you created it. The signature is closely tied to a certain file and cannot be used with another file. But what keeps people from faking this sort of things, too? It may be even easier to do this on the computer, you mean. Well, actually it is not.

This is mostly math science, but we try to put it easy. In math, there is a category of functions that can be reversed. Like "Multiplying by 3" can be reversed by "Dividing by 3". Or "adding 10" by "subtracting 10". Reversing these functions is easy. But in math there a few functions that can be reversed, but only very hard. One of these difficult to reverse functions is related to large prime numbers and the difficulty of having the product of two large prime numbers and telling which one they actually are. Therefore they are used to build a function where reversing it would require to do exactly this hard to reverse function thing. Finding large prime numbers is not hard at all for a computer and when you choose them large and then multiply them, well you know that numbers you used, but nobody else. So this is your secret you must keep. You can publish the function and sent the result of what the reversed function yields on it. Anyone wanting to verify you created the result may simple apply the non-reversed function and check whether he gets the original value. Since that is what reverse functions are about.

Using the product of the prime numbers, you can be pretty sure that you are able to reverse it and that it shall take extremely large efforts to do the same thing.

Now all you do is to sign your data e.g. "10" with the private signature function "divide by 5" and then make the reversed function "multiply by 5" public. The recipient gets a "10" data and a "2" signature. To verify it's not a fake he multiplies by 5 and finds, you signed the 10 and the data is from you. In this example faking the signature is easy, but as explained before the same procedure can become impossible to break with a different set of signatures.

One other good thing is that the problem to tell the factors or a number gets harder with size. With "99" you may probably be able to say it's "9 * 11" quite fast. But with increasing size of the factor primes, the problems gets harder. Sizes of the numbers are measured in bits. 9 and 11 have only 4 bits. With 512 the problem is said to be not possible to solve with brute force very reliable, well with 513 bits, it becomes twice as hard, with 514 bits it becomes 4 times as hard than with 512 bits. Now imagine that 1024 bits is 2^512 times as hard 512 bits. And if that does not suffice, you can use the 2^1024 times harder problem with 2048 bits. To our knowledge, no reasonable institution, not even intelligence services, use more bits for the numbers.

At this time the option -pgp allows to you add standard signatures for your patch file. In the near future (release 3.1) we plan to add support for signed patch files to the BinPatch core itself.