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
1
vote
1 answer

unable to de-serialize data

I started created a Unity game as a Visual Studio project. I created a side project (WinForms) for testing as I don't know unit testing. There, all of my code works perfectly, the serialization class works flawlessly even when the protobuf-net DLL…
Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
1
vote
1 answer

Cross platform (php to C# .NET) encryption/decryption with Rijndael Part 2

I came across this thread while googling. However after trying it out and making adjustments, I've come across a hurdle, hopefully someone can help me out a bit. The code above is fine but since the algorithm isn't really…
James
  • 25
  • 5
1
vote
2 answers

Using StreamWriter to write in a Stream (for large Stream encryption)

I am following the MSDN Example of Rijndael Encryption, only that I would like to encrypt and return a stream. The following does not work. It throws no exception but after stepping through the code, the return value has no data. public…
tinonetic
  • 7,751
  • 11
  • 54
  • 79
1
vote
1 answer

How do you save and retrieve a Key/IV pair securely?

I'm using VB.Net's RijndaelManaged (RM) to encrypt files, using the RM.GenerateKey and RM.GenerateIV methods to generate the Key and IV and encrypting the file using the CryptoStream class. I'm planning on saving this Key and IV to a file and want…
Shawn Steward
  • 6,773
  • 3
  • 24
  • 45
1
vote
1 answer

Encryption time difference between 128-bits AES and 256-bits AES?

I'm developping a program which encrypts USB drives using RijndaelManaged method in C#, with the possibility of choosing between 128/192/256-bits key size. I assume that encryption should take more time with a 256-bits key, however even with a lot…
user4550490
1
vote
1 answer

What do Streams do when implementing AES encryption in .NET?

The Rijndael encryption algorithm is implemented in .NET using 3 streams in the following example: Rinjdael. Can someone explain to me what these streams are doing? How/Why are they used? // Declare the streams used // to encrypt to an in memory //…
Blankman
1
vote
1 answer

AES (rijndael) decryption

I have a Security class that Encode and Decode string, but when I try do decode - something going wrong. Here is my Security class: class Security { public static String encrypt(String imput, String key) { String cipherText; …
KAMAEL
  • 175
  • 2
  • 16
1
vote
1 answer

Decryption with invalid key not always throws CryptographicException

I'm using following settings for my crypto-service var cipher = new RijndaelManaged(); cipher.KeySize = 256; cipher.BlockSize = 256; cipher.Padding = PaddingMode.ISO10126; cipher.Mode = CipherMode.CBC; …
1
vote
1 answer

Create a Stream that encrypt data read

I'm trying to create a stream that receive an underlying stream in the constructor, and automatically encrypt data when we read it. The goal is that when we read from the EncryptingStream : - it read the underlying stream - it encrypt the bytes read…
Fabske
  • 2,106
  • 18
  • 33
1
vote
1 answer

Is this cryptography code secure?

The application that will use this code must be secure enough to encrypt confidential data at the level SECRET. I know that the rijndaelManaged class isn't FIPS approved but that doesn't affect the security, so I thought It would be fine to use…
javaseaayameradost
  • 119
  • 1
  • 3
  • 12
1
vote
1 answer

Variable Preventing More Text Being Appended To String?

I am so lost at the moment as to why I cannot get something so simple to work! I am decrypting a value & appending it to a string, E.g. MessageBox.Show("TEST 1: " & DecryptedValue & " WHY AM I BEING STRIPPED???") The problem is, anything after the…
Chris
  • 512
  • 1
  • 16
  • 33
1
vote
2 answers

Rijndael encrypt/decrypt outputs incorrectly

My structure for the c# encrypt/decrypt is as follows: Cipher: Rijndael (AES) Block Size: 128 bits (16 bytes) Mode: CBC (Cipher Block Chaining) Key: MD5 hash passphrase IV: Same as the key Data Encoding: Base64 Character UTF-8…
DT.DTDG
  • 765
  • 1
  • 13
  • 31
1
vote
1 answer

Encoding is producing different hashes each time

I have the following structure which I am using for my Encrypt function. I'm possibly missing something from the structure in my code as I'm a PHP guy rather than a C#. What's happening is that each time in my log the hash changes, which it…
DT.DTDG
  • 765
  • 1
  • 13
  • 31
1
vote
0 answers

SQL CLR Function to decrypting string value using RijndaelManaged

I'm trying to create a clr helper function to show the plain text values of some encryptyed data in our db. Below is the function, the decryption code you see (2nd and 3rd methods) are used successfully in non-clr code but here it is failing with…
danatcofo
  • 703
  • 8
  • 18
1
vote
2 answers

How can I encrypt with AES in C# then decrypt it on Perl?

Here is my C# code. How could I decrypt this in Perl? Or I cannot decypt it in Perl due to OpenSSL? RijndaelManaged RijndaelAlg = new RijndaelManaged(); FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate); byte[] initVectorBytes =…
Kelvin
  • 1,103
  • 2
  • 11
  • 16