I use HMAC(ciphertext)+ciphertext for authenticated encryption.  The same key is used for both MAC and encryption.  Is that right? Is using separate keys for MAC and encryption necessary or any good?  I ask this beacause I have read somewhere that keys used for one role shouldn't be used for the other role.
Is it a weakness to use a single shared secret for protecting messages using a Encrypt-then-MAC scheme?    Assuming a system is using AES-256-CBC and a SHA1-HMAC and the same secret key for both operations.  Upon intercepting one of these messages and attacker could brute force this secret key by trying to solve the HMAC or by successfully decrypting the first block of the ciphertext.  Performing  a decryption on a single block of AES-256 should be a lighter operation than performing a SHA1-HMAC on a potentially large message.  Therefore AES-256 is ideal for a massively parallel brute-force attack and the use of the SHA1-HMAC doesn't hurt the system.  Is this approach sound, or is there an attack that has not been taken into consideration?
Can you please clarify if it's acceptable to use these terms interchangebly and if not point out to significant differences between these titles. It seems to me that it may be something with scale of an organization (perhaps, small/medium businesses have managing directors, and large corporations have chief executive officers) but I'm not sure. I do understand that a person may bear one or another of these titles formally, but what about real differences? How can a "proper" function have a vertical slope? Plotting the function $f(x)=x^{1/3}$ defined for any real number $x$ gives us:   Since $f$ is a function, for any given $x$ value it maps to a single y value (and not more than one $y$ value, because that would mean it's not a function as it fails the vertical line test). This function also has a vertical tangent at $x=0$.   My question is: how can we have a function that also has a vertical tangent? To get a vertical tangent we need 2 vertical points, which means that we are not working with a "proper" function as it has multiple y values mapping to a single $x$. How is it possible for a "proper" function to have a vertical tangent?  As I understand, in the graph I pasted we cannot take the derivative of x=0 because the slope is vertical, hence we cannot see the instantaneous rate of change of x to y as the y value is not a value (or many values, which ever way you want to look at it). How is it possible to have a perfectly vertical slope on a function? In this case I can imagine a very steep curve at 0.... but vertical?!? I can't wrap my mind around it. How can we get a vertical slope on a non vertical function? Remove paint from the head tube How do i create a linestring from points sort by date in PostgreSQL?  I tried:  SELECT observations.id,    ST_MakeLine(observations.geom ORDER BY observations.date) AS newgeom    FROM   observations     GROUP BY    observations.id;   This is going wrong. It returns me a linestring with same coordinates.  So, instead of a line from a to b, it gives me a to a.    What am I doing wrong? How do rays of light getting focused at a point create an image?  How are the information of object's shape and dimensions expressed as an image when light rays converge?  Is it understandable by solving wave equation for light? Gave up waiting for root device on Ubuntu Salesforce DX daily limits As a package developer scratch orgs look like a great solution for automated CI testing and Salesforce has even done some great demos using Github and TravisCI to show automatically testing code using the DX CLI. However, in reviewing the details of DX, it looks like the limit is currently set to 50 orgs a day. If we want to test pull requests against 5 different org configurations, this limits us to 10 test runs a day. On a moderately sized team, this is going to be a tough limit to deal with. Has anyone had any success in working around this limit (or heard of any planned limit increases in the future). My initial thoughts are:   Get Salesforce to increase the limit (does not seem likely since this is a very young feature) Reuse scratch orgs for a period of time (this would require a good way to clean them and some savvy CI build code) Run fewer tests (not going to go over well the first time a bug for a specific org configuration slips through) Logitech SetPoint software button remapping My Logitech G5 Laser mouse has 9 buttons but it's SetPoint software only allows 5 of them to be used as "mouse buttons" and the remaining 4 can only be assigned special windows functions (Forward, Back, Cruise Up, etc) or Keystroke Assignments.  Many of the games I play will take up to 10 "MOUSE BUTTON" inputs for in-game actions but wont recognize the remaining 4 buttons even when assigned keystroke assignments.  Is there a way to make these last 4 buttons "Generic Buttons" as well as buttons 3,4,and 5? (1 is left click and 2 is right click).  My other question is if the above is not possible, maybe I can use AutoHotkey to remap keystrokes as assigned by my SetPoint software to mouse button commands?  If so how? When should I use Inline vs. External Javascript? I would like to know when I should include external scripts or write them inline with the html code, in terms of performance and ease of maintenance.  What is the general practice for this?  Real-world-scenario - I have several html pages that need client-side form validation. For this I use a jQuery plugin that I include on all these pages. But the question is, do I:   write the bits of code that configure this script inline? include all bits in one file that's share among all these html pages? include each bit in a separate external file, one for each html page?   Thanks. I posted what I think is a clever answer to:    But then I noticed the question was posted a while ago on Mar 2.  I wanted to see what the chance of the user logging back in and seeing my answer, but the  says the user was seen on Feb 19.  I thought this was supposed to be the date they last logged in? How could they have asked a question on Mar 2 if they haven't logged in since February?  Thanks Expectation and variance of the geometric distribution How can one use memorylessness and the  and the  to find the expectation and variance of the geometric distribution?  I will post my own answer, but as always, that shouldn't stop anyone else from posting theirs. Does English allow a zero copula in subordinate clauses? In a casual search of the web, I found a few indications English does not allow zero copulas ().  However, I frequently see sentences with subordinate clauses that juxtapose a noun phrase with an adverb phrase, such as the following from a contemporary sci-fi author:  Kai stares up at me from the grave, his eyes hard as obsidian.  If this clause were made into a sentence, it would take an obligatory verb:  *His eyes hard as obsidian.  His eyes are hard as obsidian.  The original clause seems to contain an implicit "to be."  Is it an example of a zero copula?  If not, what is this construction called? What length of rope should be used to tie a cow to an exterior fence post of a circular field so that the cow can only graze half of the grass within that field?  updated: To be clear: the cow should be tied to a post on the exterior of the field, not a post at the center of the field. Proving $\mathbb{Q}$ isn't homeomorphic to $\mathbb{Z}$ Prove that $\mathbb{Q}$ isn't homeomorphic to $\mathbb{Z}$  I know that a homeomorphism is a bijection function from two sets where both the function and its inverse are continuos.   So I figure that if I show that there is no continuos invective mapping from $\mathbb{Q}\rightarrow\mathbb{Z}$ then I have done the proof. But I do not know how to do this (if his is the right way). How can I start to show this? How to make a complete factory reset, without anyone being able to retrieve my data? Is there a way in Java to determine if a path is valid without attempting to create a file? CASESAFEID() apex equivalent Is there any function in Apex which could emulate functionality of the  formula function? I'm trying to get 18-char Id variant from the standard one. How do I make all the theorem-alike environments have an ending symbol? Roots of unity filter, identity involving $\sum_{k \ge 0} \binom{n}{3k}$ How do I see that$$\sum_{k \ge 0} \binom{n}{3k} = (1 + 1)^n + (\omega + 1)^n + (\omega^2 + 1)^n,$$where $\omega = \text{exp}\left({2\over3}\pi i\right)$? What is the underlying intuition behind this equality? How to change inside background color of UISearchBar component on iOS