Main Site Documentation

.NetMF 4.3 and G400 Chip Encrypting and Decrypting


#1

In the past i used Microsoft.SPOT.Cryptography.Key_TinyEncryptionAlgorithm which was in 4.1. In 4.3 I seems to be missing something. Is there a compatible XTEA crypto? I need it to be able to decrypt Data encrypted with 4.1 devices.
Simply:
How do I perform XTEA Encryption and Decryption on a G400 running 4.3?


#2

available in our utilities:

GHI.Utilities.Xtea
Namespace: GHI.Utilities
Assembly: GHI.Hardware (in GHI.Hardware.dll) Version: 4.3.4.0

follow the link to “GHI Extensions” on our support page:https://www.ghielectronics.com/support/netmf


#3

4.3.4.0 will drop very soon then ;D


#4

Thanks will do.


#5

In the past I used this:


private static readonly byte[] IntializationVector = new byte[] { 0, 0, 2, 2, 3, 4, 31, 25 };
//and
Key crypto = new Microsoft.SPOT.Cryptography.Key_TinyEncryptionAlgorithm(CryptoKey);
crypto.Encrypt(UnEncryptedBlocks, 0, 8, IntializationVector).CopyTo(CardBlocks, 20);

I don’t see a place to insert an Intialization Vector.

In GHI’s version what IV is used?


#6

@ mPatterson557 - The IV in 4.1 was something specific to Microsoft’s full crypto implementation. XTEA itself does not use an IV so our implementation does not either.


#7

Awesome thanks.


#8

The IV is a pretty critical part of symmetric encryption. I suggest that you tack one on manually if security is important.


#9

any thoughts on how to do that?