Wednesday, January 7, 2015

the holidays with some surprise

travel during the Christmas overture Bach


Arizona Highways driven at the what the fluke,


to the tune of the momentum in the Knight hills of


the starry night the fade forward, couture and the volume


made for a outfit quite different.

nonsensica rhythm, with Jazz

the trombone and the pit of n= directions harmony


the crime scene updated in the detective files on


the cold case of 1932 on Blake Street-------acclimation from the


rare climate of Alaska, Juneau, the four wheel drive cabin.


Suddenly


Rock is there and the fireplace for coal and wood is


and the psychedelic of the Borealis streams a moist warm air


that streams through with stars and sun, day and night of the special


motion made for a rare climactic event, the storms clear and the


almost tropical has the next zazen, and down by the lake his friends building him a


Native American Canoe.........




Simplest explanation of the math behind Public Key Cryptography

I was trying to explain public key cryptography today and totally failed at it. Here are notes to myself based on various Wikipedia pages. There's a lot more to it than this (like padding) but this is the gist of it.

1. Pick two prime numbers:

p = 7
q = 13

2. Multiply them together:

n = p * q
n = 7 * 13
n = 91

3. Compute Euler's "totient" function of n:

φ(n) = (p - 1) * (q - 1)
φ(91) = (7 - 1) * (13 - 1)
φ(91) = 6 * 12
φ(91) = 72

4. Pick a random number e such that:

1 < e < φ(n)
1 < e < φ(91)
1 < e < 72

and e is "coprime" with φ(n), meaning it has no common factors.

e = 23  (because I said so)

5. Compute d, the modular multiplicative inverse of e (mod φ(n)):

e^-1 = d (mod φ(n))
23^-1 = d (mod φ(91))
23^-1 = d (mod 72)
23 * d = 1 (mod 72)
23 * 47 = 1 (mod 72)
d = 47

Now you have all the magic numbers you need:

public key  = (n = 91, e = 23)
private key = (n = 91, d = 47)


Secret messages to you

1. Have someone else encrypt a message m using your public key (n, e):

m = 60
c(m) = m^e mod n
c(60) = 60^23 mod 91
c(60) = 44
c = 44  (they send this to you)

2. Decrypt the message c using your private key (n, d):

c = 44
m(c) = c^d mod n
m(44) = 44^47 mod 91
m(44) = 60
m = 60  (now you have the secret)


Prove you wrote something

1. Hash the message to broadcast (this is Knuth's insecure hash function):

broadcast = 102
hash(broadcast) = broadcast * K mod 2^32
hash(102) = 102 * 2654435761 mod 2^32
hash(102) = 169507974

2. Compute the signature with your private key (n, d):

signature = hash(broadcast) ^ d mod n
signature = hash(102) ^ 47 mod 91
signature = 169507974 ^ 47 mod 91
signature = 90

3. People who receive the broadcast message (102) and the signature (90) can confirm with your public key (n, e):

broadcast = 102
hash(broadcast) = broadcast * K mod 2^32
hash(102) = 102 * 2654435761 mod 2^32
hash(102) = 169507974
confirmation = hash(broadcast)^e mod n
confirmation = 169507974^23 mod 91
confirmation = 90  (matches your signature)


Why is this safe?

In this simple example it's totally not. You can trivially take n = 91 and guess p and q with simple factorization:

>>> set((91 / i) for i in xrange(1, 91) if 91 % i == 0)
set([91, 13, 7])

Redo all the math above and you have the private key. Doh~

Now imagine if n was such a large number that it took a very long time to guess p and q:

>>> set((12031294782491844L / i) for i in xrange(1, 12031294782491844L) if 12031294782491844L % i == 0)

This takes a really long time. Even fancy solutions on the fastest computer on Earth would take until the end of the universe. That's why transmitting secrets with public key cryptography is safe. That's also why great leaps in prime number theory are frightening / exciting.

Follow-up

Rock stopped by to the going News stand in the pipe store


his buddy the owner, gave him the first Cuban cigar on the market.


He headed for the house he rented on the river front, just by the Huck Finn


fishing complex boat and diving shop.


Today schooner was visible on the horizon, the name of the boat


named for the mother of the captain, her maiden name


The Arnold;


the day he had the ship built


was on the completely restructured measurement of an antique pirate


of early 1500--------------------------------------------British.


He decided to sit on the veranda and write a letter to the


investment company which held his portfolio from


the awards he received from the Australian government--------



AFTER THE CALM!





Venus pottery Shop at the mall

intensive care unit, Baylor Hospital, Dallas----1962

While the anchor announced how the city would set priorities


during the labor strike of the, a funny sound in the studio preceded the black out that effected all but


the hospital, since emergency generators, were ah- constant so from the 5 th


floor of Lou's recovery center, the darkness and quiet were especially appealing.


The hum of activity with minimal lighting, halo of blue and yellow,


his tray was sitting bedside and the chicken fried steak with potatoes and greens


brought a memory of a day with Pre studying at Oxford together.





  

Sunday, January 4, 2015

the computer town

of Palo Alto......

Grace

Originally from the same town Lou, they were both ice-skaters,


even if Lou also played football, his actual passion was on the Ice


with Grace.