FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » C# RijndaelEnhanced decrypt with php mcrypt
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: C# RijndaelEnhanced decrypt with php mcrypt [message #174066 is a reply to message #174048] Fri, 20 May 2011 22:39 Go to previous messageGo to previous message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma:
Member
In article <4dd63095$0$6547$9b4e6d93(at)newsspool4(dot)arcor-online(dot)net>,
Heiko GreenRover Henning <greenrover(at)arcor(dot)de> wrote:

> hi
>
> i have a C# .net app with i decompiled. This app uses for login password
> cryption:
> http://www.obviex.com/samples/Sample.aspx?Source=EncryptionWithSaltCS&T itle=En
> cryption%20With%20Salt&Lang=C%23
>
> C# Code
> rijndaelKey = new Krypto.RijndaelEnhanced(passPhrase, initVector);
> PlainPassword =
> DiverseVariablen.rijndaelKey.Decrypt(Conversions.ToString(row["ProjectKennwort
> "])))
>
>
> I have pass and iv.
>
> How can i decrypt the passwords in php? I tryted allready several
> variants of mcrypt_decrypt().
>
> Didt somene have a idea?
>
> Wha i dont understand is that the iv has 16 chars but it should be an
> 256b encryption with normaly depends a 32chars iv.
>
> I also allready tryed a http://phpseclib.sourceforge.net/ for decryption
> without any success.
> http://pastebin.com/SKPG7gR2
>
> Friendly regards and big thanks.

http://www.obviex.com/samples/EncryptionWithSalt.aspx

shows that the encryption code in C# is a "built-in" using the
Rijndael/AES symetrical encryption algorithm.

php has the crypt() function which is really a 1-way hashing algorithm.
You can encrypt text but cannot decrypt it. Checking for a valid match
involves taking the supplied password, text, and salt, running it
through the crypt() function and comparing the encrypted results. If
they match, then you have the right password. AFAIK, there's no
built-in implementation of the same sort of encryption as in the C#
implemntation.

My guess is you are going to have to modify the C# code to do a
php-compatible encryption. You probably won't find a php implementation
of the C# code unless you write it yourself.

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: urgent
Next Topic: is dis da place?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 05:46:24 GMT 2024

Total time taken to generate the page: 0.04032 seconds