View previous topic :: View next topic |
Author |
Message |
mbates14
Joined: 08 Nov 2012 Posts: 10
|
Posted: Tue Mar 04, 2014 6:52 pm Post subject: |
|
|
Ok so what do I need to do to get this working? Im on a time crunch... |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Mar 04, 2014 9:32 pm Post subject: |
|
|
well i did send you the lib in the support ticket. just include it : $lib "xtea2.lbx" _________________ Mark |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Wed Mar 05, 2014 4:01 am Post subject: |
|
|
I did get it. I appreciate your effort to look into this issue, And it works perfectly fine. What did you have to do to fix it? I would like to know for future reference because I intend to build a RealBASIC/RealStudio app and possibly a VB6 app that uses XTEA as well.
Its just hard for me to understand how there can be so many different iterations and output results of what is supposed to be the same encryption. Eh... The joys of encryption. |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Wed Mar 05, 2014 4:32 am Post subject: |
|
|
The purpose for XTEA for me, is I am going to use it to encrypt UDP datagrams being sent from my phone to an AVR with the W5100, But not only that, I can send the encrypted XTEA firmware too.
Which the firmware side of it is taken care of with the compiler (using the old method), or write my own VB6 program to use XTEA in CBC mode to encrypt the firmware with a specific IV for each firmware push.
But I also am going to use it to send UDP datagrams to control the device. I havent decided what I am going to use for a key. Maybe make it dynamic with a master key xored with a timestamp. Ah... just rambling. lol. |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Wed Mar 05, 2014 1:54 pm Post subject: |
|
|
Is it possible to post the xtea2.lbx file in this thread or will I have to go through support?
I am also looking into adding this to my UDP app. The Android and VB6 will have to align as well.
I was just starting to create my project dir when this popped up.
Thanks,
Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Mar 05, 2014 3:37 pm Post subject: |
|
|
if you check the delphi code from the wiki pagelinks you can see that it did not implement it according the standard. and since i used the delphi code it also was wrong.
when i changed it to act according to the C code, i checked it with a java script which gave a wrong result. i then found out about the endian. it does not matter much , only when you code for different platforms. so i reversed byte order to make it compatible with the C code.
in the next update i will include the lbx and lib. i will not post the lbx here. support is only for the commercial version. _________________ Mark |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Wed Mar 05, 2014 4:10 pm Post subject: |
|
|
Mark,
Thanks for the explanation. I thought of the commercial aspect of it after I sent this message off.
I will contact support for the .lbx.
Thanks!!!
Mark |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Thu Mar 06, 2014 5:31 pm Post subject: |
|
|
Mark,
Thank you for sending me the xtea2.lbx lib.
Checking cross platform for commonality.
I notice in the bascom help for xteaencode and decode the key is listed as 128bits or 8 bytes.
Have I been looking at this too long? 128bits is 16bytes. Which is it?
Takes whatever for the key up to 128bits?
I have run the xtea.bas file modified to load the xtea2.lbx. It does work, I jsut don't have cross platform correlation yet.
Thanks,
Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Mar 07, 2014 12:59 pm Post subject: |
|
|
when you look at the example and the wiki, you can conclude it is 16 bytes. i have changed it. (the 8 bytes came from the block size). _________________ Mark |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Sun Jan 11, 2015 4:46 pm Post subject: |
|
|
Unrelated: I cant seem to find a library that handles the encryption/decryption for VB6. Has anyone worked on one, or has one?
thanks. |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Mon Jan 12, 2015 3:54 am Post subject: |
|
|
I never figured out how to get it going in VB6, so i ended up writing my own obfuscated encryption algorithm from scratch using simple xor, but with a password the same length as the message.
128K of flash memory, 128K of password, but its the algo that generates the password on the fly using a single 128-byte seed. |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Tue Jan 13, 2015 10:53 pm Post subject: |
|
|
I wrote a TEA encyptor/decryptor in VB5 some years ago, based on stuff I found on the net. Probably works in most flavours of VB. Dont know if its compatible with Marks implementation in AVR, but if not, its probably only a matter of changing the constants. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Sun Jul 30, 2017 3:29 am Post subject: |
|
|
AdrianJ wrote: | I wrote a TEA encyptor/decryptor in VB5 some years ago, based on stuff I found on the net. Probably works in most flavours of VB. Dont know if its compatible with Marks implementation in AVR, but if not, its probably only a matter of changing the constants. |
Forgot to mention, this VB5 project is missing the Form which I assume it contained the TEA functions? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sun Jul 30, 2017 10:16 am Post subject: |
|
|
this is not about bascom. you should post on some other forum. _________________ Mark |
|
Back to top |
|
|
|