CN109361668A - A kind of data trusted transmission method - Google Patents

A kind of data trusted transmission method Download PDF

Info

Publication number
CN109361668A
CN109361668A CN201811213187.8A CN201811213187A CN109361668A CN 109361668 A CN109361668 A CN 109361668A CN 201811213187 A CN201811213187 A CN 201811213187A CN 109361668 A CN109361668 A CN 109361668A
Authority
CN
China
Prior art keywords
client
enclave
server
file
data
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.)
Granted
Application number
CN201811213187.8A
Other languages
Chinese (zh)
Other versions
CN109361668B (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.)
State Grid Zhejiang Electric Power Co Ltd
Anhui Jiyuan Software Co Ltd
Information and Telecommunication Branch of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Anhui Jiyuan Software Co Ltd
Information and Telecommunication Branch of State Grid Zhejiang Electric Power 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 State Grid Zhejiang Electric Power Co Ltd, Anhui Jiyuan Software Co Ltd, Information and Telecommunication Branch of State Grid Zhejiang Electric Power Co Ltd filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN201811213187.8A priority Critical patent/CN109361668B/en
Publication of CN109361668A publication Critical patent/CN109361668A/en
Application granted granted Critical
Publication of CN109361668B publication Critical patent/CN109361668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • 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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3249Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using RSA or related signature schemes, e.g. Rabin scheme

Abstract

The invention discloses a kind of data trusted transmission methods, the client and server carried out data transmission is authenticated by SGX, client certificate module confirm it to corresponding server end where platform and user legitimacy, client is after certification, establish the session between server, client and server carries out disposable supply agreement, the confidential data of client application is sealed on the platform where application, wherein, individual exit passageway is established between server and client to be communicatively coupled, each channel is corresponding with unique client, server is encrypted in transmission process to the data that client is sent;After shielded file encrypts in enclave, according to the file request of client, specific file is sent to client, is then distributed to and has obtained certification and what is authorized check or execute other operations using person.This method is based on reliable hardware, efficiently solves security breaches.

Description

A kind of data trusted transmission method
Technical field
The invention belongs to information security fields, more particularly to a kind of new data trusted transmission method, and this method is based on can Believe hardware, is related to the transmission of confidential information in smart grid.
Background technique
Since computer technology is born, the type of the application run on computers increasingly increases with quantity.Of today Computer system needs to handle more and more important, sensitive and valuable information.These information must be prevented from distorting With steal.Unfortunately, entire industry is all more or less dedicated to steal information [1] now, for example silver is stolen from system Row business datum or Intellectual Property Right of Enterprises.There are many applications that must maintain secrecy on computer platform, such as monetary items, Web bank and medical records application etc..Secret holder may not trust each other between software in other words, so often The secret of a software all should be independently protected.Therefore, protect computer platform on software and data safety also at For the task of for many years important and complicated.
Current Implementation of File Transfer is to have secure access to key element and distribution sensitive document using main function, In include guaranteeing that the confidentiality of file, access control and user use constraint, activation record etc..Nowadays enterprise is for data Safety increasingly pay attention to, and while most of Secure Implementation all focuses on the protection of business data, execute authorization Using and distribution such as picture, video personal content needs become to be more and more obvious.Prior art can also be used for Reach this purpose.
Existing typical Implementation of File Transfer application operates on ready-made customer platform and operating system, this just brings A series of safety problems.For example, Malware, including virus and Hacker Program, can threaten such application protection secret and Execute the ability of its process, it is more likely that the transparent loss of numerical data or even this steal that will lead to enterprise keep very long by one The section time is without being found.Similar case such as network attack " aurora action " (Operation Aurora), affects perhaps Much companies.It is existing to attempt encryption and access control mechanisms to protect the scheme of enterprise's data, it is easy to be attacked by some It hits.For example, Malware may steal files content even steal key for encryption simultaneously, stealing method may It is to read application memory in application operation, display content is replicated from video frame buffers or violate Distursement (such as to attack The person of hitting extends the use of scratch file using the system time of the machine where modification client).In addition, it is assumed that above-mentioned prestige Solution has been obtained in the side of body, however more advanced attack pattern still can crack application.If the available application of attacker The hardware of the platform of operation, then he can be stolen with hardware mode such as " memory snooping " (Memory Snooping) or " cold bootstrap attack " (Cold Boot Style Attack) obtains key material, although your application be used for it is certain Cryptographic means carry out safeguard file safety.In this way consequence be exactly attacker can create Malware and using steal it is close Key effectively pretends to be real security application client.Finally, a normal business data consumer, in extreme situation Under, a large amount of secret number information of fraudulent copying and the safety prevention measure of application can be modified directly to avoid being remembered by log Record or the monitoring of other forms.
Summary of the invention
Present invention purpose to be achieved is just to provide a kind of new data trusted transmission method, and this method is based on credible hard Part, is related to the transmission of confidential information in smart grid, and the Implementation of File Transfer system of SGX technology equally focuses on file point Hair and is checked at access control, and security breaches are efficiently solved.
In order to achieve the above object, the present invention adopts the following technical scheme: a kind of data trusted transmission method, carries out data The client and server of transmission is authenticated by SGX, and client certificate module confirms its institute to corresponding server end Platform and user legitimacy, client establishes the session between server after certification, client and clothes Being engaged in, the progress of device end is disposable to supply agreement, and the confidential data of client application is sealed on the platform where application, wherein It establishes individual exit passageway between server and client to be communicatively coupled, each channel and unique client pair It answers, server is encrypted in transmission process to the data that client is sent;
After shielded file encrypts in enclave, according to the file request of client, sent to client specific File, be then distributed to obtained certification and authorize check or execute other operations using person.
Further, the file that encryption is had received by the user of certification uses the enclave for operating in client platform In secure file read component and carry out checking for file;Meanwhile whether the scope check component inspection user of client has File is checked or modified to permission, once file permission inspection fails, file decryption component is not necessarily to work.
Further, the SGX certification is that local authentication and remote authentication combine.
Further, the local authentication includes two enclave entities, and the two entities need verifying mutually, Two entities verifier and authenticatee each other, specific verification step are as follows:
1., after entity A establishes communication path with entity B, entity A obtains the value of the MRENCLAVE of entity B to step;
Step is 2.: entity A calls the EREPORT instruction of encapsulation, and label are generated using the value of the MRENCLAVE of entity B The REPORT of name, to send back entity B;
Step is 3.: after entity B receives the REPORT of entity A transmission, calling EGETKEY instruction to obtain its Report Key for recalculating the MAC of REPORT, and calculated result is compared with the MAC in REPORT;
If the two is consistent, entity B affirms the enclave that entity A is strictly and oneself operates in identical platform, when TCB's Firmware and hardware component be examined it is errorless after, entity B can check the REPORT of entity A to verify the component software of TCB, including Reflection operates in the MRENCLAVE of the Software Mirroring content in enclave and reflects the MRSIGNER of encipherer's identity.
Further, the remote authentication includes: one citation Enclave of creation on the platform of client, is carried out Local authentication between Quoting Enclave and client Enclave;After local authentication executes, it is cited Enclave MAC in REPORT is replaced with a signature, the signature is completed using the unsymmetrical key specific to equipment, citation Enclave is preserved for the private cipher key of signature, and the signature is completed using RSA.
Further, the remote authentication the following steps are included:
Step is 1.: after server receives request, sending to client and queries statement, indicates that client needs to provide evidence It proves that oneself is operated in really to meet in the environment of safety standard, that is, in enclave, while client is also needed and proved certainly Oneself legitimacy.
Step is 2.: after client receives statement, being handed over to the target Enclave of oneself to handle, target Enclave root Corresponding feedback operation is carried out according to the query statement received, while carrying out local authentication process with the citation Enclave of same platform.
Step is 3.: target Enclave sends the signing messages of the whole code texts of itself application to citation Enclave, draws It demonstrate,proves Enclave and generates the ciphertext of QUOTE and signing messages, and RSA public key is sent to target Enclave, target Enclave is receiving QUOTE, and after the ciphertext and RSA public key of signing messages, they can be transmitted to server, server On the challenger REPORT that decrypts QUOTE according to public key both to obtain, with similar local authentication result treatment Mode completes the inspection of REPORT, at the same check application signature information whether in advance put on record sign it is consistent.
Further, the data that server is sent to client carry out encryption in transmission process
Client generates RSA key pair at random, and RSA key extracts inner public key, by socket by public key It is sent to server end;
After received server-side to public key, the key for being used for file encryption that random cipher generator is distributed is added It is close, and it is sent to client;
After client receives encrypted data, data are decrypted with the private key of RSA key centering, to be used In the key of encryption file.
Further, random cipher generator distribution for encryption key the following steps are included:
A. fixed character is stored in immutable sequence;
B. request NTP service, and using the time of acquisition as the seed of random number;
C. it is instructed using RRAND, according to above-mentioned seed, generates an integer index every time, and read from fixed sequence program It removes and is marked on corresponding character in step a;
D. by character combination at the random cipher of 16 bytes.
Further, sending file in a manner of shunting from server end to client must pass from corresponding exit passageway Defeated, communication is unidirectional and is all dominated by the enclave for sending request.
Further, encryption storage includes: that the application operated in Enclave requests key by instruction EGETKEY, After success obtains key, the data of caching are read out, for the 1024 caching bytes read, according to similar sliding window The method of mouth, and according to the encryption principle of AES, encryption is grouped to these bytes, every group is still 16 bytes, is utilized The Encryption Algorithm of AES is to each group of byte encryption.
After adopting the above technical scheme, the present invention has the advantage that the credible delivery system based on SGX covers hardware With the safety guarantee of software, so as to be transferred to classified papers in client from long-range server security, and realize Safe handling and storage access.This system is about the safety of client, file permission control, document transmission process and file The design and realization for storing access, have generally reached the set goal, have realized the credibility of this Transmission system.Ensure client The integrality at end and the safety of place system, it is ensured that the running memory of the key code and data of client and server program Private ownership;Ensure the confidentiality of file transmission and the safety of file storage and encryption key uniqueness and independence.
Detailed description of the invention
The present invention will be further explained below with reference to the attached drawings:
Fig. 1 is overall system architecture schematic diagram in the present invention;
Fig. 2 is local authentication method schematic diagram in the present invention;
Fig. 3 is medium-long range authentication method schematic diagram of the present invention;
Fig. 4 is exit passageway schematic diagram in the present invention;
Fig. 5 is communications schematic diagram in the present invention;
Fig. 6 is encryption storage schematic diagram in the present invention.
Specific embodiment
Embodiment:
The present invention relates to a kind of data trusted transmission method, the client and server carried out data transmission passes through SGX Authenticated, client certificate module confirm it to corresponding server end where platform and user legitimacy, client After certification, the session between server is established, client and server carries out disposable supply agreement, visitor The confidential data of family end application is sealed on the platform where application, wherein is established between server and client independent Exit passageway be communicatively coupled, each channel is corresponding with unique client, and server exists to the data that client is sent It is encrypted in transmission process;After shielded file encrypts in enclave, according to the file request of client, to visitor Family end sends specific file, is then distributed to and has obtained certification and what is authorized check or execute other behaviour using person Make.
Specific be system framework schematic diagram as shown in Figure 1, and the believable part of client is that is, in trust to the protected of SGX Enclave in part, execute the file operation of need for confidentiality.Next this framework will be described in detail and whole system is How to run to reach the demand for security under various file management scenes.
Firstly, client certificate module confirm it to corresponding server-side where platform and user legitimacy.It utilizes The authentication function of SGX, this module generate a verifiable report about clients entities, that is, with where client The identity information of platform binding, this identity information is bound by CPU.Server-side survey report come determine at this time with oneself The machine of communication supports that the identity of SGX function and client is legal.Client is disposably supplied with server-side Agreement can thus make the confidential data of application be sealed on the platform at application place.And this encrypted secret number According to can only be used to decryption and operation.
In the framework of this system, the access right and encryption key of file are saved in the database of server. Database administrator can modify corresponding access right and be grouped to realize the management of permission for the user of client. Client establishes the session between server after certification, and server confirms client and its place at this time Platform safety.And file if simply from server transport to client, then greatly reduce this system Safety, while but also the encryption storage of client loses meaning.For this reason, it may be necessary to be built between server and client Individual exit passageway is found, each channel is corresponding with unique client.After shielded file encrypts in enclave, According to the file request of client, specific file is sent to client, is then distributed to the application for having obtained certification and having authorized User checks or executes other operations.
Once the user by certification has received the file of encryption, he, which can be used, operates in client platform Secure file in enclave reads component to carry out checking for file.And while this process, the permission of client is examined It looks into component and needs to check whether user has permission to check or modify file, once file permission inspection fails, file Decryption component is also just not necessarily to work.
Server include it is several under several modules: certification and session management module, file transmission key generation module and Store the database composition of user's data associated with the file.Content of Communication between all servers and client is all encryption , and the safety guarantee such as integrality end to end and playback protection are provided in various scenes.Protect system not by with Under several attacks threaten: file content or the key from stealing for encryption;Platform and application identity deception, that is, pretend to be The rogue program or platform of valid application;It is tampered using constraint and activity log.
In the present embodiment, specific authentication function design, SGX hardware security support to be mainly that upper level applications provide The running environment of safety can be application encryption to make incredible underlying operating system and hardware that can not steal using machine It is close.Traditional SGX authentication mode is primarily upon verifying SGX running environment, that is, whether verifying application is safely operated in SGX ring In border, the safety verification of itself is applied without paying close attention to.That is traditional SGX research is relied primarily on using inherently safe It is assumed that and in true credible delivery application scenarios, the client application for the user that disguises oneself as equally be threaten one of.For this Problem, is different from conventional operation, and this system uses the local and remote authentication mode for authenticating and combining.
The process of local authentication is as shown in Fig. 2, in the present system, local authentication includes two enclave entities, verifier With authenticatee, and the two entities need verifying mutually, and the remote authentication after being prepares.For ease of description, with Lower to represent authenticatee with A, B represents verifier.Firstly, 1. such as step, entity A is established socket with entity B and is connect.It is establishing After communication path, A obtains the value of the MRENCLAVE of B.It should be noted is that there is no encryption, reasons for the communication of this part It is that this step is not related to the transmission of file, and the value transmitted can all cause to authenticate by any change or loss Failure.A calls the EREPORT instruction of encapsulation later, and the REPORT of signature is generated using the value of the MRENCLAVE of B, uses To send back B, 2. such as step.REPORT is sent to B still through this incredible communication path by A.REPORT herein Structure include the identity of the two described above enclave, attribute relevant to enclave, hardware TCB confidence level and One MAC (Message Authentication Code, Message Authentication Code) label.
After entity B receives the REPORT of A transmission, EGETKEY instruction is called to obtain its Report Key, is used to again The MAC of REPORT is calculated, and calculated result is compared with the MAC in REPORT.If the two is consistent, then B Affirm the enclave that A is strictly and oneself operates in identical platform.After the firmware and hardware component of TCB are examined errorless, B The REPORT of A can be checked to verify the component software of TCB, including reflecting the Software Mirroring content operated in enclave The MRENCLAVE and MRSIGNER for reflecting encipherer's identity.So far B completes the verifying to A.What B was received before then using The value of MRENCLAVE in REPORT generates the REPORT of oneself in the same way, is then transferred to A, 3. such as step.Finally A verifies B in the same way to ensure that A is believable.
The method that authentication mechanism for authenticating in platform has used symmetric key encryption, in this method only Enclave checking R EPORT structure and for generating REPORT EREPORT instruction have access authentication secret permission.However It is distributed on two different platforms due to the enclave of server from the enclave of client in remote authentication, We need to create a special enclave, referred to as Quoting Enclave (citation on the platform of client Enclave) server is helped to complete verifying to client, and feedback validation information.Due to citation Enclave and client The performed Enclave in end is in identical platform, therefore utilizes above-described realization, we can complete Quoting Local authentication between Enclave and client Enclave.After local authentication executes, Enclave is cited by REPORT In MAC replaced with a signature, this signature completed using the unsymmetrical key specific to equipment, citation Enclave It is preserved for the private cipher key of signature.REPORT after replacement MAC is referred to as a QUOTE (citation).Above-mentioned signature uses RSA is completed.
For the process of server authenticating client as shown in figure 3, when starting, client wants will obtain the file of server, Therefore the communication between server is first established.1. step indicates that server receives request after, query is sent to client It is bright, indicate that client needs to provide evidence to prove oneself to operate in really in the environment for meeting safety standard, that is, In enclave, while client also needs and proves the legitimacy of oneself.After client receives statement, it is handed over to the mesh of oneself Enclave (executing the Enclave of identifying procedure) is marked to handle.At this time target Enclave according to the query received state into The corresponding feedback operation of row, while local authentication process above is carried out with the citation Enclave of same platform, 2. such as step. After two enclave finish verifying, that is, indicate both in the enclave for meeting safety standard.Target at this time Enclave sends the signing messages of the whole code texts of itself application to citation Enclave.Citation Enclave can generate QUOTE And the ciphertext of signing messages, and RSA public key is sent to target Enclave.Target Enclave is receiving QUOTE, label After the ciphertext and RSA public key of name information, they can be transmitted to server, 3. such as step.Finally, on server Challenger decrypts QUOTE according to public key to obtain the REPORT of the two, in a manner of similar local authentication result treatment Complete the inspection of REPORT, at the same check application signature information whether in advance put on record sign it is consistent.If inspection passes through, whole A remote authentication is announced successfully, otherwise fails and server can refuse other requests from client.
In the method announced in patent document CN201810190643, using the auth method of dynamic " two steps ", i.e., It joined a SGX module (using Intel SGX technology) between user and certificate server, user is carrying out authentication When first the identity information of oneself is sent in SGX module, SGX module uses the key pair identity information that is stored therein The information of encryption is transmitted to certificate server again later and carries out second step certification by encryption.User terminal in the authentication mode is real On border in untrusted environment, i.e. the not protection of SGX.Therefore there are risks such as man-in-the-middle attacks, malicious attacker can be held under the arm User is held, user is obtained by means such as packet capturings and is sent to the verifying summary info of SGX to reset and obtain certification.
In the method that patent document CN201710621204 is announced, using the traditional auth method of SGX, the authentication Method lacks the verifying to application itself, and there are the risks of client's spoof attack.
Specifically, in the present embodiment, design and realization for exit passageway are as follows:
Exit passageway is established in communication connection of the present invention between each client and server, so that server is to visitor The data that family end is sent all are encryption in transmission process.Therefore, even if attacker has stolen the data of transmission, also to it It has no way of doing it, needless to say manufactures certain attacks using data.
The realization of this module needs to be implemented two important processes, first is that server generates random cipher, second is that with secret The secure transfer process of code.In order to cooperate file encryption and meanwhile enhance encryption file safety, password generator use Intel The RRAND instruction that framework provides is used for the generation of true random number.
A. fixed character is stored in immutable sequence;
B. request NTP (Network Time Protocol, Network Time Protocol) service, and using the time of acquisition as The seed of random number;
C. it is instructed using RRAND, according to above-mentioned seed, generates an integer index every time, and read from fixed sequence program Remove mark corresponding character in step 1;
D. by character combination at the random cipher of 16 bytes.
Above step is performed, it is close that random cipher generator can distribute disposable file encryption for each password request Key.
Although, even if having grabbed key, due to the continuity of data packet, being difficult to learn that for attacker Divide the key being only for encrypting file.However in view of the possibility of Key Exposure in extreme circumstances, this system is by key Encryption has been done in transmission.The basic principle of this part is that key above is encrypted and decrypted using RSA.It utilizes Rsa encryption may insure that key can only transmit between server and client, and decryption person can only be client.Specifically It is as shown in Figure 4 to transmit implementation process:
Client generates RSA key pair at random, then extracts RSA key to inner public key, will by socket Public key is sent to server end.After received server-side to public key, file encryption is used for by what random cipher generator distributed Key is encrypted, and is sent to client.After client receives encrypted data, with the private key pair of RSA key centering Data are decrypted, to obtain the key for encrypting file.One is just established when there are data to send from server end The channel of safety, can be encrypted using the data of this channel transfer, to guarantee the safety of file transmission.
Specifically, in the present embodiment, for the design and realization of file security transmission are as follows:
File transmission is mainly server according to the file request received, from server end to client in a manner of shunting File is sent, the data in whole process must be transmitted from corresponding exit passageway.
Since data send and receive from enclave, it can make attacker is organic can using traditional Socket communication mode Multiply, it is possible to leak the interface of enclave outside cruelly.Although it is total that enclave can legally access the host outside enclave Memory is enjoyed, this mode still there are some problems, because the host of malice or operating system may be modified in non-enclave It deposits.Therefore, in order to avoid such case, present system provides a stringenter communication protocol form, i.e. utilization is shared Code and data field, are divided into Trampoline and Stub.This region defines the stringent interface interacted with enclave, thus Keep relevant security attribute easily controllable.
Communication is unidirectional and is all dominated by the enclave for sending request.As shown in figure 5, this system needs first Two region of memory are reserved in host common memory, and both ends memory address is registered in enclave, made The region Stub and Trampoline.When Enclave will request the socket example for network, setting is corresponding first in Stub Parameter (fcode is such as assigned a value of FSCOKET), then call predefined processing routine, that is, Trampoline, in order to Trampoline code is called, system needs to run EEXIT instruction and exits enclave mode.When mainframe program or operation system After system has handled enclave request and Trampoline code, result or return value can be stored in Stub region of memory, Trampoline code instructs finally, ERESUME can be re-executed to restore the operation of enclave.By the control of program After being restored to the position executed before enclave, enclave can read the value in Stub, pass through the in_arg0 in Stub Obtain socket example.Enclave can carry out believable transmission using this channel socket.
At this time according to upper section code key part the step of, after client obtains unique file encryption key, as The creator in channel, server need to be encrypted using file transmitted by this key pair.Here with Encryption Algorithm be Aes algorithm.
Specifically in the present embodiment, design and realization for document sealing module are as follows:
Encryption, which stores, to be a reading process cache contents and is output to the process in file new on hard disk by byte, such as Shown in Fig. 6.The application operated in Enclave first requests key by instruction EGETKEY, right after successfully obtaining key The data of caching are read out.For the 1024 caching bytes read, according to the method for similar sliding window, and according to The encryption principle of AES is grouped encryption to these bytes, and every group is still 16 bytes.The Encryption Algorithm of AES is utilized later To each group of byte encryption.Since encrypted byte is difficult to meet the coding of system, one may be brought in decryption Fixed obstacle.It would therefore be desirable to certain processing be done to encrypted character, here with circulation each byte conversion At the form of 16 systems, and it is output in specified file.After the completion of all data encryptions, sealed storage module is just completed Task.
Credible delivery system based on SGX covers the safety guarantee of hardware and software, so as to make classified papers from Long-range server security is transferred in client, and realizes safe handling and storage access.This system is about client Safety, file permission control, document transmission process and file storage access design and realization, generally reached expection Target, realize the credibility of this Transmission system.Ensure the integrality of client and the safety of place system, it is ensured that client With the private ownership of the running memory of the key code and data of server program;The confidentiality and file for ensuring file transmission are deposited The safety of storage and encryption key uniqueness and independence.
In addition to above preferred embodiment, there are other embodiments of the invention, and those skilled in the art can be according to this Invention makes various changes and modifications, and as long as it does not depart from the spirit of the invention, should belong to appended claims of the present invention and determines The range of justice.

Claims (10)

1. a kind of data trusted transmission method, the client and server carried out data transmission are authenticated by SGX, client The legitimacy of platform and user where holding authentication module to confirm it to corresponding server end, client are passed through after certification, The session between server is established, client and server carries out disposable supply agreement, the machine of client application Ciphertext data is sealed on the platform where application, which is characterized in that individually safety is established between server and client Channel is communicatively coupled, and each channel is corresponding with unique client, and the data that server is sent to client are being transmitted across It is encrypted in journey;
After shielded file encrypts in enclave, according to the file request of client, specific text is sent to client Part, be then distributed to obtained certification and authorize check or execute other operations using person.
2. data trusted transmission method according to claim 1, which is characterized in that the user by certification has received encryption File, read component using the secure file in the enclave for operating in client platform and carry out checking for file;Together When, whether the scope check component inspection user of client has permission to check or modify file, once file permission inspection Failure, file decryption component are not necessarily to work.
3. data trusted transmission method according to claim 2, which is characterized in that SGX certification be local authentication and Remote authentication combines.
4. data trusted transmission method according to claim 3, which is characterized in that the local authentication includes two Enclave entity, and the two entities need verifying mutually, and two entities verifier and authenticatee each other are specific to verify Step are as follows:
1., after entity A establishes communication path with entity B, entity A obtains the value of the MRENCLAVE of entity B to step;
Step is 2.: entity A calls the EREPORT instruction of encapsulation, and generates signature using the value of the MRENCLAVE of entity B REPORT, to send back entity B;
Step is 3.: after entity B receives the REPORT of entity A transmission, call EGETKEY instruction to obtain its Report Key, For recalculating the MAC of REPORT, and calculated result is compared with the MAC in REPORT;
If the two is consistent, entity B affirms the enclave that entity A is strictly and oneself operates in identical platform, when the firmware of TCB With hardware component be examined it is errorless after, entity B can check the REPORT of entity A to verify the component software of TCB, including reflection It operates in the MRENCLAVE of the Software Mirroring content in enclave and reflects the MRSIGNER of encipherer's identity.
5. data trusted transmission method according to claim 4, which is characterized in that the remote authentication includes: in client A citation Enclave is created on the platform at end, the local carried out between Quoting Enclave and client Enclave is recognized Card;After local authentication executes, citation Enclave replaces the MAC in REPORT with a signature, and the signature makes It is completed with the unsymmetrical key specific to equipment, citation Enclave is preserved for the private cipher key of signature, and the signature uses RSA is completed.
6. data trusted transmission method according to claim 5, which is characterized in that the remote authentication includes following step It is rapid:
Step is 1.: after server receives request, sending to client and queries statement, indicates that client needs to provide evidence to prove It oneself operates in and meets in the environment of safety standard really, that is, in enclave, while client also needs and prove oneself Legitimacy.
Step is 2.: after client receives statement, being handed over to the target Enclave of oneself to handle, target Enclave is according to receipts The query statement arrived carries out corresponding feedback operation, while carrying out local authentication process with the citation Enclave of same platform.
Step is 3.: target Enclave sends the signing messages of the whole code texts of itself application, citation to citation Enclave Enclave generates the ciphertext of QUOTE and signing messages, and RSA public key is sent to target Enclave, target Enclave It is receiving QUOTE, after the ciphertext and RSA public key of signing messages, they can be transmitted to server, on server Challenger decrypts QUOTE according to public key to obtain the REPORT of the two, in a manner of similar local authentication result treatment Complete the inspection of REPORT, at the same check application signature information whether in advance put on record sign it is consistent.
7. data trusted transmission method according to claim 2, which is characterized in that the data that server is sent to client Encryption is carried out in transmission process includes:
Client generates RSA key pair at random, and RSA key extracts inner public key, is sent public key by socket To server end;
After received server-side to public key, the key for being used for file encryption that random cipher generator is distributed is encrypted, and And it is sent to client;
After client receives encrypted data, data are decrypted with the private key of RSA key centering, to obtain for adding The key of ciphertext part.
8. data trusted transmission method according to claim 7, which is characterized in that the random cipher generator distribution is used In encryption key the following steps are included:
A. fixed character is stored in immutable sequence;
B. request NTP service, and using the time of acquisition as the seed of random number;
C. it is instructed using RRAND, according to above-mentioned seed, generates an integer index every time, and under reading in fixed sequence program It is marked on corresponding character in step a;
D. by character combination at the random cipher of 16 bytes.
9. data trusted transmission method according to claim 8, which is characterized in that from server end to client to shunt Mode send file and must be transmitted from corresponding exit passageway, communication is unidirectional and is all requested by sending Enclave is leading.
10. data trusted transmission method according to claim 9, which is characterized in that encryption storage includes: to operate in Application in Enclave requests key by instruction EGETKEY, after successfully obtaining key, is read out to the data of caching, For the 1024 caching bytes read, according to the method for similar sliding window, and according to the encryption principle of AES, to this A little bytes are grouped encryption, and every group is still 16 bytes, using the Encryption Algorithm of AES to each group of byte encryption.
CN201811213187.8A 2018-10-18 2018-10-18 Trusted data transmission method Active CN109361668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811213187.8A CN109361668B (en) 2018-10-18 2018-10-18 Trusted data transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811213187.8A CN109361668B (en) 2018-10-18 2018-10-18 Trusted data transmission method

Publications (2)

Publication Number Publication Date
CN109361668A true CN109361668A (en) 2019-02-19
CN109361668B CN109361668B (en) 2021-06-11

Family

ID=65345712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811213187.8A Active CN109361668B (en) 2018-10-18 2018-10-18 Trusted data transmission method

Country Status (1)

Country Link
CN (1) CN109361668B (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995776A (en) * 2019-03-26 2019-07-09 西安纸贵互联网科技有限公司 A kind of internet data verification method and system
CN110069241A (en) * 2019-03-27 2019-07-30 阿里巴巴集团控股有限公司 Acquisition methods, device, client device and the server of pseudo random number
CN110519054A (en) * 2019-08-29 2019-11-29 四川普思科创信息技术有限公司 A method of internet of things data safeguard protection is carried out based on reliable computing technology
CN110717149A (en) * 2019-10-09 2020-01-21 湖南国科微电子股份有限公司 Security architecture, operation method and device thereof, and readable storage medium
CN111865568A (en) * 2019-04-29 2020-10-30 华控清交信息科技(北京)有限公司 Data transmission oriented certificate storing method, transmission method and system
CN112231652A (en) * 2020-10-28 2021-01-15 百度在线网络技术(北京)有限公司 Trusted environment remote verification method, device, equipment, system and medium
CN112395631A (en) * 2020-11-27 2021-02-23 上海交通大学 Secure database system, method and medium based on SGX technology
CN112651018A (en) * 2020-12-18 2021-04-13 卓尔智联(武汉)研究院有限公司 SGX-based trusted input and output control method, device, equipment and storage medium
CN113158153A (en) * 2021-05-19 2021-07-23 杭州市电力设计院有限公司余杭分公司 Reading authentication management system based on intelligent power grid database
CN113329012A (en) * 2021-05-28 2021-08-31 交叉信息核心技术研究院(西安)有限公司 Rapid authentication method and system for trusted execution environment
CN113676494A (en) * 2021-10-21 2021-11-19 深圳致星科技有限公司 Centralized data processing method and device
CN113721919A (en) * 2021-08-09 2021-11-30 上海交通大学 Intel SGX trusted execution environment-based online compiling and obfuscating implementation method
CN113810382A (en) * 2021-08-24 2021-12-17 东北大学秦皇岛分校 Cipher text loading method for resisting SGX side channel attack
CN114189706A (en) * 2021-12-09 2022-03-15 北京航星永志科技有限公司 Media playing method, system, device and computer equipment
CN114338201A (en) * 2021-12-30 2022-04-12 北京可信华泰信息技术有限公司 Data processing method and device, electronic device and storage medium
CN114422215A (en) * 2021-12-31 2022-04-29 国网安徽省电力有限公司合肥供电公司 Cross-platform and trusted energy data sharing system and method based on block chain
CN114553590A (en) * 2022-03-17 2022-05-27 北京字节跳动网络技术有限公司 Data transmission method and related equipment
WO2022168083A1 (en) * 2021-02-04 2022-08-11 KAZUAR Advanced Technologies Ltd. System and method enabling networked systems to safely use digital content e.g. code
CN115334073A (en) * 2022-10-13 2022-11-11 中国电子科技集团公司第十五研究所 Method and system for deeply pulling remote file
CN115567311A (en) * 2022-10-12 2023-01-03 贵州电网有限责任公司 Encryption system and encryption method based on data information encryption
CN115801446A (en) * 2022-12-29 2023-03-14 浙江大学 Encryption database system based on trusted hardware
WO2023103697A1 (en) * 2021-12-10 2023-06-15 华为技术有限公司 Communication method in computer system, and related product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989984A (en) * 2010-08-24 2011-03-23 北京易恒信认证科技有限公司 Electronic document safe sharing system and method thereof
CN107743133A (en) * 2017-11-30 2018-02-27 中国石油大学(北京) Mobile terminal and its access control method and system based on trustable security environment
CN108418691A (en) * 2018-03-08 2018-08-17 湖南大学 Dynamic network identity identifying method based on SGX

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989984A (en) * 2010-08-24 2011-03-23 北京易恒信认证科技有限公司 Electronic document safe sharing system and method thereof
CN107743133A (en) * 2017-11-30 2018-02-27 中国石油大学(北京) Mobile terminal and its access control method and system based on trustable security environment
CN108418691A (en) * 2018-03-08 2018-08-17 湖南大学 Dynamic network identity identifying method based on SGX

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于永哲: "基于动态密码技术的M2M身份认证协议研究", 《中国优秀硕士论文全文数据库信息科技辑》 *

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995776B (en) * 2019-03-26 2021-10-26 西安纸贵互联网科技有限公司 Internet data verification method and system
CN109995776A (en) * 2019-03-26 2019-07-09 西安纸贵互联网科技有限公司 A kind of internet data verification method and system
CN110069241A (en) * 2019-03-27 2019-07-30 阿里巴巴集团控股有限公司 Acquisition methods, device, client device and the server of pseudo random number
CN110069241B (en) * 2019-03-27 2023-03-03 创新先进技术有限公司 Pseudo-random number acquisition method and device, client device and server
CN111865568A (en) * 2019-04-29 2020-10-30 华控清交信息科技(北京)有限公司 Data transmission oriented certificate storing method, transmission method and system
CN110519054A (en) * 2019-08-29 2019-11-29 四川普思科创信息技术有限公司 A method of internet of things data safeguard protection is carried out based on reliable computing technology
CN110717149A (en) * 2019-10-09 2020-01-21 湖南国科微电子股份有限公司 Security architecture, operation method and device thereof, and readable storage medium
CN112231652A (en) * 2020-10-28 2021-01-15 百度在线网络技术(北京)有限公司 Trusted environment remote verification method, device, equipment, system and medium
CN112231652B (en) * 2020-10-28 2022-02-22 百度在线网络技术(北京)有限公司 Trusted environment remote verification method, device, equipment, system and medium
CN112395631B (en) * 2020-11-27 2022-09-20 上海交通大学 Secure database system, method and medium based on SGX technology
CN112395631A (en) * 2020-11-27 2021-02-23 上海交通大学 Secure database system, method and medium based on SGX technology
CN112651018A (en) * 2020-12-18 2021-04-13 卓尔智联(武汉)研究院有限公司 SGX-based trusted input and output control method, device, equipment and storage medium
CN112651018B (en) * 2020-12-18 2022-08-02 卓尔智联(武汉)研究院有限公司 SGX-based trusted input and output control method, device, equipment and storage medium
WO2022168083A1 (en) * 2021-02-04 2022-08-11 KAZUAR Advanced Technologies Ltd. System and method enabling networked systems to safely use digital content e.g. code
CN113158153A (en) * 2021-05-19 2021-07-23 杭州市电力设计院有限公司余杭分公司 Reading authentication management system based on intelligent power grid database
CN113329012A (en) * 2021-05-28 2021-08-31 交叉信息核心技术研究院(西安)有限公司 Rapid authentication method and system for trusted execution environment
CN113329012B (en) * 2021-05-28 2022-07-26 交叉信息核心技术研究院(西安)有限公司 Rapid authentication method and system for trusted execution environment
CN113721919A (en) * 2021-08-09 2021-11-30 上海交通大学 Intel SGX trusted execution environment-based online compiling and obfuscating implementation method
CN113721919B (en) * 2021-08-09 2024-03-12 上海交通大学 Online compiling confusion implementation method based on Intel SGX trusted execution environment
CN113810382A (en) * 2021-08-24 2021-12-17 东北大学秦皇岛分校 Cipher text loading method for resisting SGX side channel attack
CN113810382B (en) * 2021-08-24 2023-07-11 东北大学秦皇岛分校 Ciphertext loading method for resisting SGX side channel attack
CN113676494A (en) * 2021-10-21 2021-11-19 深圳致星科技有限公司 Centralized data processing method and device
CN113676494B (en) * 2021-10-21 2022-01-07 深圳致星科技有限公司 Centralized data processing method and device
CN114189706A (en) * 2021-12-09 2022-03-15 北京航星永志科技有限公司 Media playing method, system, device and computer equipment
WO2023103697A1 (en) * 2021-12-10 2023-06-15 华为技术有限公司 Communication method in computer system, and related product
CN114338201A (en) * 2021-12-30 2022-04-12 北京可信华泰信息技术有限公司 Data processing method and device, electronic device and storage medium
CN114338201B (en) * 2021-12-30 2024-04-02 北京可信华泰信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN114422215A (en) * 2021-12-31 2022-04-29 国网安徽省电力有限公司合肥供电公司 Cross-platform and trusted energy data sharing system and method based on block chain
CN114553590A (en) * 2022-03-17 2022-05-27 北京字节跳动网络技术有限公司 Data transmission method and related equipment
CN114553590B (en) * 2022-03-17 2023-08-22 抖音视界有限公司 Data transmission method and related equipment
CN115567311A (en) * 2022-10-12 2023-01-03 贵州电网有限责任公司 Encryption system and encryption method based on data information encryption
CN115567311B (en) * 2022-10-12 2023-05-05 贵州电网有限责任公司 Encryption system and encryption method based on data information encryption
CN115334073A (en) * 2022-10-13 2022-11-11 中国电子科技集团公司第十五研究所 Method and system for deeply pulling remote file
CN115801446A (en) * 2022-12-29 2023-03-14 浙江大学 Encryption database system based on trusted hardware

Also Published As

Publication number Publication date
CN109361668B (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN109361668B (en) Trusted data transmission method
CN106888084B (en) Quantum fort machine system and authentication method thereof
Dwoskin et al. Hardware-rooted trust for secure key management and transient trust
CN104756127A (en) Secure data handling by a virtual machine
CN108418691A (en) Dynamic network identity identifying method based on SGX
US10263782B2 (en) Soft-token authentication system
EP1320957A1 (en) System for establishing an audit trail to protect objects distributed over a network
KR20140126787A (en) Puf-based hardware device for providing one time password, and method for 2-factor authenticating using thereof
JPH10247905A (en) Access qualification authentication device and its method
JP2011515961A (en) Authentication storage method and authentication storage system for client side certificate authentication information
CN103001976A (en) Safe network information transmission method
CN110505055B (en) External network access identity authentication method and system based on asymmetric key pool pair and key fob
CN108737376A (en) A kind of double factor authentication method and system based on fingerprint and digital certificate
CN109309645A (en) A kind of software distribution security guard method
WO2008053279A1 (en) Logging on a user device to a server
CN110837634B (en) Electronic signature method based on hardware encryption machine
CN110519222B (en) External network access identity authentication method and system based on disposable asymmetric key pair and key fob
Galibus et al. Elements of cloud storage security: concepts, designs and optimized practices
CN114003888B (en) Bidirectional authentication method and device for storage system access based on hardware information
CN111241492A (en) Product multi-tenant secure credit granting method, system and electronic equipment
CN110572392A (en) Identity authentication method based on HyperLegger network
CN105933117A (en) Data encryption and decryption device and method based on TPM (Trusted Platform Module) key security storage
Yee et al. Ensuring privacy for e-health services
Jang-Jaccard et al. Portable key management service for cloud storage
Kankal et al. An adaptive authentication based on blockchain for bigdata hadoop framework

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