Importance of the order of public/private key application to a signed encrypted message Let's say two users (U1, U2) each have a private key they keep to themselves, and each broadcast a corresponding public key to the world.  Let's then say that U1 wants to send a signed encrypted message to U2. I understand the idea that U1 wants to encrypt the message using his own private key, so that U2 can have proof that the message indeed came from U1 (since if U1's public key can decrypt a msg, it must've been encrypted by U1), and also U2's public key, so that only U2 can decrypt the message using his private key.  What I'm not completely clear on are the differences between first encrypting with U1's private key and then U2's public key, or in the opposiste order.  The way I see it, in the first possible order (U1 private, then U2 public),  nothing can be gleaned from the doubly encrypted message by observers, even if they have both U1 and U2's public keys.   If U1 were to doubly encrypt the message in the opposite order (using U2's public key first and then U1's private key), the only difference would be that observers would be able to break the layer of U1's encryption (using his public key) and see that he sent a message (but not to whom, or at least not from decrypting that first layer). Nothing more could be observed because the decrypted message (using U1's public key) would just reveal another layer of encryption that only U2's private key could decrypt.  Is that correct? Does order matter other than that?
Should we sign-then-encrypt, or encrypt-then-sign? Frequently, we want to send messages that are (a) encrypted, so passive attackers can't discover the plaintext of the message, and (b) signed with a private-key digital signature, so active attackers can't make Alice think that a message came from Bob when it didn't. Is it better to (a) generate the digital signature from the (hashed) plaintext, and then encrypt a file containing both the plaintext message and the digital signature? Or is it better to (b) encrypt the message first, and then generate a digital signature from the (hashed) encrypted file? Or (c) combine encryption and public-key digital signatures in some other way? A closely related earlier question (  ) seems to focus on symmetric-key MAC authentication. As , Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt?
How to get apt-cacher-ng to download AND cache packages from Apt HTTPS repositories? make iframe height dynamic based on content inside- JQUERY/Javascript Restoring Windows XP PATH variable I installed an application that screwed my PATH variable. Now I cannot run anything from the command prompt. Is there any way I can restore PATH variable? Aliased edge around light source in cycles Often when a mesh light is visible in the camera, the edges are not anti-aliased.  No matter how many samples I do, the lamp border always looks jagged and pixelated.  Is this a rendering error? How can I get around this issue?    And zoomed in 4x: $H$ is normal subgroup of $G$ iff $gHg^{-1}=H$ for every $g$ of $G$ Given the following definition of normal subgroup     A subgroup $H$ of a group $G$ is said to be normal if, for every $g\in G$: $$gH=Hg$$   I've tried to show that $H\mathrel{\unlhd} G$ if and only if we have $gHg^{-1}=H$ for every $g\in G$:  (if) Let $H\mathrel{\unlhd} G$, $g\in G$; if $l\in gHg^{-1}$, there exists $h\in H$ such that $l=ghg^{-1}$ and since $gh$ = $h'g$ for some $h'\in H$, then $l=ghg^{-1}=h'(gg^{-1}) = h'\in H$. Let $h\in H$; we can write $h$ as $hgg^{-1}$, and since $hg = gh'$ for some $h'\in H$, we obtain $h = hgg^{-1} = gh'g^{-1}\in ghg^{-1}$. So $gHg^{-1}=H$.  (only if) Let $gHg^{-1}=H$, $g\in G$; if we take an $l\in Hg$, $l = hg$ for some $h\in H$, we note immediately that $l=hg=(gh'g^{-1})g=gh'\in gH$. What should I do to show that $gH\subset Hg$?  I'm also wondering if this mess is correct, and if it is possible a more elegant proof of this fact. If one uses Shadow Evocation on a willing ally (e.g. Telekinetic Charge) can they choose not to disbelieve? Shadow Evocation  Nondamaging effects have normal effects except against those who disbelieve them. Against disbelievers, they have no effect.  Disbelief  Creatures encountering an illusion usually do not receive saving throws to recognize it as illusory until they study it carefully or interact with it in some fashion. A successful saving throw against an illusion reveals it to be false, but a figment or phantasm remains as a translucent outline. A failed saving throw indicates that a character fails to notice something is amiss. A character faced with proof that an illusion isn't real needs no saving throw. If any viewer successfully disbelieves an illusion and communicates this fact to others, each such viewer gains a saving throw with a +4 bonus.  (my emphasis) Voluntarily Giving up a Saving Throw  A creature can voluntarily forego a saving throw and willingly accept a spell's result. Even a character with a special resistance to magic can suppress this quality.  If I understand the above correctly,  If the ally believes the caster actually cast Telekinetic Charge, it seems they get a save which they could forgoe and so be guaranteed the benefit of the spell. &gt;&gt; We're good here. If the ally knows the caster didn't cast Telekinetic Charge, (say because of a high Spellcraft check or because she knows the caster's spell list) they have proof that the illusion isn't real and so need no saving throw. &gt;&gt; Even though she &quot;needs no saving throw&quot;, can she still choose to forego the save and be effected by the spell?  In other words, I think the question boils down to: Does one always have a choice not disbelieve an illusion, even when one has proof that it's not real? Prove the inequality $|xy|\leq\frac{1}{2}(x^2+y^2)$ How to get sudo to prompt you for a password each time A curious integral The following integral has been on my mind for a while $$\int_0^\infty \frac{\sin(x)}{e^x-1}\,\mathrm d x \tag{$\dagger$}$$    Let us indicate the integrand as $f(x)=\frac{\sin(x)}{e^x-1}$. The following are a couple of observations.   The integrand can be extended by continuity in $0$ since $$\lim_{x\to 0}f(x)=\lim_{x\to 0}\frac{\frac{\sin(x)}{x}}{\frac{e^x-1}{x}}=1$$ This is the original reason I started playing around with this integral. Mathematica yields the result $$\int_0^\infty \frac{\sin(x)}{e^x-1}\,\mathrm d x=\frac{\pi}{2}\textrm{Coth}(\pi)-\frac 12 \approx 1.076674047$$ which, following numerical evidence, seems correct. Complex analysis may be useful here, since the integrand is a holomorphic function on $\mathbb C$. I tried writing $\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$, but I was not able to find an appropriate integration contour to solve the problem. The $-1$ in the denominator breaks the simmetry of the expression. This made most of my substitutions useless.   Can this integral be evaluated correctly, preferrably through complex analytic methods? How can I explain to a non-native why the plural of a noun isn't used adjectivally? How can I explain to a non-native speaker that while this is correct:     The felling of trees.    And this is also correct:     tree felling   This is not:     *trees felling   To a non-native it seems very reasonable that since many trees are being felled and given that the felling of trees uses the plural, the inverse form would also use the plural and become trees felling.  To a native speaker such as myself, the latter is very obviously wrong, but I couldn't figure out how to formalize this into a rule that a non-native can understand. Jump/Scroll to selected object in the outliner? How can I take pictures through a skyscraper, airplane, or train window? I am new to pythontex. I could run simple python code. However, I get error with slightly complex things.  The error I get is following:  This is PythonTeX 0.16  ----  Messages for py:default:default  ---- * PythonTeX stderr - error on line 211:     File "&lt;outputdir&gt;\py_default_default.py", line 62       MW= 18e-3 u.kilogram/ u.mole                 ^   SyntaxError: invalid syntax  -------------------------------------------------- PythonTeX:  notes - 1 error(s), 0 warning(s)  C:\texlive\2018\bin\win32\runscript.tlu:803: command failed with exit code 1: python.exe c:\texlive\2018\texmf-dist\scripts\pythontex\pythontex.py notes.tex   Part of the code that has error is :  \begin{pycode} import math from pint import UnitRegistry u = UnitRegistry() alpha = 0.04 sigmaW = 72.86e-3 * u.newton / u.meter mu    = 8.9e-4 * u.pascal * u.second densityW = 1000 * u.kilogram / (u.meter ** 3) densityIPA = 1000 * u.kilogram / (u.meter ** 3) densityEtoh = 1000 * u.kilogram / (u.meter ** 3) H = 1e-6 * u.meter W = 28e-6 * u.meter L= 32e-6 * u.meter MW= 18e-3 u.kilogram/ u.mole MIPA= 60.1e-3 u.kilogram/ u.mole MEtoh= 46.07e-3 u.kilogram/ u.mole R0=8.31446 u.joule / (u.mole * u.kelvin) T0= 298 u.kelvin N= 10 D0=2.4e-5 (u.meter ** 2)/(u.second) C0=17.08e-3 u.kilogram/(u.meter ** 3) tauevW=(densityW * N * R0 * T0 * (W **3))/(6* math.pi * D0 * C0 * sigmaW * MW) \end{pycode}   Does anyone know how to solve this issue? How to tell Max CP? I'm comparing different pokemon of the same type (e.g. comparing pidgeys with each other), to see which ones I want to keep and which to transfer. I want to select based on Max CP -which differs per each pokemon-, but it's a bitch to find what a pokémon's max CP would be.  Even though the bar fill isn't very accurate (not determined per every 1%), if a CP bar is filled to 50%, it's not hard to find out what the max CP of that pokemon is. But otherwise, since there are no round measurement tools in any software I know of, it stays at mere guessing.  Does anyone know of a way to do this effectively? Shorter proof for some equvalences Let $(G,\cdot)$ be a group show that  A) $G$ is abelian  B) For all $x,y\in G: (xy)^{-1}=x^{-1}y^{-1}$  C) For all $x,y\in G: (xy)^{2}=x^{2}y^{2}$  D) There existst an $n\in \mathbb{Z}$ such that for all $x,y\in G$  $\displaystyle (xy)^{n-1}=x^{n-1}y^{n-1}$ and $\displaystyle (xy)^{n}=x^{n}y^{n}$ and $\displaystyle (xy)^{n+1}=x^{n+1}y^{n+1}$  are equivalent.    I showed $A\iff B,A\iff C$ and $A\iff D$. That was not really hard, except maybe $D\Rightarrow A$. I would like to do a circular argument, but i have no idea how.  Any hints?  Thanks in advance! $A_n:Y\rightarrow Z$ are operators that strongly converge to $A$. Also, $\|A_n\|_\text {op}\le c$ for $c&gt;0$. Given a compact operator $T:X\rightarrow Y$, I need to show that $A_nT$ converges to $AT$ in operator norm (all spaces in this question are Banach spaces).     I was unable to prove this and I also do not understand why we need to assume that $T$ is compact. Any ideas? How do I use the conditional (ternary) operator? I've always wondered how to write the "A ? B : C" syntax in a C++ compatible language.  I think it works something like: (Pseudo code)  If A &gt; B    C = A Else    C = B   Will any veteran C++ programmer please help me out? How do I find out which program and process ID accesses a given IP address in Windows? Is it possible to catch, which program is accessing a specific IP address?   I found my computer is flooding and wish to check addresses one by one.  May be it is possible to set up some audit for this? How do I change permissions on a FAT32 formatted drive? I am using Microsoft Visual C++ on Windows and Qt Creator on Ubuntu. I can't change permissions on my flash drive (FAT32), even as root.  How can I change permissions on a FAT32 flash-drive? The replier's From email address is modified when Marketing Cloud RMM forwards an email to the routing address We've set up RMM to forward replies to routing address and SFMC adds our subdomain to the replier's From email address (i.e. replier@gmail.com becomes replier.gmail.com@oursubdomain.com). However, their reply-to address remains the same.  It seems like DMARC Forward Reply Rewrite is enabled, but we were advised not to touch it as that may affect email deliverability.  Is there any workaround to this? And what will happen if we disable this feature?