I need a deterministic encryption scheme. Objectives:   Same plaintext is always encrypted to the same ciphertext. Related plaintexts are encrypted to unrelated ciphertexts. (For example, attacker that knows two ciphertexts cannot learn whether corresponsing plaintexts start with the same prefix.) Minimum space overhead. Authenticated encryption, of course.   There are also some conditions that can make it easier:   I will encrypt small chunks of data (few dozens of bytes). It is OK to store them in RAM and then start the encryption. The data will be padded to the same length all the time. So, we can conclude that the length of the data is some constant. Not high performance requirements.   My first idea was to derive IV from plaintext using HMAC and then use some authenticated encryption that requires just unique (potentially predicable) IV, like AES-GCM. This requires both IV and authentication tag to be stored alongside the encryption.  But I have an idea how to reduce the space overhead even more: Use (H)MAC of plaintext as both IV and authentication of the message. I know this is generally dangerous scheme close to encrypt-and-mac, so I specify further requirements for primitives to mitigate its risks:   The encryption will not leak anything when decrypting attacker-manipulated data. Stream ciphers like AES-CTR look suitable here, because there are no risks related to padding oracle. It just “decrypts” any attacker-provided garbage to another garbage (rejected by MAC check later) without any side channel if the AES-CTR implementation is correct. The encryption requires just unique IV, but it does not have any other requirements. Thill, AES-CTR looks suitable here. The MAC does not leak any data. HMAC (potentially truncated to 128b) looks suitable there, because failing to do so would at least weaken preimage resistance of the underlying hash function. Encryption uses a key completely unrelated to authentication key, of course. (This requirement might not be strictly needed when using, say, AES-CTR with HMAC-SHA256. However the requirement makes reasoning about security easier.)   The whole schema looks somewhat exotic to me, but I believe that I have resolved risks arising from the unusual design.  Is there any existing work that aims to do the same? Is there any research that would tell me anything about security of this scheme?
I was thinking of how to create an IV for a block cipher that doesn't require stored state, and I came up with the idea of using an HMAC of the (padded) plaintext and a (possibly distinct) key as the IV.  This seems to be secure:   The IV will only be reused if there is an HMAC collision or if the plaintext and key are the same.  The former would imply that the HMAC is broken and the latter is harmless, since it is just producing the output twice. The HMAC is verified after decryption, but before padding is checked, so padding-oracle attacks should not be an issue.   In particular, if the HMAC and the block cipher use different keys, there seems to be a very simple proof of security, assuming that either (1) the HMAC cannot be distinguished from a random function or (2) the block cipher is secure against maliciously-chosen (but unique) IVs:   The attacker cannot forge the HMAC, since this would require knowledge of the signing key. Since the signing and encryption keys are different in this case, and the HMAC is assumed random, malicious IVs cannot be triggered by an attacker.   Alternatively, if the cipher is secure against malicious (but unique) IVs, then the security of the cipher+security of the HMAC seem to prove the security of the system.  This (obviously) provides no protection against replay attacks, but that requires state anyway.  However, I am not a cryptographer so I do not trust my conclusions on this matter.  If this technique is secure, it would appear to be quite useful in practice, as it is simple and provides both encryption and authentication.
The age of the universe Many times I have read statements like, "the age of the universe is 14 billion years" . For example this wikipedia page .   Now, my question is, which observers' are these time intervals? According to whom 14 billion years? What are good books/other readings for elementary set theory? I am looking to expand my knowledge on set theory (which is pretty poor right now -- basic understanding of sets, power sets, and different (infinite) cardinalities). Are there any books that come to your mind that would be useful for an undergrad math student who hasn't taken a set theory course yet?   Thanks a lot for your suggestions! Photoshop: How to draw a guide with an exact distance from another guide Before drawing, I want to draw all guides for my layout. For example, I have a guide line named A already. After that, I want to have another guide named B  parallel with guide A and at 50px distance from it.   I have three solutions:   Draw line B and by "some way", I can see the current distance directly when I'm drawing, so I can make the distance exactly what I want it to be.  Draw line B. And then I use the Ruler tool to see the distance between the two guides. This method has disadvantages: maybe the ruler line that I draw isn't perpendicular with the guides and I'm not sure when the distance is enough. There are other clever ways, that help me get this job done fast and easily, but that I don't know yet. I think Photoshop should support this feature.   What is the best way to achieve this? A lot of textbooks and exam boards claim that light incident at exactly the critical angle is transmitted along the media boundary (i.e. at right-angles to the normal), but this seems to violate the principle of reversibility in classical physics.  How would a photon or ray travelling in the reverse direction "know" when to enter the higher refracting medium?  It can't know, so I conclude that such light is simply reflected?  Is this correct? How to detect if a mob has been hit in minecraft with command blocks? i am making a boss battle for my minecraft adventure map, and using a mob spawned with commands as the boss. When the mob gets hit, some command blocks will give the player a potion effect, but I can't figure out how to activate the command block when the mob gets hit. I am in the latest snapshot (16w03a). please help me (the person who answers my question will be given credit for it in my map) This book came out of the 1970s (early 1980's) at the latest. In it the protagonist, a not so diligent student, gets turned on to computer programming and creates (I think..) a weather program.   Eventually he moves on and years later the program contacts him. It has become an AI and he is its creator.  I forget what the setup is post contact which is not helpful at all.. Is a finite group uniquely determined by the orders of its elements? 35km commute possible? Currently, on every other day I commute to work which is a distance of 18km each way. I enjoy this ride but next year I may be moving to a place which will be about 35km from work. Questions:  1) Would it still be reasonable to commute this kind of distance each way once I have moved?  2) Google maps estimates that this distance would take 2 hours to complete. Would it be possible (depending on the bike and fitness) to do this distance in about an hour? The minimum system requirements for 18.04 are "2 GHz dual core processor or better"; would a quad-core at 1.8 GHz meet (or approximate) this requirement? Stance on repost question instead of editing to invalidate answers? I want to prove that if we have a commutative integral domain $D$ with field of fractions $F\neq D$ then $F$ is not finitely generated as a $D$-module. (In this question it may be the case that $1\not\in D$.)    My original plan was to localize at a maximal ideal and then use Nakayama's lemma but as we don't have a $1$ our localization may not be local (in fact we need not have maximal ideals).  So I'm a bit lost as to where to go?  Thanks for any help. What is wrong with the De Broglie–Bohm theory a.k.a "Causal Interpretation" of quantum theory? Possible Duplicate:          I've heard of De Broglie–Bohm theory a.k.a causal interpretation of quantum theory. The predictions match accurately with with the nondeterministic quantum theory.  As a philosophy buff this one seems just like the classical universe. No funny new-age religion style gimmicks.  So why don't people use this interpretation instead of the Copenhagen "magic" interpretation?  P.S. I'm not an expert. I possess only superficial knowledge of quantum physics. I was trying to install Lightworks 11.5.1 (amd64) on Ubuntu 14.04(amd64) but there's a notice: Dependency is not satisfiable: libtiff4. Is there anyway to solve this dependency issue?  Thanks in advance. Column vs Field: have I been using these terms incorrectly? I feel kind of embarrassed here, I've always used the terms "column" and "field" completely interchangeably, which recently caused some confusion in a technical discussion.   I was told, though, that this wasn't correct, that it should be (translating each term into spreadsheet terminology, ignoring data types and all the other stuff that make databases useful):   Database Column: like a spreadsheet column  Database Record: like a spreadsheet row Database Field: like a spreadsheet "cell" (a specific column of a specific row)   Is this right? I could have sworn that column and field are used more interchangeably than that. I certainly have been.  So we don't add fields to a table, we add columns to a table, and fields are only relevant when talking about data within a record?  Other thoughts on column vs field?  Edit: to clarify, the current context is MS SQL Server. My background before SQL server was MS Access, which might influence my use of these terms. File /etc/ld.so.nohwcap is missing in Debian 7 What is the file /etc/ld.so.nohwcap used for?. In my machine (Debian 7), this file is not found. Therefore, Which package or library this file belongs to? Which one is the formula of angular velocity? Is it $\omega= vr$? If not then why does the source below use $mvr=nh/2\pi$, where $mvr$ is angular momentum and $vr$ is angular velocity? Again $\omega=v/r$ shows radian per second. I saw $\omega= vr$ in one book and $\omega= v/r$ in another! Working with a huge file. Illustrator is super slow. What can I do to ease the load? The size of the file is 168mb and it's nearly impossible to work on the file because every action takes like five minutes or so to complete. The artwork is of a scene filled with characters and I so far outlined the entire thing with a brush and afterwards expanded all the strokes thinking it would help ease the load. However, the file is still way too big. Is there something I can do to make it easier to work on the file?  Edit: I flattened transparency and got it reduced to 33mb. Huge difference, but would like it even smaller if possible. How to make `sudo` preserve $PATH? I have a program that is installed in a custom directory under /opt. To make it easier to run it, I edited my bashrc to add said directory to my path: export PATH=$PATH:/opt/godi/bin:/opt/godi/sbin  This works fine if I want to run the program without sudo. However, if I try to run it with sudo it fails with a &quot;command not found&quot; error. $ sudo godi_console sudo: godi_console: command not found  Inspecting the PATH variable after using sudo reveals that its not including the same PATH I have as a normal user: $ sudo sh # echo $PATH                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  Why is the PATH not the same? Am I doing something wrong? I'm on Debian Jessie, if it makes a difference. One thing I tried was to invoke /opt/godi/sbin/godi_console directly, passing the absolute path to the executable. Unfortunatelly, that didn't help in this particular case because godi_console itself depends on the PATH being correctly set. One of the ways I quickly rename files in Windows is   F2 &gt; Rename &gt; Tab (to next file) &gt; Rename ...   But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative.  However, sometimes, I may want more control over how to rename specific files. In that case, perhaps its better to be able to tab to the next file Show that $(L^{p},\|\|_{p})$ is a Banach space. Show that $(L^{p},\|\|_{p})$ is a Banach space.  My approach: I prove the statement for $(L^{1},\|\|_{1})$, of the following way, first all, is easy show that $\|\|_{1}$ is a norm. So,  $(L^{1},\|\|_{1})$ is vector space. To show that is a Banach space, note that  Prop. 1: Let $(f_{n})_{n\in\mathbb{N}}\subset\mathcal{L}^{1}$ (where $\mathcal{L}^{1}=\mathcal{L}^{1}(X,\tau,\mu)$ is the space of all integrals function), such that $\sum_{i}{\|f_{n}\|}_{1}&lt;\infty$, then the sequences $\left(\sum_{n=1}^{N}{f_{n}}\right)_{n\in\mathbb{N}}$ converges almost everywhere to the integral function, that we called $\sum_{n\in\mathbb{N}}{f_{n}}$. Furthermore $$\sum_{n\in\mathbb{N}}{\int{f_{n}d\mu}}=\int{\sum_{n\in\mathbb{N}}{f_{n}d\mu}}\quad\lim_{N\to\infty}{\|\sum_{n=1}^{N}{f_{n}}-\sum_{n\in\mathbb{N}}{f_{n}}\|_{1}}=0$$ Prop. 2: Let $(E,\|\|)$ a normed vector space. Then $E$  is a Banach space if and only if for all $(e_{k})_{k\in\mathbb{N}}\subset E$ such that $\sum_{k\in\mathbb{N}}{\|e_{k}\|}&lt;\infty$, $\left(\sum_{k=1}^{n}{e_{k}}\right)_{n\in\mathbb{N}}$ converges in $E$  We take the proposition 2. Let $(f_{n})_{n\in\mathbb{N}}\subset L^{1}$ such that $\sum_{n}{\|\hat{f}_{n}\|_{1}}&lt;\infty$. Let $f_{n}\in\hat{f}_{n}$, then $\|f_{n}\|_{1}=\|\hat{f}_{n}\|_{1}$ and then $\sum_{n}{\|f_{n}\|_{1}}&lt;\infty$, by prop. 1, there exist $F\in\mathcal{L}^{1}$ such that $\|\sum_{n=1}^{N}{f_{n}-F\|_{1}}\to 0$, and then $\|\sum_{n=1}^{N}{\hat{f}_{n}-F\|_{1}}\to 0$. Finally note that $\hat{F}\in L^{1}$ is a Banach space. This was my answer for  $L^{1}$ space, but how I prove the general statement for $L^{p}$ (I want to do a similar response). Edit: I'm stuck in the problem, any idea or hint is appreciated.Thanks!!