 Home
 Products
 Integration
 Tutorial
 Barcode FAQ
 Purchase
 Company
vb.net code 39 reader The Key Distribution Problem and PublicKey Cryptography in Software
4 Code 39 Scanner In None Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications. Print Code 3 Of 9 In None Using Barcode generator for Software Control to generate, create Code 39 Extended image in Software applications. A 1,024bit RSA key pair. The number n is the modulus, e is the public exponent, and d is the private exponent Code39 Decoder In None Using Barcode reader for Software Control to read, scan read, scan image in Software applications. Paint USS Code 39 In Visual C#.NET Using Barcode drawer for .NET framework Control to generate, create Code 3/9 image in .NET applications. exponent d based on e, p, and q. Then you throw away p and q (see Figure 412). Incidentally, finding large primes is easy using the Fermat test (in the 1600s, Pierre de Fermat discovered interesting things about numbers, one of which led to a test of primality). Furthermore, researchers have shown in the Prime Number Theorem that there are more primes of 512 bits or fewer than there are atoms in the known universe. This means that we ll never run out of primes, and the probability that two people will pick the same prime are so small that we can safely assume it will never happen. Suppose that Satomi, our attacker, wants to determine Gwen s private key. If Satomi knows the key, she can open PaoChi s digital envelope. She must figure out n and d. Because the public key is, well, public, she knows Encode Code 3/9 In VS .NET Using Barcode generation for ASP.NET Control to generate, create Code39 image in ASP.NET applications. Code39 Creator In Visual Studio .NET Using Barcode encoder for Visual Studio .NET Control to generate, create Code 39 Extended image in .NET applications. The Key Distribution Problem and PublicKey Cryptography
Generate USS Code 39 In VB.NET Using Barcode encoder for .NET Control to generate, create Code 39 image in .NET applications. Creating Bar Code In None Using Barcode drawer for Software Control to generate, create bar code image in Software applications. Figure 412 Generating an RSA public and private key pair
EAN13 Drawer In None Using Barcode creator for Software Control to generate, create GTIN  13 image in Software applications. Code 39 Extended Printer In None Using Barcode drawer for Software Control to generate, create ANSI/AIM Code 39 image in Software applications. (1) Choose a public exponent 3 17 65,537 Not all primes work with the public exponent you choose; you may have to reject some primes before finding two compatible numbers Barcode Generator In None Using Barcode creation for Software Control to generate, create barcode image in Software applications. UCC  12 Encoder In None Using Barcode creation for Software Control to generate, create UPCA image in Software applications. (2) Find p , q
USD8 Drawer In None Using Barcode creator for Software Control to generate, create USD  8 image in Software applications. Code 128 Code Set C Maker In None Using Barcode drawer for Font Control to generate, create USS Code 128 image in Font applications. PRNG
Bar Code Recognizer In .NET Framework Using Barcode Control SDK for ASP.NET Control to generate, create, read, scan barcode image in ASP.NET applications. UPC Code Drawer In None Using Barcode creation for Font Control to generate, create Universal Product Code version A image in Font applications. Fermat test p,q
UPCA Supplement 5 Decoder In Visual Basic .NET Using Barcode reader for .NET Control to read, scan read, scan image in .NET applications. Generating Matrix Barcode In VS .NET Using Barcode drawer for VS .NET Control to generate, create Matrix 2D Barcode image in Visual Studio .NET applications. (3) Multiply to get n e, p, q (4) Find d
USS Code 39 Printer In Visual Studio .NET Using Barcode generation for ASP.NET Control to generate, create Code39 image in ASP.NET applications. GS1  12 Reader In None Using Barcode decoder for Software Control to read, scan read, scan image in Software applications. n = pxq Extended Euclid d
(5) Destroy p , q
n because it s part of the public key. So really, all she has to do is figure out d. It turns out that d is simply the inverse of e modulo (n). Satomi knows what e is, so all she has to do is find (n) and perform a modular inverse function. That s very easy to do using the Extended Euclidean Algorithm. NOTE: Here s an interesting bit of history. Euclid published his algorithm in about 400 BCE, but researchers have concluded that he didn t invent it. It s believed that the algorithm had been around for about 200 years before Euclid presented it. Who was the true inventor No one knows, but there is a lesson to be learned from this anonymous mathematician: If you get a good idea, publish! By the way, (n) is known as Euler s phifunction ( is the Greek letter phi, pronounced fee ). Leonhard Euler (pronounced Oiler ) was an 18thcentury mathematician who noticed some interesting things about numbers. For example, if n is the product of those two primes p and q, then (n) is (p 1)(q 1). That s the quantity p minus 1 times the quantity q minus 1 (see the FAQ on the accompanying CD for more details). 4
So Satomi s problem, which began as find d and was reduced to find (n), has now been further reduced to find p and q. She knows n and knows that p q n, so all she has to do is factor n, which is the hard problem at the foundation of the RSA algorithm. In other words, in RSA, the oneway function is multiplication. That s right, multiplication. You re probably thinking, That s not oneway. To reverse multiplication, all you have to do is divide. That s true if you know what to divide by. But if someone multiplies two numbers and tells you the result, can you determine the original two numbers That s known as factoring, and it happens to be difficult. Suppose n is 35. What are p and q That s easy they re 5 and 7 because 5 7 35. The numbers 5 and 7 are the prime factors of 35. When you break 35 into its prime factors, you re factoring. Now suppose n is 893. Factor that. (The answer is given in the next paragraph.) If you factored 893, you probably discovered that it was a little more timeconsuming than factoring 35. The longer the number, the more time it takes to factor it. Researchers have written computer programs to factor numbers. For those programs, factoring 893 would be trivial. But just as with humans, it takes these programs longer to factor bigger numbers. You can pick a number so big that the amount of time it would take to factor, even for the fastest computers, would be prohibitive. Remember Satomi s problem If she finds p and q, she can compute (n). With (n) and e, she can determine d. When she has d, she can open PaoChi s digital envelope. Because p q n and because she knows what n is (remember, that s part of the public key), all she has to do is factor n and that s how factoring can break RSA. (The answer from the preceding paragraph is 19 and 47.) Because the modulus (that s n) is the number Satomi needs to factor, we ll say that the size of the modulus is the size of the RSA key. Hence, an RSA key that uses a modulus of 1,024 bits is a 1,024bit key. No one has been able to factor big numbers in a reasonable amount of time. How big is big Currently, the most commonly used RSA key size is 1,024 bits. The record for factoring (as of December 2000) is 512 bits. In that case, p and q were each 256 bits long. It took a team using 292 offtheshelf computers a little more than five months to do the job. With a brute force attack, each time you add a bit to the key size, you double the time it takes to break. But with the technique used by the current factoring champions, each time you add a bit to the number, you don t quite double the time to factor. Each added bit makes the program run about 1.035 to 1.036 times longer. So if a 512bit key is broken in five months, a 1,024bit key can be broken in about 3 to 30 million years (see Figure 413).

