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
2
votes
0 answers

C# Encryption using RijndaelManaged - Save file in base64 format

Scenario - I have multiple files on my server and as per policy we can keep only encrypted files. We are doing some data migration, for this we have to move these files on to cloud and as per documentations Base64 is the best way to transfer…
Ajay
  • 783
  • 3
  • 16
  • 37
2
votes
1 answer

Encrypt/Decrypt Stream in C# using RijndaelManaged

I am trying to encrypt a Generic Stream in C#. Although the program has no problems, the encryption and decryption return blank when converted to strings. Any help is appreciated. public byte[] AES_Encrypt(byte[] bytesToBeEncrypted, byte[]…
user6437314
2
votes
2 answers

C# Private/Public Encryption using AES

I am trying to figure out how to make public/private keys that are AES encrypted. I'd like to be able to use it like so: byte[] BytesToEncrypt = { 0x01, 0x02, 0x03, 0x04, 0x05 }; byte[] PublicKey; byte[] PrivateKey; byte[] EncryptedBytes; byte[]…
Icemanind
  • 47,519
  • 50
  • 171
  • 296
2
votes
1 answer

Is RijndaelManaged key length the same as AES[key length]?

RijndaelManaged is an algorithm while AES is the standard. When referring to AES256, does that mean the key length I'm using with RijndaelManaged must be 256 characters? If I have a key like this: key = "mytestkey"; which is only 9 characters,…
4thSpace
  • 43,672
  • 97
  • 296
  • 475
2
votes
1 answer

Why is cipher text returned from RijndaelManaged different each time?

I would like to use RijndaelManaged to encrypt a string with any salting so if I pass encrypt a string using the same key I will receive the same cipher text back. The method I am calling looks like this public static string…
etoisarobot
  • 7,684
  • 15
  • 54
  • 83
2
votes
3 answers

Converting the Rijndaelmanged() byte[] to a string

I want to convert the Rijndaemanaged() encrpted value to a string. Will ToBase64String() suffice? It says its only for 8-bit arrays, but AES is 128 bit right? Update For the encrption, I am using the code from…
Blankman
2
votes
4 answers

Encrypting Files with AES, Encrypting Key with RSA - Am I on the right track?

Overview: I'm trying to design an application that will encrypt files to safely send through Snail Mail (LARGE sets of data). I'm planning on using AES/RijndaelManaged encryption from .Net to encrypt the files initially, using a randomly generated…
Shawn Steward
  • 6,773
  • 3
  • 24
  • 45
2
votes
1 answer

PHP & C# compatible Rijndael managed CBC mode, 256 bit encryption/decryption

This is my very first attempt at cryptography and I am having trouble with porting the encryption from PHP to C#. I had searched the internet for a working solution to my problem but everything I have tried does not work. I am getting different…
2
votes
1 answer

Bad PKCS7 Padding error: Invalid length 106

I'm trying to encrypt and decrypt with the following functions, however, it results in a bad padding error. If I set PaddingMode to None it returns some alpha characters and random symbols in Log. I'm possibly missing something from setting the…
DT.DTDG
  • 765
  • 1
  • 13
  • 31
2
votes
3 answers

PHP equivalent to Rijndael AES encryption/decryption in .Net?

Is there an equivalent functions in PHP that will allow interoperability with the .Net Rijndael AES encryption/decryption? (The encryption .Net code is below). Basically, if I encrypt in .Net can I decrypt in PHP and vice-versa? string outStr =…
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
2
votes
1 answer

Powershell and AES: If the Salt and IV are both fixed or known, is the encryption inherently unsafe or easier to crack?

I have recently been using this script to do some data encryption for a different script that I will later on be passing to other users, and I'm currently using a fixed IV and Salt. The reason I am currently using a fixed Salt and IV is that the…
DeliciousFish
  • 48
  • 1
  • 8
2
votes
1 answer

"Length of the data to decrypt is invalid" when string > 751 characters

I get the following exception when decrypting a string, but it only occurs when the original string (before encryption) is > 751 characters. It didn't have any problems encrypting. How can I avoid this…
Mr Shoubs
  • 14,629
  • 17
  • 68
  • 107
2
votes
1 answer

ASP.NET Rijndael Encryption Error - Specified key is not a valid size for this algorithm

I can't seem to get past this problem, I've created what I assume to be a 256-bit key using the random generator at GRC and combined that with my IV. I keep getting the error below: Specified key is not a valid size for this algorithm. Any help is…
Chris
  • 1,324
  • 5
  • 18
  • 29
2
votes
1 answer

Missing argument while converting RijndaelManaged in java

while converting a .net code of decryption to java I got an exception Exception in thread "main" java.lang.IllegalArgumentException: Missing argument at javax.crypto.spec.SecretKeySpec.(DashoA13*..) at…
Sinha
  • 773
  • 2
  • 16
  • 34
2
votes
1 answer

How do I decrypt this RijandelManaged in ruby, from C#?

static byte[] keyBytes = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 …
fregas
  • 3,192
  • 3
  • 25
  • 41