CN112202453A - Information processing method, device, equipment and medium for compressing ciphertext - Google Patents

Information processing method, device, equipment and medium for compressing ciphertext Download PDF

Info

Publication number
CN112202453A
CN112202453A CN202011057094.8A CN202011057094A CN112202453A CN 112202453 A CN112202453 A CN 112202453A CN 202011057094 A CN202011057094 A CN 202011057094A CN 112202453 A CN112202453 A CN 112202453A
Authority
CN
China
Prior art keywords
information
coordinate
target information
ciphertext
target
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.)
Pending
Application number
CN202011057094.8A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202011057094.8A priority Critical patent/CN112202453A/en
Publication of CN112202453A publication Critical patent/CN112202453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/70Type of the data to be coded, other than image and sound
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Accounting & Taxation (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses an information processing method, device, equipment and medium for compressing a ciphertext, which mainly relate to a block chain technology and a medical platform technology, wherein the method comprises the following steps: acquiring a target function for describing information and target information to be processed; acquiring a random number corresponding to the target information, and adjusting the target information according to the random number to obtain adjusted target information; acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information; encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information; and compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network. By adopting the embodiment of the application, the ciphertext is compressed and then stored, so that the storage pressure of the block chain network can be reduced, and the storage space is saved.

Description

Information processing method, device, equipment and medium for compressing ciphertext
Technical Field
The present application relates to the field of block chaining technologies, and in particular, to an information processing method, apparatus, device, and medium for compressing a ciphertext.
Background
At present, the internet has penetrated into daily life, and the use of the internet for information interaction has the advantages of convenience and quickness in communication, high communication efficiency and low communication cost. For example, when a network chat is performed, an online business is handled, and when a scene such as an internet office is performed, information interaction is performed, a large amount of information is generated in the information interaction process, and most of the information needs to be stored, for example, a medical platform may use a terminal to store medical record information, patient information, and the like of each patient, so as to facilitate subsequent processing such as tracing. However, the information storage space is limited, and how to reduce the pressure of the server on storing the information and save the storage space is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides an information processing method, device, equipment and medium for compressing a ciphertext, which can reduce the storage pressure of a block chain and save the storage space.
An embodiment of the present application provides an information processing method for compressing a ciphertext, including:
acquiring a target function for describing information and target information to be processed;
acquiring a random number corresponding to the target information, and adjusting the target information according to the random number to obtain adjusted target information;
acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information;
encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
and compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network.
Optionally, the coordinate information corresponding to the target information includes a first coordinate and a second coordinate, and the compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext includes: cutting out bytes with a target length from the ciphertext with the first coordinate to be used as the ciphertext with the cut first coordinate, wherein the target length is smaller than the byte length corresponding to the ciphertext with the first coordinate; and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as the compressed ciphertext.
Optionally, the target length is 1; the method for cutting out bytes of a target length from the ciphertext of the first coordinate as the ciphertext of the first coordinate comprises the following steps: cutting out the sign bit byte of the first coordinate from the ciphertext of the first coordinate; and determining the sign bit byte of the first coordinate as the ciphertext of the cut first coordinate.
Optionally, the adjusting the target information according to the random number to obtain the adjusted target information includes: splicing the random number and the target information to obtain spliced target information; and if the spliced target information is smaller than the information threshold, determining the spliced target information as the adjusted target information.
Optionally, the method further includes: if the spliced target information is greater than or equal to the information threshold, adjusting the random number; splicing the adjusted random number with the target information to obtain candidate information; and if the candidate information is smaller than the information threshold, determining the candidate information as the adjusted target information.
Optionally, the encrypting the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information includes: acquiring a private key of a terminal to which the target information belongs and a key corresponding to the target information; acquiring candidate coordinates corresponding to the target information, wherein the candidate coordinates are obtained according to base point coordinates of a curve of the target function and the private key; encrypting the candidate coordinate according to a key corresponding to the target information to obtain a ciphertext of the candidate coordinate; and fusing the ciphertext of the candidate coordinates and the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information.
Optionally, the method further includes: reading the compressed ciphertext from the blockchain network; decompressing the compressed ciphertext to obtain a ciphertext of the coordinate information corresponding to the target information; decrypting the ciphertext of the coordinate information corresponding to the target information to obtain the coordinate information corresponding to the target information; determining the adjusted target information according to the coordinate information corresponding to the target information and the target function; and determining the target information according to the adjusted target information and the random number corresponding to the target information.
An embodiment of the present application provides an information processing apparatus for compressing a ciphertext, including:
the information acquisition module is used for acquiring a target function for describing information and target information to be processed;
the information adjusting module is used for acquiring a random number corresponding to the target information and adjusting the target information according to the random number to obtain adjusted target information;
a coordinate obtaining module, configured to obtain coordinate information corresponding to the target information according to the target function and the adjusted target information;
the information encryption module is used for encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
and the information compression module is used for compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network.
Optionally, the coordinate information corresponding to the target information includes a first coordinate and a second coordinate, and the information compression module is specifically configured to: cutting out bytes with a target length from the ciphertext with the first coordinate to be used as the ciphertext with the cut first coordinate, wherein the target length is smaller than the byte length corresponding to the ciphertext with the first coordinate; and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as the compressed ciphertext.
Optionally, the target length is 1; the information compression module is specifically configured to: cutting out the sign bit byte of the first coordinate from the ciphertext of the first coordinate; and determining the sign bit byte of the first coordinate as the ciphertext of the cut first coordinate.
Optionally, the information adjusting module is specifically configured to: splicing the random number and the target information to obtain spliced target information; and if the spliced target information is smaller than the information threshold, determining the spliced target information as the adjusted target information.
Optionally, the apparatus further comprises: a random number adjusting module, configured to adjust the random number if the spliced target information is greater than or equal to the information threshold; splicing the adjusted random number with the target information to obtain candidate information; and if the candidate information is smaller than the information threshold, determining the candidate information as the adjusted target information.
Optionally, the information encryption module is specifically configured to: acquiring a private key of a terminal to which the target information belongs and a key corresponding to the target information; acquiring candidate coordinates corresponding to the target information, wherein the candidate coordinates are obtained according to base point coordinates of a curve of the target function and the private key; encrypting the candidate coordinate according to a key corresponding to the target information to obtain a ciphertext of the candidate coordinate; and fusing the ciphertext of the candidate coordinates and the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information.
Optionally, the apparatus further comprises: an information decryption module to: reading the compressed ciphertext from the blockchain network; decompressing the compressed ciphertext to obtain a ciphertext of the coordinate information corresponding to the target information; decrypting the ciphertext of the coordinate information corresponding to the target information to obtain the coordinate information corresponding to the target information; determining the adjusted target information according to the coordinate information corresponding to the target information and the target function; and determining the target information according to the adjusted target information and the random number corresponding to the target information.
One aspect of the present application provides a computer device, comprising: a processor, a memory, a network interface;
the processor is connected to a memory and a network interface, wherein the network interface is used for providing a data communication function, the memory is used for storing a computer program, and the processor is used for calling the computer program to execute the method in the aspect in the embodiment of the present application.
An aspect of the embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the information processing method for compressing a ciphertext according to the first aspect.
In the embodiment of the application, the compressed ciphertext is obtained by compressing the ciphertext of the coordinate information corresponding to the target information, and the compressed ciphertext is stored in the block chain network. Since the space resource of the block chain network is occupied greatly due to the fact that the ciphertext of the target information is directly stored into the block chain network, the ciphertext of the coordinate information corresponding to the target information is stored into the block chain network after being compressed, the storage pressure of the block chain network can be reduced, and the storage space is saved. Furthermore, the target information is adjusted by using the random number, so that the coordinate information corresponding to the adjusted target information can be generated according to the adjusted target information, and the success rate of acquiring the coordinate information corresponding to the adjusted target information is improved. By encrypting the target information, an illegal terminal can acquire the content of the target information only after cracking the encrypted target information, so that the safety of the target information can be improved. In addition, the ciphertext of the target information is compressed and stored in the block chain network, and based on the characteristics that the block chain cannot be tampered and is not easy to lose, the safety of the information can be improved, and the resource occupation of the local storage space of the terminal is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for adjusting target information according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating a composition of an information processing apparatus for compressing a ciphertext according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The block chain related to the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission (P2P transmission), consensus mechanism, encryption algorithm and the like, is essentially a decentralized database, and is a series of data blocks which are generated in a correlation mode by using a cryptography method, wherein each data block contains information of a batch of network transactions and is used for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain can comprise a blockchain bottom platform, a platform product service layer and an application service layer; the blockchain can be composed of a plurality of serial transaction records (also called blocks) which are connected in series by cryptography and protect the contents, and the distributed accounts connected in series by the blockchain can effectively record the transactions by multiple parties and can permanently check the transactions (can not be tampered). The consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes in the block chain network; that is, the consensus mechanism is a mathematical algorithm commonly recognized by network nodes in the blockchain.
The method is applicable to a medical platform, the target information can be medical record information, patient information and the like of a patient, the encrypted information is compressed by encrypting the medical record information, the patient information and other information of the medical platform of the patient, and the compressed information is stored in the block chain network, so that the medical record information, the patient information and the like of the patient can be managed, and the safety of the information of the patient is improved; by compressing the encrypted information, storage space can be saved.
Referring to fig. 1, fig. 1 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present disclosure, where the method is applied to a node in a block chain Network, where the node may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform. Alternatively, the node may refer to a computer device, including a mobile phone, a tablet computer, a notebook computer, a palm computer, a smart audio, a Mobile Internet Device (MID), a Point Of Sale (POS) machine, a wearable device (e.g., a smart watch, a smart bracelet, etc.), and the like. As shown in fig. 1, the method includes:
s101, acquiring an objective function for describing information and objective information to be processed.
Here, the objective function may be a function corresponding to an elliptic curve, or may be a function corresponding to another curve. The objective function includes curve parameters including the length of the curve, the base point, etc. The target information may refer to transaction data, business data, internal data of an organization, and the like. The transaction data may include transaction party information, transaction amount, transaction time, transaction item, etc.; the business data may include the amount of the business, the type and quantity of the items sold, etc.; internal data may include revenue status, partner information, and liability status of the organization or other data of higher importance, etc.
S102, acquiring a random number corresponding to the target information, and adjusting the target information according to the random number to obtain the adjusted target information.
In a specific implementation, a random number generation algorithm may be used to generate a random number, for example, a central limit theorem and a Box Muller (coordinate transformation method), a monte carlo algorithm, a numerical probability algorithm, a las vegas algorithm, or another algorithm, and determine the generated random number as a random number corresponding to the target information. For example, the generated random number may be any number within the [0,128] interval.
In a possible case, if the target information is not data of a numerical type, the target information may be encoded to obtain encoded data of the numerical type, and the encoded data corresponding to the target information may be adjusted according to a random number corresponding to the target information to obtain adjusted target information.
In another possible case, if the target information is data of a numerical type, the target information is adjusted according to a random number corresponding to the target information to obtain adjusted target information.
And S103, acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information.
In the embodiment of the application, when the value corresponding to the target information is greater than the information threshold, the target information cannot be mapped to the targetOn the curve of the target function, the coordinate point corresponding to the target information cannot be obtained by calculation according to the curve of the target function. Therefore, the target information can be adjusted by using the random number, so that the value corresponding to the adjusted target information is smaller than or equal to the information threshold, the target information is mapped to the curve of the target function, and the coordinate point corresponding to the target information is obtained by calculation according to the curve of the target function. By adjusting the target information by using the random number, the probability of obtaining the coordinate point corresponding to the target information can be improved, thereby improving the probability of successful encryption. The information threshold may be determined according to a curve parameter corresponding to the objective function, and if the curve parameter is a curve length c, the information threshold is 2256-w, wherein w is a minimum value. The random numbers may be generated using the random number generation algorithm mentioned above.
Here, for example, the adjusted non-numeric type target information may be encoded to obtain encoded data corresponding to the adjusted numeric type target information, and the encoded data corresponding to the target information may be mapped onto a curve corresponding to the objective function to obtain a corresponding coordinate point, so as to obtain coordinate information corresponding to the target information from the coordinate point.
In a possible implementation manner, a curve corresponding to a target function may be obtained, and the adjusted target information is mapped to a first coordinate of a target point on the curve corresponding to the target function; determining a second coordinate of a target point on a curve corresponding to the target function according to the first coordinate and the target function; and determining the first coordinate and the second coordinate as coordinate information corresponding to the target information, so as to obtain the coordinate information corresponding to the target information.
For example, according to the adjusted target information, the first coordinate and the target function of the target point on the curve corresponding to the target function are mapped, the second coordinate of the target point on the curve corresponding to the target function is determined, and the first coordinate and the second coordinate are determined as the coordinate information corresponding to the target information. For example, the curve corresponding to the objective function can be shown in equation (1-1):
y2=x3+ax+b (1-1)
wherein a and b are both known real numbers, x and y are both parameters, and by determining the value of any one of x or y, the value of the other parameter can be calculated by formula (1-1), for example, by determining the value of x and calculating the value of y by formula (1-1). For example, if a is 1 and b is-1, the curve corresponding to the objective function can be represented as y2=x3+ x-1, the first coordinate of the target point (for example, the abscissa of the target point) where the target information is mapped to the curve corresponding to the target function is 1, and the first coordinate is substituted into y as x2=x3In + x-1, y is 1, that is, the second coordinate of the target point on the curve corresponding to the target function is 1, and the coordinate information corresponding to the target information is (1, 1).
And S104, encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information.
Here, the computer device may obtain a private key of a terminal to which the target information belongs, and encrypt the coordinate information corresponding to the target information according to the private key of the terminal to obtain a ciphertext of the coordinate information corresponding to the target information. It can be seen that the ciphertext of the coordinate information corresponding to the target information is the ciphertext obtained by encrypting the target information, and the content of the target information corresponding to the ciphertext cannot be known even if the ciphertext is obtained without decrypting the ciphertext. By encrypting the target information by using the private key of the terminal to which the target information belongs, the security of the target information can be improved.
And S105, compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network.
Here, since the space resource of the block chain network is occupied greatly by directly storing the ciphertext of the coordinate information corresponding to the target information into the block chain network, the ciphertext of the coordinate information corresponding to the target information can be compressed, and the compressed ciphertext is stored into the block chain network, so that the storage pressure of the block chain network is reduced, and the storage space is saved.
Optionally, the coordinate information corresponding to the target information includes a first coordinate and a second coordinate, and the method of compressing the ciphertext of the coordinate information corresponding to the target information to obtain the compressed ciphertext may be: cutting out bytes with the target length from the ciphertext with the first coordinate to be used as the ciphertext with the first coordinate after cutting; and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as the compressed ciphertext.
And the target length is smaller than the byte length corresponding to the ciphertext of the first coordinate. For example, the first coordinate may be a y coordinate, and the second coordinate is an x coordinate, the computer device may represent bytes corresponding to the ciphertext of the y coordinate by a binary system, and the length of the bytes corresponding to the ciphertext of the y coordinate may be determined according to the length of the curve corresponding to the objective function. For example, if the length of the curve is 32 bytes, the length of the byte corresponding to the ciphertext of the first coordinate may be 32 bytes, or the length of the curve may be other bytes, which is not limited herein. Thus, the target length is less than 32 bytes, and may be, for example, 1 byte, 2 bytes, 5 bytes, 31 bytes, and so on. The byte length corresponding to the ciphertext of the second coordinate may be equal to the byte length corresponding to the ciphertext of the first coordinate, for example, the byte length corresponding to the ciphertext of the first coordinate is 32 bytes, and the byte length corresponding to the ciphertext of the second coordinate is 32 bytes. It can be understood that the smaller the byte length corresponding to the ciphertext of the coordinate information corresponding to the target information is, the smaller the resource space occupied when the coordinate information is stored in the block chain network is; the larger the byte length corresponding to the ciphertext of the coordinate information corresponding to the target information is, the larger the resource space occupied when the coordinate information is stored in the block chain network is. For example, the resource space occupied when the ciphertext with the byte length of 32 is stored in the blockchain network is larger than the resource space occupied when the ciphertext with the byte length of 1 is stored in the blockchain network.
For example, if the length of the byte corresponding to the ciphertext of the first coordinate is 32 bytes, the length of the byte corresponding to the ciphertext of the second coordinate is 32 bytes, and the target length is 1 byte, any byte, such as byte d, is cut from the 32 bytes corresponding to the ciphertext of the first coordinate as the ciphertext of the first coordinate after cutting; and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as compressed ciphertexts. That is, 32 bytes corresponding to the cut-out byte d and the ciphertext of the second coordinate are determined as the compressed ciphertext, that is, the byte length of the compressed ciphertext is 33 bytes.
Optionally, any plurality of bytes may be cut from the 32 bytes corresponding to the ciphertext of the first coordinate, for example, 4 bytes are cut to be the byte d1 to the byte d4, respectively, and then the byte d1 to the byte d4 and the 32 bytes corresponding to the ciphertext of the second coordinate are determined as the compressed ciphertext, that is, the length of the bytes in the compressed ciphertext is 36 bytes.
Optionally, the first coordinate may be an x coordinate, and the second coordinate is a y coordinate, any one byte or multiple bytes may be cut out from the 32 bytes corresponding to the x coordinate by referring to the above manner, and the cut byte or multiple bytes and the 32 bytes corresponding to the y coordinate are determined as the compressed ciphertext. By cutting the ciphertext of the coordinate information corresponding to the target information, the bytes in the ciphertext of the coordinate information corresponding to the cut target information are reduced, so that when the cut ciphertext is stored in the block chain network, the length of the bytes corresponding to the ciphertext is reduced, the space of the block chain network occupied for storing the cut ciphertext is reduced, and the storage space is saved under the condition that the number of information pieces stored in the block chain network is not changed.
Optionally, the target length is 1; the method for cutting out bytes of the target length from the ciphertext of the first coordinate may be: cutting out sign bit bytes of the first coordinate from the ciphertext of the first coordinate; and determining the sign bit byte of the first coordinate as the cut ciphertext of the first coordinate.
The sign bit byte of the first coordinate refers to a byte indicating whether the number corresponding to the first coordinate is a positive number or a negative number, for example, a computer device may use "0" in binary to indicate a positive number, and "1" to indicate a negative number. For example, the first coordinate is n, n is a number, and a number corresponding to n may be represented by binary, or 0n if n is a positive number; if n is a negative number, it can be expressed as 1 n. Here, the first coordinate may be, for example, a y coordinate, the second coordinate is an x coordinate, and the byte length corresponding to the ciphertext of the first coordinate may be determined according to the length of the curve corresponding to the objective function, for example, the length of the curve is 32 bytes, the byte length corresponding to the ciphertext of the first coordinate may be 32 bytes, the 32 bytes include a sign-bit byte, and the byte length corresponding to the ciphertext of the second coordinate may be equal to the byte length of the ciphertext of the first coordinate, that is, 32 bytes. The computer device cuts out a sign bit byte of the first coordinate from the ciphertext of the first coordinate, wherein the sign bit byte is 0 and represents that the number corresponding to the first coordinate is a positive number; and determining 0 as the ciphertext of the first coordinate after cutting.
By cutting out the sign bit byte of the first coordinate from the ciphertext of the first coordinate, the number corresponding to the first coordinate can be determined to be a positive number or a negative number, and the cut ciphertext of the first coordinate and the ciphertext of the second coordinate are determined to be compressed ciphertexts and stored in the block chain network; when the compressed ciphertext is decompressed subsequently, because the ciphertext of the second coordinate and the sign bit byte of the first coordinate are stored in the block chain network, the ciphertext of the first coordinate can be determined through the ciphertext of the second coordinate, the sign bit byte of the first coordinate and the target function, so that the compressed ciphertext is decompressed to obtain the ciphertext of the target information, and the ciphertext of the target information is decrypted subsequently.
In the embodiment of the application, the compressed ciphertext is obtained by compressing the ciphertext of the coordinate information corresponding to the target information, and the compressed ciphertext is stored in the block chain network. Since the space resource of the block chain network is occupied greatly due to the fact that the ciphertext of the target information is directly stored into the block chain network, the ciphertext of the coordinate information corresponding to the target information is stored into the block chain network after being compressed, the storage pressure of the block chain network can be reduced, and the storage space is saved. Furthermore, the target information is adjusted by using the random number, so that the coordinate information corresponding to the adjusted target information can be generated according to the adjusted target information, and the success rate of acquiring the coordinate information corresponding to the adjusted target information is improved. By encrypting the target information, an illegal terminal can acquire the content of the target information only after cracking the encrypted target information, so that the safety of the target information can be improved. In addition, the ciphertext of the target information is compressed and stored in the block chain network, and based on the characteristics that the block chain cannot be tampered and is not easy to lose, the safety of the information can be improved, and the resource occupation of the local storage space of the terminal is reduced.
Optionally, a method for adjusting target information according to a random number corresponding to the target information may be as shown in fig. 2, where fig. 2 is a schematic flow chart of the method for adjusting target information according to an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
s201, splicing the random number and the target information to obtain spliced target information.
Here, the concatenation may refer to concatenating the target information and the random number, for example, if the target information is c1 c2c3 and the random number is r, the concatenated target information may be c1 c2c3 r, and it is known that the concatenated target information includes the random number and the target information. The length of the spliced target information is equal to the length of the curve, that is, the sum of the length of the random number and the length of the target information is equal to the length of the curve. The curve length may be 32 bytes, for example, and the sum of the length of the random number and the length of the target information is equal to 32 bytes. Alternatively, the curve length may be equal to 64, 128, etc. bytes, and the curve length may be determined according to the objective function.
And S202, if the spliced target information is smaller than the information threshold, determining the spliced target information as the adjusted target information.
Here, if the spliced target information is smaller than the information threshold, it is considered that the target information is mapped to a first coordinate of a target point on a curve corresponding to the target function, and a second coordinate of the target point on the curve corresponding to the target function may be calculated according to the first coordinate and the target function, that is, coordinate information corresponding to the target information may be obtained. If the spliced target information is greater than or equal to the information threshold, it is considered that the target information is mapped to a first coordinate of a target point on a curve corresponding to a target function, and a second coordinate of the target point on the curve corresponding to the target function cannot be obtained through calculation according to the first coordinate and the target function, that is, coordinate information corresponding to the target information cannot be obtained. The spliced target information can be obtained by splicing the random number and the target information, so that the spliced target information is determined to be the adjusted target information according to the size relation between the spliced target information and the information threshold.
S203, if the spliced target information is larger than or equal to the information threshold, adjusting the random number.
Here, when the spliced target information is greater than or equal to the information threshold, the target information is mapped to a first coordinate of a target point on a curve corresponding to the target function, and a second coordinate of the target point on the curve corresponding to the target function cannot be calculated according to the first coordinate and the target function, that is, coordinate information corresponding to the target information cannot be obtained. Therefore, if the spliced target information is greater than or equal to the information threshold, the random number needs to be continuously adjusted.
And S204, splicing the adjusted random number and the target information to obtain candidate information.
And S205, if the candidate information is smaller than the information threshold, determining the candidate information as the adjusted target information.
Here, if the candidate information is smaller than the information threshold, the candidate information is mapped to a first coordinate of the target point on the curve corresponding to the objective function, and a second coordinate of the target point on the curve corresponding to the objective function may be calculated according to the first coordinate and the objective function, that is, coordinate information corresponding to the candidate information may be obtained.
In one possible implementation, if the candidate information is greater than or equal to the information threshold, the random number is adjusted; splicing the adjusted random number and the candidate information to obtain spliced candidate information; and if the spliced candidate information is smaller than the information threshold, determining the spliced candidate information as the adjusted target information.
Here, if the candidate information is greater than or equal to the information threshold, it is considered that the candidate information is mapped to a first coordinate of a target point on a curve corresponding to the objective function, and a second coordinate of the target point on the curve corresponding to the objective function cannot be calculated from the first coordinate and the objective function, that is, coordinate information corresponding to the candidate information cannot be obtained. That is, if the candidate information is greater than or equal to the information threshold, the random number continues to be adjusted until the adjusted random number and the candidate information are spliced, and if the spliced candidate information is smaller than the information threshold, the spliced candidate information is determined as the adjusted target information. By continuously adjusting the random number and adjusting the target information by using the adjusted random number, the adjusted target information can be smaller than the information threshold value, so that the adjusted target information can be mapped to a first coordinate of a target point on a curve corresponding to a target function, and a second coordinate of the target point on the curve corresponding to the target function is calculated according to the first coordinate and the target function, thereby realizing the subsequent encryption of the target information.
In the embodiment of the application, the target information and the random number corresponding to the target information are spliced, and the random number corresponding to the target information is continuously adjusted, so that the adjusted target information can be obtained, and the success rate of encrypting the target information subsequently is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present application, where the method is applied to a node in a block chain network. As shown in fig. 3, the method includes:
s301, an objective function for describing information and objective information to be processed are obtained.
S302, a random number corresponding to the target information is obtained, and the target information is adjusted according to the random number to obtain the adjusted target information.
And S303, acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information.
Here, the specific contents of steps S301 to S303 may refer to the contents of steps S101 to S103 in the embodiment corresponding to fig. 1, and are not described herein again.
S304, obtaining a private key of the terminal to which the target information belongs and a secret key corresponding to the target information.
Here, the terminal to which the target information belongs is a terminal that uploads the target information to the blockchain network for encryption, storage, and other processing, and the private key of the terminal to which the target information belongs is a private key generated by the terminal.
In a specific implementation, for example, the identifier of the terminal to which the target information belongs may be obtained, a number is generated by using an SECP256K1 algorithm, and the generated number is filled to obtain a private key of the terminal, where the private key of the terminal may refer to a number including 256 bits. Here, the identifier of the terminal may refer to a factory number of the terminal, or other identifiers for uniquely indicating the terminal.
In a possible implementation manner, the first information and the attribute information of the first information may be obtained from a blockchain network; and generating a private key corresponding to the target information according to the attribute information of the first information. The first information and the target information may belong to the same organization, and the first information is history information uploaded to the blockchain network by the organization, that is, the information uploaded to the blockchain network before the target information is encrypted and uploaded to the blockchain network. The attribute information of the first information may include one of an upload time of the first information, a terminal to which the first information belongs, and an upload address of the first information. The terminal to which the first information belongs is a terminal for uploading the first information to a block chain network; the upload address of the first information may refer to an IP address of a terminal uploading the first information, a MAC address of the terminal, and the like.
In a specific implementation, the computer device may obtain attribute information of the first information, generate a random number p according to the attribute information of the first information by using the encryption algorithm, and determine the random number p as a private key corresponding to the target information. Alternatively, the random number p may be hashed to obtain a private key corresponding to the target information, i.e., hash (p) ═ p1, and p1 may be used as the private key corresponding to the target information.
S305, acquiring candidate coordinates corresponding to the target information.
The candidate coordinates are obtained according to the base point coordinates of the curve of the objective function and the private key of the terminal. Specifically, the coordinates of a base point of a curve of the objective function may be obtained; and obtaining the product of the base point coordinate and the private key of the terminal to obtain the candidate coordinate.
Here, by acquiring the curve of the objective function, and the curve parameters of the objective function, the base point coordinates of the curve of the objective function can be acquired. For example, if the base point is G, the corresponding base point coordinate is (x1, y1), and the private key of the terminal is h, the candidate coordinate can be calculated according to the formula (1-2):
H=h*G (1-2)
the candidate coordinate is H, the base point is G, and the private key of the terminal is H.
S306, encrypting the candidate coordinates according to the key corresponding to the target information to obtain the ciphertext of the candidate coordinates.
S307, the ciphertext of the candidate coordinates and the coordinate information corresponding to the target information are fused to obtain the ciphertext of the coordinate information corresponding to the target information.
For example, the target information is i, the candidate coordinates can be encrypted by the formula (1-3) to obtain the ciphertext of the candidate coordinates, and the coordinate information corresponding to the target information and the ciphertext of the candidate coordinates can be fused to obtain the ciphertext of the coordinate information corresponding to the target information i.
Ci=Mi+ki*H (1-3)
The candidate coordinates are H, Ci is a ciphertext of the coordinate information corresponding to the target information i, Mi is the coordinate information corresponding to the target information i, and ki is a key corresponding to the target information i. And ki x H represents that the candidate coordinates are encrypted according to the key corresponding to the target information i to obtain the ciphertext of the candidate coordinates.
In a specific implementation, the coordinate information corresponding to the target information may be encrypted by using an encryption algorithm to obtain a ciphertext of the coordinate information corresponding to the target information, where the encryption algorithm may include, for example, an Elgamal algorithm (an asymmetric encryption algorithm), a Rabin algorithm (an asymmetric encryption algorithm), a Diffie-Hellman algorithm (an asymmetric encryption algorithm), and an ECC algorithm (an elliptic curve encryption algorithm). The computer equipment encrypts the coordinate information corresponding to the target information according to the private key of the terminal and the key corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information, and the terminal needs to decrypt the ciphertext corresponding to the target information to obtain the content of the target information.
S308, the ciphertext of the coordinate information corresponding to the target information is compressed to obtain a compressed ciphertext, and the compressed ciphertext is stored in the block chain network.
Here, the specific content of step S308 may refer to the content of step S105 in the embodiment corresponding to fig. 1, and is not described herein again.
In the embodiment of the application, the coordinate information corresponding to the target information is encrypted according to the private key of the terminal and the key corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information, so that the target information can be encrypted to obtain the corresponding ciphertext, and after the terminal obtains the ciphertext corresponding to the target information, the terminal needs to decrypt to obtain the content of the target information. By encrypting the target information, even if an illegal terminal acquires the ciphertext corresponding to the target information, the content of the target information cannot be acquired because decryption cannot be realized, and the safety of the target information can be ensured.
Optionally, after the compressed ciphertext is stored in the block chain network, the compressed ciphertext may be decrypted, so as to obtain the content of the target information. Referring to fig. 4, fig. 4 is a schematic flowchart of an information processing method for compressing a ciphertext according to an embodiment of the present application, where the method is applied to a node in a block chain network. As shown in fig. 4, the method includes:
s401, reading the compressed ciphertext from the block chain network.
S402, decompressing the compressed ciphertext to obtain the ciphertext of the coordinate information corresponding to the target information.
Here, since the ciphertext of the target information is compressed before the ciphertext of the target information is stored in the block chain, the ciphertext of the coordinate information corresponding to the target information may be decrypted after the compressed ciphertext is decompressed to obtain the ciphertext of the coordinate information corresponding to the target information.
Specifically, if the ciphertext of the coordinate information corresponding to the target information is compressed, the byte of the first coordinate in the ciphertext of the coordinate information corresponding to the target information is cut, the cut byte and the second coordinate in the ciphertext of the coordinate information corresponding to the target information are used as the compressed ciphertext, the first coordinate to be selected can be calculated according to the second coordinate and the target function, and the first coordinate in the ciphertext of the coordinate information corresponding to the target information is determined according to the first coordinate to be selected and the cut byte, so that the ciphertext of the coordinate information corresponding to the target information after decompression is obtained.
And S403, decrypting the ciphertext of the coordinate information corresponding to the target information to obtain the coordinate information corresponding to the target information.
Here, the target information may be decrypted by the formula (1-4) to obtain the coordinate information corresponding to the target information.
Mi=Ci-ki*H (1-4)
The candidate coordinates are H, Ci is a ciphertext of the coordinate information corresponding to the target information i, Mi is the coordinate information corresponding to the target information i, and ki is a key corresponding to the target information i. The target information can be decrypted by the formula (1-4), so that the coordinate information of the target information is obtained.
S404, determining the adjusted target information according to the coordinate information corresponding to the target information and the target function.
Here, when encrypting the target information, the coordinate information corresponding to the target information is acquired based on the target function and the adjusted target information, for example, the adjusted target information is encoded to obtain encoded data, and the encoded data is mapped onto a curve corresponding to the target function to obtain corresponding coordinate points, so that the coordinate information corresponding to the target information is obtained based on the coordinate points. Therefore, the encoded data corresponding to the adjusted target information can be obtained from the coordinate information corresponding to the target information and the target function, and the adjusted target information can be determined from the encoded data.
And S405, determining the target information according to the adjusted target information and the random number corresponding to the target information.
Here, since the coordinate information corresponding to the object information is generated based on the object function and the adjusted object information, and since the adjusted object information is obtained by adjusting the object information based on the random number corresponding to the object information, the object information may be determined based on the coordinate information corresponding to the object information and the random number corresponding to the object information. If the target information is adjusted, the random number and the target information are spliced, the random number in the target information can be deleted, and the target information is determined according to the target information from which the random number is deleted. For example, if the target information is c1 c2c3, the random number is r, and the spliced target information may be c1 c2c3 r, the target information obtained by deleting the random number r is c1 c2c 3. That is, the random number in the target information may be deleted, and the decrypted target information may be determined according to the target information from which the random number is deleted, so as to decrypt the target information.
In the embodiment of the application, by reading the compressed ciphertext from the blockchain network, since the ciphertext is compressed when being stored in the blockchain network, the compressed ciphertext needs to be decompressed to obtain the ciphertext of the coordinate information corresponding to the target information, and the ciphertext of the coordinate information corresponding to the target information is decrypted to obtain the coordinate information corresponding to the target information; and obtaining the adjusted target information through the coordinate information and the target function corresponding to the target information. Since the target information is adjusted by the random number before being encrypted, the target information before being adjusted can be obtained according to the adjusted target information and the random number, that is, the decrypted target information can be obtained, and the decryption of the target information can be realized. The target information is encrypted and then stored in the block chain network, so that the occupation of local space resources of the terminal can be saved, and the safety of the information can be improved based on the characteristic that the block chain cannot be tampered and is not easy to lose.
The method of the embodiments of the present application is described above, and the apparatus of the embodiments of the present application is described below.
Referring to fig. 5, fig. 5 is a schematic diagram of a composition structure of an information processing apparatus for compressing a ciphertext according to an embodiment of the present application, where the information processing apparatus for compressing a ciphertext may be a computer program (including program code) running in a computer device, for example, the information processing apparatus for compressing a ciphertext is an application software; the apparatus may be used to perform the corresponding steps in the methods provided by the embodiments of the present application. The apparatus 50 comprises:
an information obtaining module 501, configured to obtain a target function for describing information and target information to be processed;
an information adjusting module 502, configured to obtain a random number corresponding to the target information, and adjust the target information according to the random number to obtain adjusted target information;
a coordinate obtaining module 503, configured to obtain, according to the target function and the adjusted target information, coordinate information corresponding to the target information;
an information encryption module 504, configured to encrypt the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
the information compression module 505 is configured to compress a ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and store the compressed ciphertext in the block chain network.
Optionally, the coordinate information corresponding to the target information includes a first coordinate and a second coordinate, and the information compression module 505 is specifically configured to:
cutting out bytes with a target length from the ciphertext with the first coordinate to be used as the ciphertext with the cut first coordinate, wherein the target length is smaller than the byte length corresponding to the ciphertext with the first coordinate;
and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as the compressed ciphertext.
Optionally, the target length is 1; the information compression module 505 is specifically configured to:
cutting out the sign bit byte of the first coordinate from the ciphertext of the first coordinate;
and determining the sign bit byte of the first coordinate as the ciphertext of the cut first coordinate.
Optionally, the information adjusting module 502 is specifically configured to:
splicing the random number and the target information to obtain spliced target information;
and if the spliced target information is smaller than the information threshold, determining the spliced target information as the adjusted target information.
Optionally, the apparatus 50 further comprises: a random number adjustment module 506, configured to:
if the spliced target information is greater than or equal to the information threshold, adjusting the random number;
splicing the adjusted random number with the target information to obtain candidate information;
and if the candidate information is smaller than the information threshold, determining the candidate information as the adjusted target information.
Optionally, the information encrypting module 504 is specifically configured to:
acquiring a private key of a terminal to which the target information belongs and a key corresponding to the target information;
acquiring candidate coordinates corresponding to the target information, wherein the candidate coordinates are obtained according to base point coordinates of a curve of the target function and the private key;
encrypting the candidate coordinate according to a key corresponding to the target information to obtain a ciphertext of the candidate coordinate;
and fusing the ciphertext of the candidate coordinates and the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information.
Optionally, the apparatus 50 further comprises: an information decryption module 507, configured to:
reading the compressed ciphertext from the blockchain network;
decompressing the compressed ciphertext to obtain a ciphertext of the coordinate information corresponding to the target information;
decrypting the ciphertext of the coordinate information corresponding to the target information to obtain the coordinate information corresponding to the target information;
determining the adjusted target information according to the coordinate information corresponding to the target information and the target function;
and determining the target information according to the adjusted target information and the random number corresponding to the target information.
It should be noted that, for the content that is not mentioned in the embodiment corresponding to fig. 5, reference may be made to the description of the method embodiment, and details are not described here again.
According to an embodiment of the present application, the steps involved in the information processing method for compressing ciphertext shown in fig. 1 may be performed by respective modules in the information processing apparatus for compressing ciphertext shown in fig. 5. For example, step S101 shown in fig. 1 may be performed by the information obtaining module 501 in fig. 5, and step S102 shown in fig. 1 may be performed by the information adjusting module 502 in fig. 5; step S103 shown in fig. 1 may be performed by the coordinate acquisition module 503 in fig. 5; step S104 shown in fig. 1 may be performed by the information encryption module 504 in fig. 5; step S105 shown in fig. 1 may be performed by the information compression module 505 in fig. 5. According to an embodiment of the present application, each module in the information processing for compressing the ciphertext shown in fig. 5 may be respectively or entirely combined into one or several units to form the unit, or some unit(s) may be further split into multiple sub-units with smaller functions, which may implement the same operation without affecting implementation of technical effects of the embodiment of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of units, or the functions of a plurality of modules can be realized by one unit. In other embodiments of the present application, the information processing apparatus for compressing the ciphertext may include other units, and in practical applications, these functions may be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, an information processing apparatus that compresses ciphertext as shown in fig. 5 may be constructed by running a computer program (including program code) that is capable of executing steps involved in the respective methods shown in fig. 1, fig. 2, fig. 3, and fig. 4 on a general-purpose computer device, such as a computer, including a processing element and a storage element, such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and an information processing method that compresses ciphertext according to an embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded into and executed by the computing apparatus via the computer-readable recording medium.
In the embodiment of the application, the compressed ciphertext is obtained by compressing the ciphertext of the coordinate information corresponding to the target information, and the compressed ciphertext is stored in the block chain network, so that the space resource occupation of the block chain network is large due to the fact that the ciphertext of the target information is directly stored in the block chain network, the ciphertext of the coordinate information corresponding to the target information is stored in the block chain network after being compressed, the storage pressure of the block chain network can be reduced, and the storage space is saved. Furthermore, the target information is adjusted by using the random number, so that the coordinate information corresponding to the adjusted target information can be generated according to the adjusted target information, and the success rate of acquiring the coordinate information corresponding to the adjusted target information is improved. By encrypting the target information, an illegal terminal can acquire the content of the target information only after cracking the encrypted target information, so that the safety of the target information can be improved. In addition, the ciphertext of the target information is compressed and stored in the block chain network, and based on the characteristics that the block chain cannot be tampered and is not easy to lose, the safety of the information can be improved, and the resource occupation of the local storage space of the terminal is reduced.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. As shown in fig. 6, the computer device 60 may include: the processor 601, the network interface 604 and the memory 605, and the computer device 60 may further include: a user interface 603, and at least one communication bus 602. Wherein a communication bus 602 is used to enable the connection communication between these components. The user interface 603 may include a Display (Display) and a Keyboard (Keyboard), and the selectable user interface 603 may also include a standard wired interface and a standard wireless interface. The network interface 604 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 605 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 605 may optionally be at least one storage device located remotely from the processor 601. As shown in fig. 6, the memory 605, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 60 shown in fig. 6, the network interface 604 may provide network communication functions; and the user interface 603 is primarily an interface for providing input to a user; and processor 601 may be used to invoke the device control application stored in memory 605 to implement:
acquiring a target function for describing information and target information to be processed;
acquiring a random number corresponding to the target information, and adjusting the target information according to the random number to obtain adjusted target information;
acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information;
encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
and compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network.
It should be understood that the computer device 60 described in this embodiment of the present application may perform the description of the information processing method for compressing the ciphertext in the embodiment corresponding to fig. 1, fig. 2, fig. 3, and fig. 4, and may also perform the description of the information processing apparatus for compressing the ciphertext in the embodiment corresponding to fig. 5, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
In the embodiment of the application, the compressed ciphertext is obtained by compressing the ciphertext of the coordinate information corresponding to the target information, and the compressed ciphertext is stored in the block chain network, so that the space resource occupation of the block chain network is large due to the fact that the ciphertext of the target information is directly stored in the block chain network, the ciphertext of the coordinate information corresponding to the target information is stored in the block chain network after being compressed, the storage pressure of the block chain network can be reduced, and the storage space is saved. Furthermore, the target information is adjusted by using the random number, so that the coordinate information corresponding to the adjusted target information can be generated according to the adjusted target information, and the success rate of acquiring the coordinate information corresponding to the adjusted target information is improved. By encrypting the target information, an illegal terminal can acquire the content of the target information only after cracking the encrypted target information, so that the safety of the target information can be improved. In addition, the ciphertext of the target information is compressed and stored in the block chain network, and based on the characteristics that the block chain cannot be tampered and is not easy to lose, the safety of the information can be improved, and the resource occupation of the local storage space of the terminal is reduced.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, the computer program comprising program instructions, which, when executed by a computer, cause the computer to perform the method according to the foregoing embodiments, and the computer may be a part of the above-mentioned computer device. Such as the processor 601 described above. By way of example, the program instructions may be executed on one computer device, or on multiple computer devices located at one site, or distributed across multiple sites and interconnected by a communication network, which may comprise a blockchain network.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. An information processing method for compressing a ciphertext, comprising:
acquiring a target function for describing information and target information to be processed;
acquiring a random number corresponding to the target information, and adjusting the target information according to the random number to obtain adjusted target information;
acquiring coordinate information corresponding to the target information according to the target function and the adjusted target information;
encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
and compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into a block chain network.
2. The method according to claim 1, wherein the coordinate information corresponding to the target information includes a first coordinate and a second coordinate, and the compressing the ciphertext of the coordinate information corresponding to the target information to obtain the compressed ciphertext includes:
cutting out bytes with a target length from the ciphertext with the first coordinate to be used as the ciphertext with the cut first coordinate, wherein the target length is smaller than the byte length corresponding to the ciphertext with the first coordinate;
and determining the cut ciphertext of the first coordinate and the ciphertext of the second coordinate as the compressed ciphertext.
3. The method of claim 2, wherein the target length is 1; the cutting out bytes of the target length from the ciphertext of the first coordinate as the ciphertext of the first coordinate after cutting out includes:
cutting out a sign bit byte of the first coordinate from the ciphertext of the first coordinate;
and determining the sign bit byte of the first coordinate as the ciphertext of the cut first coordinate.
4. The method of claim 1, wherein the adjusting the target information according to the random number to obtain the adjusted target information comprises:
splicing the random number and the target information to obtain spliced target information;
and if the spliced target information is smaller than the information threshold, determining the spliced target information as the adjusted target information.
5. The method of claim 4, further comprising:
if the spliced target information is greater than or equal to the information threshold, adjusting the random number;
splicing the adjusted random number with the target information to obtain candidate information;
and if the candidate information is smaller than the information threshold, determining the candidate information as the adjusted target information.
6. The method according to claim 1, wherein the encrypting the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information comprises:
acquiring a private key of a terminal to which the target information belongs and a secret key corresponding to the target information;
obtaining candidate coordinates corresponding to the target information, wherein the candidate coordinates are obtained according to base point coordinates of a curve of the target function and the private key;
encrypting the candidate coordinates according to a key corresponding to the target information to obtain a ciphertext of the candidate coordinates;
and fusing the ciphertext of the candidate coordinates and the coordinate information corresponding to the target information to obtain the ciphertext of the coordinate information corresponding to the target information.
7. The method of claim 6, further comprising:
reading the compressed ciphertext from the blockchain network;
decompressing the compressed ciphertext to obtain a ciphertext of the coordinate information corresponding to the target information;
decrypting the ciphertext of the coordinate information corresponding to the target information to obtain the coordinate information corresponding to the target information;
determining the adjusted target information according to the coordinate information corresponding to the target information and the target function;
and determining the target information according to the adjusted target information and the random number corresponding to the target information.
8. An information processing apparatus that compresses a ciphertext, comprising:
the information acquisition module is used for acquiring a target function for describing information and target information to be processed;
the information adjusting module is used for acquiring a random number corresponding to the target information and adjusting the target information according to the random number to obtain adjusted target information;
a coordinate obtaining module, configured to obtain, according to the target function and the adjusted target information, coordinate information corresponding to the target information;
the information encryption module is used for encrypting the coordinate information corresponding to the target information to obtain a ciphertext of the coordinate information corresponding to the target information;
and the information compression module is used for compressing the ciphertext of the coordinate information corresponding to the target information to obtain a compressed ciphertext, and storing the compressed ciphertext into the block chain network.
9. A computer device, comprising: a processor, a memory, and a network interface;
the processor is connected to the memory and the network interface, wherein the network interface is configured to provide data communication functions, the memory is configured to store program code, and the processor is configured to call the program code to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202011057094.8A 2020-09-29 2020-09-29 Information processing method, device, equipment and medium for compressing ciphertext Pending CN112202453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011057094.8A CN112202453A (en) 2020-09-29 2020-09-29 Information processing method, device, equipment and medium for compressing ciphertext

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011057094.8A CN112202453A (en) 2020-09-29 2020-09-29 Information processing method, device, equipment and medium for compressing ciphertext

Publications (1)

Publication Number Publication Date
CN112202453A true CN112202453A (en) 2021-01-08

Family

ID=74007135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011057094.8A Pending CN112202453A (en) 2020-09-29 2020-09-29 Information processing method, device, equipment and medium for compressing ciphertext

Country Status (1)

Country Link
CN (1) CN112202453A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124914A (en) * 2021-09-29 2022-03-01 平安国际智慧城市科技股份有限公司 Data security transmission method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322321A (en) * 1999-08-27 2001-11-14 索尼公司 Information transmission system, transmitter, and transmission method as well as information reception system, receiver and reception method
CN1610291A (en) * 2004-11-19 2005-04-27 深圳市明华澳汉科技股份有限公司 Method for encrypting and decrypting data
CN102761418A (en) * 2012-07-16 2012-10-31 重庆电子工程职业学院 Character compression encrypting method
CN104219300A (en) * 2014-08-28 2014-12-17 广州市中海达测绘仪器有限公司 Coordinate transformation parameter sharing method and system
CN110601815A (en) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 Block chain data processing method and equipment
CN110881063A (en) * 2019-11-20 2020-03-13 腾讯科技(深圳)有限公司 Storage method, device, equipment and medium of private data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322321A (en) * 1999-08-27 2001-11-14 索尼公司 Information transmission system, transmitter, and transmission method as well as information reception system, receiver and reception method
CN1610291A (en) * 2004-11-19 2005-04-27 深圳市明华澳汉科技股份有限公司 Method for encrypting and decrypting data
CN102761418A (en) * 2012-07-16 2012-10-31 重庆电子工程职业学院 Character compression encrypting method
CN104219300A (en) * 2014-08-28 2014-12-17 广州市中海达测绘仪器有限公司 Coordinate transformation parameter sharing method and system
CN110601815A (en) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 Block chain data processing method and equipment
CN110881063A (en) * 2019-11-20 2020-03-13 腾讯科技(深圳)有限公司 Storage method, device, equipment and medium of private data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124914A (en) * 2021-09-29 2022-03-01 平安国际智慧城市科技股份有限公司 Data security transmission method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110689349B (en) Transaction hash value storage and searching method and device in blockchain
CN112202554B (en) Information processing method, device and equipment for generating key based on attribute of information
CN110661748B (en) Log encryption method, log decryption method and log encryption device
CN110263579B (en) Data processing method, system and related equipment
WO2022068360A1 (en) Shared root key-based information processing method and apparatus, and device and medium
CN113032357A (en) File storage method and device and server
CN111294203B (en) Information transmission method
CN112202779B (en) Block chain based information encryption method, device, equipment and medium
CN111611621A (en) Block chain based distributed data encryption storage method and electronic equipment
CN104601681A (en) File fragmentation processing method and device
CN112133386A (en) Block chain-based information processing method, device, equipment and medium
CN111241596B (en) Block chain asset account recovery method and device
CN111404892B (en) Data supervision method and device and server
CN112182109A (en) Distributed data coding storage method based on block chain and electronic equipment
CN112069525A (en) Encryption method, device and equipment for generating key based on attribute of information
WO2022068235A1 (en) Information processing method and apparatus for generating random number on the basis of attribute of information, and device
WO2022068359A1 (en) Encryption method and apparatus for compressing ciphertext of information, and device and medium
CN111447068A (en) Time service evidence storing method based on block chain
CN112202453A (en) Information processing method, device, equipment and medium for compressing ciphertext
CN110598427B (en) Data processing method, system and storage medium
CN112165383A (en) Encryption method, device, equipment and medium based on shared root key
CN116455572A (en) Data encryption method, device and equipment
CN111835519A (en) Covert communication method based on public block chain
CN114995949A (en) Container mirror image construction method and device
CN110958285B (en) Data storage system based on block chain

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