I am implementing a bit of security in a system that was originally built without encryption on a specific piece of data. The plan was to encrypt this piece of data and include it as part of the response in a web service. But this data is plainly available in the front end so the user could easily see the plain value and its encrypted value. How hard is it to derive the key and iv? I think it would be too easy to be comfortable with. Am I right? Is there any security worth doing if they can always see the plain value?
I have a file, which was encrypted with AES-128 in ECB mode. I know the format of the original file and know that all files in this format have the same headers. So, I have an encrypted block and the original block.  Can I get the encryption key, using this information?
Badge request: "Practically Perfect in Every Way" PlotLegends won't generate automatically more than 15 labels in v10 How to prove: if $a,b \in \mathbb N$, then $a^{1/b}$ is an integer or an irrational number? I'm trying to insert a figure into my LaTeX file using the following syntax:  \begin{figure}   \centering   \includegraphics [width=3in]{fig1.png}   \caption{Calculation of shortest path betweenness}   \label{Fig.3:Shortest path betweenness} \end{figure}   It worked for me before but this time I'm getting the following error:   LaTeX Error: \begin{figure} on input line xxx ended by \end{document}   Also, hovering over the red cross symbol indicating error in Eclipse, I see this message    paragraph ended before Gin@iii was completed.   It's obvious that I have the \end{figure} to end my \begin{figure} so I don't understand how I still get that error.  Can someone please tell me what the problem is?  Edit: Add more details for debugging. The problem went away if I remove '[width=3in]'. Here is the detail error:  pdflatex&gt; Runaway argument? pdflatex&gt; width=3in]{fig1.png} \caption {Caption} \label {Fig.1}  pdflatex&gt; ! Paragraph ended before \Gin@iii was complete. pdflatex&gt; &lt;to be read again&gt;  pdflatex&gt;                    \par  pdflatex&gt; l.40  pdflatex&gt;        pdflatex&gt;  pdflatex&gt; Underfull \vbox (badness 10000) has occurred while \output is active pdflatex&gt; (./document.bbl pdflatex&gt;  pdflatex&gt; Package natbib Warning: Empty `thebibliography' environment on input line 3.   Added sample code:  \documentclass[10pt,psfig,letterpaper,twocolumn]{article} \usepackage{geometry} \usepackage{graphics} \usepackage{setspace} \usepackage{natbib} \usepackage{verbatim} \usepackage[scaled=0.9]{helvet} \singlespacing \paperwidth 8.5in \paperheight 11in \oddsidemargin 0in \headsep 1.3cm  \geometry{left=0.75in,top=0.75in,right=0.75in,bottom=1in} \textwidth 7in  \textheight 9.25in \columnsep 0.4in \footskip 0in  \renewcommand{\bibname}{REFERENCE} \pagestyle{empty}  \begin{document} \bibliographystyle{acm}   \title{\fontfamily{phv}\selectfont{\huge{\bfseries{Title here}}}} \author{ {\fontfamily{ptm}\selectfont{\large{\bfseries{author name}}}}\thanks{contact info }}  \maketitle \thispagestyle{empty}  \section*{\fontfamily{phv}\selectfont{\normalsize{\bfseries{Section name}}}}  \begin{figure} \centering \includegraphics[width=3in]{fig1.png} \caption{Caption} \label{Fig.1} \end{figure}  \pagebreak[4] \vspace*{5.52in} \bibliography{ref} \end{document} Roll a 6-sided die until the total $\geq M$. Mean amount by which $M$ is exceeded? Here is the question:  You roll a fair 6-sided dice iteratively until the sum of the dice rolls is greater than or equal to M. What is the mean and standard deviation of the sum minus M when M=300?  Should I write a code to answer these kind of questions?  Please give me some hints on that. thanks! Why are C character literals ints instead of chars? In C++, sizeof('a') == sizeof(char) == 1. This makes intuitive sense, since 'a' is a character literal, and sizeof(char) == 1 as defined by the standard.  In C however, sizeof('a') == sizeof(int). That is, it appears that C character literals are actually integers. Does anyone know why? I can find plenty of mentions of this C quirk but no explanation for why it exists. Floating point calculations in LaTeX? To whom was Yoda referring when he said, "There is another?" In the original trilogy Yoda refers to another hope:     Obi-Wan: "That boy is our last hope."   Yoda: "No...there is another..."   The assumption being after seeing Return of the Jedi (Episode VI) that the other was Leia.  If, however, you consider the prequel trilogy canon, then this assumption depends greatly on your point of view*. Obi Wan knows about Leia (and for unknown reasons has discounted her as a hope), so Yoda must be referring to someone or something else.  Is there any canonical source as to what Yoda meant, or was uncle George setting us up for Episode VII?  *as a wise man once said      you will find that many of the truths we cling to depend greatly on   our own point of view.   Just to add a bit of clarity: I was thinking about who Yoda was referring to when he was talking to Obi-Wan. When talking to Luke, it is obvious that Leia is the other (as he talks about a 'Skywalker'). It is not so obvious (after watching the prequel trilogy) that he means it when talking to Obi-Wan. As opposed to the generic polynomial form for utilizing the Eisenstein Criterion ($a_nx^n+a_{n-1}x^{n-1}+\dots+a_0\in\mathbb{Z}[x]$ is irreducible in $\mathbb{Q}$) how do we prove that if $p$ is a prime, $x^{p-1}+x^{p-2}+\dots+x+1$ is irreducible over $\mathbb{Q}$? I'm currently using the below script to timestamp when an edit is made to column 7 on a sheet named "Sheet 1".  function onEdit(e) {    if ([7].indexOf(e.range.columnStart) != -1) {    e.range.offset(0, 7).setValue(new Date()).setNumberFormat("dd.MM.yyyy at HH:mm");    }   }     I have a second sheet "Sheet 2" which I need to run the same script on but against column 5.  function onEdit(e) {    if ([5].indexOf(e.range.columnStart) != -1) {    e.range.offset(0, 7).setValue(new Date()).setNumberFormat("dd.MM.yyyy at HH:mm");    }   }     I've tried .getSheetByName("Sheet1") but just cant seem to get it working correctly. How to create a graph with two Y axis with different values in Excel How do you make a scatter graph with 2 Y axis (one on the left and one on the right)? I have 2 scatter graphs that I want to combine. I need to have 2 lines, both lines have the same dependent variable but have their own independent variable. Click the link "graph" below to get an idea of what I'm looking for.  (I'm using google sheets but I can also find a computer with Excel if needed) Essentially as the title suggests - in some commutative ring $K$ (with 0,1), if we have 2 distinct proper prime ideals $\mathfrak{p}_1 \neq \mathfrak{p}_2$, is it necessarily the case (or if not, when is it the case?) that $\mathfrak{p}_1 + \mathfrak{p}_2 = K$ ?  I ask because I'm working through some lecture notes which frequently take some $K$ complete with respect to a discrete valuation, a prime ideal in a valuation ring  $\mathfrak{p} \subset \mathcal{O}_K$, a finite extension $L/K$, and then use the fact $\mathfrak{p}\mathcal{O}_L$ factors uniquely as some $\mathcal{P}_1^{a_1} \ldots \mathcal{P}_r^{a_r}$ (where $\mathcal{O}_L$ is the integral closure of $\mathcal{O}_K$ in $L$). Then we say $\mathcal{P}_i + \mathcal{P}_j = \mathcal{O}_L$ $(\forall$ $ i \neq j)$.   However it isn't clear to me, because we've made so many different assumptions along the way, what the reason is that $\mathcal{P}_i + \mathcal{P}_j = \mathcal{O}_L$. Is it because these primes occur in the factorisation of $\mathfrak{p}$, is it because of some property of Dedekind domains or fields, or is it not really possible to say out of context? Many thanks, and if anything needs clarification please ask. Where to set proxy ignore list? I upgraded to ubuntu 11.10 from 11.04, shocked to see few things...    My system is behind a proxy, so I did set a proxy setting. Being a web developer, I want to remove a lot of addresses that I type in browser address bar to not hit proxy. There's no such ignore list in ubuntu 11.10, what/where do I do it? What was the requirement to change the way network gui worked? How can I recover from a "AMD-Action:downloadProduct:SP" during installation of macOS? Just wiped my hard drive on my MacBook Pro from 2013. Went to install a new copy of MacOS Sierra. I get the following error:  AMD-Action:downloadProduct:SP   I looked online and tried change the date using the Utility Terminal and the following command:  date mmddHHMMyy   Then did   csrutil enable csrutil clear   Then I tried clearing the NVRAM using command + option + P + R on startup.  Still no luck. Still getting the same error message. Apple support told me to go to a "computer repair store".  Any advice? I'm new to regular expressions and would appreciate your help.  I'm trying to put together an expression that will split the example string using all spaces that are not surrounded by single or double quotes. My last attempt looks like this: (?!") and isn't quite working. It's splitting on the space before the quote.  Example input:   This is a string that "will be" highlighted when your 'regular expression' matches something.   Desired output:  This is a string that will be highlighted when your regular expression matches something.   Note that "will be" and 'regular expression' retain the space between the words. Best way to clone an installation (copying to identical hardware) Kind-of like  but slightly different (I think), in that I have 6 identical Acer Aspire Revo R3610 machines. One is (almost) configured to my requirements - when I'm done preparing it I'd like to make the other 5 machines absolutely the same. I'm very new to Ubuntu, what's the most straightforward (easiest) way of doing this?  The machines are going to live on different networks if that might otherwise be a problem (eg with Windows you can clone disks but you then have to make registry changes afterwards if they're going to run on the same network etc). The hardware in all 6 machines is, I stress, the same!  How can I efficiently clone one source image on to these identical machines?  Please restrict one software/solution per answer If $g \circ f$ is surjective, show that $f$ does not have to be surjective? Suppose $f: A \to B$ and $g: C \to D$ are functions, and that $B ⊆ C$.  I need to come up with an example where $g \circ f$ is surjective but $f$ is not. I'm confused on how exactly to do that, but I understand that to show something is surjective you have to have the range of the function equal to the codomain of the function. Here's my attempt:  So if $g(x) = x^2$ with a codomain of $ℝ$, and $f(x) = \sqrt{x}$ with a codomain of $ℝ$, then $g(f(x)) = (\sqrt{x})^2 = x$. Since the range of this function and codomain are the same, this is surjective.  But, since $f(x) = \sqrt{x}$, its range is only $[0, ∞)$, which is smaller than its codomain of $ℝ$, meaning $f$ is not surjective. Proof by induction that if $n \in \mathbb N$ then it can be written as sum of different Fibonacci numbers Proof that every natural number $n\in \mathbb N$, can be written as the sum of different Fibonacci numbers between $F_2,F_3,\ldots,F_k,\ldots$.  For example: $32 = 21 + 8+3 = F_8+F_6+F_4$  Research effort:  The base step it's simple:  Let $k=1$ it can be britten as $k=1=F_2$  For the inductive step I considered:  Let $k = k  F_2 =F_2+F_2+\cdots+F_2 = \sum_{i=2}^w a_iF_i, a_i =\{0,1\} $  Then if $k$ suffice I want to see if $k+1$ suffices too... But I'm not realy seeing how to use the inductive hypothesis, so I assume It's wrong.  Any thoughts on which can the inductive step be? There should be a notification when a moderator reviews or looks at a post which you've flagged.  The notification could show the status (helpful, declined, disputed, or something else) of your flag.  Edit  The reason for doing this is so that you would be able to see when a post which you have flagged has received moderator attention, at which point you could go back to the post. This would be good, for instance, if:   you flagged a post for migration to another site; after migration occurs, you could answer the question, since  that only unanswered questions should get migrated you flagged a post for removal of spam or otherwise nonconstructive content, and the content removal has to be carried out in batches I understand that when I press and release the power button on the top of my iPhone or iPad, it stays on but turns off the screen.  Whereas if I press and hold the power button, a "slide to turn off" control appears on the screen.  Sliding this, as I was told, does turn the unit off, but it does so by suspending the RAM to disk (flash memory, actually.) So, when turning on the iPhone or iPad, it isn't so much rebooting the OS as it is resuming it from flash storage.  How to force the OS to completely reboot on these devices?