Assume out of a set of ElGamal signatures, I've discovered that two have the same y i.e. $signature_{1}$ on $m_{1}$ = $(y,s_{1})$ and $signature_{2}$ on $m_{2}$ = $(y,s_{2})$.  The public keys for $signature_{1}$ and $signature_{2}$ and messages $m_{1}$ and $m_{2}$ are available.   How can I recover the secret keys from this information?
Show how if Alice uses the same value of $k$ to sign two different messages $m_1$ and $m_2$, using the ElGamal signature scheme, Eve can recover the value of $a$ from the corresponding signatures $(m_1, r_1, s_1)$ and $(m_2, r_2, s_2)$. (Note: you are allowed to assume that if $\gcd(a, n) = d$ then there are $d$ solutions to the congruence $ax \equiv b \pmod n$.)     ElGamal Signature Scheme:      Key Gen:      Compute $y = g^x \;\bmod p$.      The public key is $(p, g, y)$. The secret key is $(p, g, x)$      Signature Gen:      Choose a random $k$ such that $0 &lt; k &lt; p − 1$ and $\gcd(k, p − 1) = 1$      Compute $r = g^k \;\bmod p$ and $s = k^{-1}(m – xr) \;\bmod{p-1}$   Thoughts: So far, I can tell that $r_1$ and $r_2$ are equal and $s_1$ and $s_2$ are closely related since the only variation is $m$.  We can relate the two equations for $s$, by solving them for $-xr$:  $$s_1k - m_1 \equiv s_2k - m_2 \pmod p$$  $$(s_1 - s_2)k \equiv m_1 - m_2 \pmod p$$  Let $a = s_1 - s_2$, then we know from the question that for $\gcd(a, n) = d$ there are $d$ solutions for $k$.  Now the forger can compute $g^k$ for each solution to k, until $r$ is found.  Then compute $xr \equiv m_1 - ks_1 \pmod{p-1}$  There are $d&#39; = \gcd(r, p-1)$ solutions for $x$.  The forger can compute $g^x$ for all the $x$s found until she finds $y$.  Once she has $y$ she knows the proper $x$ which can be used to find $m_1$ and $m_2$.  How does this look?
In "The Matrix Revolutions" How Does Neo Stop the Machine Weapons in the Real World? Cannot make a static reference to the non-static method Is there a way to resolve probability of an event, given another event that never happens? Mathematically speaking the problem is:  Given that $P(B) = 0$,  $$P(A|B)=\frac{P(A \cap B)}{P(B)} = \frac{0}{0}$$  Is this probability vacuously $0$ of $1$? Can we show that it's one or the other? I have 5 tables and a section after them. After creation of an output file I have two tables on one page, then a section and last 3 tables on next page.  What I want to achieve is to put tables and section below them.  \begin{table}[ht]\footnotesize \centering \begin{tabular}{|ll|} ...... \end{tabular} \label{tab:result} \end{table}  \section{Section below tables} Sockets: Discover port availability using Java How can one rig a Stirling engine? (Piston) I've only done a very little animation and rigging before, and I keep getting stuck trying to rig the pistons and rotor of the Stirling engine I built.     What should happen is that one piston moves in as the other moves out, and through the attached arms, the rotor should spin. Animating the rotor and the piston heads was easy enough, but getting the arms that go from the piston heads to the end of the shaft arm to move right endlessly confuses me.   Each end of each arm moves differently over the course of a cycle. With animating, I can't figure out how to interpolate so the arms stay where they should.  With armatures, I have tried for a while, but keep getting stuck when it comes to how to have one end of a bone moving in a circle while the other end is moving in a straight line.  Edit: The answer below elegantly resolved my problem, so i've updated this with the finished .blend file in case it's useful someone else.   Here is the .blend file: For-each over an array in JavaScript I shall come, not will Native speakers, how can you comment such a sentence:  I shall come, not will  Can I use it for  I will definitely come, not maybe    Adding some information other people asked me about.  How I came to such a question.  Here   I asked about "Shall I win?" pointing that it could have some variants of understanding:  1) Shall I win? = Should I win? (suggestion)  2) Shall I win? = Will I win? (archaic with 1st person)  3) Shall I win? = is it 100% that I will win? (predestination\inevitability)  The excellent guy Mixolydian said either variant was possible, that it didn't matter what person you used "shall" with, it could have this "predestination\inevitability" anyway. Out of this we're getting that nowadays we can use "will" for simple future actions and "shall" for almost predicted (almost 100% surety of happening) future actions.  If I want to say to someone:  Don't be afraid, I will come anyway.  Don't get panicked, I will definitely come  Be sure, I will come in any case  I can use "shall" for it meanining an action into which I will put 100% effort:  I shall come!  And what if my original sentence is  Don't doubt, I will definitely come, not maybe or probably  Can I use  I shall come, not will  pointing that "shall" guarantees me putting all my strengths into it while "will" doesn't give any assuarance that I will do everything to finally come.  As I understood, it wasn't very easy to ask such a question because English was different everywhere - US, UK, Australie, Ireland etc. I heard it was acceptabse to use even "thee\thou" in Ireland or somewhere like that while all other world has already forgotten such words...  P.S. What I got from the answers ias that it was better to forget about the existence of "shall" cause it created so many misunderstandings:D Silverlight - how do I get the text of the selected item in a combobox Is a business card necessary for a graduate student? I know some PhD students have their own business cards, but I don't know if it is a standard practice for PhD students to have their own business cards. I think a business card can be useful for networking in conference or collaborating with some industrial partners. So, is are business cards necessary for a PhD student or other graduate students attending conferences?   PS: in case it is field-specific, I would like to know the different practices in different fields Phrase to give a non-detailed answer/explanation What expression could I use when giving non-detailed answers/explanations about how something works? Let's say I want to explain how a printer works without getting into too much detail, Would it be OK to say:   "At a very superficial level, a printer ...." "At a very high level, a printer ..."   I feel like there are more appropriate expressions to begin such type of sentence. Any help would be greatly appreciated. Where do electrons in electricity come from? Where do the electrons come from when an electric generator is making electricity?  Is from the air?  Would a generator work in a vacuum?  Electrons have mass so where would they be pulled from if there is nothing? How do I display a decimal value to 2 decimal places? How do I change the default file manager back to Nautilus? A while back, I set my default file manager to Nemo. I like it a lot, but it constantly crashes. I remember editing a text file to set it as default, but I forgot which file it was. How do I switch back to the Nautilus file manager? How can I convince new players to read and learn the basic rules before sitting down to play? Everyone in this story works mostly together. Some work friends and my wife were talking about playing D&amp;D, and I was appointed the DM. I've played the game once 20 years ago, so I've spent the past few months buying the resources and learning as much as I can about the game so I can make it as enjoyable for then as possible, we are yet to have our first session.  But to make it easier so I don't have to teach them literally everything I asked them to read the Basic Rules so they have some idea of what they are in for and the expectations of them and me are.  But they came back with "its too hard to read it, I learn by doing, that's what we have you for".  I'm super pissed by this, I've spent so much time and effort learning this game and they can't be bothered to put any effort in.  My question is should I let them know how much it's annoyed me, and reiterate they need to know stuff, or just ignore it and carry on? I am currently studying in class 10 and I am unable to do this problem. $$\tan 70 ° -\tan 20° -2 \tan 40° =4\tan 10°$$ Can anybody please help me.  Thanks! Future Simple and Future Perfect I've read  about Future Simple and Future Perfect, but I still can't understand the exact usage of these two tenses. Is there any diffrence between the following?     I will do my homework by 6 p.m.   I will have done my homework by 6 p.m.       I will do my homework after school   I will have done my homework after school   Also, I've checked the word 'by' in  and there're some confusing examples:       By the time (that) this letter reaches you I will have left the country.   Can I use 'By the time (that) this letter reaches you I will leave the country' instead? Vote to close a deleted question - bug? I just successfully added my Close vote to a question on Stack Overflow that had already been deleted by the author.  The question can be found .        The only purpose I see for such functionality is perhaps to stop someone from escaping the initial surge of wrath from critics, then subsequently undeleting their question.  And that would be a pretty strange thing to guard against.  It seems far more likely that this is an oddity that was overlooked.  So I'm just curious - is voting to close a deleted question a bug, or is it ?  If by design, what is the rationale behind it? Is there a correct gender-neutral singular pronoun ("his" vs. "her" vs. "their")? What effect does serial downvoting have on my rep cap? So I was the victim of serial downvoting the other day, and just had it automagically reversed. Rather than simply removing the previous votes, I was given a bonus lump of rep with the reason "serial downvote reversal". The downvotes and the bonus show up on different days. Since a whole day's quota worth of downvotes equates to quite a fraction of my daily rep cap, what happens in the following circumstances?   I get 200+ rep on a particular day, but I am serial downvoted (later reversed) back to under 200. Does this day count as reaching cap? I get 200+ rep the next day, and I am also credited back the rep. Is the rep bonus immune to the rep cap in the same way bounties are? On the day I get my rep bonus, it is enough to take me to 200 rep. Does this count as capping?