|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Rijndael in ASP.NET and DelphiWho can help? I'm trying to implement an encrypted (plain text)
communication between a Delphi application and an ASP.NET. My choice is AES/rijndael-128. For both sides, i use standard modules: Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component Library v2) from cityinthesky (www.cityinthesky.com) ASP.NET : Standard library of Rijndael both sides are working, BUT they do different! The results in encryption and decryption do not match when i use same keys. now i've no clue what i am doing wrong. Anyone out there who can give me the right hint??
Show quote
On Nov 29, 6:57 am, "Iwan Budihalim" <iwan_budiha***@visuallabs.net> The first thing to do is find a third implementation - that way youwrote: > Who can help? I'm trying to implement an encrypted (plain text) > communication between a Delphi application and an ASP.NET. My choice > is AES/rijndael-128. For both sides, i use standard modules: > > Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component > Library v2) from cityinthesky (www.cityinthesky.com) > > ASP.NET : Standard library of Rijndael > > both sides are working, BUT they do different! The results in encryption > and decryption do not match when i use same keys. now i've no clue what > i am doing wrong. > > Anyone out there who can give me the right hint?? can easily find out which of your current implementations is broken. Then it would help if you could post the C# code. It's easy to mess up using encryption. Jon On Wed, 28 Nov 2007 08:03:24 -0800 (PST), "Jon Skeet [C# MVP]"
<sk***@pobox.com> wrote: >The first thing to do is find a third implementation - that way you Try Bouncy Castle: http://www.bouncycastle.org/csharp/>can easily find out which of your current implementations is broken. I use their Java crypto library and it works very well. rossum Hi Iwan,
I don't know the answer to your question, but have you considered doing the Delphi side via a COM exposed C# dll. We have just starting doing this to gain access to the .NET database libraries from Delphi and it is proving very successful. Cheers Doug Forster Show quote "Iwan Budihalim" <iwan_budiha***@visuallabs.net> wrote in message news:ebGIZZdMIHA.4476@TK2MSFTNGP06.phx.gbl... > Who can help? I'm trying to implement an encrypted (plain text) > communication between a Delphi application and an ASP.NET. My choice > is AES/rijndael-128. For both sides, i use standard modules: > > Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component > Library v2) from cityinthesky (www.cityinthesky.com) > > ASP.NET : Standard library of Rijndael > > both sides are working, BUT they do different! The results in encryption > and decryption do not match when i use same keys. now i've no clue what > i am doing wrong. > > Anyone out there who can give me the right hint?? > I think, i better share the library so they can read between C# and Delphi.
Show quote "Doug Forster" <nobody@nowhere,com> wrote in message news:Oo8c6FfMIHA.5244@TK2MSFTNGP03.phx.gbl... > Hi Iwan, > > I don't know the answer to your question, but have you considered doing > the Delphi side via a COM exposed C# dll. We have just starting doing this > to gain access to the .NET database libraries from Delphi and it is > proving very successful. > > Cheers > Doug Forster > > "Iwan Budihalim" <iwan_budiha***@visuallabs.net> wrote in message > news:ebGIZZdMIHA.4476@TK2MSFTNGP06.phx.gbl... >> Who can help? I'm trying to implement an encrypted (plain text) >> communication between a Delphi application and an ASP.NET. My choice >> is AES/rijndael-128. For both sides, i use standard modules: >> >> Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component >> Library v2) from cityinthesky (www.cityinthesky.com) >> >> ASP.NET : Standard library of Rijndael >> >> both sides are working, BUT they do different! The results in encryption >> and decryption do not match when i use same keys. now i've no clue what >> i am doing wrong. >> >> Anyone out there who can give me the right hint?? >> > > Iwan Budihalim wrote:
Show quote > Who can help? I'm trying to implement an encrypted (plain text) Same key size ? Same key ? Same iv ? Same sequences of update> communication between a Delphi application and an ASP.NET. My choice > is AES/rijndael-128. For both sides, i use standard modules: > > Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component > Library v2) from cityinthesky (www.cityinthesky.com) > > ASP.NET : Standard library of Rijndael > > both sides are working, BUT they do different! The results in encryption > and decryption do not match when i use same keys. now i've no clue what > i am doing wrong. > > Anyone out there who can give me the right hint?? and final calls ? Arne Iwan Budihalim wrote:
Show quote > Who can help? I'm trying to implement an encrypted (plain text) If you post encryption of "This is a test" from both in hex or base64,> communication between a Delphi application and an ASP.NET. My choice > is AES/rijndael-128. For both sides, i use standard modules: > > Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component > Library v2) from cityinthesky (www.cityinthesky.com) > > ASP.NET : Standard library of Rijndael > > both sides are working, BUT they do different! The results in encryption > and decryption do not match when i use same keys. now i've no clue what > i am doing wrong. > > Anyone out there who can give me the right hint?? then we could compare. Arne On Wed, 28 Nov 2007 22:57:26 -0800, "Iwan Budihalim"
<iwan_budiha***@visuallabs.net> wrote: Show quote >Who can help? I'm trying to implement an encrypted (plain text) Just a thought, have you tried the official test vectors in FIPS 197:>communication between a Delphi application and an ASP.NET. My choice >is AES/rijndael-128. For both sides, i use standard modules: > >Delphi: TDCP_rijndael Component (DCPcrypt Cryptographic Component >Library v2) from cityinthesky (www.cityinthesky.com) > >ASP.NET : Standard library of Rijndael > >both sides are working, BUT they do different! The results in encryption >and decryption do not match when i use same keys. now i've no clue what >i am doing wrong. > >Anyone out there who can give me the right hint?? > http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf You can play with both your implementations until you get the right results from both of them. For AES-128 (10 rounds) the official test vectors are: PLAINTEXT: 00112233445566778899aabbccddeeff KEY: 000102030405060708090a0b0c0d0e0f CYPHERTEXT: 69c4e0d86a7b0430d8cdb78070b4c55a rossum |
|||||||||||||||||||||||