# US 2019/0379532 A1 · Binary stream hash modulus encryption and decryption method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0379532 A1
- Document ID: US20190379532A1
- Status: Published application
- Kind: A1
- Application number: 16/545,272
- Filed: 2019-08-20
- Published: 2019-12-12
- Earliest claimed: 2018-05-11
- Assignees: Zhuhai College of Jilin University; Jilin University
- Applicants: Zhuhai College of Jilin University; Jilin University
- Inventors: Yujuan SI; Liuqi LANG
- Web page: https://patentgrep.com/patent/US20190379532A1

## CPC

- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/0618: {Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation}
- H04L 9/065: {Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3}
- H04L 9/14: using a plurality of keys or algorithms
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present invention discloses a binary stream hash modulus encryption and decryption method, including: creating a clear-text set M according to a clear-text file; taking the clear-text set M as an initial set and performing several times of byte order iterative encryption on a reference string to obtain a cipher-text set C; wherein a key set P and an algorithm set A are combined during the iterative encryption; and calling the key set P for the cipher-text set C to perform several times of byte decryption on the reference string, wherein the key set P and the algorithm set A are jointly used during the encryption and shared during the encryption and decryption. By using the present invention, the file cannot be decoded even if intercepted by another person, an existing Internet platform is still used in a transmission environment, but transmitted information is encrypted information.

## Claims

### Claim 1

A binary stream hash Modulus encryption and decryption method, comprising:
creating a clear-text set M according to a clear-text file, wherein the clear-text file may be any parsable file;
taking the clear-text set M as an initial set, and performing several times of byte order iterative encryption on a reference string to obtain a cipher-text set C, wherein a key set P and an algorithm set A are combined during the iterative encryption, and the iterative encryption comprises acquiring arbitrary values of the clear-text set the cipher-text set C and the key set P as initial values and pointers corresponding to the initial values and performing iterative encryption on the clear-text set M to obtain the cipher-text set C by virtue of the pointers and an encryption algorithm of the algorithm set A; and
calling the key set P for the cipher-text set C to perform several times of byte decryption on the reference string, wherein the key set P and the algorithm set A, are jointly used &wing the encryption, and the key set P and the algorithm set A are shared during the encryption and decryption;
the decryption comprises retrieving the initial values during the iterative encryption, creating bit pointers corresponding to the initial values to combine the C reference string and the encryption algorithm of the algorithm set A to perform several times of byte decryption of the reference string for the cipher-text set C so as to obtain the clear-text set M, and converting the clear-text set M into a clear-text
wherein the number of bytes of the reference string is 2m, m≥1 and is a positive integer;
the clear-text set M, the cipher-text set C and the key set P take bits of the sets as circular linked lists.

### Claim 2 (depends on 1)

The binary stream hash modulus encryption and decryption method according to claim 1, wherein the clear-text set M, the cipher-text set C, the key set P and the algorithm set A are character sets composed of binary codes.

### Claim 3 (depends on 1)

The binary stream hash modulus encryption and decryption method according to claim 1, wherein the creating the clear-text set M according to the clear-text file comprises:
reading the clear-text file to obtain the number n of bytes of the clear-text file; and
creating a, clear-text set M serving as an ordered set, wherein M={X0X1Xn-1}={x0x1 . . . x8n-1}, x1={0,1}, Xi is a clear-text byte, xi is a clear-text bit, the Xi correspondingly comprises i (0≤i≤n-1) in a byte set, the xi correspondingly comprises i (0≤i≤8n-1) in a bit set, and the bits in the M serve as a circular linked list, so that a succeeding bit of the x8n-1 is x0.

### Claim 4 (depends on 1)

The binary stream hash modulus encryption and decryption method according to claim 1, wherein the method further comprises:
the key set P is P={Y0Y1 . . . Yn-1}={y0y1 . . . , y8n-1}, yj={0,1}, Yj is a clear-text byte, yj is a clear-text bit, the Yj correspondingly comprises j (0≤j≤n-1) in a byte set, the yj correspondingly comprises j (0≤j≤8n-1) in a bit set, and the bits in the P serve as a circular linked list, so that a succeeding bit of the y8n-1 is y0.

### Claim 5 (depends on 1)

The binary stream hash modulus encryption and decryption method according to claim 1, wherein the method further comprises:
the cipher-text set C is C={X0Z1 . . . Zn-1}={z0z1 . . . z8n-1}, zk={0,1}, Zk is a clear-text byte, zk is a clear-text bit, the Zk correspondingly comprises k (0≤k=n-1) in a byte set, the zk correspondingly comprises k (0≤k≤8n-1) in a bit set, and the bits in the C serve as a circular linked list, so that a succeeding bit of the z8n-1 is z0.

### Claim 6 (depends on 3, 4, 5)

The binary stream hash modulus encryption and decryption method according to any one of claims 3-5, wherein the method further comprises:
establishing a bit head as 0, and establishing a bit tail as 8n-1;
acquiring any initial value i (0≤i≤8n-1) to act on the initial values of the set M, and retaining the value;
acquiring any initial value j (0≤j≤8n-1) to act on the initial values of the set P, and retaining the value;
acquiring any initial value k (0≤k≤8n-1) to act on the initial values of the set C, and retaining the value; and
creating a variable s as a location counter of the bits.

### Claim 7 (depends on 1, 2, 3, 4, 5, 6)

The binary stream hash modulus encryption and decryption method according to any one of claims 1-6, further comprising a first encryption method, wherein
the method executes iterative encryption twice when the number of bytes of the reference string is 2, comprising:
establishing a pointer p to point to a bit xi of the set M, and locating a value p to the bit head when the value p is located at the bit tail;
establishing a pointer q to point to a bit yj of the set P, and locating a value q to the bit head when the value q is located at the bit tail;
establishing a pointer r to point to a bit zk of the set C, and locating a value r to the bit head when the value r is located at the bit tail;
executing first traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p; the values p, q, r and s are progressively increased; and if !*q&&!(s,% 2) is judged to be not true;
the values p and q are progressively increased;
executing second traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values p and q are progressively increased;
executing third traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
executing fourth traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&(s % 2) is judged to be riot true, the values p and q are progressively increased.

### Claim 8 (depends on 1, 2, 3, 4, 5, 6)

The binary stream hash modulus encryption and decryption method according to any one of claim 1-6, further comprising a second encryption method; wherein
the method executes iterative encryption twice when the number of bytes of the reference string is 2, comprising:
establishing a pointer p to point to a bit xi of the set M, and locating a value p to the bit head when the value p is located at the bit tail;
establishing a pointer q to point to a bit yj of the set P, and locating a value q to the bit head when the value q is located at the bit tail;
establishing a pointer r to point to a bit zk of the set C, and locating a value r to the bit head when the value r is located at the bit tail;
executing first traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*g&&!(s % 2) is judged to be not true, the values r and q are progressively increased;
executing second traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P; s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true; the values r and q are progressively increased;
executing third traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values r and q are progressively increased; and
executing fourth traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r ands are progressively increased; and if *q&&(s % 2) is judged to be not true, the values r and q are progressively increased.

### Claim 9 (depends on 7)

The binary stream hash modulus encryption and decryption method according to claim 7, further comprising a first decryption method corresponding to the first encryption method, wherein the first decryption method comprises:
retrieving the encrypted initial values i, j and k;
establishing a pointer p to point to a bit xi of the set M, and locating a value p to the bit head when the value p is located at the bit tail;
establishing a pointer q to point to a bit yj of the set P, and locating a value q to the bit head when the value q is located at the bit tail;
establishing a pointer r to point to a bit zk of the set C; and locating a value r to the bit head when the value r is located at the bit tail;
executing a traversing decryption step corresponding to the fourth encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit n of the set P, s=0; if !*q&&!(s % 2) is judged to be true; *r=*p, and the values p, q, r and s are progressively increased; and if !*q&&!(s % 2) is judged to be not true, the values p and q are progressively increased;
executing a traversing decryption step corresponding to the third encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true; the values p and q are progressively increased;
executing a traversing decryption step corresponding to the second encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
executing a traversing decryption step corresponding to the first encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&(s % 2) is judged to be not true, the values p and q are progressively increased.

### Claim 10 (depends on 8)

The binary stream hash modulus encryption and decryption method according to claims 8, further comprising a second decryption method corresponding to the second encryption method, wherein the second decryption method comprises:
retrieving the encrypted initial values i, j and k;
establishing a pointer p to point to a bit xi of the set M, and locating a value p to the bit head when the value p is located at the bit tail;
establishing a pointer q to point to a bit yj of the set P, and locating a value q to the bit head when the value q is located at the bit tail;
establishing a pointer r to point to a bit zk of the set C, and locating a value r to the bit head when the value r is located at the bit tail;
executing a decryption step corresponding to the fourth encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&!(s % 2) is judged to be not true, the values p and q are progressively increased;
executing a decryption step corresponding to the third encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to lie true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values p and q are progressively increased;
executing a decryption step corresponding to the second encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
executing a decryption step corresponding to the first encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, ,r and s are progressively increased, and if *q&&(s % 2) is judged to be not true, the values p and q are progressively increased.

### Claim 11 (depends on 1)

The binary stream hash modulus encryption and decryption method according to claim 1, wherein the algorithm set A comprises at least one pair of algorithms for encryption and corresponding decryption algorithms, and the number of elements in the algorithm set A is recorded as sum(A), wherein sum(4)mod2=0.

### Claim 12 (depends on 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)

The binary stream hash modulus encryption and decryption method according to any one of claims 1-11, wherein key files corresponding to the key set P comprise but not limited to audios, videos, pictures, images, graphs, pseudo-random codes and chaos values.

### Claim 13

A binary stream hash modulus encryption and decryption device;
comprising;
a first processing unit, configured to create a clear-text set M according to a clear-text file, wherein the clear-text file is any parsable file;
a second processing unit, configured to take the clear-text set M as an initial set and perform several times of byte order iterative encryption on a reference string to obtain a cipher-text set C, wherein a key set P and an algorithm set A are combined during the iterative encryption, the iterative encryption, comprises acquiring arbitrary values of the clear-text set M, the cipher-teat set C and the key set P as initial values and pointers corresponding to the initial values and performing iterative encryption on the clear-text set M to obtain the cipher-text set C by virtue of the pointers and an encryption algorithm of the algorithm set A; and
a third processing unit, configured to call the key set P for the cipher-text set C to perform several times of byte decryption on the reference string, wherein the key set P and the algorithm set A are jointly used during the encryption, and the key set P and the algorithm set A are shared during the encryption and decryption;
the decryption comprises retrieving the initial values during the iterative encryption, creating bit pointers corresponding to the initial values to combine the C reference string and the encryption algorithm of the algorithm set A to perform several times of byte decryption of the reference string for the cipher-text set C so as to obtain the clear-text set M, and converting the clear-text set M into a clear-text file,
wherein the number of bytes of the reference string is 2m, m≥1 and is a positive integer;
the clear-text set M, the cipher-text set C and the key set P take bits of the sets as circular linked lists.

### Claim 14 (depends on 13)

The binary stream hash modulus encryption and decryption device according to claim 13, wherein the clear-text set the cipher-text set C, the key set P and the algorithm set A are character sets composed of binary codes.

### Claim 15 (depends on 13)

The binary stream hash modulus encryption, and decryption device according to claim 13,
wherein the creating the clear-text set M according to the clear-text file comprises:
the clear-text file is read to obtain the number n of bytes of the clear-text file; and
a clear-text set M is created serving as an ordered set, wherein M={X0X1 . . . Xn-1}={x0x1 . . . x8n-1}, x1={0,1}, Xi is a clear-text byte, xi is a clear-text bit, the Xi correspondingly comprises i (0≤i≤n-1) in a byte set, the xi correspondingly comprises i (0≤i≤8n-1) in a bit set, and the bits in the M serve as a circular linked list, so that a succeeding bit of the x8n-1 is x0.

### Claim 16 (depends on 13)

The binary stream hash modulus encryption and decryption device according to claim 13, wherein the device further comprises:
the key set p P={Y0Y1 . . . Yn-1}={y0y1 . . . y8n-1}, yj={0,1}, Yj is a clear-text byte, yj is a clear-text bit, the Yj correspondingly comprises j (0≤j≤n-1) in ja byte set, the yj correspondingly comprises j (0≤j≤8n-1) in a bit set, and the bits in the P serve as a circular linked list, so that a succeeding bit the y8n-1 is y0.

### Claim 17 (depends on 13)

The binary stream hash modulus encryption and decryption device according to claim 13, wherein the device further comprises:
the cipher-text set C is C={Z0Z1 . . . Zn-1}={z0z1 . . . z8n-1}, zk={0,1}, Zk is a clear-text byte, zk is a clear-text bit, the Zk correspondingly comprises k (0≤k≤n-1) in a byte set, the zk correspondingly comprises k (0≤k≤8n-1) in a bit set, and the bits in the C serve as a circular linked list, so that a succeeding bit of the z8n-1 is z0.

### Claim 18 (depends on 15, 16, 17)

The binary stream hash modulus encryption and decryption device according to any one of claims 15-17, wherein the device further comprises a fourth processing unit,
configured to establish a bighead as 0 and establish a bit tail as 8n-1;
configured to acquire any, initial value i (0≤i≤8n-1) to act on the initial values of the set M, and retain the value;
configured to acquire any initial value j (0≤j≤8n-1) to act on the initial values of the set P, and retain the value;
configured to acquire any initial value k (0≤k≤8n-1) to act on the initial values of the set C, and retain the value; and
configured to create a variable s as a location counter of the bits.

### Claim 19 (depends on 13, 14, 15, 16, 17, 18)

The binary stream hash modulus encryption and decryption device according to any one of claims 13-18, wherein the device further comprises a first encryption unit configured to execute iterative encryption twice when the number of bytes of the reference string is 2, comprising:
wherein the first encryption unit is configured to
establish a pointer p to point to a bit xi of the set M, and locate a value p to the bit head when the value p is located at the bit tail;
establish a pointer q to point to a bit yj of the set P, and locate a value q to the bit head when the value q is located at the bit tail;
establish a pointer r to point to a bit zk of the set C, and locate a value r to the bit head when the value r is located at the bit tail;
execute first traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set and the value r points to the bit zk of the set C, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p; the values p, q, and s are progressively increased; and if !*q&&!(s % 2) is judged to be not true, the values p and q are progressively increased;
execute second traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values p and q are progressively increased;
execute third traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
execute fourth traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&(s % 2) is judged to be not true, the values p and q are progressively increased.

### Claim 20 (depends on 13, 14, 15, 16, 17, 18)

The binary stream hash modulus encryption and decryption device according to any one of claims 13-18, wherein the device further comprises a second encryption unit configured to execute iterative encryption twice when the number of bytes of the reference string is 2, comprising:
wherein the second encryption unit is configured to
establish a pointer p to point to a bit xi of the set M, and locate a value p to the bit head when the value p is located at the bit tail;
establish a pointer q to point to a bit yj of the set P, and locate a value q to the bit head when the value q is located at the bit tail;
establish a pointer r to point to a bit zk of the set C, and locate a value r to the bit head when the value r is located at the bit tail;
execute first traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&!(s % 2) is judged to be not true, the values r and q are progressively increased;
execute second traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values: p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values r and q are progressively increased;
execute third traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj Of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values r and q are progressively increased; and
execute fourth traversing encryption, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&(s % 2) is judged to be: true, *r=*p, and the values p, q, r and s are progressively increased; and if *q&&(s % 2) is judged to be not true, the values r and q are progressively increased.

### Claim 21 (depends on 19)

The binary stream hash modulus encryption and decryption device according to claim 19, wherein the device further comprises a first decryption unit,
wherein the first decryption unit is configured to
retrieve the encrypted initial values i, j and k;
establish a pointer p to point to a bit xi of the set M, and locate a value p to the bit head when the value p is located at the bit tail;
establish a pointer q to point to a bit yj of the set P, and locate a value q to the bit head when the value q is located at the bit tail;
establish a pointer r to point to a bit zk of the set C, and locate a value r to the bit head when the value r is located at the bit tail;
execute a traversing decryption step corresponding to the fourth encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit of the set P, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased; and if !*q&&!(s % 2) is judged to be not true, the values p and q are progressively increased;
execute a traversing decryption step corresponding to the third encryption step, Wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be trite, *r=*p, and the Values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values p and q are progressively increased;
execute a traversing decryption step corresponding to the second encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
execute a traversing decryption step corresponding to the first encryption step, wherein when the value p points to the bit xi of the set the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&(s % 2) is judged to be not true, the values p and q are progressively increased.

### Claim 22 (depends on 20)

The binary stream hash modulus encryption and decryption device according to claim 20, wherein the device further comprises a second decryption unit;
wherein the second decryption unit is configured to
retrieve the encrypted initial values i, j and k;
establish a pointer p to point to a bit xi of the set and locate a value p to the bit head when the value p is located the bit tail;
establish a pointer q to point to a bit yj of the set and locate a value q to the bit head when the value q is located at the bit tail;
establish a pointer r to point to a bit zk of the set C, and locate a value r to the bit head when the value r is located at the bit tail;
execute a decryption step corresponding to the fourth encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&!(s % 2) is judged to be not true, the values p and q are progressively increased;
execute a decryption step corresponding to the third encryption step, wherein When the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, s=0; if !*q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if !*q&&(s % 2) is judged to be not true, the values p and q are progressively increased;
execute a decryption step corresponding to the second encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, if *q&&!(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&!(s % 2) is judged to be not true, the values p and q are progressively increased; and
execute a decryption step corresponding to the first encryption step, wherein when the value p points to the bit xi of the set M, the value q points to the bit yj of the set P, and the value r points to the bit zk of the set C, s=0; if *q&&(s % 2) is judged to be true, *r=*p, and the values p, q, r and s are progressively increased, and if *q&&(s % 2) is judged to be not true, the values p and q are progressively increased.

### Claim 23 (depends on 13)

The binary stream hash modulus encryption and decryption device according to claim 13, wherein the algorithm set A comprises at least one pair of algorithms for encryption and corresponding decryption algorithms, and the number of elements in the algorithm set A is recorded as sum(A), wherein sum(A)mod2=0.

### Claim 24 (depends on 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)

The binary stream hash modulus encryption and decryption device according to any one of claims 13-23, wherein key files corresponding to the key set P comprise but not limited to audios, videos, pictures, images, graphs, pseudo-random codes and chaos values.
