CPC H04L 9/0825 (2013.01) [H04L 9/001 (2013.01); H04L 9/0656 (2013.01); H04L 9/14 (2013.01)] | 20 Claims |
1. An encryption and decryption method based on bit permutation and bit transformation, comprising the following steps of:
S1: configuring a memory space, and preparing corresponding storage spaces for a plaintext file, a ciphertext file, and a key file, wherein an initial key file comes from a known coding sequence and serves as a shared file for encryption and decryption;
S2: changing a bit value of an initial key stream according to a bit operation rule, so as to obtain a bit-transformed key stream, and then changing a bit value of a plaintext according to the bit operation rule depending on the key stream; and
S3: on the basis of a bit-transformed plaintext stream, according to a bit permutation rule depending on the key stream, performing a bit permutation operation on the bit-transformed plaintext stream, and randomly distributing the plaintext stream in a ciphertext stream, so as to obtain a target ciphertext and store the target ciphertext as a file.
|