Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #26 20130924 11:47:40
Re: Large Prime
Should we compare the secrets? 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #27 20130924 11:49:19
Re: Large PrimeHm, we could. But, I will be able to do that after I get my good night's sleep. The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #28 20130924 11:55:49
Re: Large PrimeIsn't it already 3 o clock there? Do you remain awake for so long? 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #29 20130924 13:00:28
Re: Large Primehttp://pastebin.com/MyZtxUyu Code:import base64 def rc4crypt(data, key): x = 0 box = range(256) for i in range(256): x = (x + box[i] + ord(key[i % len(key)])) % 256 box[i], box[x] = box[x], box[i] x,y = 0, 0 out = [] for char in data: x = (x + 1) % 256 y = (y + box[x]) % 256 box[x], box[y] = box[y], box[x] out.append(chr(ord(char) ^ box[(box[x] + box[y]) % 256])) return ''.join(out) def decode(message,key): return rc4crypt(base64.b64decode(message),key) def encode(message,key): return base64.b64encode(rc4crypt(message,key)) key = raw_input('Enter secret here:\n') message = raw_input('Enter message here:\n') print 'If you wanted to encrypt, here\'s the cyphertext:', encode(message,key) try: print 'If you wanted to decrypt, here\'s the plaintext:', decode(message,key) except: pass Instructions 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #30 20130924 19:44:24
Re: Large Prime
In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #31 20130924 20:37:15
Re: Large PrimenhmIfQZuJaeccvW/WqEvpFAHfI5I1yqkSXLLbZ0uhH8g The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #32 20130924 22:08:13
Re: Large Prime
jxXbHUFJOPSGePnyFptuvR8MeIhJkg== 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #33 20130924 22:19:40
Re: Large Prime
nwSIWA5lP/XUVOy5CcI8rxESf4JI0CCoSjc= The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #34 20130924 22:29:22
Re: Large Prime
khnMHBhvOfSBbv2+E4YrpR4bM5obky6pBn/AOYw0nX56Yc5bvQ== 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #36 20130925 01:41:31
Re: Large PrimeHi; 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Who are you to judge everything?' Alokananda #37 20140315 16:56:17
Re: Large PrimeI'm not sure if I should post, (1) it is somewhat necroposting, (2) there seems to be another conversation going on about DH, and (3) I type way too much. But regarding generating large primes, this is a good paper about generating nbit random primes: "Close to Uniform Prime Number Generation With Fewer Random Bits" by Fouque and Tibouchi available at eprint.iacr.org/2011/481. For crypto, you may want to also look at FIPS 1864. 