The present application relates to the technical field of
information security, and more particularly to a lightweight
encryption and decryption method, comprising: obtaining sensor continuity binary
data stream and dividing it into
fixed length packets; calling pre-generated round key sequence and whitening key, wherein the round key sequence is generated by main key shift operation and round constant iteration; performing XOR operation on the packet data and the whitening key to output initial
confusion data; dividing the initial
confusion data into four equal length subsegments to perform multi-round iteration
processing, each round including 16-bit modulo addition operation and fixed bit
cyclic shift; performing XOR operation on the shifted data and the current round key, updating the subsegment state according to a preset
branch processing rule, and performing linear transformation on the updated state using a self-inverse matrix; splicing the subsegments output in the last round into
ciphertext and transmitting to an execution mechanism; and calling the round key sequence in reverse direction during decryption, performing inverse transformation and
inverse operation using the self-inverse matrix to restore the
original data. The present application solves the problem of high
encryption delay of industrial
control equipment.