RSA gets its security from factorization problem. Read the source below for more detail.

2) How does one generate two large primes?

Large odd number are chosen at random.

Factorization algorithms can be used (attempted at least) to

factor faster than brute forcing: Trial division, Pollard’s rho,

Pollard’s p-1, Quadratic sieve, elliptic curve factorization,

Random square factoring, Number field sieve, etc. to check whether the number is prime number or not.

3) How is the arithmetic carried out?

For a example of number sieve go here to website below:

http://www.daniweb.com/code/snippet305.html

Or read here to find out more:

http://en.wikipedia.org/wiki/Primality_test

http://en.wikipedia.org/wiki/Pollard%27s_p_-_1_algorithm

4) Raising a message to a power of significant size isn’t going to work well with a 32 or even 64bit processor. I assume some type of addon library is used to accomodate the larger numbers?

To find modular of a power is easier compared to finding the power first then finding the modular.

Example are from website below:

http://www.urch.com/forums/gmat-problem-solving/34778-remainder-high-power-ps.html

Or you can read about it below:

http://www.cat4mba.com/node/6127

http://en.wikipedia.org/wiki/Modular_arithmetic

http://babbage.sissa.it/PS_cache/cs/pdf/9903/9903001v1.pdf

e coprime to m, means that the largest number that can exactly divide both e and m (their greatest common divisor, or gcd) is 1. Euclid’s algorithm is used to find the gcd of two numbers, but the details are omitted here.

for two large prime,

(p-1)(q-1) is even number x even number = even number

So it can be said that e could not be 2.

m = (p – 1)(q – 1)

d = (1 + nm) / e

where d and n must be an integer.

See the below for good example:

http://pajhome.org.uk/crypt/rsa/rsa.html