CN115001685B - Method, device, equipment and storage medium for inadvertent transmission - Google Patents

Method, device, equipment and storage medium for inadvertent transmission Download PDF

Info

Publication number
CN115001685B
CN115001685B CN202210861043.3A CN202210861043A CN115001685B CN 115001685 B CN115001685 B CN 115001685B CN 202210861043 A CN202210861043 A CN 202210861043A CN 115001685 B CN115001685 B CN 115001685B
Authority
CN
China
Prior art keywords
information
sent
public key
base point
target information
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
CN202210861043.3A
Other languages
Chinese (zh)
Other versions
CN115001685A (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.)
Beijing Infosec Technologies Co Ltd
Original Assignee
Beijing Infosec Technologies Co Ltd
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 Beijing Infosec Technologies Co Ltd filed Critical Beijing Infosec Technologies Co Ltd
Priority to CN202210861043.3A priority Critical patent/CN115001685B/en
Publication of CN115001685A publication Critical patent/CN115001685A/en
Application granted granted Critical
Publication of CN115001685B publication Critical patent/CN115001685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/50Oblivious transfer

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention provides an inadvertent transmission method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a plurality of information to be sent, and receiving a first public key sent by a receiving terminal; generating a plurality of second public keys corresponding to the plurality of information to be sent respectively based on the first public key; determining a first random number used for encrypting a plurality of information to be transmitted; and encrypting the plurality of information to be sent according to the first random number and the plurality of second public keys respectively to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number. The same first random number is used for encrypting the plurality of messages to be sent, so that part of data in the plurality of encrypted messages adopts the same data, and the calculation for many times is not needed, thereby not only reducing the calculation amount and the calculation expense in the generation process of the plurality of ciphertexts, but also simplifying the encryption process, and further improving the inadvertent transmission speed of the messages.

Description

Method, device, equipment and storage medium for accidental transmission
Technical Field
The present invention relates to the field of network information technologies, and in particular, to an unintentional transmission method, apparatus, device, and storage medium.
Background
The Oblivious Transfer (OT) is a protocol for transferring secret messages, transfers information in an obfuscated manner, can protect the privacy of both parties of message Transfer, is the basic protocol in cryptography, and is commonly used for constructing other cryptographic protocols and applications.
In practical applications, the most common inadvertent transmission is the K-to-1 inadvertent transmission. In the process of the careless transmission of K taking 1, an information holder holds K pieces of information, an information receiver wants to apply for acquiring 1 piece of information from the K pieces of information, and through interaction of the information holder and the information receiver, the information receiver can only acquire the information to be acquired, wherein the information to be acquired is applied in advance by 1 piece of information, and the information holder does not know the information specifically acquired by the information receiver.
However, in the conventional scheme, in order to implement the careless transmission of information, a holder needs to separately encrypt each held information, which makes the calculation more complicated, increases the calculation overhead, and also affects the careless transmission efficiency of the message.
Disclosure of Invention
The embodiment of the invention provides an inadvertent transmission method, an apparatus, a device and a storage medium, which are used for reducing calculation overhead and improving the efficiency of the inadvertent transmission of messages.
In a first aspect, an embodiment of the present invention provides an inadvertent transmission method, applied to a sending end, where the method includes:
acquiring a plurality of information to be sent, wherein the information to be sent comprises target information corresponding to a receiving end;
receiving a first public key sent by the receiving end;
generating a plurality of second public keys corresponding to the plurality of information to be sent respectively based on the first public key;
determining a first random number for encrypting the plurality of information to be transmitted;
and encrypting the plurality of information to be sent according to the first random number and the plurality of second public keys respectively to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number.
In a second aspect, an embodiment of the present invention provides an apparatus for unintentional transmission, where the apparatus is located at a sending end, and the apparatus includes:
the first acquisition module is used for acquiring a plurality of information to be sent, wherein the information to be sent comprises target information corresponding to a receiving end;
the first receiving module is used for receiving the first public key sent by the receiving end;
a first generating module, configured to generate, based on the first public key, a plurality of second public keys corresponding to the plurality of pieces of information to be sent respectively;
a first determining module, configured to determine a first random number used for encrypting the multiple pieces of information to be sent;
the first encryption module is configured to encrypt the multiple pieces of information to be sent according to the first random number and the multiple second public keys, and obtain multiple pieces of encrypted ciphertext corresponding to the multiple pieces of information to be sent, where the multiple pieces of encrypted ciphertext include the same part of data, and the same part of data is related to the first random number.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code that, when executed by the processor, causes the processor to implement at least the oblivious transfer method of the first aspect.
In a fourth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code that, when executed by a processor of a policing device, causes the processor to implement at least the inadvertent transmission method of the first aspect.
In a fifth aspect, an embodiment of the present invention provides an oblivious transmission method, which is applied to a receiving end, where the method includes:
acquiring a base point on an elliptic curve for data transmission, multiple times of points of the base point and a target information identifier, wherein the target information identifier is an identifier corresponding to target information to be received;
randomly generating a private key, wherein the private key is used for decrypting the target information;
generating a first public key based on the target information identification, the private key and a plurality of multiple points of the base point;
and sending the first public key to the sending end so that the sending end encrypts a plurality of information to be sent based on the first public key and a first random number to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, the same part of data is related to the first random number and a base point on the elliptic curve, and the plurality of information to be sent comprise the target information.
In a sixth aspect, an embodiment of the present invention provides an inadvertent transmission apparatus, located at a receiving end, where the apparatus includes:
a second obtaining module, configured to obtain a base point on an elliptic curve for data transmission, multiple times of the base point, and a target information identifier, where the target information identifier is an identifier corresponding to target information to be received;
the second generation module is used for randomly generating a private key, and the private key is used for decrypting the target information;
a second determining module, configured to generate a first public key based on the target information identifier, the private key, and multiple time points of the base point;
the second sending module is configured to send the first public key to the sending end, so that the sending end encrypts a plurality of pieces of information to be sent based on the first public key and the first random number to obtain a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be sent, where the plurality of encrypted ciphertexts include the same part of data, and the same part of data is related to the first random number and a base point on the elliptic curve, where the plurality of pieces of information to be sent include the target information.
In a seventh aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to at least implement the inadvertent transmission method of the fifth aspect.
In an eighth aspect, embodiments of the invention provide a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium
The read storage medium has stored thereon executable code that, when executed by a processor of a computing device, causes the processor to
The processor may implement at least the method of inadvertent transmission as described in the fifth aspect.
The oblivious transmission scheme provided by the embodiment of the invention can be suitable for a sending end and a receiving end, aiming at any sending end, firstly, a plurality of pieces of information to be sent and a first random number used for encrypting the plurality of pieces of information to be sent are obtained, then, a plurality of second public keys respectively corresponding to the plurality of pieces of information to be sent are generated, and the plurality of pieces of information to be sent are respectively encrypted according to the obtained first random number and the plurality of second public keys, so that a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be sent are obtained, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number. In the scheme, the first random number and the second public keys are used for encrypting the information to be sent respectively to obtain a plurality of encrypted ciphertexts corresponding to the information to be sent, so that the safety of the information is improved, meanwhile, the same random number is used for encrypting the information to be sent, so that the encrypted ciphertexts comprise the same part of data, and the part of data does not need to be calculated for many times, thereby greatly reducing the calculation amount generated by the encrypted ciphertexts, reducing the calculation cost, simplifying the encryption process of the information to be sent, and further realizing the improvement of the inadvertent transmission speed of the information.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of an inadvertent transmission method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of an inadvertent transmission method according to an exemplary embodiment of the present application;
fig. 3 is a schematic flowchart of a process of generating a plurality of second public keys corresponding to a plurality of pieces of information to be sent according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a process of obtaining a plurality of encrypted ciphertexts corresponding to a plurality of information to be transmitted according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an inadvertent transmission method according to an exemplary embodiment of the present invention;
fig. 6 is a schematic structural diagram of an inadvertent transmission device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device corresponding to the inadvertent transmission device provided in the embodiment shown in fig. 6;
fig. 8 is a schematic structural diagram of an inadvertent transmission device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device corresponding to the inadvertent transmission device provided in the embodiment shown in fig. 8.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise. It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Depending on the context, the words "if" or "if" as used herein may be interpreted as "at" \8230; \8230, when "or" when 8230; \8230, when ".
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in articles of commerce or systems including such elements.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
The careless transmission transmits information in an fuzzification mode, the privacy of an information holder and an information receiver can be effectively protected, and the careless transmission is started to be applied in more and more fields due to the characteristics of the careless transmission, such as fields of privacy information recovery, fair transaction contract signing, careless safety calculation and the like.
However, in the process of the unintentional transmission in which K takes 1, since the information receiver only obtains the information to be applied for acquisition and does not reveal the rest of information held by the information holder, K pieces of information held by the information holder need to be encrypted and then transmitted, and thus, an encrypted ciphertext generation process needs to be performed on each message once, which not only increases the calculation amount in the whole ciphertext generation process, but also complicates the calculation, increases the calculation overhead, and affects the efficiency of the unintentional transmission of the message. Based on this, the embodiment of the present invention provides a solution, where multiple pieces of information to be sent are encrypted by using the same first random number, and part of data in multiple encrypted ciphertexts corresponding to the multiple pieces of information to be sent no longer needs to be calculated for multiple times, and the same data may be used, so that the calculation amount in the process of generating the multiple encrypted ciphertexts is reduced, the calculation overhead is reduced, the encryption process is simplified, and the speed of inadvertent transmission of messages is increased.
The method for transmitting the data unintentionally is described in detail by various embodiments.
The method for transmitting the data unintentionally can be executed by an electronic device, and the electronic device can be a terminal device such as a PC, a notebook computer, a smart phone, and the like. The following is an exemplary description of the inadvertent transmission procedure performed by the transmitting end.
Fig. 1 is a flowchart of an inadvertent transmission method according to an embodiment of the present invention. Fig. 2 is a schematic view of an application scenario of an oblivious transmission method according to an exemplary embodiment of the present application; referring to fig. 1 and fig. 2, the embodiment provides an inadvertent transmission method, where an execution main body of the method may be a sending end device, it may be understood that the sending end device may be implemented as software or a combination of software and hardware, and specifically, as shown in fig. 1, the inadvertent transmission method may include the following steps:
step 101, obtaining a plurality of information to be sent, wherein the plurality of information to be sent includes target information corresponding to a receiving end.
And 102, receiving a first public key sent by a receiving end.
Step 103, generating a plurality of second public keys corresponding to the plurality of information to be sent respectively based on the first public key.
Step 104, determining a first random number for encrypting a plurality of information to be transmitted.
And 105, encrypting the plurality of information to be sent respectively according to the first random number and the plurality of second public keys to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number.
The above steps are explained in detail below:
step 101, obtaining a plurality of information to be sent, wherein the plurality of information to be sent includes target information corresponding to a receiving end.
In the embodiment of the present invention, a sending end, as an information holder, needs to acquire a plurality of pieces of information to be sent before performing an inadvertent transmission, and the acquired pieces of information to be sent include target information corresponding to a receiving end. The information to be transmitted may refer to two or more information to be transmitted, the specific number of the information to be transmitted may be set according to the actual application situation and the design requirement, and the information to be transmitted may include data, images, texts, audios, and the like.
In some embodiments, before acquiring the plurality of pieces of information to be transmitted, the transmitting end device may determine the elliptic curve parameters, the base point on the elliptic curve, and the multiple times of the base point. Specifically, elliptic curve parameters are obtained, an elliptic curve is determined based on the elliptic curve parameters, and then a base point on the elliptic curve is determined based on the elliptic curve. Based on the base point on the elliptic curve, a plurality of times of the base point is determined. And then disclosing the determined elliptic curve parameters, elliptic curve equations, the base points on the elliptic curve and the multiple times of the base points, specifically, sending the determined elliptic curve parameters, the elliptic curve equations, the base points on the elliptic curve and the multiple times of the base points to the corresponding receiving terminals, or directly storing the determined elliptic curve parameters, the elliptic curve equations, the base points on the elliptic curve and the multiple times of the base points in a preset storage area, and when the receiving terminals need to receive information, directly accessing the preset storage area to obtain specific parameter information.
In other embodiments, the information such as the elliptic curve parameters and the base points on the elliptic curve may be generated and disclosed by a third party authority before acquiring the plurality of pieces of information to be transmitted. Specifically, the third party mechanism selects elliptic curve parameters, determines an elliptic curve based on the elliptic curve parameters, then determines a base point on the elliptic curve based on the elliptic curve, and determines a plurality of multiple points of the base point based on the base point on the elliptic curve. And the determined elliptic curve parameters, the elliptic curve equation, the base point on the elliptic curve and a plurality of times of the base point are sent to the sending end equipment and the receiving end equipment, or the determined parameter information is directly stored in a preset storage area, and the sending end equipment and the receiving end equipment can directly obtain the specific parameter information by accessing the preset storage area.
Specifically, it is assumed that a sending end or a third party organization selects a parameter q, defines a finite field Fq containing q elements, selects a parameter a, b ∈ Fq, defines an elliptic curve equation E (Fq) by the parameter a, b, and selects a base point G =onthe elliptic curve equation
Figure 533444DEST_PATH_IMAGE001
Wherein, in the step (A),
Figure 981743DEST_PATH_IMAGE001
i.e. the coordinates of the base point G, the order of which is n, are defined
Figure 495900DEST_PATH_IMAGE002
Is a hash algorithm. In addition, after generating or acquiring the elliptic curve related parameters, the elliptic curve equation and the base point coordinate information on the selected elliptic curve, the transmitting end may determine a multiple point set of the base point coordinates based on the base point coordinates<G>={[1]G,[2]G,[3]G...[n]G }, wherein [ n ]]G = n × G. Then from the multiple point set of base point coordinates<G>A plurality of multiple points G1, G2.. GK are selected, wherein G1, G2.. GK are represented as a plurality of non-repeating multiple points randomly selected from a set of multiple points of the base point coordinates. And finally, the sending end sends the multiple selected multiple times of points to the receiving end, so that the receiving end can generate a corresponding first public key according to the multiple times of points. The sending end or the third party mechanism can disclose the relevant parameters of the elliptic curve, the elliptic curve equation, and the selected base point and the multiple times point information of the base point on the elliptic curve.
And 102, receiving a first public key sent by a receiving end. When the receiving end needs to acquire the target information, a first public key is generated based on the target information identifier corresponding to the target information and the public key corresponding to the target information, and the generated first public key is sent to the sending end.
The sending end receives a first public key sent by the receiving end, wherein the first public key is not public key information corresponding to real target information, and the target information identification and the public key information corresponding to the target information are hidden.
Step 103, generating a plurality of second public keys corresponding to the plurality of pieces of information to be transmitted respectively based on the first public key.
The sending end calculates public key information used when each piece of information to be sent is encrypted based on the received first public key, and the public key information is defined as a second public key. Due to the characteristic of inadvertent transmission, it is necessary to ensure that the receiving end can obtain the target information and that other information held by the sending end is not leaked, and thus, a plurality of pieces of information to be sent need to be encrypted and transmitted in the transmission process. After the first public key is received, when the plurality of information to be sent are encrypted, a plurality of second public keys corresponding to the plurality of information to be sent are generated based on the first public key sent by the receiving end, so that the receiving end can only decrypt an encrypted ciphertext corresponding to the target information based on a private key corresponding to the target information, the receiving end can only obtain the target information, and meanwhile other information to be sent is protected from being leaked.
Step 104, determining a first random number for encrypting a plurality of information to be transmitted.
And 105, encrypting the plurality of information to be sent respectively according to the first random number and the plurality of second public keys to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number.
In the data transmission process, in order to protect the security of information and ensure that the receiving end can only obtain target information, a plurality of pieces of information of the sending end need to be respectively encrypted and then transmitted, and the specific implementation process can be as follows: the method comprises the steps of firstly determining a first random number used for encrypting a plurality of information to be sent, then encrypting the plurality of information to be sent according to the first random number and a plurality of second public keys respectively to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number. When the encrypted ciphertexts corresponding to the information to be sent are generated, the same first random number is adopted to generate the ciphertexts for the information to be sent, namely, part of data in the encrypted ciphertexts are generated based on the first random number, so that the part of data in the encrypted ciphertexts does not need to be generated for multiple times, and only one-time calculation generation is needed, thereby reducing the calculation amount for generating the encrypted ciphertexts and the calculation cost, simplifying the encryption process of the information to be sent, and further improving the speed of the unintentional transmission of the information.
The method for transmitting the information to be transmitted includes generating a plurality of second public keys corresponding to a plurality of pieces of information to be transmitted respectively based on a received first public key, determining a first random number used for encrypting the plurality of pieces of information to be transmitted, and encrypting the plurality of pieces of information to be transmitted respectively according to the first random number and the plurality of second public keys to obtain a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be transmitted, where the plurality of encrypted ciphertexts include the same part of data, and the same part of data is related to the first random number. In the scheme, the first random number and the second public keys are used for encrypting the information to be sent respectively to obtain a plurality of encrypted ciphertexts corresponding to the information to be sent, so that the information security is improved. Meanwhile, as the same random number is adopted to encrypt a plurality of messages to be sent, the plurality of encrypted ciphertexts comprise the same part of data, and the part of data does not need to be calculated for many times, thus not only greatly reducing the calculation amount generated by the plurality of encrypted ciphertexts and reducing the calculation cost, but also simplifying the encryption process of the plurality of messages to be sent, and further realizing the improvement of the inadvertent transmission speed of the messages.
Fig. 3 is a schematic flowchart of a process of generating a plurality of second public keys corresponding to a plurality of pieces of information to be sent according to an embodiment of the present application; on the basis of the foregoing embodiment, referring to fig. 3, this embodiment provides an implementation manner for generating a plurality of second public keys corresponding to a plurality of pieces of information to be sent, based on a first public key. Specifically, the method may include:
step 301: and acquiring a plurality of information identifications corresponding to a plurality of information to be sent.
Step 302: and if the information identifier is 0, determining the first public key as a second public key for encrypting the information to be sent corresponding to the information identifier.
Step 303: and if the information identifier is not 0, generating a plurality of second public keys for encrypting a plurality of information to be transmitted based on the plurality of information identifiers, the first public key and a plurality of times of the base point.
Before generating a plurality of second public keys corresponding to a plurality of information to be sent, first, a plurality of information identifiers corresponding to a plurality of information to be sent are obtained. The sending end device may perform identification processing on each to-be-sent information in advance to generate a corresponding information identifier, or may obtain multiple pieces of to-be-sent information, where the multiple pieces of to-be-sent information carry information identifiers.
After a plurality of information identifiers corresponding to a plurality of pieces of information to be sent are obtained, whether the information identifiers are 0 or not is judged, and if the information identifiers are 0, the first public key is directly determined as a second public key used for encrypting the information to be sent corresponding to the information identifiers. And if the information identifier is not 0, generating a plurality of second public keys for encrypting a plurality of pieces of information to be transmitted based on the information identifier, the first public key and a plurality of times of the base point.
The specific implementation manner of generating the plurality of second public keys for encrypting the plurality of information to be transmitted based on the information identifier, the first public key, and the plurality of multiple points of the base point may be: and determining a plurality of multiple points corresponding to the plurality of information identifications, and generating a plurality of second public keys for encrypting the plurality of information to be sent based on the multiple points and the first public key.
In an optional embodiment, generating, based on the multiple times and the first public key, multiple second public keys for encrypting multiple pieces of information to be sent may include: a plurality of difference values between the first public key and the multiple points are respectively obtained, and a plurality of second public keys are respectively determined based on the difference values.
Specifically, assume that the first public key is PK0, the sending end holds 5 pieces of information to be sent, obtains information identifiers i of the 5 pieces of information to be sent as 1, 2, 3, 4, and 5, obtains 5 multiple points corresponding to the 5 pieces of information to be sent as G1, G2, G3, G4, and G5, respectively, calculates a plurality of differences between the first public key and the 5 multiple points, that is, PKi = Gi-PK0, and determines the plurality of differences as the second public key. Namely, the second public keys corresponding to the 5 pieces of information to be transmitted are PK1= G1-PK0, PK2= G2-PK0, PK3= G3-PK0, PK4= G4-PK0, and PK5= G5-PK0, respectively.
In practical application, there may be a case where the information identifier of the acquired information to be transmitted includes 0. Specifically, assume that the first public key is PK0, the sending end holds 5 pieces of information to be sent, acquires information identifiers i of the 5 pieces of information to be sent as 0, 1, 2, 3, and 4, determines a second public key corresponding to the information to be sent with the information identifier of 0 as the first public key, namely PK0= PK0, then acquires respective corresponding multiple points of the remaining 4 pieces of information to be sent, which are G1, G2, G3, and G4, respectively calculates a plurality of differences between the first public key and the 4 multiple points, namely PKi = Gi-PK0, and determines the plurality of differences as the second public key, namely, the second public keys corresponding to the 4 pieces of information to be sent are PK1= G1-PK0, PK2= G-PK 0, PK3= G3-PK0, and PK4= G4-PK0, respectively.
In the embodiment of the invention, whether the information identifier is 0 is judged by obtaining the information identifier corresponding to each of a plurality of pieces of information to be sent, if the information identifier is 0, the first public key is determined as the second public key used for encrypting the information to be sent corresponding to the information identifier, and if the information identifier is not 0, a plurality of second public keys used for encrypting the plurality of pieces of information to be sent are generated based on the information identifier, the first public key and a plurality of multiple points of a base point. Generating multiple information to be transmitted corresponding to the first public key
The second public key can enable the receiving end to only carry out encryption ciphertext corresponding to the target information based on the private key corresponding to the target information
And line decryption is carried out, so that the receiving end can only obtain the target information and simultaneously protects other information to be sent from being leaked.
Fig. 4 is a schematic flowchart of a process of obtaining a plurality of encrypted ciphertexts corresponding to a plurality of information to be transmitted according to an embodiment of the present application; on the basis of the foregoing embodiment, referring to fig. 4, this embodiment provides an implementation manner for encrypting a plurality of pieces of information to be transmitted according to a first random number and a plurality of second public keys, respectively, and obtaining a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be transmitted. Specifically, encrypting the multiple pieces of information to be sent according to the first random number and the multiple second public keys, respectively, and obtaining multiple encrypted ciphertexts corresponding to the multiple pieces of information to be sent may include:
step 401 generates a ciphertext first portion based on the first random number and a base point on the elliptic curve.
Step 402, respectively generating a plurality of ciphertext second parts corresponding to the information to be transmitted based on the first random number, the plurality of second public keys and the plurality of information to be transmitted.
Step 403, the hash algorithm is used to process the first random number, the plurality of second public keys, and the plurality of information to be sent, so as to obtain respective ciphertext third portions of the plurality of information to be sent.
Step 404, obtaining an encrypted ciphertext corresponding to each of the plurality of information to be transmitted based on the ciphertext first portion, the ciphertext second portions corresponding to the plurality of information to be transmitted, and the ciphertext third portions corresponding to the plurality of information to be transmitted.
After a first random number used for encrypting a plurality of information to be sent is determined, the plurality of information to be sent are encrypted respectively according to the first random number and a plurality of second public keys. Specifically, first, the ciphertext first portion is generated based on the first random number and the base point on the elliptic curve. And then, respectively generating a plurality of ciphertext second parts corresponding to the information to be transmitted based on the first random number, the plurality of second public keys and the plurality of information to be transmitted. And then, the first random number, the plurality of second public keys and the plurality of information to be sent are processed by utilizing a Hash algorithm, and the third parts of the ciphertext corresponding to the plurality of information to be sent are respectively obtained. And finally, acquiring the encrypted ciphertext corresponding to the information to be sent based on the ciphertext first part, the ciphertext second parts corresponding to the information to be sent and the ciphertext third parts corresponding to the information to be sent. The plurality of information to be transmitted each generate a ciphertext first portion based on a first random number and a base point on an elliptic curve. The information to be sent is encrypted and the encrypted ciphertext is generated by only executing the generation process of the first ciphertext part once, so that the calculation amount of the generation of the encrypted ciphertexts is greatly reduced, the calculation cost is reduced, the encryption process of the information to be sent can be simplified, and the purpose of improving the information careless transmission speed is realized.
Usually, an encrypted ciphertext consists of three parts, so each encrypted ciphertext needs to generate three parts of the ciphertext respectively. In the embodiment of the invention, the same first random number is used for generating the first part of the ciphertext, the corresponding first part of the ciphertext is generated when each message to be sent does not need to be encrypted respectively, only one calculation is needed, and when a plurality of next messages to be sent are encrypted to generate the encrypted ciphertext, the calculated first part of the ciphertext is directly used.
Specifically, it is assumed that a sending end holds k pieces of information to be sent, information identifiers corresponding to the k pieces of information to be sent are 1 and 2
Figure 563214DEST_PATH_IMAGE003
Figure 908744DEST_PATH_IMAGE004
The process of encrypting each message Mi to be sent by the sending end and generating a corresponding encrypted ciphertext may include:
step 1, selecting a random number as a first random number r, and the first random number
Figure 465628DEST_PATH_IMAGE005
Step 2, calculating the first part of the ciphertext
Figure 401835DEST_PATH_IMAGE006
Where G is the coordinate of the base point on the elliptic curve.
Step 3, order
Figure 131894DEST_PATH_IMAGE007
Calculating
Figure 535193DEST_PATH_IMAGE008
Wherein
Figure 200661DEST_PATH_IMAGE009
In order to generate the function for the symmetric key,
Figure 486149DEST_PATH_IMAGE010
is the length of the data Mi to be transmitted.
Step 4, calculating the second part of the ciphertext
Figure 957581DEST_PATH_IMAGE011
Step 5, calculating a third part of the ciphertext
Figure 887491DEST_PATH_IMAGE012
Step 6, obtaining k encrypted ciphertexts according to the first part, the second part and the third part of the ciphertexts corresponding to each message to be sent
Figure 114073DEST_PATH_IMAGE013
=。
As can be seen from the above process of generating the encrypted ciphertext, the first part of the encrypted ciphertext is calculated by the first random data and the ellipse base coordinate G, but in the embodiment of the present invention, the same first random number and the same ellipse base coordinate G are used, so that the same first part of the ciphertext is obtained, that is, the first parts of the ciphertext corresponding to all the information to be transmitted are the same and only need to be calculated once, so that the amount of calculation can be greatly reduced, and the calculation process can be simplified.
In addition, in practical applications, after obtaining a plurality of encrypted ciphertexts corresponding to a plurality of information to be transmitted, the transmitting end needs to transmit the plurality of ciphertexts after encryption to the receiving end. Therefore, on the basis of any of the above embodiments, the inadvertent transmission method may further include: and sending the plurality of encrypted ciphertexts to a receiving end so that the receiving end decrypts the encrypted ciphertexts corresponding to the target information based on the private key corresponding to the target information identification to obtain the target information.
FIG. 5 is a flow chart illustrating an inadvertent transmission method according to an exemplary embodiment of the present invention; referring to fig. 5, the embodiment provides an inadvertent transmission method, and the execution subject of the method may be a receiving end device, and it is understood that the terminal device may be implemented as software or a combination of software and hardware. Specifically, the method for transmitting the data unintentionally may include:
step 501, a base point on an elliptic curve for data transmission, multiple times of the base point and a target information identifier are obtained, and the target information identifier is an identifier corresponding to target information to be received.
Step 502, randomly generating a private key, wherein the private key is used for decrypting the target information.
Step 503, generating a first public key based on the target information identifier, the private key and the multiple points of the base point.
Step 504, the first public key is sent to the sending end, so that the sending end encrypts the multiple pieces of information to be sent based on the first public key and the first random number to obtain multiple encrypted ciphertexts corresponding to the multiple pieces of information to be sent, the multiple encrypted ciphertexts include the same data, the same data are related to the first random number and a base point on the elliptic curve, and the multiple pieces of information to be sent include the target information.
The above steps are explained in detail below:
step 501, a base point on an elliptic curve for data transmission, multiple times of the base point and a target information identifier are obtained, and the target information identifier is an identifier corresponding to target information to be received.
In the embodiment of the invention, the elliptic curve parameters, the elliptic curve equation, the coordinate information of the base point on the elliptic curve and the multiple times of point information of the base point can be generated and disclosed by the sending end, and can also be generated and disclosed by a third party mechanism, so that the receiving end can directly acquire the parameter information.
When performing the inadvertent transmission, the receiving end first needs to acquire a base point on the elliptic curve for data transmission, multiple times of the base point, and a target information identifier. The target information identifier is an identifier corresponding to target information to be received, specifically, the target information identifier to be received can be selected from a plurality of information identifiers to be sent, in addition, the identifier corresponding to each information to be sent is already determined, a receiving end can also directly acquire the target information identifier, and in the embodiment of the invention, the specific implementation mode for acquiring the target information identifier is not limited, as long as the target information identifier can be accurately acquired.
Step 502, randomly generating a private key, wherein the private key is used for decrypting the target information.
Step 503, generating a first public key based on the target information identifier, the private key and the multiple points of the base point.
After the target information identifier is obtained, a random number can be randomly generated as a private key, and the private key is used for decrypting the target information. Then, a first public key is generated based on the target information identifier, the private key and the multiple points of the base point. The first public key is not directly calculated according to the private key to obtain the public key for encryption, but relates to the obtained first public key, so that the sending end can calculate the public key for encryption according to the first public key and cannot sense the value of the target information identifier of the receiving end, the privacy of the receiving end is protected, and accidental transmission is realized.
Specifically, generating the first public key based on the target information identifier, the private key, and multiple points of the base point may include:
step 5031, based on the private key and the base point on the elliptic curve, a public key corresponding to the target information identifier is generated.
Step 5032, generating a first public key based on the target information identifier, the multiple times of the base point, and the public key corresponding to the target information identifier.
The receiving end generates a public key corresponding to the target information identifier according to a randomly generated private key and a base point on the elliptic curve, wherein the public key is used for encrypting each piece of information to be sent. Therefore, in the embodiment of the present invention, a first public key is generated based on the public key corresponding to the target information identifier, and the first public key is sent to the sending end, so that the sending end can calculate the public key corresponding to the target information identifier according to the first public key without perceiving the value of the specific target information identifier.
Specifically, the implementation manner of generating the first public key based on the target information identifier, the multiple times of the base point, and the public key corresponding to the target information identifier may include: firstly, judging the value of a target information identifier, and if the target information identifier is 0, determining a public key corresponding to the target information identifier as a first public key; if the target information identifier is not 0, a first public key is generated based on the target information identifier, the multiple point of the base point and the public key.
In some embodiments, specifically, generating the first public key based on the public key and the multiple point of the base point may include: and acquiring a difference value between the public key and the multiple point of the base point, and determining the first public key based on the difference value.
Specifically, assume that the target information is identified as
Figure 90119DEST_PATH_IMAGE014
Randomly generating a random number s as a private key, and generating a public key corresponding to the target information identifier based on the private key and the ellipse base point coordinates
Figure 771768DEST_PATH_IMAGE015
. Then identifying the target information
Figure 211976DEST_PATH_IMAGE014
If the target information is identified, the value of the target information is judged
Figure 281563DEST_PATH_IMAGE014
Is 0, then the first public key is
Figure 682589DEST_PATH_IMAGE016
If the target information is identified
Figure 292562DEST_PATH_IMAGE014
If not 0, then the first public key is
Figure 524960DEST_PATH_IMAGE017
Step 504, the first public key is sent to the sending end, so that the sending end encrypts the multiple pieces of information to be sent based on the first public key and the first random number to obtain multiple encrypted ciphertexts corresponding to the multiple pieces of information to be sent, the multiple encrypted ciphertexts include the same data, the same data are related to the first random number and a base point on the elliptic curve, and the multiple pieces of information to be sent include the target information.
And sending the determined first public key to the sending end, so that the sending end can encrypt a plurality of messages to be sent based on the first public key and the first random number to obtain a plurality of encrypted ciphertexts corresponding to the plurality of messages to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number and the base point on the elliptic curve.
The sending end generates a plurality of encrypted ciphertexts and then sends the ciphertexts to the receiving end, so that the receiving end obtains target information based on a private key corresponding to the target information identification. Thus, in some embodiments, the oblivious transmission method may further comprise: and receiving a plurality of encrypted ciphertexts corresponding to a plurality of information to be transmitted, which are transmitted by the transmitting end, and decrypting the encrypted ciphertexts based on the private key to obtain the target information.
Specifically, the implementation manner of decrypting the encrypted ciphertext based on the private key to obtain the target information may include: identifying based on target information
Figure 968711DEST_PATH_IMAGE018
Selecting the encrypted ciphertext corresponding to the target information identifier from the received multiple information to be transmitted
Figure 653770DEST_PATH_IMAGE019
Figure 67434DEST_PATH_IMAGE020
. And decrypting the encrypted ciphertext by using the private key s according to the SM2 algorithm to obtain the target information, wherein the specific detailed process can refer to the SM2 encryption and decryption algorithm.
In summary, in the embodiment of the present invention, a private key is randomly generated, where the private key is used to decrypt target information, a first public key is generated based on a target information identifier, the private key and a base point on an elliptic curve, and the first public key is sent to a sending end, so that the sending end encrypts multiple pieces of information to be sent based on the first public key and a first random number to obtain multiple encrypted ciphertexts corresponding to the multiple pieces of information to be sent, where the multiple encrypted ciphertexts include the same part of data, and the same part of data is related to the first random number and the base point on the elliptic curve, thereby reducing the amount of computation, simplifying the entire computation process, and improving the entire efficiency of unintentional transmission.
For the specific implementation process of some steps of the scheme provided by the embodiment of the present invention, reference may be made to the related descriptions in the foregoing other embodiments, which are not described herein again.
In a specific application, the method includes a sending end device and a receiving end device in an accidental transmission process, and the specific accidental transmission method may include the following steps:
step 1, a sending end obtains elliptic curve parameters, determines an elliptic curve based on the elliptic curve parameters, and determines a base point on the elliptic curve based on the elliptic curve.
Specifically, the sending end selects a parameter q, defines a finite field Fq containing q elements, selects a parameter a, b ∈ Fq, defines an elliptic curve equation E (Fq) by the parameter a, b, and selects a base point G = on the elliptic curve equation
Figure 92022DEST_PATH_IMAGE001
Wherein, in the step (A),
Figure 768991DEST_PATH_IMAGE001
i.e. the coordinates of the base point G, the order of which is n, are determinedYi (Chinese character)
Figure 3663DEST_PATH_IMAGE002
Is a hash algorithm.
And 2, the transmitting end discloses the relevant parameters of the elliptic curve, an elliptic curve equation, a base point on the selected elliptic curve and a plurality of times of the base point.
And 3, the sending end acquires a plurality of information to be sent, wherein the information to be sent comprises target information corresponding to the receiving end.
And 4, the receiving end acquires a base point on the elliptic curve for data transmission, a plurality of times of the base point and a target information identifier.
Specifically, the base point and the multiple times of the base point on the elliptic curve for data transmission are obtained by receiving the elliptic curve related parameters and the elliptic curve equation sent by the sending end and the multiple times of the base point on the elliptic curve, and the target information identifier is selected from the multiple information identifiers to be sent.
And 5, the receiving end randomly generates a private key and generates a public key corresponding to the target information identifier based on the private key and the base point on the elliptic curve.
And 6, the receiving end generates a first public key based on the target information identifier, the base point on the elliptic curve and the public key corresponding to the target information identifier.
Specifically, the target information is identified as
Figure 158701DEST_PATH_IMAGE014
Randomly generating a random number s as a private key, and generating a public key corresponding to the target information identifier based on the private key and the ellipse base point coordinates
Figure 37795DEST_PATH_IMAGE015
. Then identifying the target information
Figure 947982DEST_PATH_IMAGE014
If the target information is identified, the value of the target information is judged
Figure 607634DEST_PATH_IMAGE014
Is 0, then the first public key is
Figure 501116DEST_PATH_IMAGE016
If the target information is identified
Figure 297033DEST_PATH_IMAGE014
If not 0, determining the multiple point of the corresponding base point based on the target information identification
Figure 378122DEST_PATH_IMAGE021
And based on the multiple point of the base point
Figure 197173DEST_PATH_IMAGE021
Public key corresponding to target information identification
Figure 959593DEST_PATH_IMAGE022
Generating a corresponding first public key, i.e. the first public key is
Figure 937913DEST_PATH_IMAGE017
And 7, the receiving end sends the first public key to the sending end.
And step 8, the sending end receives the first public key sent by the receiving end.
And 9, the sending end generates a plurality of second public keys corresponding to the plurality of information to be sent respectively based on the first public key.
Specifically, the plurality of corresponding second public keys are calculated, and if the information identifier is not 0, the second public key is calculated based on PKi = Gi-PK0, and if the information identifier is 0, the second public key is calculated based on PKi = PK0.
Step 10, the sending end determines a first random number used for encrypting a plurality of information to be sent.
And 11, the sending end generates a first part of the ciphertext based on the first random number and a base point on the elliptic curve.
And step 12, the sending end respectively generates a plurality of ciphertext second parts corresponding to the information to be sent based on the first random number, the plurality of second public keys and the plurality of information to be sent.
And step 13, the sending end processes the first random number, the plurality of second public keys and the plurality of information to be sent by using a Hash algorithm to respectively obtain a third part of a ciphertext corresponding to each of the plurality of information to be sent.
And step 14, the sending end obtains the encrypted ciphertext corresponding to each of the plurality of information to be sent based on the ciphertext first part, the ciphertext second part corresponding to each of the plurality of information to be sent and the ciphertext third part corresponding to each of the plurality of information to be sent.
Specifically, a random number is randomly selected as the first random number r, and the first random number r is selected as the second random number r
Figure 862007DEST_PATH_IMAGE005
Computing the first part of the ciphertext
Figure 433934DEST_PATH_IMAGE006
Let us order
Figure 734465DEST_PATH_IMAGE007
Calculating
Figure 832871DEST_PATH_IMAGE008
Computing the second part of the ciphertext
Figure 599970DEST_PATH_IMAGE011
Computing the third part of the ciphertext
Figure 721510DEST_PATH_IMAGE012
. Obtaining k encrypted ciphertexts according to the first part, the second part and the third part of the ciphertexts corresponding to each message to be sent
Figure 888049DEST_PATH_IMAGE013
=
Figure 513065DEST_PATH_IMAGE023
And step 15, the sending end sends the plurality of encrypted ciphertexts to the receiving end.
And step 16, the receiving end receives the plurality of encrypted ciphertexts, selects the encrypted cipher text corresponding to the target information from the plurality of encrypted cipher texts based on the target information identification, and decrypts the encrypted cipher text by using a private key to obtain the target information.
For related contents not described in this embodiment, reference may be made to the related descriptions in the foregoing embodiments, which are not described herein again.
The inadvertent transmission device of one or more embodiments of the invention will be described in detail below. Those skilled in the art will appreciate that these means can each be constructed using commercially available hardware components and by performing the steps taught in this disclosure.
Fig. 6 is a schematic structural diagram of an oblivious transmission apparatus according to an embodiment of the present invention, where the apparatus is located at a sending end device, and as shown in fig. 6, the apparatus includes: the device comprises a first acquisition module 11, a first receiving module 12, a first generation module 13, a first determination module 14 and a first encryption module 15.
The first obtaining module 11 is configured to obtain a plurality of pieces of information to be sent, where the plurality of pieces of information to be sent include target information corresponding to a receiving end.
The first receiving module 12 is configured to receive the first public key sent by the receiving end.
A first generating module 13, configured to generate, based on the first public key, a plurality of second public keys corresponding to the plurality of pieces of information to be sent respectively.
A first determining module 14, configured to determine a first random number used for encrypting the plurality of information to be sent.
The first encryption module 15 is configured to encrypt the multiple pieces of information to be sent according to the first random number and the multiple second public keys, respectively, to obtain multiple pieces of encrypted ciphertext corresponding to the multiple pieces of information to be sent, where the multiple pieces of encrypted ciphertext include the same part of data, and the same part of data is related to the first random number.
Optionally, before the first obtaining module 11, the apparatus may include a setting module, and the setting module may be specifically configured to: acquiring parameters of an elliptic curve; determining an elliptic curve based on the elliptic curve parameters; determining a base point on the elliptic curve based on the elliptic curve; based on the base point, a plurality of multiple points of the base point are determined.
Optionally, the first generating module 13 may be further specifically configured to: acquiring a plurality of information identifications corresponding to the plurality of information to be sent respectively; if the information identifier is 0, determining the first public key as a second public key for encrypting the information to be sent corresponding to the information identifier; and if the information identifier is not 0, generating a plurality of second public keys for encrypting a plurality of information to be sent based on the plurality of information identifiers, the first public key and a plurality of multiple points of the base point.
Optionally, the first generating module 13 may be further specifically configured to: determining a plurality of times corresponding to the plurality of information identifications; and generating a plurality of second public keys for encrypting a plurality of information to be sent based on the plurality of multiple points and the first public key.
Optionally, the first generating module 13 may be further specifically configured to: respectively acquiring a plurality of difference values between the first public key and the plurality of multiple points; a plurality of second public keys are respectively determined based on the plurality of difference values.
Optionally, the first encryption module 15 may be specifically configured to: generating a ciphertext first portion based on the first random number and a base point on the elliptic curve; respectively generating ciphertext second parts corresponding to the plurality of information to be sent based on the first random number, the plurality of second public keys and the plurality of information to be sent; processing the first random number, the plurality of second public keys and the plurality of information to be sent by utilizing a Hash algorithm to respectively obtain ciphertext third parts corresponding to the plurality of information to be sent; and obtaining encrypted ciphertexts corresponding to the multiple pieces of information to be transmitted respectively based on the first ciphertexts, the second ciphertexts corresponding to the multiple pieces of information to be transmitted respectively and the third ciphertexts corresponding to the multiple pieces of information to be transmitted respectively.
Optionally, the apparatus may further include a sending module, where the sending module is specifically configured to: and sending the plurality of encrypted ciphertexts to the receiving end so that the receiving end decrypts the encrypted ciphertexts corresponding to the target information based on the private key corresponding to the target information identification to obtain the target information.
The apparatus shown in fig. 6 may perform the steps performed by the sending end device in the foregoing embodiment, and for details of the performing process and the technical effect, reference is made to the description in the foregoing embodiment, and details are not repeated here.
In one possible design, the structure of the unintentional transfer device shown in fig. 6 may be implemented as an electronic device, as shown in fig. 7, which may include: a first processor 21, a first memory 22, a first communication interface 23. Wherein the first memory 22 has stored thereon executable code which, when executed by the first processor 21, causes the first processor 21 to at least implement the steps performed by the sending end device as in the previous embodiments.
Additionally, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to implement at least the inadvertent transmission method as provided in the preceding embodiments.
Fig. 8 is a schematic structural diagram of an inadvertent transmission apparatus according to an embodiment of the present invention, where the apparatus is located at a receiving end device, and as shown in fig. 8, the apparatus includes: a second obtaining module 31, a second generating module 32, a second determining module 33, and a second sending module 34.
A second obtaining module 31, configured to obtain a base point on an elliptic curve for data transmission, multiple times of the base point, and a target information identifier, where the target information identifier is an identifier corresponding to target information to be received;
a second generating module 32, configured to randomly generate a private key, where the private key is used to decrypt the target information;
a second determining module 33, configured to generate a first public key based on the target information identifier, the private key, and multiple times of the base point;
a second sending module 34, configured to send the first public key to the sending end, so that the sending end encrypts, based on the first public key and the first random number, a plurality of pieces of information to be sent to obtain a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be sent, where the plurality of encrypted ciphertexts include the same part of data, and the same part of data is related to the first random number and a base point on the elliptic curve, where the plurality of pieces of information to be sent include the target information.
Optionally, the second determining module 33 may specifically be configured to: generating a public key corresponding to the target information identification based on the private key and a base point on the elliptic curve; and generating the first public key based on the target information identifier, the multiple times of the base point and a public key corresponding to the target information identifier.
Optionally, the second determining module 33 may specifically be configured to: if the target information identifier is 0, determining a public key corresponding to the target information identifier as a first public key; and if the target information identifier is not 0, generating a first public key based on the target information identifier, the multiple times of the base point and the public key.
Optionally, the second determining module 33 may be further specifically configured to: obtaining a difference value between the public key and a multiple point of the base point; based on the difference, a first public key is determined.
Optionally, the apparatus may further include a decryption module, and the decryption module may be specifically configured to: receiving a plurality of encrypted ciphertexts corresponding to the plurality of information to be transmitted sent by the sending end; and decrypting the encrypted ciphertext based on the private key to obtain the target information.
The apparatus shown in fig. 8 may perform the steps performed by the receiving end device in the foregoing embodiment, and the detailed performing process and technical effect refer to the description in the foregoing embodiment, which are not described herein again.
In one possible design, the structure of the unintentional transfer device shown in fig. 8 may be implemented as an electronic device, as shown in fig. 9, which may include: a second processor 41, a second memory 42, a second communication interface 43. Wherein the second memory 42 has stored thereon executable code, which when executed by the second processor 41, makes the second processor 41 at least to implement the steps performed by the receiving end device as in the previous embodiments.
Additionally, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code that, when executed by a processor of a device, causes the processor to at least implement the inadvertent transmission method as provided in the preceding embodiments.
The above-described apparatus embodiments are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (15)

1. An inadvertent transmission method applied to a sending end includes:
acquiring a plurality of pieces of information to be transmitted and elliptic curve parameters, wherein the plurality of pieces of information to be transmitted comprise target information corresponding to a receiving end;
determining a base point on the elliptic curve based on the elliptic curve parameters;
determining a plurality of times of the base point based on the base point, and sending the base point on the elliptic curve and the plurality of times of the base point to a receiving end;
receiving a first public key sent by the receiving end;
generating a plurality of second public keys corresponding to the plurality of pieces of information to be sent respectively on the basis of the first public key;
determining a first random number for encrypting the plurality of information to be transmitted;
and encrypting the plurality of information to be sent according to the first random number and the plurality of second public keys respectively to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, and the same part of data is related to the first random number and a base point on the elliptic curve.
2. The method according to claim 1, wherein the generating a plurality of second public keys corresponding to the plurality of pieces of information to be transmitted based on the first public key comprises:
acquiring a plurality of information identifications corresponding to the plurality of information to be sent respectively;
if the information identifier is 0, determining the first public key as a second public key for encrypting the information to be sent corresponding to the information identifier;
and if the information identifier is not 0, generating a plurality of second public keys for encrypting a plurality of information to be sent based on the plurality of information identifiers, the first public key and a plurality of multiple points of the base point.
3. The method according to claim 2, wherein generating a plurality of second public keys for encrypting a plurality of information to be transmitted based on the plurality of information identifications, the first public key, and a plurality of multiple points of the base point comprises:
determining a plurality of times corresponding to the plurality of information identifications;
and generating a plurality of second public keys for encrypting a plurality of information to be sent based on the plurality of multiple points and the first public key.
4. The method of claim 3, wherein generating a plurality of second public keys for encrypting a plurality of information to be transmitted based on a plurality of the multiple points and the first public key comprises:
respectively obtaining a plurality of difference values between the first public key and the plurality of multiple points;
a plurality of second public keys are respectively determined based on the plurality of difference values.
5. The method according to any one of claims 1 to 4, wherein the encrypting the plurality of information to be transmitted according to the first random number and the plurality of second public keys respectively to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be transmitted comprises:
generating a ciphertext first portion based on the first random number and a base point on an elliptic curve;
respectively generating ciphertext second parts corresponding to the plurality of information to be sent based on the first random number, the plurality of second public keys and the plurality of information to be sent;
processing the first random number, the plurality of second public keys and the plurality of information to be sent by using a hash algorithm to respectively obtain a third part of ciphertext corresponding to each of the plurality of information to be sent;
and acquiring encrypted ciphertexts corresponding to the plurality of information to be transmitted respectively based on the first part of the ciphertexts, the second parts of the ciphertexts corresponding to the plurality of information to be transmitted respectively and the third parts of the ciphertexts corresponding to the plurality of information to be transmitted respectively.
6. The method according to any one of claims 1-4, further comprising:
and sending the plurality of encrypted ciphertexts to the receiving end so that the receiving end decrypts the encrypted ciphertexts corresponding to the target information based on the private key corresponding to the target information identification to obtain the target information.
7. An inadvertent transmission method, applied to a receiving end, includes:
receiving a base point on an elliptic curve sent by a sending end and a plurality of times of the base point;
acquiring a target information identifier for data transmission, wherein the target information identifier is an identifier corresponding to target information to be received;
randomly generating a private key, wherein the private key is used for decrypting the target information;
generating a first public key based on the target information identification, the private key and a plurality of multiple points of the base point;
and sending the first public key to the sending end, so that the sending end generates a plurality of second public keys corresponding to the plurality of information to be sent respectively based on the first public key, and encrypts the plurality of information to be sent according to the second public keys and the first random number to obtain a plurality of encrypted ciphertexts corresponding to the plurality of information to be sent, wherein the plurality of encrypted ciphertexts comprise the same part of data, the same part of data is related to the first random number and a base point on the elliptic curve, and the plurality of information to be sent comprise the target information.
8. The method of claim 7, wherein generating a first public key based on the target information identification, the private key, and a plurality of multiples of the base point comprises:
generating a public key corresponding to the target information identification based on the private key and a base point on the elliptic curve;
and generating the first public key based on the target information identifier, the multiple times of the base point and the public key corresponding to the target information identifier.
9. The method of claim 8, wherein generating the first public key based on the target information identifier, the plurality of times of the base point, and a corresponding public key of the target information identifier comprises:
if the target information identifier is 0, determining a public key corresponding to the target information identifier as a first public key;
and if the target information identifier is not 0, generating a first public key based on the target information identifier, the multiple times of the base point and the public key.
10. The method of claim 9, wherein generating the first public key based on the public key and the base point's multiple comprises:
obtaining a difference value between the public key and a multiple point of the base point;
based on the difference, a first public key is determined.
11. The method according to any one of claims 7-10, further comprising:
receiving a plurality of encrypted ciphertexts corresponding to the plurality of information to be transmitted sent by the sending end;
and decrypting the encrypted ciphertext based on the private key to obtain the target information.
12. An inadvertent transmission device at a transmitting end, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a plurality of information to be sent and elliptic curve parameters, and the plurality of information to be sent comprises target information corresponding to a receiving end; determining a base point on the elliptic curve based on the elliptic curve parameters; determining a plurality of times of the base point based on the base point, and sending the base point on the elliptic curve and the plurality of times of the base point to a receiving end;
the first receiving module is used for receiving a first public key sent by the receiving end;
a first generating module, configured to generate, based on the first public key, a plurality of second public keys corresponding to the plurality of pieces of information to be sent respectively;
a first determining module, configured to determine a first random number used for encrypting the multiple pieces of information to be sent;
the first encryption module is configured to encrypt the multiple pieces of information to be sent according to the first random number and the multiple second public keys, and obtain multiple pieces of encrypted ciphertext corresponding to the multiple pieces of information to be sent, where the multiple pieces of encrypted ciphertext include the same part of data, and the same part of data is related to the first random number and a base point on the elliptic curve.
13. An inadvertent transmission device, at a receiving end, comprising:
the second acquisition module is used for receiving a base point on the elliptic curve sent by the sending end and a plurality of times of the base point; acquiring a target information identifier for data transmission, wherein the target information identifier is an identifier corresponding to target information to be received;
the second generation module is used for randomly generating a private key, and the private key is used for decrypting the target information;
a second determining module, configured to generate a first public key based on the target information identifier, the private key, and multiple points of the base point;
a second sending module, configured to send the first public key to the sending end, so that the sending end generates, based on the first public key, a plurality of second public keys corresponding to the plurality of pieces of information to be sent, and encrypts, according to the second public key and the first random number, the plurality of pieces of information to be sent to obtain a plurality of encrypted ciphertexts corresponding to the plurality of pieces of information to be sent, where the plurality of encrypted ciphertexts include the same part of data, and the same part of data is related to the first random number and a base point on the elliptic curve, where the plurality of pieces of information to be sent include the target information.
14. An electronic device, comprising: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the inadvertent transmission method of any of claims 1 to 11.
15. A non-transitory machine-readable storage medium having stored thereon executable code that, when executed by a processor, causes the processor to perform the method of inadvertent transmission of any of claims 1 to 11.
CN202210861043.3A 2022-07-22 2022-07-22 Method, device, equipment and storage medium for inadvertent transmission Active CN115001685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210861043.3A CN115001685B (en) 2022-07-22 2022-07-22 Method, device, equipment and storage medium for inadvertent transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210861043.3A CN115001685B (en) 2022-07-22 2022-07-22 Method, device, equipment and storage medium for inadvertent transmission

Publications (2)

Publication Number Publication Date
CN115001685A CN115001685A (en) 2022-09-02
CN115001685B true CN115001685B (en) 2022-10-21

Family

ID=83022574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210861043.3A Active CN115001685B (en) 2022-07-22 2022-07-22 Method, device, equipment and storage medium for inadvertent transmission

Country Status (1)

Country Link
CN (1) CN115001685B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801234B (en) * 2022-10-11 2023-04-07 蓝象智联(杭州)科技有限公司 Data inadvertent transmission method based on state secret
CN115378588B (en) * 2022-10-25 2023-05-26 北京信安世纪科技股份有限公司 Method, apparatus and storage medium for inadvertent transmission
CN115412246B (en) * 2022-11-01 2023-01-31 北京信安世纪科技股份有限公司 Method, device, equipment and storage medium for inadvertent transmission
CN116594972B (en) * 2023-07-17 2023-10-24 国网江苏省电力有限公司信息通信分公司 File encryption sharing method and device
CN117579255B (en) * 2024-01-17 2024-03-29 同盾科技有限公司 Method and device for generating inadvertent transmission instance, electronic equipment and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931529B (en) * 2010-08-09 2014-07-16 中兴通讯股份有限公司 Data encryption method, data decryption method and nodes
US11405365B2 (en) * 2019-03-13 2022-08-02 Springcoin, Inc. Method and apparatus for effecting a data-based activity
CN110839026B (en) * 2019-11-12 2022-04-01 深圳市迅雷网络技术有限公司 Data processing method based on block chain and related equipment
US11438152B2 (en) * 2020-01-31 2022-09-06 Visa International Service Association Distributed symmetric encryption
CN112055021B (en) * 2020-09-08 2021-07-23 苏州同济区块链研究院有限公司 Imperial transmission method and device based on elliptic curve
CN113141247B (en) * 2021-04-25 2023-07-04 重庆都会信息科技有限公司 Homomorphic encryption method, homomorphic encryption device, homomorphic encryption system and readable storage medium
CN113259329B (en) * 2021-04-26 2022-07-15 北京信安世纪科技股份有限公司 Method and device for data careless transmission, electronic equipment and storage medium
CN114401084B (en) * 2021-12-10 2023-12-29 北京理工大学 Third-party random number transmission method based on ciphertext transformation

Also Published As

Publication number Publication date
CN115001685A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN115001685B (en) Method, device, equipment and storage medium for inadvertent transmission
JP7119040B2 (en) Data transmission method, device and system
EP3476078B1 (en) Systems and methods for authenticating communications using a single message exchange and symmetric key
CN113259329B (en) Method and device for data careless transmission, electronic equipment and storage medium
CN110771089A (en) Secure communications providing forward privacy
CN105025019B (en) A kind of data safety sharing method
EP1471680A1 (en) Identifier-Based Encryption method and apparatus
US12010216B2 (en) Computer-implemented system and method for highly secure, high speed encryption and transmission of data
CN111769934B (en) Data transmission method, system and computer readable storage medium
CN110932851A (en) PKI-based multi-party cooperative operation key protection method
CN103297230B (en) Information encipher-decipher method, Apparatus and system
Hasan et al. Secure lightweight ECC-based protocol for multi-agent IoT systems
CN113886887A (en) Data query method and device based on multi-party security calculation
CN111052673A (en) Anonymous broadcasting method, key exchange method, anonymous broadcasting system, key exchange system, communication device, and program
CN111404671A (en) Mobile quantum secret communication method, gateway, mobile terminal and server
CN114726546A (en) Digital identity authentication method, device, equipment and storage medium
CN113708917A (en) APP user data access control system and method based on attribute encryption
CN114070549B (en) Key generation method, device, equipment and storage medium
CN111656728B (en) Device, system and method for secure data communication
KR101695361B1 (en) Terminology encryption method using paring calculation and secret key
CN115412246B (en) Method, device, equipment and storage medium for inadvertent transmission
CN107534552B (en) Method executed at server device, client device and server device
GB2401013A (en) Cryptographic Method and Apparatus
CN113824677A (en) Federal learning model training method and device, electronic equipment and storage medium
CN116248359A (en) Data transmission system, method and device based on careless transmission protocol

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