Questions tagged [rijndael]

Rijndael is a block cipher that won the Advanced Encryption Standard competition. A subset of it was standardized as AES (FIPS 197) in October 2000.

Rijndael is a variable blocksize (only 128 bits standardized in AES), variable keysize (only 128,192 and 256 bits in AES) block cipher. The number of rounds is key-size dependent.

Rijndael is not widely supported, most cryptography libraries supporting only the AES subset. The exception being the .NET platform which supports more block sizes. Keep in mind that using a non AES compatible blocksize/keysize combination can lead to interoperability nightmare and that the security of Rijndael hasn't been widely studied outside of the AES subset.

https://learn.microsoft.com/en-us/archive/blogs/shawnfa/the-differences-between-rijndael-and-aes explains the difference between the AES standard, .NET implementation and the original Rijndael cipher.

430 questions
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
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
3 answers

Encryption function gives different output on windows and unix

I have an encryption tool written in C# that take a string as input. When i run the compiled exe file on my windows machine i get an output that is different from when i run it on the remote UNIX server using mono. Here is an…
user735247
  • 113
  • 1
  • 7
7
votes
5 answers

Is RIJNDAEL encryption safe to use with small amounts of text given to users?

I am thinking about making the switch to storing session data in encrypted cookies rather than somewhere on my server. While this will result in more bandwidth used for each request - it will save extra database server load and storage…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
7
votes
2 answers

How does RFC2898DeriveBytes generate an AES key?

I saw some code like string password = "11111111"; byte[] salt = Encoding.ASCII.GetBytes("22222222"); Rfc2898DeriveBytes key = new Rfc2898DeriveBytes(password, salt); RijndaelAlg.Key = key.GetBytes(RijndaelAlg.KeySize / 8); I can see the key is…
Kelvin
  • 1,103
  • 2
  • 11
  • 16
6
votes
2 answers

How to encrypt or decrypt with Rijndael and a block-size of 256 bits?

For certain reasons I need to implement Rijndael de/compression with a blocksize of 256 bits instead of AES which uses a block size of 128 bits (reason: data is encrypted in PHP using Rijndael...). How can I change the block-size for a cipher? If i…
Laures
  • 5,389
  • 11
  • 50
  • 76
6
votes
2 answers

Rijndael key size in C#

I'm currently developing a little tool in C# that allows me to quickly crypt my files. So I used this script which looks to be perfect for me. But I still have a problem : the key is too short (8 character max). I read in RijndaelManaged()…
user6248151
6
votes
1 answer

Crypto++ pbkdf2 output is different than Rfc2898DeriveBytes (C#) and crypto.pbkdf2 (JavaScript)

So I'm trying to use PBKDF2 to derive a key given a base64 string of 256bits. I am able to use C#'s Rfc2898DeriveBytes and node-crypto's pbkdf2 to derive the same key, however, I can't say the same for C++. I'm not sure if I'm doing wrong…
Chebn
  • 63
  • 1
  • 5
6
votes
1 answer

Cannot decrypt data with C# that was encrypted using PHP (Rijdael-128)

I decrypt data using PHP with this code: $content="1234"; $cp = mcrypt_module_open('rijndael-128', '', 'cbc', ''); $iv = mcrypt_create_iv(16, MCRYPT_RAND); $key = pack("H*",md5('a')); mcrypt_generic_init($cp, $key, $iv); $encrypted =…
Alexander Reifinger
  • 512
  • 1
  • 4
  • 18
6
votes
1 answer

How can I encrypt and decrypt using AES 128 without an IV?

I'm currently needing a way to encrypt a string and decrypt a byte array using AES-128 symmetrical encryption, in C#. I can't find a way how to do this, but maybe I've missed something.
kdh
  • 927
  • 1
  • 8
  • 18
5
votes
1 answer

Python equivalent of PHP's MCRYPT_RIJNDAEL_256 CBC

I need a Python implementation of this function - I want to use it on appengine. I am not so good in Python so please help. function encrypt($data) { return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256 ,'oqufXQ(?bc=6_hR2I3sMZChDpb6dDlw4',…
user80287
  • 560
  • 3
  • 11
  • 17
5
votes
3 answers

Rijndal Algorithm using C#

I want the code of Rijndael algorithm to encrypt any given text to store it in a database, I also want to know how to reverse the encryption method, ie: decrypt the encrypted text to use it.
sikas
  • 5,435
  • 28
  • 75
  • 120
5
votes
4 answers

PHP Encryption & VB.net Decryption

I'm trying to do a simple task. Encypt a value in PHP and Decrypt it in my VB.net app. I figure I'd use tripleDES or Rijdael 128 or 256 I though this should be simple. Can anyone point me in the right direction? Thank you
shaiss
  • 2,000
  • 5
  • 22
  • 33
5
votes
2 answers

Delphi program using DCPcrypt does not decrypt from PHP after upgrade to XE2

I have an application developed in Delphi 2007 in which a value is encrypted by PHP and decrypted in the application. Encryption algorithm is RIJNDAEL 128. When I moved the XE2 and installed the latest version of DCPcrypt the application run but…
user1231791
  • 185
  • 3
  • 12
5
votes
0 answers

Rijndael 128 Encrypt/decrypt between vb.net and php

EDIT: sorry for this question, i solved it immediately by myself ... the only thing i had to do was to set the padding to zeros: aes.Padding = PaddingMode.Zeros i am trying to encrypt the traffic between my VB.Net Application without SSL (cause the…
user1543123
  • 51
  • 1
  • 4
1
2
3
28 29