LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Tiny Encryption Algorithm, trouble with string to byte to unsigned 32 conversions based on my understanding of C source code.

I am working to implement the Tiny Encryption Algorithm. I have attached work in progress. In C (attached code) the algorithm takes an unsigned long section of the text input and encrypts it. I am trying to use the string to byte array and then process 4 bytes at a time of type U32 in a for loop. I do not know how to represent the 4 ascii bytes as an usigned 32 bit integer. Please look at the VI work in progress. Would appreciate any explanation as to how to access the data in a loop/how to implement C algorithm in Labview.

Thanks.
0 Kudos
Message 1 of 4
(4,087 Views)
Just typecast your string into an U32 Array (Pad first if string size is not a multiple of four). The rest will fall into place.

See attached example.
0 Kudos
Message 2 of 4
(4,087 Views)
Hi Bernie;

I succesfully implemented the TEA algorithm in LabVIEW and is part of the Crypto-G library. For more information about Crypto-G, check http://www.visecurity.com/cryptg.shtml

Regards;
Enrique
www.visecurity.com
www.vartortech.com
0 Kudos
Message 3 of 4
(4,087 Views)
Thanks for the help, problem solved.
0 Kudos
Message 4 of 4
(4,087 Views)