Here's my issue and someone can help me understand it so I can program it correctly.  I have a point(X,Y) on an Elliptical Curve E(a,b) where a=-3 and B is a large number that is in hexidecimal from -51BD.  To compress this point oficially in a program, we know that every X on  the curve has two Y's, one even and one odd.  Therefore, we only need to store whether the corresponding Y point we are storing is even or odd.  So to store the point (X,Y) now, we shift X ridding of it's most significant bit and add 1 if the Y point is odd.  Therefore, one can think of the compressed point  being 2*X+B(B is the bit we added if it was odd or even) since the multiplication by 2 is implied because of the shift.  I understand this completely, it's recovering the original point that has me confused.  Since a point on the curve is given by the equation y^2=x^3+ax+b, we can find square roots officially in GF(p).  The following is from my spec which confuses me  If p is prime and congruent to 3 mod 4, one of it's square roots is z^((p+1)/4) mod p and the other is p-z^((p+1)/4) mod p. How would I solve this?What is z?  For example, I know how to extract the x point so let's say I simplify the right side of the equation to be 7 and p is 11. Would I be trying to solve for the square root that's equal to 7 mod 11?  I tried to be very detailed to express my difficulty. Thanks for any help
I have a point $(X,Y)$ on an elliptical curve $E(a,b)$ where $a=-3$ and $B$ is a large number that is in hexadecimal from -51BD. To compress this point oficially in a program, we know that every $X$ on the curve has two $Y$'s, one even and one odd. Therefore, we only need to store whether the corresponding $Y$ point we are storing is even or odd. So to store the point $(X,Y)$ now, we shift $X$ ridding of its most significant bit and add $1$ if the $Y$ point is odd. Therefore, one can think of the compressed point being $2 \cdot X+B$ ($B$ is the bit we added to tell if $Y$ was odd or even) since the multiplication by $2$ is implied because of the shift. I understand this completely. It's recovering the original point that has me confused.  Since a point on the curve is given by the equation $y^2=x^3+ax+b$, we can find square roots officially in $\mathrm{GF}(p)$. The following from my spec is what confuses me.  If $p$ is prime and congruent to $3$ mod $4$, one of its square roots is $z^{(p+1)/4} \bmod p$ and the other is $p-z^{(p+1)/4} \bmod p$. How would I solve this? What is $z$?  For example, I know how to extract the $x$ point so let's say I simplify the right side of the equation to be $7$ and $p$ is $11$. Would I be trying to solve for the square root that's equal to $7$ mod $11$?
Is it better to initialize class member variables on declaration  private List&lt;Thing&gt; _things = new List&lt;Thing&gt;(); private int _arb = 99;   or in the default constructor?  private List&lt;Thing&gt; _things; private int _arb;  public TheClass() {   _things = new List&lt;Thing&gt;();   _arb = 99; }   Is it simply a matter of style or are there performance trade-offs, one way or the other? Error 1052 Field is Ambiguous using Inner Join Function 11.4 Full Jaillbreak method Yet? I've been searching around for a a while now and So far I haven't found any full jailbreaks for ios 11.4 on a 6s. To be honest, I am new to the jailbreaking scene. I've installed Velonzy, but could find no jailbreaking tools. Am I missing something, or is there truly nothing left.  PS. I would downgrade to a system-rootable version but I haven't any SHSH blobs, or found any alternative method. Is it possible? How to convert a string of bytes into an int? How can I convert a string of bytes into an int in python?   Say like this: 'y\xcc\xa6\xbb'  I came up with a clever/stupid way of doing it:  sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))   I know there has to be something builtin or in the standard library that does this more simply...  This is different from  for which you can use int(xxx, 16), but instead I want to convert a string of actual byte values.  UPDATE:  I kind of like James' answer a little better because it doesn't require importing another module, but Greg's method is faster:  &gt;&gt;&gt; from timeit import Timer &gt;&gt;&gt; Timer('struct.unpack("&lt;L", "y\xcc\xa6\xbb")[0]', 'import struct').timeit() 0.36242198944091797 &gt;&gt;&gt; Timer("int('y\xcc\xa6\xbb'.encode('hex'), 16)").timeit() 1.1432669162750244   My hacky method:  &gt;&gt;&gt; Timer("sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))").timeit() 2.8819329738616943   FURTHER UPDATE:  Someone asked in comments what's the problem with importing another module. Well, importing a module isn't necessarily cheap, take a look:  &gt;&gt;&gt; Timer("""import struct\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""").timeit() 0.98822188377380371   Including the cost of importing the module negates almost all of the advantage that this method has. I believe that this will only include the expense of importing it once for the entire benchmark run; look what happens when I force it to reload every time:  &gt;&gt;&gt; Timer("""reload(struct)\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""", 'import struct').timeit() 68.474128007888794   Needless to say, if you're doing a lot of executions of this method per one import than this becomes proportionally less of an issue. It's also probably i/o cost rather than cpu so it may depend on the capacity and load characteristics of the particular machine. The class of cardinal numbers is well ordered I'm looking for a proof that the class of cardinal numbers is well ordered under the order relation $|A|\leq |B| \Leftrightarrow$ exists an injection $f:A \to B$.  In fact, I've found a very beautiful proof in an article, but I think it's not the standard one. Why are local variables not initialized in Java? Was there any reason why the designers of Java felt that local variables should not be given a default value? Seriously, if instance variables can be given a default value, then why can't we do the same for local variables?  And it also leads to problems as explained in :     Well this rule is most frustrating when trying to close a resource in a finally block. If I instantiate the resource inside a try, but try to close it within the finally, I get this error. If I move the instantiation outside the try, I get another error stating that a it must be within a try.      Very frustrating. How to reload a gem on every request in Development mode? I have Ubuntu server 12.04 installed, so I have no GUI. When I do the command ifconfig, I cannot find my internal IP address. It says inet addr: 127.0.0.1. Here is the output of ifconfig -a: eth0   link encap:Ethernet  HWaddr 00:06:4f:4a:66:f0     BROADCAST MULTICAST  MTU:1500  Metric:1     RX packets:0 errors:0 dropped:0 overruns:0 frame:0     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:1000     RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  eth1   link encap:Ethernet  HWaddr 00:16:ec:05:c8:9c      BROADCAST MULTICAST  MTU:1500  Metric:1     RX packets:0 errors:0 dropped:0 overruns:0 frame:0     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:1000     RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  lo     Link encap:Local Loopback     inet addr 127.0.0.1  Mask:255.0.0.0     inet6 addr:  ::1/128 Scope:Host     UP LOOPBACK RUNNING MTU:65536  Metric:1     RX packets:1800 errors:0 dropped:0 overruns:0 frame:0     Tx packets:1800 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:0     RX bytes:143896 (143.b KB)  TX bytes:143896 (143.8 KB)  here are the contents of etc/network/interfaces: # The loopback network interface auto lo iface lo inet loopback  # The primary network interface auto eth0 iface eth0 inet dhcp  If someone could edit this for me, the contents of etc/network/interfaces should be on separate lines. The output of host askubuntu.com was: ;; connection timed out; no servers could be reached.  I set up owncloud and webmin a few months ago and was using them for a month with no problems. I think the power went off one day 2 months ago and I never turned the server back on until yesterday. I haven't done anything that would have affected the internet setup So i'm not sure why it doesn't work anymore. As far as my network topology goes, I have a pci-e network card for the pc. The ethernet line goes from the network card to a switch, and then to a modem/router from there. To perform a bit flipping attack, the previous block is modified by using XOR. This results in an altered plaintext. However, now the ciphertext of the previous block is altered, hence it will result in an invalid format. Am I correct or am I missing something?   For example, suppose I have the following plaintext name=jcconvenant;photo=picture.jpg;admin=false;colour=red;  and the correspoding ciphertext c26a5697689463d662f540e55e2a1ecef9c5df20133dfe49d6d3c369679a95ff4f4c5a490f530b2a2f25db40da64f1e9302724ce61b9a435e23f4d600252a143  Suppose we perform a bit flipping attack and get the following ciphertext c26a5697689463d662f540e55e2a1ecef9c5df20133dfe49d6c1d07071c495ff4f4c5a490f530b2a2f25db40da64f1e9302724ce61b9a435e23f4d600252a143  Then the resulting plaintext will still look corrupted.   ¶ä╚°  h8ì│►Nƒz│Ioé¤ßkü2KÀQiý4I@pg;admin=true;;colour=red;  Is there a way to perform bit flipping while still obtaining a valid plaintext? I have to show by induction that this function is a multiple of 8. I have tried everything but I can only show that is multiple of 4, some hints? The function is $$5^{n+1}+2\cdot 3^n+1 \hspace{1cm}\forall n\ge 0$$, because it is a multiple of 8, you can say that$$5^{n+1}+2\cdot 3^n+1=8\cdot m \hspace{1cm}\forall m\in\mathbb{N}$$. Guaranteed lifetime of temporary in C++? How do you deal with a player that's determined to play the game in a way that is detrimental to the advancement of the story? Is it possible to get the ID of a Contact which is part of a Person Account?  I have a custom object which has a custom field referencing the Person Account, though it seems to be referencing the Contact directly. I have created a button which I am using to pass the ID into a Visualforce Page.  With the Insert Field drop-down on the create/edit button page I can put in {!Account.Id} or {!Contact.Id} but neither of these work. The Account ID is placed in the URL but is not the correct ID and the Contact ID is blank, which I assume is because the button is on a Person Account page and not a Contact Page. Age from Date of Birth using JQuery I need to calculate if someone is over 18 from their date of birth using JQuery.  var curr = new Date(); curr.setFullYear(curr.getFullYear() - 18);  var dob = Date.parse($(this).text());  if((curr-dob)&lt;0) {     $(this).text("Under 18"); } else {     $(this).text(" Over 18"); }   There must be some easier functions to use to compare dates rather than using the setFullYear and getFullYear methods.  Note: My actual reason for wanting to find a new method is length of the code. I have to fit this code into a database field that is limited to 250 chars. Changing the database is not something that can happen quickly or easily. Let $P,Q$ real $n\times n$ matrices  such that $P^2=P$ , $Q^2=Q$ and $I-P-Q$ is an invertible matrix.  Prove that $P$ and $Q$ have the same rank.  Some help with this please , happy year and thanks. How can I copy the contents of a folder to another folder in a different directory using terminal? I am trying to copy the contents of a folder to another folder in a different directory using terminal.  Would somebody be able to provide me an example of the command line syntax required to achieve this? In CodeGear Delphi 2007, how can I turn specific warnings and hints off? I am attempting to turn off H2077 - Value assigned to 'varname' never used. Can Ubuntu really run all Windows programs? How to understand intuitively the Stolz-Cesaro Theorem for sequences? I have to give a presentation on the theorem in Real Analysis with a fellow student. While I've looked over the  and verified that, yes, step B does indeed follow logically from step A, etc. and have internalized the proof to the extent that I can replicate it myself on paper, I still feel that I have made little progress as to why this theorem works the way it does, i.e. what is the intuition behind the theorem, such that it should make sense that it follows the way it does. Therefore I ask: what kind of intuition is there about this theorem? It would also be helpful to understand how the theorem can be used effectively in analysis.  I have seen it referred to as a sort of L'Hopital's rule for sequences, which certainly seems to make sense, but I similarly have little intuitive understanding of how that rule works, either.  I am asking this question not only for my personal understanding, but also for the sake of being able to present it in an illuminating manner, such that the rest of the class can also come away with the same sort of intuition of how the theorem works and how it is useful. Any help would be greatly appreciated.  EDIT: I should point out that the formulation of the theorem we are being tasked to prove is the following:  Let $\lbrace a_n \rbrace$, $\lbrace b_n \rbrace$ be sequences, ${b_n}$ strictly increasing and unbounded. Then if $\lim\limits_{n \to \infty} \frac {a_{n+1} - a_n}{b_{n+1} - b_n} = l$ for some $l \in \mathbb R$, then $\lim\limits_{n \to \infty} \frac{a_n}{b_n} = l$ also. How does the User Card popup work? We are experimenting with enhanced user card mouseover popups and have enabled them network wide. You can tell which users will trigger the popup because they have a 3-D drop shadowy look to their gravatar:    Hover your mouse over the gravatar and wait. Note that the user card mouseover popup will only be displayed if the following conditions are met:   Is the profile complete, and long enough? We enforce a minimum length requirement. The user's reputation must be >= 1k  If you have more links than are able to be displayed after truncation, those extra links will be shown in the bottom of the dialog. We order links at the bottom consistently -- if you include a twitter, google plus, linked in, or facebook those links are prioritized. It will be visible on a question and answer detail page, any page with a list of questions, and the /users list. It will not be shown when a question or answer is wiki'd. It will not be shown when excerpt summary is defined as &lt;!-- summary: &amp;nbsp; --&gt; we support explicitly specifying your user card excerpt summary using the following syntax:  &lt;!-- summary: This is my profile, there are others like it but this one is mine. --&gt;   The above example will result in:    This is now mostly complete.  The goal is allow people to show  off how awesome they are inline, without having to click through to the full user profile page.