Encrypting and Decrypting Data

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Protect your application data with .NET Micro Framework encrypting and decrypting capabilities. You can choose to implement secure keys, digital signing, and built-in cryptographic capabilities to create custom encryption. This overview guides you through use of the cryptography API.

Encryption and Decryption in the .NET Micro Framework

Your application may have data that it needs to protect. For example, if your hardware device transmits personal information across an unsecure link, it would most likely encrypt the data before transmission.

The .NET Micro Framework currently supplies classes that implement two encryption algorithms. The first of these is the RSA algorithm, which is named after its three inventors: Ron Rivest, Adi Shamir, and Len Adleman. The framework implements this algorithm in the Key_RSA class. This algorithm implements public and private keys and is highly secure. You can also use it as a method of digitally signing messages and data.

The second encryption algorithm provided by the .NET Micro Framework is the Extended Tiny Encryption Algorithm (XTEA). It performs simple symmetric encryption and decryption of data in a cipher-block chaining (CBC) mode with ciphertext stealing. The framework implements XTEA in the Key_TinyEncryptionAlgorithm class.

Extending the Cryptographic Capabilities of the .NET Micro Framework

If you decide that your application needs a cryptographic method that is not currently supported by the .NET Micro Framework, you can implement that method yourself. To do this, derive a custom class from the Key class provided in the Microsoft.SPOT.Cryptography namespace. At the minimum, your custom class needs to override the Key.Encrypt and Key.Decrypt methods.