Chinese Journal of Quantum Electronics, Volume. 41, Issue 6, 956(2024)

Image encryption based on one⁃dimensional quantum walks on a circle

LIU Wenjing... LIU Jun, CAO Yuan, WANG Pengyue and ZHANG Rong |Show fewer author(s)
Author Affiliations
  • College of Electronic and Optical Engineering, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
  • show less
    Figures & Tables(20)
    One-dimensional quantum walks on a circle
    Schematic diagram of permutation box
    Control matrix decides the choice of sub-block image encryption method
    Algorithm flowchart of image encryption and decryption
    Encryption and decryption of Baboon, Lena and Peppers
    Correlation analysis of images before and after Baboon encryption. (a) Before encryption; (b) After encryption
    Correlation analysis of images before and after Lena encryption. (a) Before encryption; (b) After encryption
    Correlation analysis of images before and after Peppers encryption. (a) Before encryption; (b) After encryption
    Decrypted image Lena with several keys
    Histograms of the encrypted and original images
    • Table 0. [in Chinese]

      View table
      View in Article

      Table 0. [in Chinese]

      输入: 待加密图片 (OIm) 和P-box2

      输出: 整体置换后的图片 (OPIm)

      1[hw] ← size (OIm)
      2OIm1 ← reshape(OIm, 1, h × w) // 将图片灰度矩阵转化为1 × (h × w) 的像素序列

      3

      4

      5

      for i ← 1 to h × w do

      OIm2 (i) ←OIm1 (P-box2 (i)) // 进行整体像素置换

      endfor

      6OPIm ←OIm2 // 将像素置换后的序列重新转化为灰度矩阵
    • Table 0. [in Chinese]

      View table
      View in Article

      Table 0. [in Chinese]

      输入: 一维圆上量子行走所需初始参数 (N1, t, α, β)
      输出: 验证序列S
      1P1 ← QW (N1, t, α, β) // 运行一维圆上量子行走得到概率分布列矩阵
      2SP ← fix (P × 10^8) mod 256 // 得到的N1维概率分布矩阵放大截取为0~255的整数
      3S ← dec2bin (SP) // 将得到的整数序列转化为二进制序列作为验证序列
    • Table 0. [in Chinese]

      View table
      View in Article

      Table 0. [in Chinese]

      输入: 分块加密重组图片 (RIm), xor2
      输出: 加密图片 (CIm)
      1CIm ← bitxor (RIm, xor2) //使用xor2 完成整体异或
    • Table 0. [in Chinese]

      View table
      View in Article

      Table 0. [in Chinese]

      输入: 待加密图片 (OIm) 和一维圆上量子行走所需初始参数 (N, t, α, β)
      输出: 控制矩阵 (C-box), 替换盒 (P-box1, P-box2), 伪随机数矩阵 (xor1, xor2)
      1P ← QW (N, t, α, β) // 运行一维圆上量子行走得到N 维概率分布列矩阵
      2[h w] ← size (OIm) // 获得待加密图片大小h × w
      // 构建控制矩阵
      3CP ← Resize (P, [1, h × w/256]) // 调整概率分布矩阵尺寸为分块数量大小h × w/256
      4C ← fix (CP × 10^8) mod 1 // 缩放后的概率分布矩阵放大截取为0和1的整数
      5C-box ← reshape (C, h/16, w/16) // 将得到的0、1整数序列转化为方块矩阵形式
      // 构建替换盒P-box1
      6BP ← Resize (P, [1, 256]) // 缩放概率分布矩阵尺寸为256得到BP
      7B ← order (BP) // 将BP从小到大排序
      8P-box1 ← index(BP in B) // 对BP中排序前后的数进行对应索引组成替换盒
      // 构建替换盒P-box2
      9BP2 ← Resize (P, [1, h × w]) // 缩放概率分布矩阵尺寸为h × w得到BP2
      10B2 ← order (BP2) // 将BP2从小到大排序
      11P-box2 ← index (BP2 in B2) // 对BP2中排序前后的数进行对应索引组成替换盒
      // 构建两个伪随机数矩阵
      12X1 ← fix (BP × 10^8) mod 256//将BP放大截取为0~255的整数组成的序列X1
      13xor1 ← reshape (Key, 16, 16) // 将X1转化为16 × 16方块矩阵xor1
      14X2 ← fix (BP2 × 10^8) mod 256 // 将BP2放大截取为0~255的整数组成的序列X2
      15xor2 ← reshape (Key2, h, w) // 将X2转化为h × w方块矩阵xor2
    • Table 0. [in Chinese]

      View table
      View in Article

      Table 0. [in Chinese]

      输入: 整体置换后的图片(OPIm), C-box, P-box1和X1
      输出: 分块加密重组图片 (RIm)
      1[hw] ← size (OPIm)
      2Blocks[] ← 将 OPIm 分为16 × 16大小的分块图片
      3for each Block ← Blocks[] do // 对每个分块Blocks[i] 标上序号i
      4block ← reshape (Blocks[i], 1, 256)
      5if C-box[i] = 0 // 根据分块的序号i获得控制矩阵中对应的值来决定加密方式
      6BX1 ← bit x or (block, X1)
      7for j ← 1 to 256 do
      8BX2(j) ←BX1 (P-box1 (j))
      9endfor
      10endif // 控制矩阵对应值为0的分块先异或后置换
      11if C-box[i] = 1
      12for j ← 1 to 256 do
      13BX1(j) ←block (P-box1 (j))
      14endfor
      15BX2 ← bit xor (BX1, X1)
      16endif // 控制矩阵对应值为1的分块先置换后异或
      17Encblock[i] ← reshape (BX2, 16, 16)
      18endfor
      19RIm ← combine Encblock into RIm image // 完成加密的分块根据序号重组
    • Table 1. Correlation analysis of encrypted image

      View table
      View in Article

      Table 1. Correlation analysis of encrypted image

      ImageDirection
      HorizontalVerticalDiagonal
      Baboon0.86530.75230.7190
      Enc-Baboon-0.00180.00140.0046
      Lena0.96910.98410.9557
      Enc-Lena-0.0013-0.00120.0034
      Peppers0.97550.98080.9625
      Enc-Peppers-0.00050.00560.0008
    • Table 2. RNPC value of encrypted image

      View table
      View in Article

      Table 2. RNPC value of encrypted image

      ImageRNPC/%
      Baboon99.600
      Lena99.619
      Peppers99.606
    • Table 3. Comparison of average values of correlation coefficients and RNPC of the Lena, Baloon, Peppers with other similar schemes based on QWs.

      View table
      View in Article

      Table 3. Comparison of average values of correlation coefficients and RNPC of the Lena, Baloon, Peppers with other similar schemes based on QWs.

      AlgorithmCorrelation (average)RNPC (average)/%
      Horizontal Hertical Diagonal
      proposed-0.00120.00170.002999.608
      Ref.[17]0.00020.00140.000699.614
      Ref.[18]-0.0022-0.0025-0.003599.619
      Ref.[23]-0.0067-0.0021-0.002799.58
      Ref.[24]-0.0023-0.0031-0.009199.598
    • Table 4. Comparison of hash values of tiny modifications key and true key

      View table
      View in Article

      Table 4. Comparison of hash values of tiny modifications key and true key

      KeyThe corresponding hash values to tiny modifications of the key
      Ture key00FE00D6006200FA003500DA0089003A0055000E0063005A00A700BF004E00490082003000F100CB005100D800A900A0009F001E009B00B3000200BF00CC005500FB009E00E800F8006900C90034004B002B006D008300BB00820028023213499A2547BC8E34B81BFFF64691511BDEA246163222F5323FED71AA50C07CAC4BBACBDDEBD926BA9E76E574D10AFA03FA7BE7BA2F153B0219009D008E0037000A001D0067009E00E600FD00A8006D0035006C007900B400590015000600CA00B10052006000CB00BD0035004400E9002D00E1008A0095006B005F0006000000B000F800DB00AA005500C0009E0090001600CB

      Ture key butN=243

      (Verification sequence)

      5700A5002700910063009E008500C7001900B800F5004A00BA003D00E1002000D700BF007A0075009200CA00570016005200E8002F0031005C0091001E00F700B700A700340054007C0068002D0069005500B3000B007300EF001C0063005800EC00B203461CEEE6564EDE144F857F3C60E1C7E8483EB0DC0F14B2B576B46ABDE55AD2E5140FAA9524B41D8215CE203403830093002400E2006C00F7001C004A0028009B00DC009E003500AB00DC00D70070005B008100AB001700490027007E009C00B80037008600F5009F007D00F2001D0096008D002800CB0034009400A00058009900720064003800D9002E0089009300
      Ture key butt=2646B000B0093007200C0000E00D900FB0027001200C100B9003A00D700CA005900A80001000D000D003C00F6004E003F00170046002A000F0092006C006F00E2000200350091001C00140075000400D4003900E6000D00AB00BC008200E903A51F18FDE5BE4AA3BAE2951D3614E8B3D21006B7EF0F9473C0061BB3DC267A77E6E7623BB0459F7F99F4690331EE4D2D1C6F435D3248304BF0062009E00AD0091000F00DF00CE003A0052008300C4009E006600ED001100AC008500AB003B008A00DB00C10026009F004A000200CD005D00BC007A0019005300CC00A700A100AC0025001A005A002100350026006000E0005E00
      Ture key butβ=π/61D00B200810082049E3EA7E852503552C0F5422AF6CE14B0F80E50AA5A4E21AFB80C513920A0E20E0C2B8FDF5F9D21D574108A918081A4BCFB6E699922A7B80F83B98D9CF2D4B5E1169A8D908BFCD6E05FB35733457D0F977BA420A6704477D212B785F064DAC61871995C2B4183745382C29C375813CCE02B229F8A4F5EE4F022E1516D756C0E12D96B85CA9F8BD196EA4E0EB6CA99B7F8F8551F5AC23F4774A4F0756F16A33D5CAB9BA9A556EBE10960F41E33E5C31B0546D2CBE9910DCCEAF747CE30B3609E7783338FF4CBE000FEF377050E03DF304B5205AE36CDA976F067845EDC4E7F260A3F3312C601A
    • Table 5. RNPC values of the change key and the true key

      View table
      View in Article

      Table 5. RNPC values of the change key and the true key

      KeyRNPC/%
      Ture key0
      Ture key but N = 2430.9959
      Ture key but t = 2640.9956
      Ture key but β=π/60.9956
    Tools

    Get Citation

    Copy Citation Text

    Wenjing LIU, Jun LIU, Yuan CAO, Pengyue WANG, Rong ZHANG. Image encryption based on one⁃dimensional quantum walks on a circle[J]. Chinese Journal of Quantum Electronics, 2024, 41(6): 956

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category:

    Received: Dec. 23, 2022

    Accepted: --

    Published Online: Jan. 8, 2025

    The Author Email:

    DOI:10.3969/j.issn.1007-5461.2024.06.012

    Topics