CN110581758B - Json file encryption method applied to network shooting range - Google Patents

Json file encryption method applied to network shooting range Download PDF

Info

Publication number
CN110581758B
CN110581758B CN201910868941.XA CN201910868941A CN110581758B CN 110581758 B CN110581758 B CN 110581758B CN 201910868941 A CN201910868941 A CN 201910868941A CN 110581758 B CN110581758 B CN 110581758B
Authority
CN
China
Prior art keywords
json file
scrambling
character string
rossler
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910868941.XA
Other languages
Chinese (zh)
Other versions
CN110581758A (en
Inventor
张伟哲
张宾
刘健威
邱彪
方滨兴
陈育梅
刘川意
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peng Cheng Laboratory
Guangdong Electronic Information Engineering Research Institute of UESTC
Original Assignee
Peng Cheng Laboratory
Guangdong Electronic Information Engineering Research Institute of UESTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peng Cheng Laboratory, Guangdong Electronic Information Engineering Research Institute of UESTC filed Critical Peng Cheng Laboratory
Priority to CN201910868941.XA priority Critical patent/CN110581758B/en
Publication of CN110581758A publication Critical patent/CN110581758A/en
Application granted granted Critical
Publication of CN110581758B publication Critical patent/CN110581758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

The invention belongs to the technical field of computers, and particularly relates to a Json file encryption method applied to a network shooting range, which comprises the following steps: s1, converting a Json file into a square or approximately square matrix character string block; s2, converting the matrix character string block in the step S1 into an ASCII code; s3, mapping the converted ASCII code to an RGB color spectrum to form a pixel graph; and S4, scrambling and encrypting the pixel graph in the step S3 and then sending the pixel graph to a receiving end, compared with the prior art, the method has the advantages that the content of the Json file is integrated to form a matrix character string, the matrix character string is converted into a graph form, and the graph is encrypted through a scrambling algorithm, so that the key space of the encryption of the Jason file can be improved, the complexity of the encryption process can be improved, the risk of cracking is reduced, and the security of the encryption of the Json file is effectively improved.

Description

Json file encryption method applied to network shooting range
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a Json file encryption method applied to a network shooting range.
Background
The network target range is characterized in that a virtual environment is combined with real equipment, a real network space attack and defense combat environment is simulated in a simulating mode, and a network attack and defense combat capability research and network space weapon equipment verification test platform can be supported. Network security personnel can take network attack prevention and how to implement network attack through the training environment provided by the network shooting range, and can also take risk assessment and the like according to the simulation network scene.
The key of the network shooting range is how to design a network topology according with the actual situation, a network topology graph generates a large number of Json files in the implementation process, the files have no long character strings with spaces and comprise capital and small letters, various common symbols and the like, wherein the letters, the symbols and the like reflect important characteristic information of the network topology graph, once the important characteristic information is leaked, the system security of the network shooting range is seriously influenced, therefore, the files need to be encrypted, the current Json files are usually encrypted by MD5, and the Json files encrypted by the method are easy to crack in the transmission process, so that the security performance is insufficient, and the specific implementation of the network shooting range is influenced.
In view of the above, it is desirable to provide a Json file encryption method applied to network shooting ranges to meet practical needs.
Disclosure of Invention
The invention aims to: aiming at the defects of the prior art, the Json file encryption method applied to the network shooting range is good in encryption effect and can effectively improve the security of Json file encryption.
In order to achieve the purpose, the invention adopts the following technical scheme:
a Json file encryption method applied to a network shooting range comprises the following steps:
s1, converting a Json file into a square or approximately square matrix character string block;
s2 converting the matrix character string block in the step S1 into an ASCII code;
s3, mapping the converted ASCII code to an RGB color spectrum to form a pixel graph;
and S4, scrambling and encrypting the pixel graph in the step S3 and then sending the pixel graph to a receiving end.
It should be noted that the reason why the scrambling encryption processing method is used in the present invention rather than other methods is that in actual operation, the color of the image contains the key information of the transmission file, and if the encryption process changes the color and the decryption cannot be completely restored, the obtained file will be completely invalid. Therefore, by adopting the scrambling algorithm, one-dimensional information can be encrypted in an image two-dimensional encryption mode, the space of a secret key is increased, the complexity in the encryption process can be increased, the risk of being cracked is reduced, and the safety of the system is improved.
As an improvement to the Json file encryption method applied to the network shooting range in the present invention, the step S1 includes:
s11, integrating the content of the Json file into a character string and acquiring the length of the character string;
and S12, generating a minimum matrix which is approximate to a square according to the length of the character string, and storing the information of the character string in the matrix to form a matrix character string block.
As an improvement to the Json file encryption method applied to the network range in the present invention, the step S3 further includes converting the matrix into a pixel image.
As an improvement of the Json file encryption method applied to the network range in the present invention, in step S4, a Rossler scrambling algorithm is used for scrambling and encrypting, where the Rossler scrambling algorithm equation is:
dx/dt=-(y+z),
dy/dt=x+ay,
dz/dt=b+z(x-c),
wherein x, y and z are control variables, a, b and c are positive parameters, and t is time.
As an improvement to the Json file encryption method applied to the network range described in the present invention, the a =0.2, b =0.2, c =5.7, a =0.2, b =0.2, c =4.6, a =0.38, b =0.2, c =5.7, or a =0.1, b =0.1, c =14. The parameters are all chaotic attractor research parameters commonly used in a Rossler scrambling algorithm, so that the parameters can be quickly substituted to realize quick calculation, and the scrambling encryption efficiency is improved.
As an improvement of the Json file encryption method applied to the network shooting range, the scrambling encryption process includes the following steps:
s41: reading a pixel image to be scrambled, and determining a key k by using a Rossler scrambling algorithm, wherein k is equal to the scrambling times;
s42: initializing parameters in a Rossler scrambling algorithm equation and performing iterative operation to obtain a Rossler chaotic sequence;
s43: restoring the Rossler chaotic sequence in the step S42 into a two-dimensional vector, taking an upper triangular matrix of the two-dimensional vector, and carrying out Rossler forward transform scrambling on the image;
s44: the triangular matrix in step S43 is used to scramble k times, and an encrypted image fig is obtained.
The invention has the beneficial effects that: compared with the prior art, the method and the device have the advantages that the contents of the Json files are integrated to form the matrix character strings, the matrix character strings are converted into the patterns, and the patterns are encrypted through the scrambling algorithm, so that the key space of the encryption of the Jason files can be increased, the complexity of the encryption process can be increased, the risk of cracking is reduced, and the encryption safety of the Json files is effectively improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not limit the invention. In the drawings:
FIG. 1 is a flow chart of the operation of the present invention.
Detailed Description
As used in the specification and in the claims, certain terms are used to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This specification and claims do not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. "substantially" means within an acceptable error range, that a person skilled in the art will be able to solve the technical problem within a certain error range, substantially to achieve the technical result.
In the description of the present invention, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "horizontal", and the like indicate orientations or positional relationships based on those shown in the drawings, only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the present invention, unless otherwise explicitly stated or limited, the terms "mounted," "connected," "fixed," and the like are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood according to specific situations by those of ordinary skill in the art.
The present invention will be described in further detail below with reference to the accompanying drawings, but the present invention is not limited thereto.
A Json file encryption method applied to a network shooting range comprises the following steps:
s1, converting a Json file into a square or approximately square matrix character string block;
s2, converting the matrix character string block in the step S1 into an ASCII code;
s3, mapping the converted ASCII code to an RGB color spectrum to form a pixel graph;
and S4, scrambling and encrypting the pixel graph in the step S3 and then sending the pixel graph to a receiving end.
It should be noted that the reason why the scrambling encryption processing method is used in the present invention rather than other methods is that in actual operation, the color of the image contains the key information of the transmission document, and if the encryption process changes the color and the decryption cannot be completely restored, the obtained document will be completely invalidated. Therefore, by adopting the scrambling algorithm, one-dimensional information can be encrypted in an image two-dimensional encryption mode, the space of a secret key is increased, the complexity in the encryption process can be increased, the risk of being cracked is reduced, and the safety of the system is improved.
In this embodiment, the step S1 further includes the following steps:
s11, integrating the content of the Json file into a character string and acquiring the length of the character string;
and S12, generating a minimum matrix which is approximate to a square according to the length of the character string, and storing the information of the character string in the matrix to form a matrix character string block.
In this embodiment, the matrix needs to be converted into a pixel image in step S3. The pixel image to be encrypted contains the information of the matrix and the information of the character strings in the Json file.
Preferably, in step S4, a Rossler scrambling algorithm is used for scrambling and encrypting, and the equation of the Rossler scrambling algorithm is as follows:
dx/dt=-(y+z),
dy/dt=x+ay,
dz/dt=b+z(x-c),
wherein x, y and z are control variables, a, b and c are positive parameters, and t is time.
Preferably, a =0.2, b =0.2, c =5.7, a =0.2, b =0.2, c =4.6, a =0.38, b =0.2, c =5.7 or a =0.1, b =0.1, c =14. The parameters are all chaotic attractor research parameters commonly used in a Rossler scrambling algorithm, so that the parameters can be quickly substituted to realize quick calculation, and the scrambling encryption efficiency is improved.
Preferably, the scrambling encryption process includes the steps of:
s41: reading a pixel image to be scrambled, and determining a key k by using a Rossler scrambling algorithm, wherein k is equal to the scrambling times;
s42: initializing parameters in a Rossler scrambling algorithm equation and performing iterative operation to obtain a Rossler chaotic sequence;
s43: restoring the Rossler chaotic sequence in the step S42 into a two-dimensional vector, taking an upper triangular matrix of the two-dimensional vector, and carrying out Rossler forward transform scrambling on the image;
s44: the triangular matrix in step S43 is used to scramble k times, and an encrypted image fig is obtained.
According to the scrambling and encryption processing steps, in the embodiment, taking an M × N image as an example, a quadruple key is adopted when the Rossler transformation is used, so that the security of scrambling is increased. The Rossler transform scrambling algorithm mainly comprises the following steps:
step1, reading a graph Image to be scrambled, wherein the size of the graph Image is M x N, determining a first secret key k = u (scrambling times), and establishing a temporary matrix B, wherein the size of the matrix B is the size of the graph Image;
step2, generating a Rossler random number sequence by utilizing Rossler transformation, wherein the number sequence is determined by 3 parts of initial values, namely the size M, N of the image and the input initial value key k;
1) Initial values were selected for the Rossler equation: a = b =0.2, c =5.7 (in this case the Rossler system is in a chaotic state and acts as the second key), and the time series interval h =0.0001 (the third key);
2) Initializing a Rossler chaotic sequence, and initializing three array variables of x, y and z in a Rossler equation;
3) Sequentially iterating, and performing M x N times of iterative operation to generate a Rossler chaotic sequence (x, y, z);
step3, restoring the size of the chaotic sequence to an MxN two-dimensional vector, taking a triangular matrix A (a fourth secret key) on the two-dimensional vector, scrambling the image, wherein a base P '= AP, and P' is a scrambled image obtained after 1 Rossler transformation;
step4, when k is not equal to u (i.e. the loop is not ended), the operation is continued in Step3 until k iterations are performed, and the final encrypted image Fig is obtained.
The foregoing description shows and describes several preferred embodiments of the invention, but as aforementioned, it is to be understood that the invention is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. A Json file encryption method applied to a network shooting range is characterized by comprising the following steps:
s1, converting a Json file into a square or approximately square matrix character string block;
s2, converting the matrix character string block in the step S1 into an ASCII code;
s3, mapping the converted ASCII code to an RGB color spectrum to form a pixel graph;
and S4, scrambling and encrypting the pixel graph in the step S3 and then sending the pixel graph to a receiving end.
2. The Json file encryption method applied to the network range as recited in claim 1, wherein the step S1 comprises:
s11, integrating the content of the Json file into a character string and acquiring the length of the character string;
and S12, generating a minimum matrix which is approximate to a square according to the length of the character string, and storing the information of the character string in the matrix to form a matrix character string block.
3. The Json file encryption method applied to a network range as recited in claim 2, wherein: the step S3 further includes converting the matrix into a pixel image.
4. The Json file encryption method applied to the network range as recited in claim 1, wherein the scrambling and encryption processing in step S4 is performed by a Rossler scrambling algorithm, and the Rossler scrambling algorithm equation is:
dx/dt=-(y+z),
dy/dt=x+ay,
dz/dt=b+z(x-c),
wherein x, y and z are control variables, a, b and c are positive parameters, and t is time.
5. The Json file encryption method applied to a network range as recited in claim 4, wherein: the a =0.2, b =0.2, c =5.7, a =0.2, b =0.2, c =4.6, a =0.38, b =0.2, c =5.7 or a =0.1, b =0.1, c =14.
6. The Json file encryption method applied to the network range as claimed in claim 5, wherein the scrambling encryption process comprises the steps of:
s41: reading a pixel image to be scrambled, and determining a key k by using a Rossler scrambling algorithm, wherein k is equal to the scrambling times;
s42: initializing parameters in a Rossler scrambling algorithm equation and performing iterative operation to obtain a Rossler chaotic sequence;
s43: restoring the Rossler chaotic sequence in the step S42 into a two-dimensional vector, taking an upper triangular matrix of the two-dimensional vector, and carrying out Rossler forward transform scrambling on the image;
s44: the triangular matrix in step S43 is used to scramble k times, and an encrypted image fig is obtained.
CN201910868941.XA 2019-09-16 2019-09-16 Json file encryption method applied to network shooting range Active CN110581758B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910868941.XA CN110581758B (en) 2019-09-16 2019-09-16 Json file encryption method applied to network shooting range

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910868941.XA CN110581758B (en) 2019-09-16 2019-09-16 Json file encryption method applied to network shooting range

Publications (2)

Publication Number Publication Date
CN110581758A CN110581758A (en) 2019-12-17
CN110581758B true CN110581758B (en) 2023-02-10

Family

ID=68812995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910868941.XA Active CN110581758B (en) 2019-09-16 2019-09-16 Json file encryption method applied to network shooting range

Country Status (1)

Country Link
CN (1) CN110581758B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795939B (en) * 2023-06-19 2024-04-05 重庆市规划和自然资源信息中心 Method for realizing geographic data restoration based on geotools

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010046104A2 (en) * 2008-10-23 2010-04-29 University Of Ulster An encryption method
CN103023511B (en) * 2012-12-05 2016-06-08 云之朗科技有限公司 The compaction coding method of a kind of application and device
CN104318133A (en) * 2014-10-28 2015-01-28 艾普工华科技(武汉)有限公司 Image-based license encryption method and device
CN107610037A (en) * 2017-09-29 2018-01-19 重庆第二师范学院 A kind of image encryption method and device for merging more chaotic maps and DNA encoding
CN108494742B (en) * 2018-03-05 2023-10-27 杭州泰酷科技有限公司 Web data encryption transmission mode applied to browser

Also Published As

Publication number Publication date
CN110581758A (en) 2019-12-17

Similar Documents

Publication Publication Date Title
Man et al. Double image encryption algorithm based on neural network and chaos
Raff et al. Barrage of random transforms for adversarially robust defense
CN106600518B (en) Compressed sensing based visual security and the image encryption of data safety, decryption method
Dolendro Singh et al. Visually meaningful multi-image encryption scheme
CN111680676B (en) Training face recognition model, image registration and face recognition method and device
Ma et al. A fast hyperchaotic image encryption scheme
EP3949246A1 (en) Method and apparatus for implementing a white-box cipher
CN110581758B (en) Json file encryption method applied to network shooting range
CN108665964A (en) A kind of medical image wavelet field real-time encryption and decryption algorithm based on multi-chaos system
Rawat et al. Steganography technique for hiding text information in color image using improved LSB method
Huang et al. A robust image hashing with enhanced randomness by using random walk on zigzag blocking
Akgul et al. A novel data hiding method by using a chaotic system without equilibrium points
CN115766962A (en) Multi-key image encryption method based on five-dimensional conservative hyperchaotic system
CN113885333A (en) DoS attack resisting image encryption method based on complex network event trigger synchronization control
CN104680475A (en) Image hybrid encrypting method based on hyperchaotic system
CN108512651B (en) Artificial intelligence image identification attack defense method, system and storage medium
CN116707754A (en) Digital image encryption method based on five-dimensional non-balance point hyperchaos
CN112329025B (en) Power terminal bypass safety analysis method and power terminal bypass safety analysis system
Al-Tuwaijari Image encryption based on fractal geometry and chaotic map
CN109660695B (en) Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping
Ahmad et al. Digital image encryption based on chaotic map for secure transmission
CN109214163B (en) Identity authentication method and device
Shaikh et al. Significance of the transition to biometric template protection: explore the future
Abdul-Majeed Chaotic Scheme for Image Encryption Based on Arnold Cat's Map
CN110418028A (en) Image encryption method and device based on cascaded transformation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant