In RSA, what happens if the plaintext $m$ is not coprime to $n$? Coming from the  on RSA, I think I understand the following: RSA is based on generating an integer $n$ as the product of two large primes, $p$ and $q$, and encryption/decryption exponents $e$ and $d$ such that for any given plaintext $m$, $$(m^e)^d \equiv (m^d)^e \equiv m^{ed} \equiv m \mod n\,,$$ i.e. such that modular exponentiation with $e$ (encryption) composed in any order with exponentiation with $d$ (decryption) is the identity mapping on the plaintext. This works because $e$ and $d$ are chosen such that $$ed \equiv 1 \mod{|m|}$$ for any plaintext $m$, where $|m|$ denotes the order of $m$ in $\mathbb{Z}/n\mathbb{Z}$. This is done by selecting a multiplicative inverse pair $e$, $d$ in the ring of integers mod $\lambda(n)$, where $\lambda$ is ; and if I understand correctly the latter is essentially the least common multiple of the orders of all positive integers less than $n$ that are coprime to $n$, so that if $ed \equiv 1 \mod \lambda(n)$ is true then $ed \equiv 1 \mod |m|$ is too for all $m$ coprime to $n$, since $|m| \mid \lambda(n)$. But what happens if $m$ happens not to be coprime to $n$, i.e. if $m$ is either a multiple of $p$ or of $q$? What guarantees that in this case too the first identity shown above (the encryption-decryption identity) still holds? I thought along the lines of using , i.e. if I could prove that $ed$ was congruent to $p$ mod $\lambda(n)$, then $m^{ed} \equiv m \mod p$. But after some thought, this doesn't seem to lead anywhere.
Does RSA work for any message M? I decided to read the original RSA paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystem because of a question I had about RSA (which is not the question I'm about to ask, but may be a question on here at some time) and came across something I had never seen before in any textbook description of RSA (Note: this comes from the beginning of ).  for any integer (message) $M$ which is relatively prime to $n$, $M^{\phi(n)} \equiv 1\pmod{n}$  The part I don't recall ever hearing in class, or coming across in a text book, or seeing in any description of RSA I've ever read is that $M$ and $n$ must be relatively prime. So, I decided to play around with a toy example of RSA to see what would happen. I use $p=13$, $q=31$, $e=7$ and $M=2p=26$ (for completeness: $d=103$, $\phi(n)=360$, $n=403$). I observed the following using my toy instance of RSA: $M^e\equiv M\pmod{n}$, $M^e\equiv 0\pmod{p}$ and $M^e\equiv M\pmod{q}$. Do these equivalences hold for all $M,p,q$ when $M$ and $n$ are not relatively prime? How would I prove this? What is the real-world effect of this?
How come Dropbox gets an icon in Finder sidebar? How come Dropbox gets a non-generic icon in Finder's sidebar, when other directories like Google Drive and Sites (native in OS X before Lion) all have the same generic one?    How can I customise the icons used by the folders in the sidebar? OS X used to show individual icons of all folders there — not any longer. I bought an Acer laptop and installed Ubuntu 14.04LTS but WiFi drivers are not available for it. So I am trying to install a windows driver using wifidocs/driver/ndiswrapper.  On doing lspci -vvnn, it gives:  Network controller ［0280: Qualcomm Atheros Device ［168c:0042］ (rev 30)   Then I also disabled the atheros drivers. Using lspci and lspci -n, I can say PCI id is 168c:0042. But Acer website has three atheros drivers. I could not figure out which one to download but downloaded one on a windows PC and pasted the zip file on my desktop then unzipped it from the terminal using unzip &lt;filename&gt;.zip. The page says you have to go to control panel system hardware and all that on the windows system. I did not do it. Windows computer not being mine, I am afraid I should not install any additional driver on it. After unzipping it has one .inx file and one .bin file but no .sys file. I don't know whether I am completely right till here or have I missed something? And if I am right then how to proceed from here? I also made a new directory and copied the unzipped .inx and .bin files in it. Then in that directory I ran the ndiswrapper -i &lt;filename&gt;.inf but it says ndiswrapper not installed and when I do sudo apt-get install ndiswrapper-common, I get the reply that ndiswrapper-common is already the latest version. What to do? here is my dmesg | grep ath10k result  [   7.882758] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [    8.190016] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [    8.334587] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2 [   10.140677] ath10k_pci 0000:03:00.0: qca9377 hw1.0 (0x05020000, 0x003820ff sub 105b:e09a) fw WLAN.TF.1.0-00267-1 fwapi 5 bdapi 1 htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features ignore-otp [   10.140682] ath10k_pci 0000:03:00.0: debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 Here is the output of lspci -nnk | grep -iA2 net  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Acer Incorporated [ALI] Device [1025:098a]     Kernel driver in use: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]     Kernel driver in use: ath10k_pci I have seen in American Sniper, Dead-7 and Carrie that when someone is killed, they are laying on the ground with blood leaking out of their back or somewhere else on the body.  The puddle continuously grows with few signs of slowing down. This is obviously not CGI because it is a real liquid (may not be real blood as that would spark an emergency in real life).   I have seen in American Sniper that when the protagonist kills yet another enemy, they are filmed hitting the ground and blood starts pooling around their body.  In Carrie: In the dance room where Carrie sets her powers loose and kills a lot of teenagers in the process, there are a few that hit the ground with blood pooling under their bodies. Sometimes they would be on their side with blood coming out.  In Dead 7: Kimono and the other six killed lots of zombies. Some of the six were killed in the process as well before they came to Apocalypta to kill her. They were filmed hitting the ground dead with blood pooling around them.  I am not sure how they film this as they are wearing thin shirts for these scenes, and not only that, but the characters also have blood (obviously fake) only just dripping out of the side of their mouths (an indicator they have a ruptured and wounded stomach or lung (in this case the blood would be pink and frothy).  What is the film technique that allows this to happen? Energy-momentum tensor transformation I've been trying to find how the energy-momentum tensor changes if we add a total derivative to the lagrangian: $$L\to L+\mathrm d_\mu X^\mu.\tag{1}$$   From the answer key:  $$T^{\mu\nu}\to T^{\mu\nu}+\partial_\lambda F^{\lambda\mu\nu}\tag{2}$$ Where $$F^{\lambda\mu\nu}=\frac{\partial X^\lambda}{\partial(\partial_\mu\phi)}\partial^\nu\phi -\frac{\partial X^\mu}{\partial(\partial_\lambda\phi)}\partial^\nu\phi.\tag{3}$$ Is the above answer right? I'm not able to get this result! any help? $(document) vs. $("document") Why should I use the keyword "final" on a method parameter in Java? I can't understand where the final keyword is really handy when it is used on method parameters.    If we exclude the usage of anonymous classes, readability and intent declaration then it seems almost worthless to me.   Enforcing that some data remains constant is not as strong as it seems.    If the parameter is a primitive then it will have no effect since the parameter is passed to the method as a value and changing it will have no effect outside the scope.  If we are passing a parameter by reference, then the reference itself is a local variable and if the reference is changed from within the method, that would not have any effect from outside of the method scope.    Consider the simple test example below. This test passes although the method changed the value of the reference given to it, it has no effect.  public void testNullify() {     Collection&lt;Integer&gt; c  = new ArrayList&lt;Integer&gt;();           nullify(c);     assertNotNull(c);            final Collection&lt;Integer&gt; c1 = c;     assertTrue(c1.equals(c));     change(c);     assertTrue(c1.equals(c)); }  private void change(Collection&lt;Integer&gt; c) {     c = new ArrayList&lt;Integer&gt;(); }  public void nullify(Collection&lt;?&gt; t) {     t = null; } I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases.  My setup is the following:   Development environment: Windows XP Production environment: Debian   Database used: MySQL 5.x  Users mainly use Firefox2 but also Opera 9.x, FF3, IE7 and Google Chrome are used to access the site.  How to achieve this? If I run a randomForest model, I can then make predictions based on the model.  Is there a way to get a prediction interval of each of the predictions such that I know how "sure" the model is of its answer.  If this is possible is it simply based on the variability of the dependent variable for the whole model or will it have wider and narrower intervals depending on the particular decision tree that was followed for a particular prediction? Do the parent directory's permissions matter when accessing a subdirectory? Debugging errors of SAGA interpolation algorithms in QGIS Processing? I encounter recurrent problems with the geoalgorithms that perform interpolations. No matter what technique I use I end with the following errors. As stated in the OGR tab QGIS 2.0 is unable to open a file in C drive. I have very little IT background so the message error is meaningless.   Is there anybody able to decrypt the message and solve the problem?      here this is the algorithm i used What are valid values for the id attribute in HTML? How do I get my device detected by ADB on Linux? I just got my shiny new Wileyfox Swift – and before putting it to use I want to oem unlock and root it (as I usually do with new devices ;) Trouble is, though  is enabled on the device, and a corresponding line in /etc/udev/rules.d/51-android.rules exists, the device is not seen by adb devices.  I know there are several answers scattered around this site, but they are either hard to find, just cover a specific device, or don't cover all steps I finally needed. So I take this as a chance for a canonical, device-independent question and give it a detailed answer below:  How can I get my Android device seen and used by adb on Linux? I'm trying to create globally-unique identifiers in JavaScript.  I'm not sure what routines are available on all browsers, how &quot;random&quot; and seeded the built-in random number generator is, etc. The GUID / UUID should be at least 32 characters and should stay in the ASCII range to avoid trouble when passing them around. How many combinations of groups are there where no member of a group has been with another member before? I found this hard to word in the title, so let me give an example. I have 16 students, and I want to split them up into 4 groups of 4. However, I want to make sure that every time I have a new combination of groups, that a student has never been with any of their new groupmates before. I found info on how to separate objects into groups, but not in only unique ways as I've described above. I think I figured this out the rote way, by assigning each student a number and then finding the unique combinations, and got 3. But I'd like to know the math behind it, and how it could be applied to other configurations (20 students w/ 4 groups of 5?). Thanks for any help you can give! No SA password. No SQL Server Management Studio. No OS authentication I have this problem.  I need to do some administrative tasks on a MS SQL Database using SA account.   OS authentication is not set. SQL Server Manager Manager Studio is not installed. I have no other admin database account. I do have access to a Windows admin account The only tools installed on the database server are as shown:     How can I activate OS authentication so I can log into the database an reset the SA password ? VPN server on Google Compute Engine with OpenVPN Show $f$ can't be irreducible over a finite field if $f^\prime$ is the zero polynomial. On which Stack Exchange site can I ask customer service questions about product X or company Y? On which Stack Exchange site can I ask questions like        When will [some new feature] for [some product] be released?   Where can I download an update for [some product]?   I'm getting errors when accessing the customer portal for [some company] – how can I fix this?   Why was I banned for doing [some action] on [some platform]?   Why is [some company] discontinuing [some product]?   Why is [some company] giving away [some product] for free?   What's the price for [some product]?      or any other product support/customer service questions?  It's not a product related to programming (or I've read  on Meta Stack Overflow) so I know Stack Overflow isn't the right place. Which other site in the network will take these kind of questions? Product of elements of a finite abelian group Suppose $G=\{a_1,...,a_n\}$ is a finite abelian group, and let $x=a_1a_2\dotsm a_n$.   Prove that if there is more than one element of order $2$ then $x=e$.   What I've done so far: (#1 is just for illustration, There should be at least $3$ such elements)   $G$ has an even number of elements with order $&gt;2$ (They are paired so: $(a,a^{-1})$ ). And then there are $e$ and $\{b|o(b)=2\}$. Also, if $G$ has at least one element of order 2 then $|G|$ is even (Lagrange). Thus $|\{b|o(b)=2\}|$ must be odd. If there is exactly one element $b$ of order $2$ then $x=b$. That's because $G$ is abelian, and we can write: $x=e\cdot b\cdot(a_1 a_{1}^{-1}\dotsm a_n a_{n}^{-1})=b\cdot(e\dotsm e)=b$. If there are exactly $3$ such elements $a,b,c\in G$, then, as shown above, $x=abc$ and thus $x=e$ (That's because $(abc)^2=a^2b^2c^2=e$ which means $abc\in \{a,b,c,e\}$. If $abc=a$ then $b=c^{-1}=c$ which is false, same goes for $abc=b,abc=c$.)   I haven't managed to find a reason why the claim must hold for $5, 7, ...$ (i.e. All other odd integers). Does anyone have an idea?  Thanks in advance. Please excuse my English.  edit: Not a canonical answer but a simple one (if such even exists). I am trying to understand the Georgi chapter of tensor methods in $SU(3)$ representations, and I don't know how to resolve the tensor product of 2 matrices in a 2 heavy quark + 2 light antiquark system. Namely:  Let the tetraquark system be:           $QQ\bar q\bar{q}$  So, those $Q$ heavy quarks interact and can be understood in the $3\bigotimes 3$ representations for $SU(3)$, and $\bar q\bar q$ can be understood as the $\bar 3\bigotimes\bar 3=3\bigoplus\bar 6$ representations for $SU(3)$.  The interaction diagram for the $Q$ heavy quarks is shown in the following scheme, which is an analogy to the Feynman Diagram where a gluon is understood to be exchanged between upper and lower arrows:  $i'\xrightarrow{(T_{a})^{i'}_{i}}i ,  {}^iQ$  $j'\xrightarrow{(T_{a})^{j'}_{j}}j ,  {}^jQ$  So, as usuall we consider the elements of $3$ representation as $u^i$, and therefore the elements of $\bar 3$ representation as $v_{j}$.  I must understand how does the following expression transform:  $(T_{a})^{i'}_{i}(T_{a})^{j'}_{j}\cdot(1/2)\cdot (w^iv^j+w^jv^i)=\Xi\cdot(1/2)\cdot(w^{i'}v^{j'}+w^{j'}v^{i'})$  In other words, how can one give the correct value of $\Xi$?  Note1: $T_a$ is understood to be the $a-ith$ generator of the associated Lie Algebra, which come from the definition of the Gell-Mann Matrices.  $(T_{a})^{i}_{j}\propto(\lambda)_{ij}$, in matrix notation.  Note2: I understand the Young Tableaux and they are not intended to be used here, so please don't try to explain this situation through the tables.   Note3: I assume this is a purely solvable mathematical problem and doesn't need a deep insight into the physical concepts...  Also requesting information about how to understand the tensor products in these cases, since I have been checking many sources but the definitions seem not clear enough.