AES plaintext is smaller than 128 bits I'm currently developing a AES implementation in a graduation project at university. As far as I know, AES uses a 128 bit block length as input . if the entered string to encrypt is not 128 bits such as 32 bits . what should be done for data that is less than 128 bits ? What's the best solution ?
AES plaintext is smaller than 128 bits - how to expand? We are currently developing a little AES implementation in a crypto-course at university.  As far as I know, AES uses a 128 bit block length, so all data that will be encrypted gets split up into blocks of 128 bits (16 bytes) into a 2d-array (or 1d in implementation) with 4 &times; 4 fields.  I was wondering and didn't find out what to do if the entered string to encrypt is not 128 bits long? The question is going further by thinking that there will never be exactly n &times; 128 bits of data to encrypt.  For a smaller key given by the user (e.g. "test") I know there is a key expansion algorithm defined.  But what should be done for data that is less than 128 bits?
Accessing private member variables from prototype-defined functions Is there any way to make “private” variables (those defined in the constructor), available to prototype-defined methods?  TestClass = function(){     var privateField = "hello";     this.nonProtoHello = function(){alert(privateField)}; }; TestClass.prototype.prototypeHello = function(){alert(privateField)};   This works:  t.nonProtoHello()   But this doesn’t:  t.prototypeHello()   I’m used to defining my methods inside the constructor, but am moving away from that for a couple reasons. Is there a Ubuntu sanity check? Is there a standard procedure to 'unit test' an Ubuntu system against the deb packages?  Assume, a system has ubuntu-desktop installed according to the package manager. Can I find out, whether the file system has all the files in ubuntu-desktop and dependencies?   related question: lstlisting: how to set code color and frame color how to install packages with apt-get on a system connected via proxy? I've got an Ubuntu 11.10 system connected via a proxy to the internet, and I would like to install packages via apt-get. When I try to do that I get this error message:  sudo apt-get install libboost-program-options-dev [...] Err http://gb.archive.ubuntu.com/ubuntu/ oneiric/main libboost1.46-dev i386 1.46.1-5ubuntu2 407  Proxy Authentication Required   Any ideas? Encouraging software publishers to use StackExchange as support mechanism Whenever I deal with an application publisher's custom support mechanism because I can't see any evidence of activity on StackExchange, I always wish they'd just migrate to StackExchange, particularly when I get a prompt response from them. What a waste, I think, that my question and answer weren't captured on SE.  In cases where there is some activity for the application on SE, I'll post my question there and, if I get no response, reference the SE question in my email follow-up. In the case of , that had a happy ending where the support person posted the answer to the SE site at the same time they emailed me.  My related meta questions are:   Are there any obvious downsides to publishers effectively "giving up" their custom support mechanisms, or at least their custom forum, in favor of the appropriate SE site? Are there any obvious downsides to SE for publishers making this transition? Is SE staff engaged in any systematic marketing efforts to get publishers to make this transition? Is there any SE documentation which lists the advantages of publishers making this transition? Browsers redirect to level3.com if domain does not exist If I enter a URL incorrectly, my Firefox browser occasionally redirects me to    This occurs in Chrome too. I've restarted Firefox in safe mode, and it still happens I've restarted Windows 10 in safe mode, and it still happens I've installed Hitman Pro Alert. The scan found nothing, and could not prevent the redirect. My HOSTS file is clean. My ethernet settings IPv4 properties use Google's DNS: 8.8.8.8 and 8.8.4.4 The only other issue I have is when visiting  which produces numerous pop-up windows, unless I disable scripts. I have Comodo Internet Security (antivirus and firewall) installed, and it identifies nothing.   Any other suggestions? Imagine you're trapped inside a free falling elevator. Would you decrease your impact impulse by jumping during the fall? When? What can be considered as "Home ties" for a UK Standard Visitor visa (PLAB)? I am an Indian national who recently cleared his PLAB1 examination and has booked to sit PLAB2 in UK (which can be given only in UK). Before applying for a visa, I would like to know about the how one can prove home ties. Of course, I have read about the Family, Job, Property being used as ties but...  I haven't worked since my graduation (two years now) as I wasted a lot of precious time on USMLE. After that IELTS and then PLAB1. So can't show job as tie.  I don't have any property in my name but my father does have residential plots and agricultural lands worth a few crores on his name.    Does an affidavit that I am his only son and heir to all that bla bla bla, serve the purpose?  I do have few life insurance policies in my name.  Can they be used as an indicator of some kind of active Indian society member thingy?  I am unmarried but do intend to show my parents as family ties.   I did my medical studies in China (6-7 years). I have also traveled to a few countries like Russia, Thailand, Philippines, HK, Macau etc etc (though not a single Western country).    Can that be used in my favour in home ties that I have always obeyed country's laws and returned to India upon completion of the purpose of the trip? Override iTunes "media" keys (play, pause, etc) for Spotify? ASP.NET MVC controller actions that return JSON or partial html I've doing some researches since few days and I haven't really got an answer to my question.  I am in the process of building a huge file server for the company I work for. We bought a server case  with 24 bays and drives. Now I am stuck at the point where I have to choose the RAID card. I saw a RAID card from LSI that offer 6 internals mini-SAS 8087 ports (6x4) and would work perfectly with my build. However, it's not cheap.  I have been reading about the subject and I found something called SAS Expander. They are cheap.  with 6 mini SAS 8087 for 225$ (instead of 1150$ of the other one).  Now my question, how would I link an SAS Expander with a RAID card ? Do I need to a buy a RAID card with only 1 external 8088 port and link it with the other card ? Could someone clarify this for me because I haven't found any good documentation on it.  Thanks you. In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision? I have an elliptic curve $E$ over $\mathbb{F}_{11}$ defined by $y^2=x^3+4x$ with the point at infinity $\mathcal{O}$  I have a divisor of $E$, defined by $$D=\left[(0,0)\right]+\left[(2,4)\right]+\left[(4,5)\right]+\left[(6,3)\right]-4\left[\mathcal{O}\right]$$  I know that $\text{deg}(D)=1+1+1+1-4=0$ and it is clear that $\text{sum}(D)=\infty$  Therefore $D$ is the divisor of a function - we want to find this function  I am given \begin{align}\text{div}(y-2x)&amp;=\left[(0,0)\right]+2\left[(2,4)\right]-3\left[\mathcal{O}\right]\\ \text{div}(x-2)&amp;=\left[(2,4)\right]+\left[(2,-4)\right]-2\left[\mathcal{O}\right] \end{align}  I am then told that we can express $D$ as follows:  $$D = \left[(2,4)\right]+\text{div}\left(\frac{y-2x}{x-2}\right)+\left[(4,5)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]$$  However, when I expand this back out, I get the following:  \begin{align}D &amp;= \left[(2,4)\right]+\text{div}\left(\frac{y-2x}{x-2}\right)+\left[(4,5)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &amp;= \left[(2,4)\right]+\text{div}(y-2x)-\text{div}(x-2)+\left[\left(4,5\right)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &amp;= \left[(2,4)\right]+\left(\left[(0,0)\right]+2\left[(2,4)\right]-3\left[\mathcal{O}\right]\right)-\left(\left[(2,4)\right]+\left[(2,-4)\right]-2\left[\mathcal{O}\right]\right)+\left[\left(4,5\right)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &amp;= \left[(0,0)\right]+2\left[(2,4)\right]+\left[(4,5)\right]+\left[(6,3)\right]+2\left[\mathcal{O}\right]-\left[(2,-4)\right] \end{align}  which clearly isn't equivalent to the original $D$ unless $$\left[(2,4)\right]+2\left[\mathcal{O}\right]-\left[(2,-4)\right]=-4\left[\mathcal{O}\right]$$  Can anyone either explain what I've done wrong or show me how I can obtain the above equation please    This question comes in three parts:   Step 1 - This one Step 2 -  Step 3 - Select from list of reasons when performing downvotes Preamble: I know that 'give a reason when downvoting' is a very common request, and I assure you that I have read these posts and the discussions in them and my request is very different. This isn't about encouraging people to comment and is more about gathering metrics.  I'd like to see a feature whereby people who are downvoted get some better feedback on why they were downvoted, especially given that people rarely leave comments in practice.  So my suggestion is that when user clicks on the downvote, they are prompted to pick from a short list (No more than 5) of common reasons. It would be a popup that replaces the existing "Please consider adding a comment" box.  The user receiving the downvote would see how many people downvoted them for each reason, but not who did it. It would significantly address the issue of people being too lazy to comment or not wanting to comment (for fear of retaliation or any other reason) while helping to ensure the user gets useful feedback.  Perhaps the downvote could also be weighted based on whether or not a reason is picked.  For questions the list might look something like:   Not a question Not relevant to the subject area Trivial question with no research effort Poorly asked question Other   And for answers, this might be:   Nonconstructive or not an answer Incorrect or dangerous answer Poor explanation Doesn't answer the original question Other I want to know a proof of an alternative form of Fermat-Euler's theorem   $$a^{\phi (n) +1} \equiv a \pmod n$$   when $a$ and $n$ are not relatively prime.   I searched some number theory books and a cryptography book and internet, but there were only proofs of the original theorem  $a^{\phi (n)} \equiv 1 \pmod n$ or in case n=pq which is used for RSA. So I would be very thankful if someone show me a proof or book I should read. I've got a domain that I apparently forgot to set a preferred domain for, so I just tried to do it. Webmaster Tools instead popped up a little box:     Part of the process of setting a preferred domain is to verify that you own http://www.example.com/. Please verify http://www.example.com/.   I'm running into some problems following these instructions:   As far as I can tell I already did verify sometime in the past. There's a TXT DNS record with the gibberish Google tells you to set for it that I couldn't have come up with myself. …and nothing is telling me this information is bad. So let's assume the site is somehow not actually verified. All  instructions start with "click the Manage Site button next to the site you want, and then click Verify this site." That button doesn't even exist on my screens. (It presumably goes away when you successfully verify?) Those instructions were all updated pretty recently, and the DNS one in particular just a couple weeks ago so it seems a bit unlikely they're inaccurate.   I am not using Apps, and won't be, so can't try out the verification .   Note that I also have another domain that I have not done any verification for which is showing the same behavior(no such button, being told to verify when it seems impossible etc.) so something appears to just be broken.  I already have a no-www process in place server-side, so we can skip that. I'm just trying to get the box checked off in GWT.  If I don't get any resolution, I'll eventually scrap the TXT record and see if the site gets un-verified(or whatever since it thinks it isn't), and see if I can just restart the process.  It's not urgent so I'm just trying to figure out if I've gone blind to something or what. Did the button move? I don't mean people with low self esteem.  But there are people who feel happy at being able to make other people laugh at their own expense. I remember someone telling me there is a word for them, I can't find it.  Let me explain:  I sometimes, while sitting with a group of people, might just tell them a personal embarrassing story, which might be completely fabricated, to make other people laugh. And when they laugh, I feel happiness.  I'm also self deprecating, but not in a way that I hate myself, rather,  just my work (I'm a screenwriter) and knowing I can do better. I do not self deprecate myself in public (I don't praise myself either).   Edit: Now that its mentioned, I think the word I'm talking about was used to describe a person's sense of humor. Or it could be a word used to describe a psychological trait/disorder.  Edit: I just looked up humor styles on Wikipedia. And after reading it, I guess the word that closely matches what I'm looking for is 'Affiliated Humor' but in a 'Self Defeating' style. How to control RAM / swap usage Is there a way (application) to control RAM / swap usage policy at application level.  I have some applications that I use all the time and I want them to stay in RAM all the time and there are also application that I use quite seldom and they might be thrown to swap at demand. I know that default configured windows should give me best performance but I want to check whether I can get more :).  I use windows 7. multiplicative group of infinite fields Is this sentence acceptable?     You’re welcome, have a nice day ahead.