Questions tagged [aes]

Advanced Encryption Standard (AES) is a cryptographic block cipher algorithm.

The latest addition to the block cipher algorithms. DES was published in 1977 based on IBM's previous work on the Lucifer cipher with an expected life span of 10 years. As a result of DES's fame, it has been targeted and probed by cryptanalysis for any weaknesses. The price of fame came at a cost, as a result NIST launched a competition announcing a successor to DES which would be known as AES. Several proposals were submitted and the winner was announced on October 2, 2000.

The cipher uses a default 128-bit block size, with varying key sizes of 128, 192 and 256 bits. (AES deviated from the original Rijndael proposal)

The Rijndael cipher was developed by two Belgian cryptographers: Joan Daemen and Vincent Rijmen

7171 questions
602
votes
9 answers

How to choose an AES encryption mode (CBC ECB CTR OCB CFB)?

Which of them are preferred in which circumstances? I'd like to see the list of evaluation crtieria for the various modes, and maybe a discussion of the applicability of each criterion. For example, I think one of the criteria is "size of the…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
420
votes
9 answers

Java 256-bit AES Password-Based Encryption

I need to implement 256 bit AES encryption, but all the examples I have found online use a "KeyGenerator" to generate a 256 bit key, but I would like to use my own passkey. How can I create my own key? I have tried padding it out to 256 bits, but…
Nippysaurus
  • 20,110
  • 21
  • 77
  • 129
174
votes
11 answers

How to avoid installing "Unlimited Strength" JCE policy files when deploying an application?

I have an app that uses 256-bit AES encryption which is not supported by Java out of the box. I know to get this to function correctly I install the JCE unlimited strength jars in the security folder. This is fine for me being the developer, I can…
Ken
143
votes
9 answers

Comparison of DES, Triple DES, AES, blowfish encryption for data

Does anyone have pros and cons together for comparing these encryption algorithms ?
yogsma
  • 10,142
  • 31
  • 97
  • 154
127
votes
5 answers

AES Encryption for an NSString on the iPhone

Can anybody point me in the right direction to be able to encrypt a string, returning another string with the encrypted data? (I've been trying with AES256 encryption.) I want to write a method which takes two NSString instances, one being the…
Boz
  • 1,646
  • 5
  • 15
  • 15
120
votes
14 answers

Javascript AES encryption

Is there a library available for AES 256-bits encryption in Javascript?
coder
  • 2,239
  • 5
  • 22
  • 20
119
votes
10 answers

Initial bytes incorrect after Java AES/CBC decryption

What's wrong with the following example? The problem is that the first part of the decrypted string is nonsense. However, the rest is fine, I get... Result: `£eB6O�geS��i are you? Have a nice day. @Test public void testEncrypt() { try { …
TedTrippin
  • 3,525
  • 5
  • 28
  • 46
118
votes
10 answers

Using AES encryption in C#

I can't seem to find a nice clean example of using AES 128 bit encryption. Does anyone have some sample code?
YOYO
113
votes
6 answers

What's the difference between SHA and AES encryption?

What's the difference between SHA and AES encryption?
Pete
111
votes
7 answers

AES vs Blowfish for file encryption

I want to encrypt a binary file. My goal is that to prevent anyone to read the file who doesn't have the password. Which is the better solution, AES or Blowfish with the same key length? We can assume that the attacker has great resources…
mimrock
  • 4,813
  • 8
  • 32
  • 35
109
votes
10 answers

Image encryption/decryption using AES256 symmetric block ciphers

Is there any good example of how to encrypt and decrypt image and other files with AES on Android?
hardartcore
  • 16,886
  • 12
  • 75
  • 101
97
votes
5 answers

AES Encryption - Key versus IV

The application I am working on lets the user encrypt files. The files could be of any format (spreadsheet, document, presentation, etc.). For the specified input file, I create two output files - an encrypted data file and a key file. You need both…
Peter
  • 11,260
  • 14
  • 78
  • 155
94
votes
6 answers

Java AES and using my own Key

I want to encrypt a string using AES with my own key. But I'm having trouble with the bit length of the key. Can you review my code and see what I need to fix/change. public static void main(String[] args) throws Exception { String username =…
Bernie Perez
  • 12,513
  • 13
  • 46
  • 55
91
votes
5 answers

What are best practices for using AES encryption in Android?

Why I ask this question: I know there have been a lot of questions about AES encryption, even for Android. And there are lots of code snippets if you search the Web. But on every single page, in every Stack Overflow question, I find another…
caw
  • 30,999
  • 61
  • 181
  • 291
79
votes
9 answers

Size of data after AES/CBC and AES/ECB encryption

I would like to know the size of data after AES encryption so that I can avoid buffering my post-AES data(on disk or memory) mainly for knowing the size. I use 128 bit AES and javax.crypto.Cipher and javax.crypto.CipherInputStream for encryption. A…
Ramson Tutte
  • 843
  • 1
  • 7
  • 8
1
2 3
99 100