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

258 questions
5
votes
1 answer

Decrypting bytes encrypted by .NET's RijndaelManaged using Java

I am trying to decrypt something, which was encrypted using RijndaelManaged of .NET/C#, using Java to decrypt. The C# program is not mine; I cannot change it to be more interoperable. But I know how it is encrypting: byte[] bytes = new…
Aleksei Vasiliev
  • 221
  • 1
  • 3
  • 6
5
votes
2 answers

How can I decrypt a string using AES algorithm in c#?

I have an encrypted string from one of our customers. This string was encrypted using the AES method in Java. The only thing I have is the key: "xxxxxxxxxxxxxxxxxxxxxxxx" (24 chars) and the encrypted text: "56e84e9f6344826bcfa439cda09e5e96" (32…
user29964
  • 15,002
  • 19
  • 52
  • 63
5
votes
1 answer

Java encode and .NET decode

The encryption is in java: String salt = "DC14DBE5F917C7D03C02CD5ADB88FA41"; String password = "25623F17-0027-3B82-BB4B-B7DD60DCDC9B"; char[] passwordChars = new char[password.length()]; password.getChars(0,password.length(), passwordChars,…
Wijaya
  • 51
  • 1
  • 3
5
votes
3 answers

How many characters to create a byte array for my AES method?

I am using the AES methods here: http://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged.aspx I want to have a string value that I will convert to byte array and pass it to the AES encrypt method. How many characters…
mrblah
  • 88,033
  • 134
  • 292
  • 404
4
votes
3 answers

"Length of the data to decrypt is invalid." exception during Rijndael decryption

I get "Length of the data to decrypt is invalid." exception when i try to decrypt a memory stream. I am beginner, cant figure out whats wrong. whats wrong? public bool EncryptStream() { string password = @"myKey123"; // Your Key Here …
veagles
  • 465
  • 1
  • 5
  • 8
4
votes
5 answers

Rijndael / AES from C# to VB6

I need to encrypt a byte array in VB6 and decrypt it in C# (NET 2.0). And viceversa (C# to VB6). In C# I used RijndaelManaged class. In VB6 I used free pieces of from Internet. The best seems to be http://www.frez.co.uk/freecode.htm#rijndael But the…
Fabrizio Accatino
  • 2,204
  • 19
  • 23
4
votes
2 answers

Rijndael: same string, different results

We had a small desktop app that needs to be provided as a web feature now (.Net). This app contains some code for encryption and uses Rijndael classes from .Net framework. The code accepts an input string, encrypts it and writes it out the results…
Apeksha
  • 475
  • 6
  • 23
4
votes
2 answers

exception when decrypting with Rijndael

I have some code that decrypts a password with Rijndael public static string DecryptPassword(string encrypted) { using (MemoryStream ms = new MemoryStream()) using (RijndaelManaged rijndaelManaged = new RijndaelManaged()) using…
adrianm
  • 13,642
  • 4
  • 49
  • 91
4
votes
5 answers

Is salting values an essential good practice with Rijndael or AES encryption?

I've implemented an encryption function using the Rijndael/AES encryption provider in .NET. My "understanding" of the algorithm suggests that as long as the Key and IV aren't compromised then the data is safe. However I've read on some sites where…
Achilles
  • 10,653
  • 7
  • 58
  • 112
4
votes
2 answers

How do I encrypt a string in vb.net using RijndaelManaged, and using PKCS5 padding?

I use the following code to initialize encryption... Dim symmetricKey As New System.Security.Cryptography.RijndaelManaged() With symmetricKey .Key = Encoding.ASCII.GetBytes(Key) .IV = Encoding.ASCII.GetBytes(IV) .Mode = CipherMode.CBC …
digiguru
  • 12,010
  • 18
  • 59
  • 83
4
votes
1 answer

RijndaelManaged - What does setting KeySize property do?

Given I am setting the KeySize to be 192, when I am encrypting some data by doing the following: static void Main() { var querystrings = "dataToEncrypt"; byte[] keyvalue = new byte[] { 241, 205, 121, 123, 109, 246,…
Mark Walsh
  • 2,957
  • 1
  • 20
  • 43
4
votes
2 answers

AES algorithm (pass key length) - AES pass key + addtional PIN code

In my business scenario (basically a cloud file sharing application) I have the following case: user uploads file(s) to the folder it's being checked if the folder is PIN protected 1) If it's not PIN protected, encrypt the file using the…
wegelagerer
  • 3,090
  • 8
  • 36
  • 56
4
votes
1 answer

Calculation of encrypted file size does not match true size

I have the need to calculate the size of a file I am encrypting using Rijndael. According to other answers on this site, and on google, the following is the correct way of calculating encrypted data length: EL = UL + (BS - (UL Mod BS) Mod…
Sk93
  • 3,494
  • 3
  • 33
  • 62
4
votes
1 answer

AES OFB encryption for RijndaelManaged

I need to communicate from a C# application to another application via encrypted messages in OFB mode. I know that RijndaelManaged does not have support for AES OFB mode. Is there anybody more experienced than me aware of any other way to…
4
votes
3 answers

Password encryption/decryption between classic asp and ASP.NET

I have 2 websites: one written in classic asp and another written in ASP.NET (1.1 framework). Both applications use a login mechanism to validate user credentials based on a shared database table. Up to now passwords are stored in a 1-way MD5 hash,…
1 2
3
17 18