rijndael

How to decode Rijndael in ruby (encoded in VB.net)

Hello, I am using Rinjael to encode in VB.NET and need to decode in Ruby. My VB.NET encryption class looks like this: Private Class Encryptor Private symmetricKey As System.Security.Cryptography.RijndaelManaged Private iVector As Byte() Private Key As Byte() Public Function encrypt(ByVal data As String) ...

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 = mcrypt_generic($cp, $content); echo base64_encode($key)."\n"; echo base64_encode($iv)."\n"; echo base64_...

SlowAES cannot decrypt properly without original size...

Hello, First time poster here. Awesome community here. After endless hours of searching, I'm unable to figure out the answer to this problem I"m facing. First and foremost, I'm no guru when it comes to encryption/decryption, cryptology, etc. I only want to go so far in this realm without getting lost. The primary framework I code on i...

I need to encrypt the names of my http form elements

I have a form with certain elements, input boxes, check boxes etc. I need to encrypt the names of these input boxes and check boxes. I'm currently using a Rijndael encryption/decryption method through c# however this is making the encrypted names too long to be passed in a post. Is there a better way to get decent encrypted names? my pur...

AES/Rijndael implementation for SQL Server 2000?

Do you know any function implementation I could use for decrypting data encrypted by AES/Rijndael in SQL Server 2000? ...

How can I retain carriage returns when I'm encrypting data?

I have this following setup, a textarea named with some data in it that may have carriage returns and another textarea that has style='display:none' in order to make it hidden as follows: <textarea id="myTextarea" onBlur="encryptMyData()"></textarea> <textarea name="encryptedText" style='display:none'></textarea> the user enters data ...

Rijndael encryption from Action Script to C#

I am trying to share encryption between Action Script and C# My task is to decrypt the following message within C# f1ca22a365ba54c005c3eb599d84b19c354d26dcf475ab4be775b991ac97884791017b12471000def05bb77bfe9c3a97d44ef78c9449f12daf6e25b61ab1a281 It uses Rijndael encyption , ECB mode (electronic code book), Key: Pas5pr@se , 128 bit key s...

rijndael encryption - only part of the string is decrypted.

Only part of the string is getting decrypted, i think it has to do with my encoding. Here is what happens: string s = "The brown fox jumped over the green frog"; string k = "urieurut"; string enc = EncryptString(s, k); string dec = DecryptString(enc, k); The RESULT is this: The brown fox juϼ㴘裴혽Ή⪻ㆉr t...

System.Security.Cryptography.CryptographicException: Length of the data to decrypt is invalid Error

I used the code on http://www.obviex.com/samples/Encryption.aspx for encryption/decryption. I was successful in creating a simple test to functionality encrypt and decrypt data. However, I keep on getting the following error when I test the decrypt function that is used from the Accounts Controller. I am thinking it either has to do w...

C# Public Key verify Perl Private key and use as AES key ? Possible and/or viable ?

Hi, i was thinking if it is possible and/or viable for obfuscation and security to do as the follow: Client start session with Server (which means a valid login and password was sent and accepted) Server encrypt a random password with it is Private Key that will then be used into a data encryption using Rijndael's method and send both...

Store IV and Key for Rijndael

I need to store username and password in an app.config. I want to encrypt these values using Rijndael algorithm. Where do I store the key and IV for decrypting the un and pw? I need to deploy the application to different servers with different users. ...

PHP AES decryption

Hi All, I'm really struggling to decrypt a given cipher text in PHP and I'm hoping that one of you will be able to spot where I'm going wrong with this one. So this is the string I'm trying to decode Wq+J2IlE7Cug1gJNiwy1beIcFggGhn+gZHkTCQ4J/DR3OY45OMs4RXN850xbfAmy I know its encrypted with AES/CBC/PKCS5Padding with an IV of 2ZqVSH...

how to call RijndaelAlg.CreateEncryptor in C# correctly when saving lots of independent files

In my situation I have a number of files that will be stored on a server. Each of these files is created by a C# application that I am writing. background: For this application, the amount of time needed to encrypt isnt important, the files tend to be small and we've got plenty of CPU cycles to spare (the client is the only computer ...

Rijndael decryption in C#

I need to decrypt a string using Rijndael and those values: key size - 192 block size - 128 key - cmdAj45F37I5ud2134FDg2fF When I'm using the code below I get an error : string size illigle, can anyone help me? public static string DecryptRijndael(string value, string encryptionKey) { var key = Encoding.UTF8.GetBytes(en...

.NET AES/Rijndael — inconsistent decryption when reusing decryptor

I've created a class for encrypting and decrypting using AES. public class AesEncryptionProvider { #region Fields // Encryption key private static readonly byte[] s_key = new byte[32] { // Omitted... }; // Initialization vector private static readonly byte[] s_iv = new byte[16] { // Omitted... ...

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. ...

Rijndael 256 Encrypt/decrypt between c# and php?

UPDATED I have made the changes to the C# code so it uses a block size of 256. but now the hello world looks like this http://pastebin.com/5sXhMV11 and I cant figure out what I should use with rtrim() to get ride of the mess at the end. Also when you say the IV should be random, by this do you mean don't use the same IV more then once ...

Rewrite Rijndael 256 C# Encryption Code in PHP

I have an encryption/decryption algorithm written in C# - I need to be able to produce the same encryption in PHP so I can send the encrypted text over HTTP to be decrypted on the C# side. Here is the C# code for the encryption. this.m_plainText = string.Empty; this.m_passPhrase = "passpharse"; this.m_saltValue = "saltvalue"; this.m_has...

Delphi AES library (Rijndael) tested with KAT Vectors

Hi, for these 2 libraries, Delphi Encryption Compendium v 5.2 TurboPower Lockbox v 2.07 I tested their Rijndael DCB/CBC algorithm with "AES Known Answer Test (KAT) Vectors" obtained at NIST website (http://csrc.nist.gov/groups/STM/cavp/index.html) But, both of these libraries failed the tests. Not sure if it was my testing that has...

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 space. Anyway, I plan on encrypting the cookie contents using RIJNDAEL 256. function encrypt($text, $...