This post is dedicated to friends who want to quickly access xxtea's encryption. It's a very simple combination, and in five minutes it's going to take you from the door to the practice, and it's going to make encrypted decryption accessible。
Xxtea (extended extened tiny enrichption agorithm) is a lightweight symmetric cluster encryption algorithm introduced in 1998 by david wheeler and roger needham to improve the security of their predecessor tea and xtea algorithms。
Core characteristics: achieving simplicity, code refining, efficient implementation, well suited to resource-limited environments, such as embedded systems, physical networking devices or basic protection of scripts, configuration documents。
The algorithm uses 128 keys, using a feistel structure, to confuse and diffuse data through multiple rounds (usually 6+52/n wheel, n is the number of data blocks) by adding, moving and differentiating or operating (which core confusion calculations are commonly defined as mx macros), and can process data blocks of any length, not just fixed size。
Caution: because its design weighs security and efficiency, xxtea applies to the encryption needs of data in general, but is less robust than more modern algorithms such as aes in the face of very high security requirements。
Example of luatos development: this paper will use the air 780epm development board as an example of sharing how data encryption and decryption using xxtea algorithms can be done through extremely simple api in luatos。
Example of xxtea application
The air780epm application example is continuously updated and the core function of this example demo is to encrypt and decrypt data using xxtea encryption algorithms。
Recent example source code:
For more details on the course:
01. Code elements resolution
Xxtea demo. Lua example codes are described below, and complete demo details are provided in the latest file of the source repository。
Start the co-ordinated process and then determine whether xxtea's library exists and the data to be encrypted is "hello world!" and the key is "07946". Encryption is followed by tohex(), which is shown in 16 digits; then the encrypted data is decrypted, which is also shown in 16。

Examples of running results
Air780epm development boards are used to burn the nuclear solids and demo script codes through luatools, which are successfully opened to view the results。

In which the decrypted data is converted through a 16-digit spin string, the original "hello world!"
Test tool for 16-plus transformation strings:











