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

Specified initialization vector (IV) does not match the block size for this algorithm (Microsoft Example)

I copied the code from here and i changed something that's not crucial and I now get this error: Specified initialization vector (IV) does not match the block size for this algorithm byte[] publicKey =…
Susta250
  • 109
  • 3
1
vote
4 answers

Why can't C# decrypt the output from Perl's Crypt::Rijndael?

A file has been encrypted by Perl. Initial decrypt attempts failed and I am now trying to ascertain whether there is any hoojoo going on (some other settings required) Duff Perl Code: use strict; use Crypt::Rijndael; my $key ='...'; my $rcipher =…
David Christiansen
  • 5,869
  • 2
  • 36
  • 42
1
vote
0 answers

Encrypted in C#. Need decryption in NodeJS

I barely have any knowledge on c#. I have a scenario where I have encryption and decryption in c# as follows. But, I want to implement same decryption in NodeJS. Can anyone help me in figuring this out. Here's the salt and secret keys private static…
prashanth
  • 19
  • 4
1
vote
2 answers

Decrypt Access token using PHP for C# Encryption

I have an API URL with specific access token which was encrypted with C#(Below Code) and I want to Decrypt it using PHP post request by passing access token to parameters. Can anyone help me out to solve this problem. Thanks in Advance!! C# Code for…
1
vote
0 answers

Padding is invalid and cannot be removed - randomly thrown by RijndaelManaged

I have searched for a good plain text file encryption in C# and came across a post on SO and have been using it for a while now. I don't remember the original post I got the code from; but here's the copy of the original code, slightly modified for…
Latheesan
  • 23,247
  • 32
  • 107
  • 201
1
vote
0 answers

RijndaelManaged - Padding is invalid and cannot be removed in C#

I am getting following error Padding is invalid and cannot be removed however, I have checked during debugging that all properties were same in encryption and decryption i.e; BlockSizeValue = 128, InputBlockSize = 16, OutputBlockSize = 16,…
Mangrio
  • 1,000
  • 19
  • 41
1
vote
1 answer

rijndael aes turkish character not displayed (classic asp)

Response.LCID = 1055 Response.Codepage = 65001 Response.Charset = "utf-8" knm = "ışöçü" sss = "asd" enc = AESEncyptString(knm,sss) dec = AESDecyptString(enc,sss) response.write(dec) Results = ????? I tried it with Base64. …
1
vote
1 answer

Why AesManaged.FeedbackSizeValue = 8 when AesManaged.FeedbackSize = 128

I wish to explicitly set the encryption parameters (as read from .NET 4.7 defaults) so as to avoid decryption difficulties later down the line when future framework versions implement different defaults. Why is it that after manually setting the…
golfalot
  • 956
  • 12
  • 22
1
vote
1 answer

openssl returns Bad Magic Number

In my Linux machine i have a binary AES encrypted file: head -c 100 Leela_Turanga.plr �|�XѨ��>��c��N�Ώڤ�LW�M��t�p5=c.4���ᑸ�#Owl����M�d��>�ٷa�L�r|��ć�ڐ,��:����#�����\ Also i know that the file has been encryped using the password: h3y_gUyZ I am…
1
vote
1 answer

Strange behaviour during RijndaelManaged construction

I've noticed the following strange behaviour in the following code, if I set the Key in an object initializer it generates a random key and doesn't set my key. Is this a glitch? var algorithm = new RijndaelManaged { Mode = CipherMode.CBC, …
drowhunter
  • 371
  • 2
  • 12
1
vote
0 answers

Encrypting & Decrypting a String in C# - Issues from some networks

Firstly, apologies if this is the wrong place to post this question but I couldn't comment on a previous answer to ask this. I have inherited a site that already has an encryption / decryption method built in, with a comment that says the methods…
1
vote
2 answers

IV Block Size Issue with RijndaelManaged in C#

I am having trouble with this code to encrypt a string using RinjndaelManaged. I kept getting the error "Specified initialization vector (IV) does not match the block size for this algorithm" and have matched the key and IV length and tried a 32…
joel
  • 157
  • 1
  • 8
1
vote
1 answer

knowing salt that used when encryption AES 256

I have a password like "abd123456", that I encrypt with AES-256 encryption. After Base-64 encoding, the result would be the 44 character string: IXCgaa5igYxzKTRTP+PMT7Bt9iIWiF6EWLmnKqZtlXI= How can I know the salt that the .NET Framework's…
1
vote
2 answers

C# Rijndael Encryption not accepting any Key except "mykey123"

I found this script on http://www.codeproject.com/Articles/26085/File-Encryption-and-Decryption-in-C. It works fine when I use the static key // string password = @"myKey1234"; // Your Key Here. when I pass in a different key, it doesn't work string…
IBM
  • 252
  • 1
  • 12
1
vote
2 answers

AES Encryption using RijndaelManged Class: Baes64 encoding and decoding aes encryption string

So, I am having an issue with decrypting the decoded base64 aes string. Is this possible? I wrote a small console program to work this out but no luck. Here is my example: As depicted, I have successfully converted the base64 back the aes encrypted…
Joseph Freeman
  • 1,644
  • 4
  • 24
  • 43