The invention relates to the technical field of
information security, in particular to a lightweight
encryption and decryption method, which comprises the following steps: acquiring a continuous binary
data stream of a sensor and segmenting the continuous binary
data stream into fixed-length groups; calling a pre-generated round key sequence and a whitening key, wherein the round key sequence is generated through
master key shift operation and round constant iteration; performing XOR operation on the grouped data and the whitening key to output initial
confusion data; segmenting the initial
confusion data into four equal-length sub-segments to execute multiple rounds of iterative
processing, wherein each round comprises 16-bit modular addition operation and fixed-bit
cyclic shift; xOR is carried out on the shifted data and a current round key, a sub-segment state is updated according to a preset
branch processing rule, and linear transformation is carried out on the updated state by adopting a self-inverse matrix; the last-round output sub-segments are spliced into a
ciphertext to be transmitted to an execution mechanism; during decryption, reversely calling the round key sequence, and
multiplexing the self-inverse matrix to execute inverse transformation and reverse operation to recover
original data. The problem of high
encryption delay of industrial
control equipment is solved.