block TEA in c#

3.3k Views Asked by At

Using block tea (XXTEA), how can I convert encrypted text into human readable form?

string encryptedText = "ASDFSDAFSADFSDFSDFSDAF"; (assume it is in correct format)

I have the key/pwd also.

3

There are 3 best solutions below

0
casperOne On

There is a Visual Basic implementation of the block tea algorithm here:

http://www.blog-dotnet.com/post/Tiny-Encryption-Algorithm-(TEA)-in-Visual-BasicNET.aspx

Block tea is meant to be easily implementable, so you shouldn't have a hard time converting that to C# (or compiling it into a .NET assembly with VB and then referencing it from .NET).

You should use the above as a base and then modify it as per the XXTEA algorithm, found here:

http://en.wikipedia.org/wiki/XXTEA

Again, it's meant as being easy to implement, so you shouldn't be too hard. If there are specific parts you are having issues with, please make sure to follow up.

0
AudioBubble On

Edit1: Core XTEA algorithm in C# with other parts in VB.NET at CodeProject

Tiny Encryption Algorithm and XTEA for the Compact Framework at CodeProject

Here is a JavaScript Implementation of the XXTEA algorithm and here.

Here is a Pascal implementation of all of them.

With all the other answers you should be able to put an implementation together. Once you do it, make a blog or report back here so it is recorded for the next guy!

0
AlignedDev On

I found this https://github.com/WooCode/xxTea which is a C# implementation, with unit tests provided. I haven't verified it's accuracy.