Questions tagged [aescryptoserviceprovider]

66 questions
61
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
  • 19,993
  • 29
  • 99
  • 234
33
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
  • 45,922
  • 20
  • 140
  • 177
10
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
  • 594
  • 1
  • 6
  • 24
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 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,585
  • 8
  • 49
  • 60
6
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…
5
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
  • 9,413
  • 28
  • 96
  • 186
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
  • 4
  • 19
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,161
  • 5
  • 34
  • 64
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
  • 6,930
  • 11
  • 39
  • 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
  • 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
  • 8,590
  • 6
  • 31
  • 41
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…
2
votes
2 answers

Generating secret key for AES 256 Encryption from Keychain

I am working on a project where I need to encrypt/decrypt some data locally. I am using RNCryptor for the encryption and decryption process. To do that I need to use key, i don't want to define that key from app side like: NSString *password =…
1
2 3 4 5