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

You are not logged in. #1 20130922 12:30:45
Large PrimeIs there a effective quick way to generate a large prime of a given length? '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 #2 20130922 18:48:32
Re: Large PrimeI know where you are going with this and it is not necessary. 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. #3 20130922 19:14:34
Re: Large PrimeWhere am I going? Code:while True: randomnumber = random.randrange(2**(length1),(2**(length))1) if primep(randomnumber): print randomnumber break Thats all I got from stackoverflow Last edited by Agnishom (20130922 19:16:47) '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 #4 20130922 19:27:06
Re: Large PrimeYou think you need a large prime to learn Diffie Hellman. I can denmonstrate the procedure using a small one.
Hohohohohohohahahaha, they are always good for a laugh. To think that such brilliant people can still have a wonderful sense of humor gives me much hope for the human race. 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. #5 20130922 22:53:29
Re: Large Prime
I can too. But that is not secure enough. '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 #6 20130923 01:49:36
Re: Large PrimeI agree. But I thought you wanted to see how it worked? 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. #7 20130923 02:04:58
Re: Large PrimeI think the only problem is  after Alice and Bob have the shared secret, how do they exchange messages using it? 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 #8 20130923 02:13:47
Re: Large PrimeI have been waiting to answer that one since yesterday. But it seems I have missed Agnishom today. 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. #9 20130923 11:43:16
Re: Large Prime
They use a symmetric cypher, like RC4 with the key. '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 #10 20130923 12:48:10
Re: Large PrimeLet us take the generally accepted p from http://tools.ietf.org/html/rfc2409#section6.2 Code:179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007 The generator g is Code:2 '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 #11 20130923 12:52:04
Re: Large PrimeHi Agnishom Code:170889576082067697731054176601909874828559452754928289693960008087616417613737398548717155229171096112124599345710842437121675819339812482513978573388985033018038377053945453188374711735023121936105534290646082341664680937820085667262891263915428892361981765346083422852575547729295502827704976423861860303103 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 #12 20130923 14:25:55
Re: Large PrimeHi anonymnesty, Code:173419298906489863864646388281941306843742681293608592957943679413527102401811311961611828206757391788738800024670641247258673805804085888390828078173388181181530749311360724611386280929348614725682444473741887149211776384725911058474047582365359321545094524307293842804350322782081718297375589621859722244791 Last edited by Agnishom (20130923 14:34:05) '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 #13 20130923 15:36:04
Re: Large PrimeHm, just call me Stefy. It's easier for everybody that way. 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 #14 20130923 22:55:52
Re: Large PrimeHi Stefy, '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 #15 20130923 23:47:39
Re: Large PrimeI have tested on my computer(Mac on Terminal).That doesn't generate any numbers! #16 20130924 00:43:32
Re: Large Prime
I am sorry, primep is defined externally. Do you want the full working code? Last edited by Agnishom (20130924 01:02:37) '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 #17 20130924 04:33:03
Re: Large Prime
It is. 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 #18 20130924 06:22:28
Re: Large PrimeI have a nice tut on this if you need to see how it is done. 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. #19 20130924 06:23:01
Re: Large PrimeHi bobbym 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 #20 20130924 06:29:01
Re: Large PrimeIt uses baby sized numbers but maybe that is best for an example. 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. #21 20130924 06:39:11
Re: Large PrimeSure. Any example would suffice, seeing how I am not sure at all how to use the shared secret. 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 #22 20130924 06:44:43
Re: Large PrimeNeither am I. How about we try to follow their example? 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. #23 20130924 07:35:07
Re: Large PrimeTheir? 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 #24 20130924 07:53:22
Re: Large PrimeThe video I have. They use an example. They go through the technique step by step. Should be easy to do with a real problem later on. 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. #25 20130924 10:38:11
Re: Large PrimeCould you post the link to the video? 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 