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
28
votes
3 answers

algorithm - Is the RijndaelManaged Class in C# equivalent to AES encryption?

I am asking this question to confirm whether the RijndaelManaged class in C# is equivalent to AES encryption. From what I have been reading, RijndaelManaged was the algorithm of choice to implement AES encyrption. Can someone confirm this…
Matthew
  • 4,477
  • 21
  • 70
  • 93
27
votes
4 answers

invalid AES key length error

this code give invalid AES key length error. how can i correct it ? ( i want 128 bit key AES encryption ) package org.temp2.cod1; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; public class Code1 { …
silverkid
  • 9,291
  • 22
  • 66
  • 92
26
votes
4 answers

C# Example of AES256 encryption using System.Security.Cryptography.Aes

I need to implement AES 256 encryption /decryption and I haven't been able to find an example that works correctly. MSDN suggests that I should use the AES class. The Rijndael class is the predecessor of the Aes algorithm. You should use the Aes…
TeamWild
  • 2,460
  • 8
  • 43
  • 53
25
votes
4 answers

Correct way to use php openssl_encrypt

I'm working with cryptography on a project and I need a little help on how to work with openssl_encrypt and openssl_decrypt, I just want to know the most basic and correct way to do it. Here is what I got so far: // To encrypt a…
Jo E.
  • 7,822
  • 14
  • 58
  • 94
25
votes
2 answers

encrypt- decrypt with AES using C/C++

How can I encrypt and decrypt a file with a 256 key AES in C or C++?
Yannis Assael
  • 1,099
  • 2
  • 20
  • 43
25
votes
4 answers

How can I make my AES encryption identical between Java and Objective-C (iPhone)?

I am encrypting a string in objective-c and also encrypting the same string in Java using AES and am seeing some strange issues. The first part of the result matches up to a certain point but then it is different, hence when i go to decode the…
Simon Lee
  • 22,304
  • 4
  • 41
  • 45
25
votes
2 answers

SQL Server 2008 Open Master Key error upon physical server change over

I copied a SQL Server database from one system to the next, identical setup, but completely different physical machine. I used Norton Ghost and recoverd files manually, for example, the entire SQL Server 2008 folder found in c:\Program Files after…
Tomasz Iniewicz
  • 4,379
  • 6
  • 42
  • 47
25
votes
2 answers

How to encrypt data in a UTF-8 string using OpenSSL::Cipher?

In a Rails 3.0 (Ruby 1.9.2) app I'm trying to encrypt some data using something like this: cipher = OpenSSL::Cipher.new 'aes-256-cbc' cipher.encrypt cipher.key = cipher.random_key cipher.iv = cipher.random_iv encrypted = cipher.update 'most secret…
Henrique Zambon
  • 1,301
  • 1
  • 11
  • 20
24
votes
3 answers

Decrypting AES256 with node.js returns wrong final block length

Using this Gist I was able to successfully decrypt AES256 in Node.js 0.8.7. Then when I upgraded to Node.js 0.10.24, I now see this error: TypeError: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length at…
Justin Elkow
  • 2,833
  • 6
  • 28
  • 60
24
votes
3 answers

What does—or did—"volatile void function( ... )" do?

I've seen How many usage does "volatile" keyword have in C++ function, from grammar perspective? about use of the volatile keyword on functions, but there was no clear explanation of what Case 1 from that question did. Only a statement by one of…
EdwinW
  • 1,007
  • 2
  • 13
  • 32
23
votes
3 answers

AES interoperability between .Net and iPhone?

I need to encrypt a string on the iPhone and send it to a .Net web service for decryption. I am able to encrypt/decrypt on the iPhone and with .Net, but the encrypted strings from the iPhone cannot be decrypted by .Net. The error I get is "Padding…
David Veksler
  • 512
  • 1
  • 5
  • 14
23
votes
3 answers

What is the difference between Aes and AesManaged

I found two class in C# related to AES, and example code of them MSDN provides are similar, what is the difference between these two classes? Aes…
yu yang Jian
  • 6,680
  • 7
  • 55
  • 80
23
votes
6 answers

Python AES encryption without extra module

Is it possible to encrypt/decrypt data with AES without installing extra modules? I need to send/receive data from C#, which is encrypted with the System.Security.Cryptography reference. UPDATE I have tried to use PyAES, but that is too old. I…
Anton
  • 542
  • 1
  • 6
  • 16
23
votes
2 answers

Cipher: What is the reason for IllegalBlockSizeException?

I have observed the following when I worked with Cipher. Encryption code: Cipher aes = Cipher.getInstance("AES"); aes.init(Cipher.ENCRYPT_MODE, generateKey()); byte[] ciphertext = aes.doFinal(rawPassword.getBytes()); Decryption code : Cipher aes =…
shazinltc
  • 3,616
  • 7
  • 34
  • 49
23
votes
5 answers

How to decrypt message with CryptoJS AES. I have a working Ruby example

I'm able to decrypt AES encrypted message with Ruby like this: require 'openssl' require 'base64' data =…
Priit
  • 5,200
  • 2
  • 21
  • 20