Questions tagged [aescryptoserviceprovider]
68 questions
72
votes
8 answers
Good AES Initialization Vector practice
per my question Aes Encryption... missing an important piece, I have now learned that my assumption for creating a reversible encryption on a string was a bit off. I now have
public static byte[] EncryptString(string toEncrypt, byte[]…

Jeremy Holovacs
- 22,480
- 33
- 117
- 254
34
votes
3 answers
Why are RijndaelManaged and AesCryptoServiceProvider returning different results?
Here is the example that I have run. It has the same Mode, Padding, BlockSize, KeySize. I am using the same init vector, key and data.
Using the RijndaelManaged produces an encrypted value…

SwDevMan81
- 48,814
- 22
- 151
- 184
12
votes
2 answers
Why are there random characters appearing in my decrypted text?
Intro
I'm trying to encrypt and decrypt texts and sometimes, especially for larger texts, random characters appear within the decrypted text. I'm using AES cryptography within the System.Security.Cryptography namespace and the text I'm trying to…

Brownish Monster
- 682
- 1
- 8
- 25
9
votes
1 answer
How many bytes are IV and Keys for AES?
I'm using AESCryptoServiceProvider in C#/.Net Framework and I'm wondering how large, in bytes, the IV and Keys are. I'm pretty sure that this class follows the specifications of AES so if anyone has any ideas, I'd be happy to hear it :)

Dominic K
- 6,975
- 11
- 53
- 62
9
votes
2 answers
Are the AES legal key sizes really the limit?
The AesCryptoServiceProvider.LegalKeySizes field shows you the allowed sizes in bits.
However what I don't understand is if those are true, how am I able to successfully utilise a 2048 bit key length (256 Bytes)?
I suppose my real question is, does…

SteakNinja
- 105
- 1
- 5
7
votes
1 answer
How to Decrypt EncryptedAssertion using System.Cryptography
The Identity provider is encrypting the Saml Assertion using the functions of component pro
Dim encryptedSamlAssertion As New EncryptedAssertion(samlAssertion, encryptingCert, New…

Akshay G
- 2,070
- 1
- 15
- 33
7
votes
1 answer
Storing the Initialization Vector - Separate field?
When encryption sensitive information using the .NET AesCryptoServiceProvider library I generate a unique Initialization Vector (IV) for each value that is encrypted. In the database record where I save the encrypted data I have a field named "IV"…

webworm
- 10,587
- 33
- 120
- 217
4
votes
1 answer
Where to specify key and IV value when doing AES encryption/decryption in Android?
I am working on AES encryption and decryption in android. I have an Audio file which is encrypted using AES/CBC. I have the key and IV (initialization vector).
I have read some links. From this
SecretKeySpec skeySpec = new SecretKeySpec(raw,…

Karthikeyan Ve
- 2,550
- 4
- 22
- 40
4
votes
1 answer
AES-256/CBC encryption with OpenSSL and decryption in C#
I am a newbie to cryptography. My requirement is to decrypt/encrypt the text that is encrypted/decrypted using openssl. The algorithm that we are using is aes-256-cbc in the Openssl.
So, I am trying to implement the same functionality in my…

Nagaraj
- 221
- 2
- 5
- 21
3
votes
1 answer
Specified initialization vector (IV) does not match the block size for this algorithm
public static string GenerateKey()
{
AesCryptoServiceProvider aesCrypto = (AesCryptoServiceProvider)AesCryptoServiceProvider.Create();
// Use the Automatically generated key for Encryption.
return…

CODe
- 2,253
- 6
- 36
- 65
3
votes
1 answer
FIPS-compliant encryption in .NET 2.0
We have a .NET 2.0 application that uses the RijindaelManaged class to encrypt some sensitive data. This was fine until we ran into some machines that require the use of FIPS-compliant algorithms.
We'd like to switch to AesCryptoServiceProvider, but…

Odrade
- 7,409
- 11
- 42
- 65
3
votes
1 answer
Decryption using AES 256 with key and salt values using Java
I'm trying to make decryption logic and knnow that encrypted string has been made using:
Key: 8d6ea4d3e6f8c4f8641516baa5e42b85
transformation: AES/CBC/ISO10126PADDING
salt: 1c4dd21d7ba43bdd
iterations: 0
Encrypted string:…

user3101544
- 31
- 1
- 1
- 2
3
votes
4 answers
System.PlatformNotSupportedException AesCryptoServiceProvider
I've got the following problem.
I've created a class that uses AesCryptoServiceProvider to encrypt and decrypt some data. I'm using the class in a SharePoint WebPart and everything works fine. I'm also using the same class on the same webapplication…

superreeen
- 151
- 2
- 12
3
votes
3 answers
Seekable alternative to .NET's CryptoStream?
Does anybody know a seekable alternative to .NET's CryptoStream?
It is OK if the alternative supports Seek only in "read" mode or if it is limited to e.g. AES256.

Stefan Schultze
- 9,240
- 6
- 35
- 42
2
votes
1 answer
AES and its cipher modes
I was trying encryption/decryption with AES then I tried the CBC & ECB modes
I got the same encrypted output from all three ! is this how it goes?
it's may not be wrong but I just don't know what to expect . and what's the point of having modes if…

Katia
- 679
- 2
- 15
- 42