13.03.2013 Views

Hacking the Xbox

Hacking the Xbox

Hacking the Xbox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The RSA Algorithm<br />

Chapter 7 - A Brief Primer on Security 115<br />

The RSA algorithm was patented by <strong>the</strong> Massachusetts<br />

Institute of Technology and exclusively licensed to RSA Data<br />

Security, Inc in 1983. The patent on <strong>the</strong> RSA algorithm has<br />

since expired in September 2000. Thus, today RSA is free to<br />

use in any application. Many excellent tutorials and educational<br />

examples using RSA can now be found on <strong>the</strong><br />

Internet. Perform a Google search using <strong>the</strong> keywords “RSA<br />

algorithm” to find some of <strong>the</strong>se examples.<br />

The RSA algorithm is as follows (adapted from http://<br />

world.std.com/~franl/crypto/rsa-guts.html):<br />

1. Find two large (thousands of bits long) prime numbers, “P”<br />

and “Q”.<br />

2. Choose “E” such that E > 1, E < PQ, and E is relatively prime<br />

to (P-1)(Q-1). E does not have to be prime, but it must be<br />

odd. The pair of E and PQ are <strong>the</strong> public key.<br />

3. Compute “D” such that (DE - 1) is evenly divisible by<br />

(P-1)(Q-1). This can be accomplished by finding an integer<br />

X which causes D = (X(P-1)(Q-1) + 1)/E to be an integer. D is<br />

<strong>the</strong> private key.<br />

4. Plaintext “T” is encrypted using <strong>the</strong> function<br />

C = (T E ) mod PQ<br />

5. Ciphertext “C” is decrypted using <strong>the</strong> function<br />

T = (C D ) mod PQ<br />

Note that T < PQ. Messages larger than PQ must be broken<br />

down into a sequence of smaller messages, and very short<br />

messages must be padded with carefully selected values<br />

to foil dictionary attacks, among o<strong>the</strong>r things.<br />

computed hash of <strong>the</strong> received message. If <strong>the</strong> decrypted hash sent with<br />

<strong>the</strong> message and <strong>the</strong> locally computed hash agree, <strong>the</strong>n <strong>the</strong> receiver could<br />

conclude that <strong>the</strong> message is au<strong>the</strong>ntic and unaltered. This process is<br />

outlined in Figure 7-4.<br />

If this protocol sounds complex to you, it is. There are a lot of places<br />

where things can go wrong. The receiver could have a false copy of <strong>the</strong><br />

sender’s public key. The sender could have had his private key compromised.<br />

The hash could have weaknesses. Employing digital signatures in<br />

an adversarial environment requires attention to detail at all levels of <strong>the</strong><br />

system design.<br />

In <strong>the</strong> <strong>Xbox</strong>, digital signatures are used to control <strong>the</strong> distribution and sale<br />

of programs for <strong>the</strong> console. Microsoft is effectively in control of both <strong>the</strong><br />

sender and <strong>the</strong> receiver of messages. The receivers — <strong>Xbox</strong> consoles —<br />

are programmed to only run programs that are digitally signed by<br />

Microsoft. In an ideal world, this guarantees that Microsoft has <strong>the</strong> final

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!