Remote authentication method, apparatus, device, storage medium and program product
By supporting remote authentication methods with multiple key establishment modes, this method solves the problem that existing SGX remote authentication schemes can only support one key mode, achieving efficient and compatible authentication and security in different scenarios, and reducing development and promotion costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2026-03-24
AI Technical Summary
The existing SGX remote authentication scheme only supports one key mode, which leads to the need for different remote authentication schemes in different scenarios. This increases the development and promotion costs of trusted computing services and reduces security and efficiency.
A remote authentication method is provided that supports multiple key establishment modes, including key transmission mode, key negotiation mode, and public key distribution mode. It achieves two-way authentication by generating a temporary public key and authentication reference information, realizing one-round interactive compatibility authentication.
It achieves efficient remote authentication compatible with multiple key modes in different scenarios, supports two-way authentication, resists replay attacks and unknown key sharing attacks, meets the authentication and security requirements of SGX applications, and reduces development and promotion costs.
Smart Images

Figure CN117439746B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a remote authentication method, device, equipment, storage medium and program product. BACKGROUND
[0002] In the existing SGX remote authentication implementation scheme, only one key mode is supported. However, different key modes are often required in different scenarios, so that when a trusted computing service needs to be applied in different scenarios, different remote authentication schemes need to be implemented. This leads to an increase in the development and promotion cost of the trusted computing service, and reduces the security and efficiency of the remote authentication. SUMMARY
[0003] The present disclosure provides a remote authentication method, device, equipment, storage medium and program product to solve the technical problem that the remote authentication cannot be compatible with multiple key modes to some extent.
[0004] In a first aspect, the present disclosure provides a remote authentication method, comprising:
[0005] providing multiple key establishment modes for a user, wherein the multiple key establishment modes comprise a key transmission mode, a key negotiation mode and a public key distribution mode;
[0006] obtaining verifier identity information and a target key establishment mode set by the user based on the multiple key establishment modes, and generating configuration information based on the target key establishment mode and the verifier identity information;
[0007] generating a first temporary public key based on the target key establishment mode;
[0008] obtaining authentication reference information from a designated authentication file based on the first temporary public key, a first cryptographic hash of the verifier identity information and the configuration information, wherein the authentication reference information is used to provide to the verifier to authenticate whether the prover is trustworthy;
[0009] generating an authentication request based on the configuration information, the first cryptographic hash, the first temporary public key and the authentication reference information;
[0010] sending the authentication request to the verifier, and receiving an authentication result from the verifier for the authentication request.
[0011] In a second aspect, the present disclosure provides a remote authentication method, comprising:
[0012] receive an authentication request from the prover, the authentication request comprising a first temporary public key from the prover, authentication reference information, a first cryptographic hash of verifier identity information, and configuration information; wherein the authentication reference information is obtained from a designated authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information, to authenticate whether the prover is trustworthy; the configuration information comprises verifier identity information and a target key establishment mode set by a user based on a plurality of key establishment modes; the plurality of key establishment modes comprise a key transfer mode, a key agreement mode, and a public key distribution mode;
[0013] parse the authentication request, and confirm the identity of the verifier based on the first cryptographic hash of the verifier identity information;
[0014] in response to successful identity confirmation of the verifier, call a remote authentication service to authenticate the authentication reference information, to determine whether the prover is trustworthy;
[0015] in response to determining that the prover is trustworthy, generate an authentication result based on the key establishment mode;
[0016] send the authentication result to the prover.
[0017] In a third aspect of the present disclosure, a remote authentication device is provided, comprising:
[0018] a key module configured to provide a plurality of key establishment modes to a user, the plurality of key establishment modes comprising a key transfer mode, a key agreement mode, and a public key distribution mode;
[0019] a configuration information module configured to obtain verifier identity information and a target key establishment mode set by a user based on the plurality of key establishment modes, and generate configuration information based on the target key establishment mode and the verifier identity information;
[0020] a temporary public key module configured to generate a first temporary public key based on the target key establishment mode;
[0021] an authentication reference module configured to obtain authentication reference information from a designated authentication file based on the first temporary public key, the first cryptographic hash of the verifier identity information, and the configuration information; wherein the authentication reference information is provided to the verifier to authenticate whether the prover is trustworthy;
[0022] an authentication request module configured to generate an authentication request based on the configuration information, the first cryptographic hash, the first temporary public key, and the authentication reference information;
[0023] a transceiver module configured to send the authentication request to the verifier, and receive an authentication result from the verifier in response to the authentication request.
[0024] In a fourth aspect, the present disclosure provides a remote authentication device, comprising:
[0025] a transceiver configured to receive an authentication request from a proof-providing end, the authentication request comprising a first temporary public key from the proof-providing end, authentication reference information, a first cryptographic hash of the identity information of the verification end, and configuration information; wherein the authentication reference information is obtained from a designated authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information, to authenticate whether the proof-providing end is trustworthy; the configuration information comprises the identity information of the verification end and a target key establishment mode set by a user based on a plurality of key establishment modes; the plurality of key establishment modes comprise a key transmission mode, a key negotiation mode, and a public key distribution mode;
[0026] a parsing module configured to parse the authentication request;
[0027] an identity verification module configured to confirm the identity of the verification end based on the first cryptographic hash of the identity information of the verification end;
[0028] a remote authentication module configured to, in response to successful identity confirmation of the verification end, call a remote authentication service to authenticate the authentication reference information, to determine whether the proof-providing end is trustworthy;
[0029] an authentication result module configured to, in response to determining that the proof-providing end is trustworthy, generate an authentication result based on the key establishment mode;
[0030] the transceiver is further configured to send the authentication result to the proof-providing end.
[0031] In a fifth aspect, the present disclosure provides an electronic device, comprising one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs comprise instructions for performing the method according to the first aspect or the second aspect.
[0032] In a sixth aspect, the present disclosure provides a non-transitory computer-readable storage medium containing a computer program, which, when executed by one or more processors, causes the processors to perform the method according to the first aspect or the second aspect.
[0033] In a seventh aspect, the present disclosure provides a computer program product comprising computer program instructions, which, when executed on a computer, cause the computer to perform the method according to the first aspect or the second aspect.
[0034] As can be seen from the above, the remote authentication method, device, equipment, storage medium and program product provided by the present disclosure can simultaneously support an efficient remote authentication scheme of multiple key modes, only one round of interaction is needed, and bidirectional authentication is supported, which can meet the authentication and remote authentication functions and security requirements of SGX applications, resist replay attacks and unknown key sharing attacks, can simultaneously support different scenarios, and can save development and promotion costs. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present disclosure or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0036] Figure 1 A schematic diagram of a remote authentication architecture of an embodiment of the present disclosure.
[0037] Figure 2 A schematic diagram of a hardware structure of an exemplary electronic device of an embodiment of the present disclosure.
[0038] Figure 3 A schematic diagram of a flow of a remote authentication system of an embodiment of the present disclosure.
[0039] Figure 4 A schematic diagram of an exemplary flow of a remote authentication method of an embodiment of the present disclosure.
[0040] Figure 5 A schematic diagram of a flow of a remote authentication method of an embodiment of the present disclosure.
[0041] Figure 6 A schematic diagram of a flow of a remote authentication method of an embodiment of the present disclosure.
[0042] Figure 7 A schematic diagram of a remote authentication device of an embodiment of the present disclosure.
[0043] Figure 8 A schematic diagram of a remote authentication device of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] In order to make the purposes, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below with reference to specific embodiments and drawings.
[0045] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the embodiments of the disclosure shall be understood as having the common meaning to those skilled in the art to which the embodiments of the disclosure belong. The terms "first", "second", and similar terms used in the embodiments of the disclosure do not denote any order, quantity, or importance, but are used to distinguish different components. The terms "include", "contain", and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships can also change accordingly.
[0046] Currently, remote attestation of SGX (Software Gaurd Extensions) is based on the security foundation of Trusted Execution Environment (TEE) application. The remote attestation is initiated by a user to TEE; TEE measures the program code loaded into the TEE encrypted memory, and signs the measurement value, and then sends the measurement value and the signature to the user; the user verifies the signature with the help of the authentication service provider, and then compares the measurement value contained in the signature with the measurement value previously possessed by the user. If they are consistent, it means that the program running in the TEE is previously authenticated by the user, and the TEE and the program running in the TEE can be trusted, so that the secret to be protected can be transmitted to the TEE through the secure channel of remote attestation. In the remote attestation protocol, the secret to be protected by the user is generally the user's own key and data, mainly supporting two common key modes: one is symmetric key mode, which means that the user transmits the data key to the TEE through the secure channel of remote attestation, and the data can be encrypted with the data key and then sent to the TEE. In another mode, the public key and envelope encryption mode, the TEE generates a public-private key pair, signs the public key and the measurement value, and sends the public key, the measurement value, and the signature to the user; after the user verifies, the user encrypts the symmetric key with the public key of the TEE, encrypts the data based on the symmetric key, and then returns the ciphertext of the symmetric key and the ciphertext of the data to the TEE.
[0047] It can be seen that in the above existing SGX remote authentication scheme, only one of the key modes is supported, and both key modes cannot be supported at the same time. However, different key modes are often required in different scenarios. When a trusted computing service needs to be applied in different scenarios, different remote authentication schemes need to be implemented, which increases the development and promotion cost of the service. Therefore, how to implement a remote authentication scheme compatible with multiple key modes is a technical problem that needs to be solved.
[0048] In view of this, the embodiments of the present disclosure provide a remote authentication method, device, equipment, storage medium and program product. An efficient remote authentication scheme compatible with multiple key modes at the same time, only one round of interaction is required, and bidirectional authentication is supported, which can meet the authentication and remote authentication functions and security requirements of SGX applications, resist replay attacks and unknown key sharing attacks, support different scenarios at the same time, and save development and promotion costs.
[0049] Figure 1 A schematic diagram of a remote authentication architecture of the embodiments of the present disclosure is shown. Referring to Figure 1 The remote authentication architecture 100 can include a server 110, a terminal 120, and a network 130 providing a communication link. The server 110 and the terminal 120 can be connected through the wired or wireless network 130. The server 110 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms, etc. basic cloud computing services.
[0050] The terminal 120 can be implemented in hardware or software. For example, when the terminal 120 is implemented in hardware, it can be various electronic devices with a display screen and supporting page display, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers, etc. When the terminal 120 is implemented in software, it can be installed in the above-mentioned electronic devices; it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or as a single software or software module, which is not specifically limited here.
[0051] It should be noted that the remote authentication method provided by the embodiments of the present disclosure can be executed by the terminal 120 or the server 110. It should be understood that Figure 1 The number of terminals, networks and servers in
[0052] Figure 2A hardware structure diagram of an example electronic device 200 is shown. As shown in Figure 2 The electronic device 200 can include a processor 202, a memory 204, a network module 206, a peripheral interface 208, and a bus 210. The processor 202, the memory 204, the network module 206, and the peripheral interface 208 are connected to each other through the bus 210.
[0053] The processor 202 can be a central processing unit (CPU), a graphics processor, a neural network processor (NPU), a microcontroller unit (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. The processor 202 can be configured to perform functions related to the techniques described in the present disclosure. In some embodiments, the processor 202 can also include multiple processors integrated as a single logical component. For example, as shown in Figure 2 The processor 202 can include multiple processors 202a, 202b, and 202c.
[0054] The memory 204 can be configured to store data (e.g., instructions, computer code, etc.). As shown in Figure 2 The data stored in the memory 204 can include program instructions (e.g., program instructions for implementing the remote authentication method of the embodiments of the present disclosure) and data to be processed (e.g., the memory can store configuration files of other modules, etc.). The processor 202 can also access the program instructions and data stored in the memory 204, and execute the program instructions to operate on the data to be processed. The memory 204 can include volatile storage devices or non-volatile storage devices. In some embodiments, the memory 204 can include random access memory (RAM), read only memory (ROM), optical disks, magnetic disks, hard disks, solid state disks (SSDs), flash memories, memory sticks, etc.
[0055] The network module 206 can be configured to provide the electronic device 200 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It can be appreciated that the type of network is not limited to the specific examples described above. In some embodiments, the network module 106 can include any combination of any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc.
[0056] The peripheral interface 208 can be configured to connect the electronic device 200 with one or more peripheral devices to enable information input and output. For example, the peripheral devices can include input devices such as keyboards, mice, touchpads, touchscreens, microphones, various sensors, etc., and output devices such as displays, speakers, vibrators, indicator lights, etc.
[0057] The bus 210 can be configured to transmit information between various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), such as internal buses (e.g., processor-memory buses), external buses (USB ports, PCI-E buses), etc.
[0058] It should be noted that although the architecture of the electronic device 200 described above only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208, and the bus 210, in a specific implementation, the architecture of the electronic device 200 can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the architecture of the electronic device 200 described above can also only include components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0059] Referring to Figure 3 , Figure 3 A schematic diagram of a remote attestation system according to an embodiment of the present disclosure is shown. Figure 3 In some embodiments, the system 300 can include a user platform 310, a server 320, and an attestation service (Intel Attestation Service) IAS / PCCS.
[0060] User platform 310 may be a computing device running on an SGX CPU platform. User platform 310 may include an Attestor and an application 313. The Attestor may further include an application enclave 311 and a quoting enclave 312. Application 313 may be an application running outside the TEE and not protected by trusted hardware, therefore it is untrusted and insecure to the user. Application enclave 311 is a protected content container used to store sensitive data and code of application 313. Quoting enclave 312 is used to handle remote authentication. It can receive reports from application enclave 311 via application 313, verify and sign the reports to generate corresponding quotations, and return them to application 313.
[0061] Server 320 is used to invoke the authentication service IAS / PCCS to verify the quote information in order to authenticate the identity of application enclave 311. Server 320 and the authentication service IAS / PCCS can act as verifiers, i.e., entities on the user's side or trusted by the user.
[0062] Figure 3 In this process, the user can first send the verification information along with an initial request (such as an SQL query, keyword search, etc.) to the application 313 of the user platform 310 where the Attestor is located. The verification information includes the key length (KeyLength), key establishment mode (KEMode), verifier identity information (info), and challenge value (n2). Key establishment modes can include secret provisioning mode (sp), key agreement mode (ka), and public-key distribution mode (pkd). Secret provisioning mode refers to the verifier encrypting and signing the data key before transmitting it to the attestor, who then decrypts it to obtain the data key. Key agreement mode refers to the attestor and verifier jointly negotiating to obtain the data key. Public-key distribution mode refers to the verifier authenticating the attestor's public key and then transmitting the data key based on the authenticated attestor's public key.
[0063] Application 313 sends verification information to application enclave 311 to launch the Attestor authentication client. For example... Figure 4 As shown, Figure 4 An example flowchart of a remote authentication method according to an embodiment of this disclosure is shown.Figure 3 and Figure 4 The remote authentication method 400 can comprise the following steps.
[0064] At step S410, the attester (e.g. the application enclave 311) receives the verification information determined at the user side, and generates configuration information cf based on the verification information. The configuration information cf can comprise at least part of the information in the verification information, and can also comprise data other than the verification information that needs to be sent.
[0065] At step S411, the attester (e.g. the application enclave 311) calculates a temporary public key epk1 based on the key establishment mode KEMode in the verification information cf. Wherein, if KEMode is a public key distribution mode pkd, step 412 is performed; if KEMode is a key transmission mode sp or a key agreement mode ka, step 413 is performed.
[0066] At step S412, for the key establishment mode KEMode being the public key distribution mode pkd, i.e. KEMode==pkd, the attester (e.g. the application enclave 311) generates the temporary public key epk1 based on the public-private key pair (rsk, rpk) and the challenge value n1, the challenge value n2; step S414 is performed.
[0067] In some embodiments, the public-private key pair (rsk, rpk) can be randomly generated, or the public-private key pair (rsk, rpk) of RSA3072 can be recovered. For example, a 3072-bit public-private key pair (rsk, rpk) can be randomly generated based on the RSA algorithm; when the public-private key pair (rsk, rpk) has been generated before, the 3072-bit public-private key pair (rsk, rpk) based on the RSA algorithm can be recovered from the existing file to reduce the amount of calculation.
[0068] In some embodiments, the temporary public key epk1 can comprise epk1==rpk||n1||n2.
[0069] At step S413, for the key establishment mode KEMode being the key transmission mode sp or the key agreement mode ka, i.e. KEMode==ka or sp. The attester (e.g. the application enclave 311) can calculate the temporary public key epk1 based on the temporary private key esk1; step S414 is performed.
[0070] In some embodiments, the temporary private key esk1=r1. Wherein, r1 can be a random number randomly generated.
[0071] In some embodiments, the temporary public key epk1=esk1*G=r1*G. Wherein, G can be the G point in the elliptic encryption algorithm.
[0072] In some embodiments, the application enclave 311 can send the ephemeral public key epk1 to the quote enclave 312 via the application 313. For example, the ephemeral public key epk1 is sent to the application 313 in a user data field of a report for remote attestation, and forwarded by the application 313 to the quote enclave 312.
[0073] At step S414, the attester (e.g. the quote enclave 312) computes a verifier identity information hash value id2 = H(info) based on the verifier identity information info in the verification information; and computes a hash value Hash = H(cf || id2 || epk1) based on the configuration information cf, the verifier identity information hash value id2 and the ephemeral public key epk1.
[0074] The attester (e.g. the quote enclave 312) extends the hash value Hash to obtain an extended Hash. For example, the hash value Hash is 32 bytes, and the hash value Hash is extended by 32 bytes to obtain an extended Hash of 64 bytes, e.g. storing 0 in the 32 bytes extended after the hash value Hash. The extended Hash can be stored in a user data field of the report, e.g. written into a Software Guard Extensions (SGX) report / dev / attestation / user_report_data; and the quote information quote is obtained by the quote enclave 312, e.g. reading information from a Software Guard Extensions (SGX) quote / dev / attestation / quote. The quote enclave 312 can send the configuration information cf, the verifier identity information hash value id2, the ephemeral public key epk1 and the quote information quote to the application 313.
[0075] The application 313 generates an attestation request req based on the configuration information cf, the verifier identity information hash value id2, the ephemeral public key epk1 and the quote information quote. The application 313 sends the attestation request req to the verifier (e.g. the server 320).
[0076] In some embodiments, the attestation request req = cf || id2 || epk1 || quote is generated.
[0077] At step S420, while the attester performs the above steps S410-S414, the verifier can load the long-term private key sk2, the long-term public key pk2 and the cert certificate (e.g. CA root certificate) set by the user.
[0078] At step S421, the Verifier (e.g. server 320) receives the attestation request req from the Attestor, e.g. from step S414. The server 320 can forward the attestation request req to the attestation server IAS / PCCS.
[0079] The Verifier (e.g. the attestation server IAS / PCCS) can parse the attestation request req to obtain the configuration information cf, the verifier identity information hash value id2, the attestation quote information quote, and the ephemeral public key epk1, and determine whether the attestation request req is sent to the correct Verifier based on the verifier identity information hash value id2. If it is confirmed that the attestation request req is sent to the correct Verifier, the hash value Hash = H(cf || id2 || epk1) can be calculated. If the attestation request req is sent to the wrong Verifier, the process ends.
[0080] At step S421, the Verifier also calls the attestation service IAS / PCCS to verify the attestation quote information quote. For example, the attestation service IAS / PCCS is called to verify the quote information quote based on the hash value Hash calculated by the Verifier.
[0081] At step S422, the Verifier calculates the data key dk, the encrypted data key c, and the response resp of the Verifier to the attestation request of the Attestor based on the key establishment mode KEMode in the verification information cf. If the KEMode is the public key distribution mode pkd, step 423 is performed; if the KEMode is the key transfer mode sp or the key agreement mode ka, step 424 is performed.
[0082] At step S423, the Verifier determines that the key establishment mode KEMode is the public key distribution mode pkd, i.e. KEMode == pkd, and can randomly select the data key dk or obtain the data key dk set by the user side.
[0083] The Verifier encrypts the data key dk based on the public key rpk in the public-private key pair of the Attestor (e.g. the public key rpk of RSA3072 can be obtained from the ephemeral public key epk1) to obtain the encrypted data key c = PKE(rpk; dk).
[0084] The verifier can sign the ephemeral public key epk1 || the encrypted data key c based on the long-term private key sk2 to obtain a verification signature data sig1 = Sig(sk2; epk1 || c).
[0085] The verifier generates a response resp = sig1 || c || cert based on the verification signature data sig1. The step S425 is executed.
[0086] In step S424, the verifier determines the key establishment mode KEMode to be the key transfer mode sp or the key agreement mode ka, i.e., KEMode == ka or sp. The verifier obtains an ephemeral public key epk2 based on the ephemeral private key esk2.
[0087] In some embodiments, the ephemeral private key esk2 = r2. Wherein, r2 can be a randomly generated random number.
[0088] In some embodiments, the ephemeral public key epk2 = esk2 * G = r2 * G. Wherein, G can be a G point in an elliptic encryption algorithm.
[0089] The verifier obtains a master key k = r2 * epk1 based on the ephemeral public key epk1 and the ephemeral private key esk2 = r2 parsed from the authentication request req.
[0090] The verifier obtains a session key sk = H(cf || epk1 || epk2 || k) based on the configuration information cf, the ephemeral public key epk1, the ephemeral public key epk2, and the master key k.
[0091] If the key establishment mode KEMode is the key agreement mode ka, the verifier sets the data key dk = sk, otherwise, the verifier randomly generates or obtains a data key dk set by the user side. That is, if the key establishment mode KEMode is the key transfer mode sp, the verifier randomly generates a data key dk or obtains a data key dk set by the user side.
[0092] Then, the encrypted data key c is calculated. If the key establishment mode KEMode is the key agreement mode ka, the verifier sets the encrypted data key c = Null, otherwise, the data key dk and the session key sk are encrypted to obtain the encrypted data key c. That is, if the key establishment mode KEMode is the key transfer mode sp, the verifier encrypts the data key dk and the session key sk to obtain the encrypted data key c.
[0093] In some embodiments, the data key dk can be encrypted to obtain an encrypted data key c using an encryption algorithm. For example, the data key dk and the session key sk can be encrypted using an AES GCM encryption algorithm, c = AES (sk; dk).
[0094] The signature can then be performed, and the verifier can sign the ephemeral public key epkl || ephemeral public key epk2 || encrypted data key c based on the long-term private key sk2 to obtain a verification signature data sig2 = Sig (sk2; epkl || epk2 || c).
[0095] The verifier can generate a response resp = sig2 || epk2 || c || cert based on the verification signature data sig2. Step S425 can be performed.
[0096] In step S425, the verifier can send the response resp to the attester and output the data key dk.
[0097] In some embodiments, when the key establishment mode KEMode is a public key distribution mode pkd, the ephemeral public key epkl can also be output in step S425.
[0098] In step S415, the attester can receive the response resp from the verifier. The attester can parse the response resp, verify the certificate cert from the verifier based on the CA root certificate, and confirm the identity of the verifier. If the identity verification is successful, step S416 can be performed, and if the identity verification is not successful, the process can end.
[0099] In step S416, the attester can calculate the data key dk based on the key establishment mode KEMode in the verification information cf. When the KEMode is a public key distribution mode pkd, step 417 can be performed, and when the KEMode is a key transport mode sp or a key agreement mode ka, step 418 can be performed.
[0100] In step S417, the attester can determine that the key establishment mode KEMode is a public key distribution mode pkd, i.e., KEMode == pkd, and can verify the signature data sigl based on the long-term public key pk2 from the verifier, e.g., whether Verify (pk2; sigl; epkl || c) == true is true.
[0101] The attester can also decrypt the encrypted data key c based on the private key rsk obtained from the RSA3072 to obtain the data key dk=PKE(rsk;c). Step S419 is performed.
[0102] In step S418, the attester determines the key establishment mode KEMode to be the key transport mode sp or the key agreement mode ka, i.e., KEMode==ka or sp. The attester verifies the signature data sig2 based on the long-term public key pk2 from the verifier, e.g., whether Verify(pk2;sig2;epk1||epk2||c)==true holds.
[0103] The attester can also obtain the master key k=r1*epk2 based on the ephemeral public key epk2 of the verifier.
[0104] The attester can also configure the information cf, the ephemeral public key epk1, the ephemeral public key epk2, and the master key k to calculate the session key sk=H(cf||epk1||epk2||k).
[0105] If the key establishment mode KEMode is the key agreement mode ka, the data key dk=sk, otherwise the attester decrypts the encrypted data key c based on the session key sk to obtain the data key dk=AES(sk;c). That is, if the key establishment mode KEMode is the key transport mode sp, the attester decrypts the encrypted data key c based on the session key sk to obtain the data key dk=AES(sk;c).
[0106] In step S419, the attester outputs the data key dk. It can be seen that the method according to the embodiments of the present disclosure can implement a one-round (two-pass) protocol of “attester request-verifier reply” to complete the remote authentication process, and can simultaneously support multiple key mode authentication, and can meet the authentication and remote authentication functions and security requirements of the SGX application, and can resist replay attacks, unknown key sharing attacks, and the like.
[0107] For remote authentication in key negotiation or key transmission mode, the user side can use the data key dk to encrypt the data to be transmitted data to obtain the transmission ciphertext c_data, and send the transmission ciphertext c_data to the attestor (e.g., application enclave 311); after the application enclave 311 calculates the corresponding plaintext result result, it uses the data key dk to encrypt the plaintext result result to obtain the result ciphertext c_result, and returns the result ciphertext c_result to the user side.
[0108] For remote authentication in public key distribution mode, after the user side verifies that the challenge value n2 is consistent, the distributed public key epk1 can be used to envelop the data to be transmitted, data', to obtain the transmitted ciphertext c_data'. Then, the hash value Hash(c_data') of the transmitted ciphertext c_data' is passed to the verifier. The verifier signs it to obtain the signature result sig. The verifier passes the transmitted ciphertext c_data' and the signature result sig to the attestor (e.g., application enclave 311). The application enclave 311 verifies the signature result sig and decrypts the transmitted ciphertext c_data', then calculates the corresponding plaintext result result'. The plaintext result result' is then encrypted with the data key dk and returned to the verifier. The verifier decrypts it and passes it to the user side.
[0109] See Figure 5 , Figure 5 A schematic diagram of a remote authentication method according to an embodiment of the present disclosure is shown. This method 500 can be used to implement remote authentication and can be... Figure 1 This can be implemented by server 110 or terminal 120, or by both server 110 and terminal 120. Figure 2 The electronic device 200 is implemented in this system. (Refer to...) Figure 5 As shown, the method 500 may include the following steps.
[0110] In step S510, multiple key establishment modes are provided to the user, including key transmission modes (e.g., ...). Figure 4 KEMode (sp) and key negotiation mode (e.g.) Figure 4 KEMode (=ka) and public key distribution mode (e.g.) Figure 4 KEMode in (pkd)
[0111] In step S520, obtain the identity information of the verification terminal (e.g., Figure 4and the target key establishment mode set by the user based on the multiple key establishment modes, and generates configuration information (e.g., id2 in Figure 4 in cf) based on the target key establishment mode and the verifier identity information;
[0112] In step S530, a first ephemeral public key (e.g., epk1 in Figure 4 ) is generated based on the target key establishment mode;
[0113] In step S540, an attestation quote (e.g., quote in Figure 4 ) is obtained from a specified attestation file (e.g., / edv / attestation / in Figure 4 ) based on the first ephemeral public key (e.g., epk1 in Figure 4 ), a first cryptographic hash (e.g., id2 in Figure 4 ) of the verifier identity information, which can be a hash value or other cryptographic value, and the configuration information; wherein the attestation quote is used to provide to the verifier to attest whether the prover is trustworthy;
[0114] In step S550, an attestation request (e.g., req in Figure 4 ) is generated based on the configuration information, the first cryptographic hash, the first ephemeral public key, and the attestation quote;
[0115] In step S560, the attestation request is sent to the verifier, and an attestation response (e.g., resp in Figure 4 ) is received from the verifier in response to the attestation request.
[0116] In some embodiments, generating a first ephemeral public key based on the target key establishment mode comprises:
[0117] If the target key establishment mode is a key transport mode or a key agreement mode, the first ephemeral public key (e.g., epk1 in Figure 4 ) is generated based on a first randomly generated ephemeral private key (e.g., esk = r1 in Figure 4 ) and an elliptic curve encryption algorithm (e.g., epk1 = r1*G in
[0118] If the target key establishment mode is a public key distribution mode, the first ephemeral public key is generated based on a prover public key (e.g., rpk in Figure 4 ) in a prover public-private key pair, a first randomly generated challenge value (e.g., n1 in Figure 4 ), and a second challenge value (e.g., n2 in Figure 4 ) set by the user; wherein the prover public-private key pair is randomly generated or recovered based on existing files and encryption algorithms.
[0119] In some embodiments, the specified attestation files include a first attestation file (e.g., / dev / attestation / user_report_data) and a corresponding second attestation file (e.g., / dev / attestation / quote); obtaining attestation quote information from the specified attestation files based on the first ephemeral public key, a first cryptographic hash of the verifier identity information, and the configuration information includes:
[0120] computing a second cryptographic hash of the first ephemeral public key, the first cryptographic hash, and the configuration information (e.g., Hash(pk1 || h || config) in Figure 4 );
[0121] extending the second cryptographic hash to obtain an extended cryptographic hash;
[0122] writing the extended cryptographic hash to the first attestation file and reading the attestation quote information from the second attestation file.
[0123] In some embodiments, the attestation result includes a verifier long-term public key (e.g., pk2 in Figure 4 ), verifier signature data (e.g., sig in Figure 4 ), an encrypted data key (e.g., c in Figure 4 ), and a verifier certificate (e.g., cert in Figure 4 );
[0124] The method further includes:
[0125] verifying the verifier certificate based on a CA root certificate to authenticate the verifier;
[0126] in response to successful authentication of the verifier, verifying the verifier signature data based on the verifier long-term public key;
[0127] in response to successful verification of the signature, computing a data key (e.g., dk in Figure 4 ) based on the encrypted data key and the target key.
[0128] In some embodiments, for the public key distribution mode, verifying the verifier signature data based on the verifier long-term public key includes:
[0129] verifying the verifier signature data based on the verifier long-term public key, the verifier signature data, the first ephemeral public key, and the encrypted data key (e.g., Verify(pk2; sig; epk1 || c) == true in Figure 4 );
[0130] Or, for the key agreement mode or the key transfer mode, the authentication result further comprises the second ephemeral public key (e.g., epk2 in Figure 4 ) of the second party; and the verification signature data is signed verified based on the verification end long-term public key, including:
[0131] The verification signature data is signed verified based on the verification end long-term public key, the verification signature data, the first ephemeral public key, the second ephemeral public key and the encrypted data key (e.g., Verify(pk2; sig; epk1||epk2||c) == true in Figure 4 ).
[0132] In some embodiments, the data key is calculated based on the encrypted data key and the target key establishment mode, including:
[0133] If the target key establishment mode is the key transfer mode or the key agreement mode, a master key is generated based on the first ephemeral private key (e.g., epk1 = r1 in Figure 4 ) and the second ephemeral public key (e.g., epk2 in Figure 4 ). Figure 4
[0134] A session key is generated based on the master key, the first ephemeral public key, the second ephemeral public key and a first cryptographic hash of the configuration information (e.g., sk in Figure 4 ).
[0135] For the key agreement mode, the data key is the session key (e.g., dk = sk in Figure 4 ).
[0136] Or, for the key transfer mode, the data key is decrypted from the encrypted data key based on the session key (e.g., dk = AES(sk; c) in Figure 4 ).
[0137] Or, for the public key distribution mode, the data key is decrypted from the encrypted data key based on the attestation end private key of the attestation end public-private key pair (e.g., dk = PKE(rsk; c) in Figure 4 ).
[0138] In some embodiments, the method 500 further comprises:
[0139] Receiving encrypted data (e.g., transmission ciphertext c_data) from the verification end, the encrypted data being based on encryption of to-be-processed data (e.g., to-be-processed data data).
[0140] obtaining a data processing result based on the data key and the encrypted data, and transmitting the calculation result based on the data key, further comprising: Figure 4
[0141] In some embodiments, if the target key establishment mode is the key transmission mode or the key agreement mode, the encrypted data is obtained by encrypting the data to be processed based on the data key;
[0142] obtaining a data processing result based on the data key and the encrypted data, and transmitting the calculation result based on the data key, further comprising:
[0143] decrypting the encrypted data based on the data key to obtain the data to be processed;
[0144] performing corresponding data processing on the data to be processed to obtain a processing result (e.g., the plaintext result result in the foregoing embodiments), and encrypting the calculation result based on the data key to obtain an encrypted result (e.g., the result ciphertext c_result in the foregoing embodiments);
[0145] sending the encrypted result to the user.
[0146] In some embodiments, if the target key establishment mode is the public key distribution mode, the encrypted data (e.g., the transmission ciphertext c_data' in the foregoing embodiments) is obtained by encrypting the data to be processed (e.g., the data to be transmitted data' in the foregoing embodiments) based on the data key to obtain first encrypted data, and then encrypting the first encrypted data based on the prover public-private key (e.g., the public key epk1 in the foregoing embodiments) in the prover public-private key pair to obtain
[0147] obtaining a data processing result based on the data key and the encrypted data, and transmitting the calculation result based on the data key, further comprising:
[0148] receiving the encrypted data (e.g., the transmission ciphertext c_data' in the foregoing embodiments) and signature data (e.g., the signature result sig in the foregoing embodiments) of the encrypted data, wherein the signature data of the encrypted data is obtained by performing verification signature on a third cryptographic hash (e.g., the hash value Hash(c_data') in the foregoing embodiments) of the encrypted data based on a verifier long-term private key (e.g., the verifier long-term private key sk2);
[0149] verifying the signature data of the encrypted data based on a verifier long-term public key (e.g., the verifier long-term private key pk2), and decrypting the encrypted data based on the prover private key (e.g., the prover private key rsk) in the prover public-private key pair and the data key to obtain the data to be processed;
[0150] performing corresponding data processing on the to-be-processed data to obtain a processing result (e.g., the plaintext result result' in the foregoing embodiment), and encrypting the calculation result based on the data key to obtain an encrypted result;
[0151] sending the encrypted result to the verification end for decryption to obtain the decrypted processing result to be sent to the user.
[0152] Referring to Figure 4 , Figure 4 A schematic diagram of a remote authentication method according to an embodiment of the present disclosure is shown. The method 600 can be used to implement remote authentication, and can be implemented by the server 110 or the terminal 120, or by both the server 110 and the terminal 120. It can also be implemented by the electronic device 200 in Figure 4 . Referring to Figure 4 , the method 600 can include the following steps. Figure 4
[0153] At step S610, an authentication request (e.g., req in Figure 4 ) from the attesting end is received, the authentication request including a first temporary public key from the attesting end, authentication quote information, a first cryptographic hash of the verification end identity information, and configuration information; wherein the authentication quote information is obtained from a designated authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information to authenticate whether the attesting end is trustworthy; the configuration information includes verification end identity information and a target key establishment mode set by the user based on a plurality of key establishment modes; the plurality of key establishment modes include a key transfer mode, a key agreement mode, and a public key distribution mode;
[0154] At step S620, the authentication request is parsed, and the identity of the verification end is confirmed based on the first cryptographic hash of the verification end identity information (e.g., id2 in Figure 4 );
[0155] At step S630, in response to successful identity confirmation of the verification end, a remote authentication service (e.g., IAS / PCCS in Figure 4 ) is invoked to authenticate the authentication quote information (e.g., quote in Figure 4 ) to determine whether the attesting end is trustworthy;
[0156] At step S640, in response to determining that the attesting end is trustworthy, an authentication result (e.g., resp in Figure 4 ) is generated based on the target key establishment mode;
[0157] At step S650, the authentication result is sent to the attesting end.
[0158] In some embodiments, generating the authentication result based on the target key establishment mode comprises:
[0159] If the target key establishment mode is the key agreement mode or the key transport mode, generating a second ephemeral private key (e.g., esk2 in Figure 4 ) randomly and generating a second ephemeral public key (e.g., epk2 in Figure 4 ) based on the second ephemeral private key;
[0160] Generating a master key (e.g., k in step S424 of Figure 4 ) based on the first ephemeral public key (e.g., epk1 in step S424 of Figure 4 ) and the second ephemeral private key (e.g., esk2 in step S424 of Figure 4 );
[0161] Generating a session key (e.g., sk = H(cf||epk1||epk2||k) in step S424 of Figure 6 ) based on the configuration information, the first ephemeral public key, the second ephemeral public key and the master key; for the key agreement mode, the data key is the session key (e.g., dk = sk in step S424 of Figure 6 ) and the encrypted data key is null (e.g., c = Null in step S424 of Figure 1 );
[0162] For the key transport mode, generating a data key (e.g., dk in step S424 of Figure 2 ) randomly and the encrypted data key is based on encryption of the data key and the session key (e.g., c = AES(sk; dk) in step S424 of Figure 6 );
[0163] Signing the first ephemeral public key, the second ephemeral public key and the encrypted data key based on a long-term private key to obtain verification signature data (e.g., sig = Sig(sk2; epk1||epk2||c) in step S424 of Figure 4 );
[0164] ;
[0165] Obtaining the authentication result based on the second ephemeral public key, the verification signature data, the encrypted data key and a verifier certificate (e.g., resq = epk2||c||sig||cert in step S424 of Figure 4 );
[0166] ;
[0167] If the target key establishment mode includes a public key distribution mode,
[0168] randomly generating a data key or obtaining a data key set by a user (e.g. Figure 4 dk) in step S423;
[0169] encrypting the data key based on a first temporary public key (e.g. rpk) in the evidence end public-private key pair to obtain an encrypted data key (e.g. Figure 4 c=PKE(rpk;dk) in step S423;
[0170] wherein the evidence end public-private key pair (e.g. rpk, rsk) is randomly generated or recovered based on an existing file and an encryption algorithm;
[0171] signing the first temporary public key and the encrypted data key based on the verification end long-term private key (e.g. sk2) to obtain verification signature data (e.g. Figure 4 sig=Sig(sk2;epk1||c) in step S423;
[0172] sig=Sig(sk2;epk1||c) in step S423;
[0173] obtaining the authentication result based on the verification signature data, the encrypted data key and the verification end certificate (e.g. Figure 4 resq=c||sig||cert in step S423.
[0174] According to the embodiments of the present disclosure, a trusted computing service can be compatible with multiple key establishment modes, including key transmission, key negotiation and public key distribution, so that users can select a key establishment mode according to the deployment ability of the user, the data key update and other needs in different application scenarios. For example, if the user can directly deploy a verifier and has the ability to securely save the data key, the user can select the key negotiation or key transmission mode; if the computing task of the user is instant, and different submitted data sets do not need to be jointly calculated, the user can select the key negotiation mode, and conversely, if the ciphertext needs to be stored and the joint calculation is frequent, the user can use the key transmission mode, so that the keys of each data set are consistent, thereby facilitating the enclave to perform decryption and calculation; if the actual application is for individuals, such as a ToC scenario, the individual user end cannot deploy a verifier, and has no ability to securely save the data key, the user can select the public key distribution mode, that is, to believe a remote verifier, to obtain the authenticated Attestor public key with the help of the verifier, and to encrypt the data in an envelope encryption manner, and then to pass the ciphertext hash value to the verifier, the verifier signs the hash value, and the user passes the ciphertext and the signature result to the enclave; the enclave calculates the result and returns the result to the verifier in the form of the data key, and the verifier decrypts the result and passes the result to the user. Thus, the efficient remote authentication scheme compatible with multiple key modes can only need one round of interaction, supports bidirectional authentication, can meet the authentication and remote authentication functions and security requirements of the SGX application, and can resist replay attacks, unknown key sharing attacks and the like.
[0175] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server. The method of the embodiments can also be applied to a distributed scenario, and be completed by multiple devices in cooperation. In the case of the distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiments of the present disclosure, and the multiple devices can interact with each other to complete the method.
[0176] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order described above and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0177] Based on the same inventive concept, the present disclosure also provides a remote authentication device corresponding to the method of any of the above embodiments.
[0178] Reference Figure 4 , the remote authentication device comprises:
[0179] a key module configured to provide a plurality of key establishment modes for a user, the plurality of key establishment modes comprising a key transport mode, a key agreement mode, and a public key distribution mode;
[0180] a configuration information module configured to obtain verifier identity information and a target key establishment mode set by the user based on the plurality of key establishment modes, and generate configuration information based on the target key establishment mode and the verifier identity information;
[0181] a temporary public key module configured to generate a first temporary public key based on the target key establishment mode;
[0182] an authentication reference module configured to obtain authentication reference information from a designated authentication file based on the first temporary public key, a first cryptographic hash of the verifier identity information, and the configuration information; wherein the authentication reference information is provided to the verifier to authenticate whether the prover is trustworthy;
[0183] an authentication request module configured to generate an authentication request based on the configuration information, the first cryptographic hash, the first temporary public key, and the authentication reference information;
[0184] a transceiver module configured to send the authentication request to the verifier and receive an authentication result from the verifier in response to the authentication request.
[0185] Reference Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 4 Figure 7 Figure 8 , the remote authentication device comprises:
[0186] a transceiver module configured to receive an authentication request from a prover, the authentication request comprising a first temporary public key from the prover, authentication reference information, a first cryptographic hash of verifier identity information, and configuration information; wherein the authentication reference information is obtained from a designated authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information to authenticate whether the prover is trustworthy; the configuration information comprises verifier identity information and a target key establishment mode set by the user based on a plurality of key establishment modes; the plurality of key establishment modes comprises a key transport mode, a key agreement mode, and a public key distribution mode;
[0187] a parsing module configured to parse the authentication request;
[0188] an identity verification module configured to confirm the identity of the verifier based on the first cryptographic hash of the verifier identity information;
[0189] a remote authentication module, configured to, in response to the identity of the verification end being successfully confirmed, invoke a remote authentication service to authenticate the authentication reference information, to determine whether the evidence end is trustworthy;
[0190] an authentication result module, configured to, in response to determining that the evidence end is trustworthy, generate an authentication result based on the target key establishment mode;
[0191] The transceiving module is further configured to send the authentication result to the evidence end.
[0192] For the convenience of description, the above apparatus is described in various modules in terms of functions. Of course, the functions of the modules can be implemented in one or more software and / or hardware when implementing the present disclosure.
[0193] The apparatus of the above embodiments is used to implement the corresponding remote authentication method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again.
[0194] Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the remote authentication method according to any of the above embodiments.
[0195] The computer-readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0196] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to perform the remote authentication method according to any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which are not described herein again.
[0197] Those of ordinary skill in the art will realize that the foregoing discussion of any of the embodiments has been presented for the purpose of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms described, and that various alternatives, modifications, and variations can be employed without departing from the spirit or scope of the disclosure as set forth in the claims. Examples of such alternate, modified, and varying embodiments have been discussed above in conjunction with the material discussed above.
[0198] In addition, to simplify the description and discussion, and so as not to make the embodiments of the disclosure difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components can or can not be shown in the provided drawings. Further, devices can be shown in block diagram form in order to avoid making the embodiments of the disclosure difficult to understand, and this also takes into account the fact that details regarding implementation of these block diagram devices are highly dependent on the platform to which the embodiments of the disclosure are to be implemented (i.e., these details should be well within the understanding of one of ordinary skill in the art). Where specific details (e.g., circuitry) are set forth in order to describe an illustrative embodiment of the disclosure, it should be apparent to one of ordinary skill in the art that the embodiments of the disclosure can be practiced without or with variation of these specific details. Thus, these descriptions should not be construed as limiting, but merely as descriptive of illustrative embodiments of the disclosure.
[0199] While the disclosure has been described in connection with specific embodiments thereof, it will be understood that many modifications, variations and alternatives will be apparent to those skilled in the art as a result of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.
[0200] The embodiments of the disclosure are intended to cover all such alternatives, modifications, and variations as falling within the broad scope of the appended claims. Accordingly, any one of the steps of the embodiments of the disclosure can be performed in any order, and many of the steps can be performed in any order or in parallel, unless otherwise specified.
Claims
1. A remote authentication method, characterized in that, include: The system provides users with multiple key establishment modes, including key transmission mode, key negotiation mode, and public key distribution mode. Obtain the identity information of the verification terminal and the target key establishment mode set by the user based on the multiple key establishment modes, and generate configuration information based on the target key establishment mode and the identity information of the verification terminal; Generate a first temporary public key based on the target key establishment pattern; Based on the first temporary public key, the first cryptographic hash of the verifier's identity information, and the configuration information, authentication reference information is obtained from the specified authentication file; wherein, the authentication reference information is provided to the verification end to verify whether the presenting end is trustworthy; An authentication request is generated based on the configuration information, the first cryptographic hash, the first temporary public key, and the authentication reference information. The authentication request is sent to the verification terminal, and the authentication result from the verification terminal for the authentication request is received. The authentication result indicates that the verification terminal is a trusted execution environment.
2. The method according to claim 1, characterized in that, Generate a first temporary public key based on the target key establishment pattern, including: If the target key establishment mode is a key transmission mode or a key negotiation mode, then the first temporary public key is generated based on the randomly generated first temporary private key and the elliptic cryptography algorithm. If the target key establishment mode is a public key distribution mode, then the first temporary public key is generated based on the public key of the demonstration end in the public-private key pair, the randomly generated first challenge value, and the second challenge value set by the user; wherein, the public-private key pair of the demonstration end is randomly generated or recovered based on existing files and encryption algorithms.
3. The method according to claim 1, characterized in that, The specified authentication file includes a first authentication file and a corresponding second authentication file; Based on the first temporary public key, the first cryptographic hash of the verifier's identity information, and the configuration information, authentication reference information is obtained from the specified authentication file, including: Calculate the first temporary public key, the first cryptographic hash, and the second cryptographic hash of the configuration information; The second cryptographic hash is expanded to obtain the extended cryptographic hash; The extended cryptographic hash is written into the first authentication file, and the authentication reference information is read from the second authentication file.
4. The method according to claim 1, characterized in that, The authentication result includes the long-term public key of the verification end, the verification signature data, the encryption data key, and the verification end certificate; The method further includes: The identity of the verification terminal is verified based on the CA root certificate. In response to the successful authentication of the verification terminal, the verification signature data is signed and verified based on the long-term public key of the verification terminal; In response to the successful signature verification, a data key is calculated based on the encrypted data key and the target key to establish a pattern.
5. The method according to claim 4, characterized in that, For the public key distribution mode, the verification signature data is signed and verified based on the long-term public key of the verification end, including: The verification signature data is signed and verified based on the long-term public key of the verification terminal, the verification signature data, the first temporary public key, and the encryption data key. Alternatively, for the key negotiation mode or key transmission mode, the authentication result may further include the second temporary public key; the signature verification of the verification signature data based on the long-term public key of the verification end includes: the second temporary public key is generated based on a randomly generated second temporary private key; The verification signature data is signed and verified based on the long-term public key of the verification end, the verification signature data, the first temporary public key, the second temporary public key, and the encryption data key.
6. The method according to claim 5, characterized in that, The data key is calculated based on the encrypted data key and the target key establishment pattern, including: If the target key establishment mode is a key transmission mode or a key negotiation mode, then a master key is generated based on the first temporary private key and the second temporary public key; A session key is generated based on the master key, the first temporary public key, the second temporary public key, and the first cryptographic hash of the configuration information; For the key negotiation mode, the data key is the session key; Alternatively, for the key transmission mode, the data key is obtained by decrypting the encrypted data key based on the session key; Alternatively, for the public key distribution mode, the data key is obtained by decrypting the encrypted data key based on the private key of the proof end public-private key pair.
7. The method according to claim 6, characterized in that, The method further includes: Receive encrypted data from the verification end, the encrypted data being obtained by encrypting the data to be processed; The data processing result is obtained based on the data key and the encrypted data, and the calculation result is transmitted based on the data key.
8. The method according to claim 7, characterized in that, If the target key establishment mode is a key transmission mode or a key negotiation mode, the encrypted data is obtained by encrypting the data to be processed based on the data key; The data processing result is obtained based on the data key and the encrypted data, and the calculation result is transmitted to the data key, further including: The encrypted data is decrypted using the data key to obtain the data to be processed; The data to be processed is subjected to corresponding data processing to obtain a processing result, and the calculation result is encrypted based on the data key to obtain an encrypted result; The encrypted result is sent to the user.
9. The method according to claim 7, characterized in that, If the target key establishment mode is a public key distribution mode, the encrypted data is obtained by encrypting the data to be processed based on the data key to obtain the first encrypted data, and then encrypting the first encrypted data based on the public key of the demonstration end in the public-private key pair of the demonstration end to obtain the result. The data processing result is obtained based on the data key and the encrypted data, and the calculation result is transmitted to the data key, further including: Receive the encrypted data and the signature data of the encrypted data, wherein the signature data of the encrypted data is obtained by verifying and signing the third cryptographic hash of the encrypted data based on the long-term private key of the verification end; The signature data of the encrypted data is verified based on the long-term public key of the verification end, and the encrypted data is decrypted based on the private key of the verification end and the data key in the public-private key pair of the verification end to obtain the data to be processed. The data to be processed is subjected to corresponding data processing to obtain a processing result, and the calculation result is encrypted based on the data key to obtain an encrypted result; After the encryption result is sent to the verification end for decryption, the decrypted processing result is obtained and sent to the user.
10. A remote authentication method, characterized in that, include: The system receives an authentication request from the demonstrating client. The authentication request includes a first temporary public key from the demonstrating client, authentication reference information, a first cryptographic hash of the verifying client's identity information, and configuration information. The authentication reference information is obtained from a specified authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information to authenticate whether the demonstrating client is trustworthy. The configuration information includes the verifying client's identity information and a target key establishment mode set by the user based on multiple key establishment modes. These multiple key establishment modes include a key transmission mode, a key negotiation mode, and a public key distribution mode. The authentication request is parsed, and the identity of the verification terminal is confirmed based on the first cryptographic hash of the verification terminal's identity information; In response to the successful identity verification of the verification terminal, a remote authentication service is invoked to authenticate the authentication reference information in order to determine whether the verification terminal is trustworthy; In response to determining that the authentication terminal is trustworthy, an authentication result is generated based on the target key establishment pattern; The authentication result is sent to the verification terminal.
11. The method according to claim 10, characterized in that, The authentication result is generated based on the target key establishment pattern, including: If the target key establishment mode is the key negotiation mode or the key transmission mode. A second temporary private key is randomly generated, and a second temporary public key is generated based on the second temporary private key; Generate a master key based on the first temporary public key and the second temporary private key; A session key is generated based on the configuration information, the first temporary public key, the second temporary public key, and the master key; For the key negotiation mode, the data key is the session key and the encrypted data key is empty; for the key transmission mode, the data key is randomly generated and the encrypted data key is obtained by encrypting the data key and the session key. The first temporary public key, the second temporary public key, and the encrypted data key are signed based on the long-term private key to obtain the verification signature data; The authentication result is obtained based on the second temporary public key, the verification signature data, the encryption data key, and the verification terminal certificate. If the target key establishment mode includes a public key distribution mode... Randomly generate a data key or retrieve a user-set data key; The encrypted data key is obtained by encrypting the data key using the first temporary public key in the public-private key pair of the proof end; wherein, the public-private key pair of the proof end is randomly generated or recovered based on an existing file and encryption algorithm; The first temporary public key and the encrypted data key are signed based on the long-term private key of the verification terminal to obtain verification signature data; The authentication result is obtained based on the verification signature data, the encryption key, and the verification certificate.
12. A remote authentication device, characterized in that, include: The key module is used to provide users with multiple key establishment modes, including key transmission mode, key negotiation mode and public key distribution mode; The configuration information module is used to obtain the identity information of the verification terminal and the target key establishment mode set by the user based on the multiple key establishment modes, and to generate configuration information based on the target key establishment mode and the identity information of the verification terminal. The temporary public key module is used to generate a first temporary public key based on the target key establishment pattern; The authentication reference module is used to obtain authentication reference information from a specified authentication file based on the first temporary public key, the first cryptographic hash of the verifier's identity information, and the configuration information; wherein, the authentication reference information is used to provide to the verification end to verify whether the authenticating end is trustworthy; The authentication request module is used to generate an authentication request based on the configuration information, the first cryptographic hash, the first temporary public key, and the authentication reference information; The transceiver module is used to send the authentication request to the verification terminal and receive the authentication result from the verification terminal in response to the authentication request.
13. A remote authentication device, characterized in that, include: The transceiver module is used to receive an authentication request from the proving end. The authentication request includes a first temporary public key from the proving end, authentication reference information, a first cryptographic hash of the verification end's identity information, and configuration information. The authentication reference information is obtained from a specified authentication file based on the first temporary public key, the first cryptographic hash, and the configuration information to authenticate whether the proving end is trustworthy. The configuration information includes the verification end's identity information and a target key establishment mode set by the user based on multiple key establishment modes. The multiple key establishment modes include a key transmission mode, a key negotiation mode, and a public key distribution mode. The parsing module is used to parse the authentication request; The identity verification module is used to confirm the identity of the verification terminal based on a first cryptographic hash of the verification terminal's identity information; The remote authentication module is used to call the remote authentication service to authenticate the authentication reference information in response to the successful identity verification of the verification terminal, so as to determine whether the verification terminal is trustworthy; The authentication result module is used to generate an authentication result based on the target key establishment mode in response to determining that the authenticating end is trustworthy; The transceiver module is also used to send the authentication result to the proof-presenting terminal.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 11.
15. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 11.
16. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Secret key remote acquisition method and device
CN106789018A
Data processing method and related device
CN114584306A