# US 12,118,096 B2 · Image encryption method based on multi-scale compressed sensing and Markov model

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

- Number: US 12,118,096 B2
- Document ID: US12118096B2
- Status: Granted
- Kind: B2
- Application number: 17/948,648
- Filed: 2022-09-20
- Published: 2023-03-23
- Granted: 2024-10-15
- Earliest claimed: 2021-09-18
- Assignees: Dalian University of Technology
- Applicants: Dalian University of Technology
- Inventors: Qiang Zhang; Bin Wang; Pengfei Wang; Yuandi Shi; Rongrong Chen; Xiaopeng Wei
- Web page: https://patentgrep.com/patent/US12118096B2

## CPC

- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure discloses an image encryption method based on multi-scale compressed sensing and a Markov model. According to the difference in information carried by low-frequency coefficients and high-frequency coefficients of an image, different sampling rates are set for the low-frequency coefficients and the high-frequency coefficients of the image, which can effectively improve the reconstruction quality of a decrypted image. The decrypted image obtained by the present disclosure has higher quality than the decrypted image generated by the existing scheme, and a better visual effect and more complete original image information can be obtained.

## Claims

### Claim 1

An image encryption method based on multi-scale compressed sensing and a Markov model, comprising:
generating parameters and initial values of one-dimensional chaotic mapping according to plaintext image information;
obtaining subsampling rates of original coefficient matrices at all levels by using multi-scale block compressed sensing theory through a total target sampling rate of a plaintext image;
substituting the parameters and initial values of the one-dimensional chaotic mapping into a corresponding chaotic system to generate chaotic sequences, transforming the chaotic sequences into a matrix form, and obtaining corresponding orthogonal basis matrices, and extracting some elements of the orthogonal basis matrices as measurement matrices according to the subsampling rates;
performing three-level discrete wavelet transform on the plaintext image to obtain the original coefficient matrices at all levels, and blocking the original coefficient matrices at all levels to construct new coefficient matrixes at all levels;
using the chaotic sequences to generate index sequences, and scrambling the corresponding coefficient matrices at all levels as blocks;
using the measurement matrices to measure the coefficient matrices at all levels;
retaining low-frequency coefficient matrices, merging measured non-low frequency coefficient matrices at all levels to construct a matrix T, performing micro-processing on the matrix T to obtain a to-be-measured matrix NT, and respectively generating a row-state transition probability matrix and a column-state transition probability matrix according to the to-be-measured matrix NT;
performing SVD decomposition on the low-frequency coefficient matrices to obtain submatrices, and quantizing the elements in the submatrices and the non-low frequency coefficient matrices at all levels to a preset interval;
generating index values according to the information of the chaotic sequences and determining merging rules by the index values, firstly mering the non-low frequency coefficient matrices at all levels according to the merging rules to obtain an overall matrix, and then inserting the submatrices into different positions of the overall matrix;
adjusting the dimension of the overall matrix, acquiring the element information of the overall matrix, and generating control parameters for secondary scrambling;
scrambling the merged overall matrix according to the row-state transition probability matrix and the column-state transition probability matrix, and simultaneously setting corresponding flag bits; and
performing independent diffusion of elements on the overall matrix by using one of the chaotic sequences, and performing global diffusion on elements of the overall matrix by using the other chaotic sequences to obtain a final encrypted image.

### Claim 2 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of generating parameters and initial values of one-dimensional chaotic mapping according to plaintext image information is as follows:
r
0
=
{
r
e
⁢
n
⁢
d
-
mod
⁡
(
(
l
0
L
0
+
l
1
L
1
)
×
r
e
⁢
n
⁢
d
×
1
⁢
0
,
1
)
1
⁢
0
,
(
l
0
L
0
+
l
1
L
1
)
×
r
e
⁢
n
⁢
d
×
1
⁢
0
>
r
e
⁢
n
⁢
d
(
l
0
L
0
+
l
1
L
1
)
×
r
e
⁢
n
⁢
d
×
10
,
(
l
0
L
0
+
l
1
L
1
)
×
r
e
⁢
n
⁢
d
×
1
⁢
0
≤
r
e
⁢
n
⁢
d
where, L0 and L1 are the numbers of 0 and 1 in a hash value K of the plaintext image respectively, l0 and l1 are a length of a longest continuous 0 sequence and a length of a longest continuous 1 sequence respectively, rend is a right endpoint of a chaotic interval, and r0 is a certain value of the chaotic interval;
{
r
1
=
r
s
⁢
t
⁢
a
⁢
r
⁢
t
+
mod
⁡
(
(
(
max
⁡
(
k
1
,
k
2
,
k
3
,
k
4
,
k
5
,
k
6
)
×
t
1
)
(
min
⁡
(
k
1
,
k
2
,
k
3
,
k
4
,
k
5
,
k
6
)
×
t
2
)
)
×
1
⁢
0
1
⁢
4
,
r
e
⁢
n
⁢
d
-
r
s
⁢
t
⁢
a
⁢
r
⁢
t
)
r
2
=
r
s
⁢
t
⁢
a
⁢
r
⁢
t
+
mod
⁡
(
(
(
max
⁡
(
k
7
,
k
8
,
k
9
,
k
1
⁢
0
,
k
1
⁢
1
,
k
1
⁢
2
)
×
t
3
)
(
min
⁡
(
k
7
,
k
8
,
k
9
,
k
1
⁢
0
,
k
1
⁢
1
,
k
1
⁢
2
)
×
t
4
)
)
×
1
⁢
0
1
⁢
4
,
r
e
⁢
n
⁢
d
-
r
s
⁢
t
⁢
a
⁢
r
⁢
t
)
where, ki, i=1, 2, . . . , 12 is the i-th binary number of K, t1-t4 is an external key, rstart is a left endpoint of the chaotic interval, rend is the right endpoint of the chaotic interval, r1 and r2 are some values of the chaotic interval;
{
a
=
r
e
⁢
n
⁢
d
(
1
+
e
1
2
⁢
5
⁢
6
×
(
-
t
5
×
(
k
1
⁢
3
⊕
k
1
⁢
4
⊕
k
1
⁢
5
)
)
)
b
=
r
e
⁢
n
⁢
d
(
1
+
e
1
2
⁢
5
⁢
6
×
(
-
t
6
×
(
k
1
⁢
6
⊕
k
1
⁢
7
⊕
k
1
⁢
8
)
)
)
c
=
1
2
×
(
r
s
⁢
t
⁢
a
⁢
r
⁢
t
(
1
+
e
1
2
⁢
5
⁢
6
×
(
-
t
7
×
(
k
1
⁢
9
⊕
k
2
⁢
0
⊕
k
2
⁢
1
)
)
)
+
r
e
⁢
n
⁢
d
(
1
+
e
1
2
⁢
5
⁢
6
×
(
-
t
8
×
(
k
2
⁢
2
⊕
k
2
⁢
3
⊕
k
2
⁢
4
)
)
)
)
where, ki, i=13, 14, . . . , 24 is the i-th binary number of K, t5-t8 is an external key, rstart is the left endpoint of the chaotic interval, rend is the right endpoint of the chaotic interval, and a, b and c are some values of the chaotic interval;
{
Z
1
=
[
t
1
×
k
25
t
3
×
k
26
t
5
×
k
27
t
7
×
k
28
]
Z
2
=
[
t
2
×
k
29
t
4
×
k
30
t
6
×
k
31
t
8
×
k
32
]
where, ki, i=25, 14, . . . , 32 is the i-th binary number of K, t1-t8 is an external key, and Z1 and Z2 are transition matrices;
{
x
0
=
mod
⁡
(
(
Z
3
(
1
)
+
Z
3
(
2
)
-
⌊
Z
3
(
1
)
+
Z
3
(
2
)
⌋
)
×
1
⁢
0
1
⁢
4
,
1
)
x
0
⁢
0
=
mod
⁡
(
(
Z
3
(
3
)
+
Z
3
(
4
)
-
⌊
Z
3
(
3
)
+
Z
3
(
4
)
⌋
)
×
1
⁢
0
1
⁢
4
,
1
)
y
00
=
mod
⁡
(
(
Z
3
(
1
)
+
Z
3
(
3
)
-
⌊
Z
3
(
1
)
+
Z
3
(
3
)
⌋
)
×
1
⁢
0
1
⁢
4
,
1
)
v
0
=
mod
⁡
(
(
Z
3
(
2
)
+
Z
3
(
4
)
-
⌊
Z
3
(
2
)
+
Z
3
(
4
)
⌋
)
×
1
⁢
0
1
⁢
4
,
1
)
where, └⋅┘ presents downward rounding, Z3 is a Kronecker product of transition Z1 and transition Z2, Z3 (i), i=1, 2, 3, 4 represents the i-th element of the matrix Z3, and x0, x00, y00, v0 are the initial values of the corresponding chaotic mapping, respectively.

### Claim 3 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of scrambling the corresponding coefficient matrices at all levels as the blocks comprises:
letting a matrix A3 be an m×n matrix, expanding the matrix A3 into a sequence with a length being m×n, wherein i is the index of the i-th element in the sequence, a scrambling method of which is as follows:
A3′(Ind3(m×n−i+1))=A3(Ind3(i))
where, A3′ is a sequence after A3 is scrambled, and Ind3 is an index sequence for scrambling third-level wavelet decomposition coefficient matrices; and similarly, other coefficient matrices Hi′, Vi′, Di′, i=1, 2, 3 after scrambling are obtained.

### Claim 4 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of performing micro-processing on the matrix T to obtain the to-be-measured matrix NT is as follows:
T
=
(
H
1
″
V
1
″
D
1
″
H
2
″
V
2
″
D
2
″
H
3
″
V
3
″
D
3
″
)
where, Hi″, Vi″, Di″, i=1, 2, 3 are coefficient matrices after Hi′, Vi′, Di′, i=1, 2, 3 are compressed, and T is a coefficient merging matrix;
{
N
⁢
T
=
-
T
,
l
0
>
l
1
N
⁢
T
=
T
-
0
.5
,
L
0
>
L
1
N
⁢
T
=
T
+
0
.5
,
L
0
<
L
1
where, L0 and L1 are the numbers of 0 and 1 in the hash value K of the plaintext image respectively, l0 and l1 are the length of the longest continuous 0 sequence and the length of the longest continuous 1 sequence respectively, and NT is the to-be-measured matrix after processing T.

### Claim 5 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of firstly mering the non-low frequency coefficient matrices at all levels according to the merging rules to obtain the overall matrix is as follows:
{
L
⁢
i
⁢
n
⁢
d
1
=
(
X
1
′
(
n
1
×
n
1
)
+
X
2
′
(
n
2
×
n
2
)
+
X
3
′
(
n
3
×
n
3
)
)
/
3
Lind
1
′
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Lin
⁢
d
1
)
×
1
⁢
0
8
,
6
)
)
+
1
Lind
2
=
(
X
1
′
(
n
1
×
n
1
-
1
)
+
X
2
′
(
n
2
×
n
2
-
1
)
+
X
3
′
(
n
3
×
n
3
-
1
)
)
/
3
L
⁢
i
⁢
n
⁢
d
2
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Lin
⁢
d
2
)
×
1
⁢
0
8
,
6
)
)
+
1
Lind
3
=
(
X
1
′
(
n
1
×
n
1
-
1
)
+
X
2
′
(
n
2
×
n
2
-
1
)
+
X
3
′
(
n
3
×
n
3
-
1
)
)
/
3
Lind
3
′
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Lin
⁢
d
3
)
×
1
⁢
0
8
,
6
)
)
+
1
where, Lindi, i=1, 2, 3 is an index value generated by the chaotic sequence X1′, i=1, 2, 3, ni×ni, i=1, 2, 3 is a length of X1′, i=1, 2, 3, and Lind1′, i=1, 2, 3 is a result of mapping Lindi, i=1, 2, 3 to an interval [1, 6];
{
(
Y
11
Y
12
Y
13
)
=
(
H
3
′″
H
2
′″
H
1
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
3
′″
V
2
′″
V
1
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
3
′″
D
2
′″
D
1
′″
)
(
Y
11
Y
12
Y
13
)
=
(
H
3
′″
H
1
′″
H
2
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
3
′″
V
1
′″
V
2
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
3
′″
D
1
′″
D
2
′″
)
(
Y
11
Y
12
Y
13
)
=
(
H
2
′″
H
3
′″
H
1
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
2
′″
V
3
′″
V
1
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
2
′″
D
3
′″
D
1
′″
)
(
Y
11
Y
12
Y
13
)
=
(
H
2
′″
H
1
′″
H
3
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
2
′″
V
1
′″
V
3
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
2
′″
D
1
′″
D
3
′″
)
(
Y
11
Y
12
Y
13
)
=
(
H
1
′″
H
3
′″
H
2
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
1
′″
V
3
′″
V
2
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
1
′″
D
3
′″
D
2
′″
)
(
Y
11
Y
12
Y
13
)
=
(
H
1
′″
H
2
′″
H
3
′″
)
,
(
Y
21
Y
22
Y
23
)
=
(
V
1
′″
V
2
′″
V
3
′″
)
,
(
Y
31
Y
32
Y
33
)
=
(
D
1
′″
D
2
′″
D
3
′″
)
where, Hi′″, Vi′″, Di′″, i=1, 2, 3 is a result of quantizing Hi″, Vi″, Di″, i=1, 2, 3 to [0, 255], a first group of sorted matrices are marked as Y1, three internal block matrices are marked as Y11, Y12, Y13 respectively, and a sorting order is determined by Lind1′; a second group of sorted matrices are marked as Y2, three internal block matrices are marked as Y21, Y22, Y23, and a sorting order is determined by Lind2′; and a third group of sorted matrices are marked as Y3, three internal block matrices are marked as Y31, Y32, Y33, and a sorting order is determined by Lind3′ D.

### Claim 6 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of inserting the submatrices into different positions of the overall matrix is as follows:
{
H
⁢
i
⁢
n
⁢
d
1
=
(
X
1
′
(
1
)
+
X
2
′
(
1
)
+
X
3
′
(
1
)
)
/
3
Hind
2
=
(
X
1
′
(
2
)
+
X
2
′
(
2
)
+
X
3
′
(
2
)
)
/
3
Hind
3
=
(
X
1
′
(
3
)
+
X
2
′
(
3
)
+
X
3
′
(
3
)
)
/
3
H
⁢
i
⁢
n
⁢
d
1
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Hin
⁢
d
1
)
×
1
⁢
0
8
,
4
)
)
+
1
H
⁢
i
⁢
n
⁢
d
2
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Hin
⁢
d
2
)
×
1
⁢
0
8
,
4
)
)
+
1
H
⁢
i
⁢
n
⁢
d
3
=
floor
⁢
(
mod
⁡
(
abs
⁡
(
Hin
⁢
d
3
)
×
1
⁢
0
8
,
4
)
)
+
1
where, Hindi, i=1, 2, 3 is an index value generated by the chaotic sequence X1′, i=1, 2, 3, and Hind1′, i=1, 2, 3 is a result of mapping Hindi, i=1, 2, 3 to the interval [1, 4];
{
Y
1
′
=
(
U
Y
11
Y
12
Y
13
)
,
Y
2
′
=
(
S
Y
21
Y
22
Y
23
)
,
Y
3
′
=
(
VT
Y
31
Y
32
Y
33
)
Y
1
′
=
(
Y
11
U
Y
12
Y
13
)
,
Y
2
′
=
(
Y
21
S
Y
22
Y
23
)
,
Y
3
′
=
(
Y
31
VT
Y
32
Y
33
)
Y
1
′
=
(
Y
11
Y
12
U
Y
13
)
,
Y
2
′
=
(
Y
21
Y
22
S
Y
23
)
,
Y
3
′
=
(
Y
31
Y
32
VT
Y
33
)
Y
1
′
=
(
Y
11
Y
12
Y
13
U
)
,
Y
2
′
=
(
Y
21
Y
22
Y
23
S
)
,
Y
3
′
=
(
Y
31
Y
32
Y
33
VT
)
T
′
=
(
Y
1
′
Y
2
′
Y
3
′
)
where, Y1′ is a matrix after the first group merging, and the sorting order is determined by Hind1′; Y2′ is a matrix after the second group merging, and the sorting order is determined by Hind2′; Y3′ is a matrix after the third group merging, and the sorting order is determined by Hind3′; T′ is a matrix after Y1′, Y2′ and Y3′ are merged; and U, S and VT are three submatrices obtained by SVD decomposition of the low-frequency coefficient matrices at levels.

### Claim 7 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of adjusting the dimension of the overall matrix and acquiring the element information of the overall matrix is as follows:
{
Max
=
max
⁡
(
T
′
)
Min
=
min
⁡
(
T
′
)
d
1
=
floor
⁢
(
mean
⁢
(
T
′
)
)
d
2
=
ceil
⁡
(
(
Max
+
Min
)
/
2
)
d
1
′
=
mod
⁡
(
d
1
,
1
⁢
0
)
d
2
′
=
mod
⁡
(
d
2
,
10
)
d
1
⁢
2
′
=
max
⁡
(
d
1
′
,
d
2
′
)
where, Max is the maximum value of the matrix T′, Min is the minimum value of the T′, d1 is the maximum integer less than or equal to the average value of elements in the T′, d2 is the minimum integer greater than or equal to the average value of Max and Min, d1′ is the remainder of d1 divided by 10, d2′ is the remainder of d2 divided by 10, and d12 is the larger of d1′ and d2′.

### Claim 8 (depends on 1)

The image encryption method based on multi-scale compressed sensing and a Markov model of claim 1, wherein a specific method of generating the control parameters for secondary scrambling is as follows:
{
V
1
=
10
×
V
′
-
round
⁢
(
10
×
V
)
V
2
=
1
⁢
0
2
×
V
′
-
round
⁢
(
10
2
×
V
)
V
3
=
1
⁢
0
3
×
V
′
-
round
⁢
(
10
3
×
V
)
V
4
=
1
⁢
0
4
×
V
′
-
round
⁢
(
10
4
×
V
)
where, V′ is a generated and processed chaotic sequence, and Vi, i=1, 2, 3, 4 is a subsequence generated by V′;
{
w
1
=
fix
⁢
(
mod
⁡
(
V
1
(
m
1
′
+
n
1
′
)
+
1
,
5
)
)
w
2
=
fix
⁢
(
mod
⁢
(
V
2
(
round
⁢
(
m
1
′
/
2
+
n
1
′
/
2
)
+
2
×
10
2
,
5
2
)
)
w
3
=
fix
⁢
(
mod
⁡
(
V
3
(
abs
⁡
(
round
⁢
(
(
m
1
′
/
3
+
n
1
′
/
3
)
+
3
)
)
)
×
10
3
,
5
3
)
)
w
4
=
fix
⁢
(
mod
⁢
(
V
4
(
abs
⁡
(
round
⁢
(
m
1
′
/
4
+
n
1
′
/
4
)
+
4
)
)
×
10
4
,
5
4
)
)
where, w1-w4 are used as control parameters for subsequent shift operation, and fix is a rounding function to zero; and m1′ is a maximum prime factor of a matrix row dimension m1, and n1′ is a maximum prime factor of a matrix column dimension n1.
