Questions tagged [rijndaelmanaged]

.NET Framework (1.1 and later) managed version of the Rijndael (AES) algorithm.

.NET Framework (1.1 and later) managed version of the Rijndael (AES) cryptographic algorithm. Any public static (Shared in VB) members of this type are thread safe.

Class: System.Security.Cryptography.RijndaelManaged

269 questions
10
votes
2 answers

Encrypt AES with C# to match Java encryption

I have been given a Java implementation for encryption but unfortunately we are a .net shop and I have no way of incorporating the Java into our solution. Sadly, I'm also not a Java guy so I've been fighting with this for a few days and thought I'd…
Christopher Johnson
  • 2,629
  • 7
  • 39
  • 70
9
votes
3 answers

Reading from a cryptostream to the end of the stream

I'm having some trouble with the code below. I have a file in a temporary location which is in need of encryption, this function encrypts that data which is then stored at the "pathToSave" location. On inspection is does not seem to be handling the…
David
  • 125
  • 1
  • 2
  • 7
9
votes
3 answers

ASP.NET MVC - Secure Temporary Storage of Credit Card Data

I have a checkout process for a shopping cart that is currently storing credit card data in the session for retrieval once the user finalizes the purchase. The purchase process is set up such that the user inputs the credit card, views a…
Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
8
votes
3 answers

Is this a reasonable way to implement 'remember me' functionality

If a user logs into the site, and says 'remember me', we get the unique identifier for the user, encrypt this with RijndaelManaged with a keysize of 256 and place this in a httponly cookie with a set expiration of say.. 120 days, the expiration is…
meandmycode
  • 17,067
  • 9
  • 48
  • 42
8
votes
6 answers

C# AES Rijndael - detecting invalid passwords

I'm using Rijndael to encrypt some sensitive data in my program. When the user enters an incorrect password, most of the time a CryptographicException is thrown with the message "Padding is invalid and cannot be removed.". However, with very small…
Ozzah
  • 10,631
  • 16
  • 77
  • 116
8
votes
4 answers

RijndaelManaged Decryption - How can I remove the padding /0 gracefully?

How can I remove the padding from a decrypted string? I'm using RijndaelManaged provider to encrypt and decrypt. When I decrypt there are several /0/0/0/0/0/0 at the end of the string. My question is how can I gracefully (properly) remove the…
Hcabnettek
  • 12,678
  • 38
  • 124
  • 190
8
votes
3 answers

RijndaelManaged: IV Generation?

I want to implement the most secure, and most reliable form of symmetric key cryptography in my application. The user should input a password to encrypt/decrypt, and that's all. For RijndaelManaged, one must enter a key and an IV. I'm not sure how…
cam
  • 8,725
  • 18
  • 57
  • 81
8
votes
3 answers

Calculate maximum size for encrypted data

Is there any way to calculate the largest outcome from an Rijndael encryption with a fixed array length? Encryption method: RijndaelManaged Padding: PKCS7 CipherMode: CBC BlockSize 128 KeySize: 128 I need this as im converting a database where all…
Peter
  • 37,042
  • 39
  • 142
  • 198
7
votes
2 answers

Using Rijndael to encrypt/decrypt files

I need to transfer xml files and they are required to be encrypted. I have found some examples think I'm close but when I decrypt the file I end up with trailing junk characters. There are some posts about this but I have not seen any that will…
mjames
  • 137
  • 1
  • 2
  • 5
7
votes
8 answers

ASP.NET 2.0 RijndaelManaged encryption algorithm vs. FIPS

I'm running into an issue with an ASP.NET 2.0 application. Our network folks just upped our security, and now I get the floowing error whenever I try to access the app: "This implementation is not part of the Windows Platform FIPS validated…
R Rush
  • 71
  • 1
  • 2
7
votes
3 answers

Using Rijndael encryption for large files

I'm in a situation where I need to encrypt / decrypt a file of n length securely, ideally using Rijndael, but definitely at 256bit encryption. I've played around with encryption before and have encrypted/decrypted strings and byte arrays quite…
Sk93
  • 3,676
  • 3
  • 37
  • 67
6
votes
4 answers

simple encrypting / decrypting in VB.Net

I'm trying to figure out how to encrypt / decrypt a string in VB.Net. I followed the example given here and wrote the following code (below). There's a text box, an "encrypt" button, and a "decrypt" button. The idea is to type something into the…
nttaylor
  • 788
  • 3
  • 11
  • 25
6
votes
2 answers

Index out of range when decrypting a file

I'm really not sure what's going on here. My app is encrypting files correctly and without issue, but it's throwing an IndexOutOfRangeException when trying to decrypt the same file... Here's my code: Public Sub EncryptDecrypt(ByVal Action As String,…
Ortund
  • 8,095
  • 18
  • 71
  • 139
6
votes
1 answer

RijndaelManaged encrypt replacement of Enterprise Library

I have a question regarding the encryption: basically in my web application I've used Enterprise Library 5.0 where they had a block for cryptography, so basically in the configuration tool provided by them I've registered a block and generated a…
Alnedru
  • 2,573
  • 9
  • 50
  • 88
6
votes
2 answers

C# AES-256 Encryption

I am using RijndaelManaged to make a simple encryption/decryption utility. This is working fine, but I am trying to get it integrated with another program which is created in Unix (Oracle). My problem is, for all smaller input string, i am getting…
Bhaskar
  • 10,537
  • 6
  • 53
  • 64
1
2
3
17 18