A blockchain-based bastion machine log security encryption logging system and method
By using blockchain technology and interstellar file system in the bastion machine log system, the problem of log tampering and difficulty in accountability is solved, the secure storage and non-tamperability of log data are achieved, and the authenticity and transparent recording of data are ensured.
Patent Information
- Application Number
- CN202210950741.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-08-09
AI Technical Summary
The traditional bastion host log system cannot prevent log tampering, and centralized servers are vulnerable to attacks, making it difficult to confirm the authenticity of data, making audit results unreliable, and making accountability difficult.
A blockchain-based bastion machine log security encryption logging system is adopted. By encrypting log data and storing it in the interstellar file system, the blockchain is used for sharing and verification to ensure the non-tamperability and authenticity of the data.
It realizes the safe storage and sharing of log data, reduces the risk of tampering, ensures transparent recording and accountability of data, and improves the authenticity of data sources.
Smart Images

Figure CN115314224B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a blockchain-based bastion host log secure encryption log recording system and method. Background Art
[0002] With the advent of the big data era and the rapid development of network technology, the work of operation and maintenance personnel has become increasingly complicated, among which network security auditing is extremely important. In order to ensure the security of a specific network environment, bastion host technology has emerged. Various technical means in the bastion host are used to monitor and record the operation behaviors of users and operation and maintenance personnel on network equipment, databases, servers and other equipment, so as to conduct centralized processing, audit accountability and high-risk warnings. Among them, the most important part is the log data of the bastion host, which retains the operation records of various personnel; the bastion host log is key data that can help us troubleshoot and identify the person responsible for the accident.
[0003] At present, various log systems have been widely used for log storage; however, traditional log systems cannot prevent logs from being tampered with. Centralized servers are more vulnerable to attacks, and those who have the right to operate records can easily tamper with logs. Due to the audit and operation log data in the bastion host, when they are centrally stored and shared, there are problems such as data tampering, difficulty in confirming the authenticity of the source of log data, unreliable audit results in the centralized audit process, and difficulty in accountability. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a blockchain-based bastion host log secure encrypted logging system and method, which ensures the authenticity and non-tamperability of log data, avoids data loss, and provides a complete data backup solution.
[0005] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a blockchain-based bastion machine log secure encryption logging system, and the blockchain-based bastion machine log secure encryption logging system includes:
[0006] Bastion client, used for:
[0007] Encrypting the original log data, and sending the encrypted original log data to the Interstellar File System;
[0008] Perform structured analysis on the original log data, upload the encrypted analysis log, interstellar file address and aggregate signature to the blockchain for sharing, wherein the bastion machine client completes the authorization of the data user terminal, so that the data user terminal can search for the expected results and decrypt to obtain the original log data;
[0009] Data client, used for:
[0010] Send a registration application to the bastion server client and be authorized to obtain a re-encryption key and a search token, wherein the search token includes an identity verification code and a search trap;
[0011] Generate a trapdoor set through the required parsing log and public key, call the query smart contract on the blockchain to search and obtain the search results, and verify that the signature is correct;
[0012] The encrypted key ciphertext obtained by searching is re-encrypted by the re-encryption key pair to obtain the required decryption key pair to obtain the permission to access the decrypted original log data of the bastion machine client from the interplanetary file system.
[0013] In addition, the present invention also provides a blockchain-based bastion host log security recording method, the blockchain-based bastion host log security recording method uses the above-mentioned blockchain-based bastion host log security recording system, the method comprising:
[0014] Step 1: Initialize the bastion host log system parameters;
[0015] Step 2, generating keys for the bastion machine client and the data user client respectively;
[0016] Step 3, generating the original log data encrypted file and signature of the bastion machine client;
[0017] Step 4, generating a searchable encrypted parsing log of the bastion host client;
[0018] Step 5, generating a re-encryption key and a search token for the data user;
[0019] Step 6: The data user terminal searches and verifies the correctness of the search results, and re-encrypts and decrypts the encrypted ciphertext of the bastion server client to obtain the symmetric key of the bastion server client;
[0020] Step 7, the bastion machine client completes the secure encrypted recording of the log, ensures that the data user client obtains the authority to access the original log data ciphertext from the interplanetary file system, and decrypts the original log data to complete the secure recording of the log.
[0021] Preferably, the initializing the bastion machine log system parameters includes:
[0022] Configured with security parameter λ as input, select two large prime numbers p and q, output the multiplication cyclic group G1, G2 and bilinear pairing e: G1×G2→G2 with prime order p, g is a generator on the multiplication cyclic group G1, G2, G is a generator on G1, randomly select h1, h2←G2, calculate L=e(h1,h2), and select the following hash function:
[0023] H1: {0,1} |sk| →{0,1} |q| ;
[0024] H2∶{0,1} * →{0,1} |q| ;
[0025] H3∶{0,1} * →G1;
[0026] The common parameters for initializing the bastion host log system are:
[0027] param=(g,G,h1,h2,G1,G2,e,H1,H2,H3,L).
[0028] Preferably, the generating of the keys of the bastion machine client and the data user terminal includes:
[0029] The bastion client ID i Random Selection calculate The data client ID i The public key and private key are pk i =X i ,sk i =x i ;
[0030] The data user ID u Random Selection calculate The data user ID u The public key and private key are pk u =Y u ,sk u =y u .
[0031] Preferably, the generating of the original log data ciphertext and the encrypted key ciphertext of the bastion machine client includes:
[0032] The bastion host client randomly selects is the symmetric encryption key; encrypt the original log d = <d0,d1,…d l >,(d l ∈{0,1}* ,l=0,1,…,n) to generate ciphertext D l , and calculate the symmetric key ciphertext C1;
[0033] Generate the ciphertext D by the following formula l :
[0034] D l =AES(k s ,d l );
[0035] The bastion machine client uploads the ciphertext C d = <D0,D1,…D l >, go to the Interstellar File System and get the file address IPFS of the original log data ciphertext Addr ;
[0036] The bastion host client randomly selects Calculate C1 = (c0, c1, c2);
[0037] c0=L r ·k s ;
[0038] c1=g r ;
[0039]
[0040] Preferably, the generation of searchable encrypted parsing logs of the bastion host client includes:
[0041] The bastion machine client performs log parsing on the original data, and obtains the parsed log file as W= <w0,w1,…w n >,(w l ∈{0,1} * ,l=0,1,…,n), calculate the encrypted parsing log in
[0042] Preferably, the bastion machine client performs aggregate signing on the encrypted original log data including:
[0043] The bastion client generates two random blind keys a0 and b0 and index Sign the original log data and update the blind key through H1 to calculate A j =a j G,B j =b j G. For the original log ciphertext D = <D0,D1,…D l >Sign, sign the encrypted original log;
[0044] A single signature is: l =a l H2(D l ||(l+m))+b l mod;
[0045] The aggregate signature is:
[0046]
[0047] The bastion host client will Upload to blockchain.
[0048] Preferably, the bastion host client generates a re-encryption key and a search token for the data user terminal including:
[0049] After the data user completes the registration, the private key sk of the bastion machine client is used i and the public key Y of the data user u To generate the re-encryption key;
[0050] The re-encryption key rk is obtained by the following formula:
[0051]
[0052] The bastion machine client sends the re-encryption key rk to the registered data user terminal;
[0053] After the data user completes registration, the bastion host client receives the user information and calculates R U =ID U ||P U ||T U ||B U , R U Upload to the blockchain module for data user end to conduct identity authentication of on-chain information;
[0054] The data user assumes that the time is t for searching, let i = (1, 2, ... t), calculate R' U =ID′ U ||P′ U ||(T′ U +i)||B′ U , if and only if there exists a unique i∈[1,t] such that R′ U =R U When , the data user's identity authentication is passed;
[0055] The data user terminal query and analysis log set W′= <w0′,w1′,…w m ′>(i=0,1,…,m), calculate Tdi =H3(w i ′), generate the search trap set Γ = <Td0,Td1,…Td m >, get search token T= <R′ U ,Γ>.
[0056] Preferably, the data user terminal searches and verifies the correctness of the search results, and the process includes:
[0057] The blockchain provides a searchable encrypted parsing log To search, follow these steps:
[0058] η i =e(Td i ,Y u )(i=0,1,…,m);
[0059] right calculate Obviously m≤n;
[0060] When η i =η j When δ ij =1, otherwise δ ij =0, for δ ij (i=0,1,…,m;j=0,1,…,n) forms a matrix Sending the search results to the data user terminal;
[0061] After the data user obtains the search results, it extracts the aggregate signature σ 0,l The correctness of the search signature is verified by the following formula:
[0062]
[0063] Preferably, the data user terminal generates a symmetric key after obtaining the search result and obtains the authority to decrypt the original log data ciphertext from the InterPlanetary File System, including:
[0064] After the data user verifies that the search results are correct, it extracts C1 from the search results and uses the re-encryption key rk and the data user's private key y u Get the symmetric key k s The process is as follows:
[0065] C2=(c′0,c′1,c′2);
[0066] c′0=c0;
[0067] c′1=c1;
[0068] c′2=e(c2,rk);
[0069]
[0070] The data user obtains the original log permission of the bastion machine client after decryption from the interplanetary file system, and obtains the original log data d through the following formula:
[0071] d=DEC(k s ,D l ).
[0072] Compared with the prior art, the blockchain-based bastion log security recording system of the present invention realizes the secure storage and data sharing of bastion log data by combining blockchain technology and IPFS distributed storage; combined with blockchain technology, the key parameters after log parsing are anchored on the chain to reduce the risk of data tampering, and the blockchain nodes participate in consensus and data synchronization to ensure the data unification between nodes, so that the log data is stored more securely in the system. The present invention adopts the forward aggregate signature algorithm to ensure the forward security of log parsing data. After the bastion log data is stored, if the auditor finds that there are violators or improper operations, they can query and hold accountable according to the log information. If the signature is abnormal, the original log data in the interstellar file can be obtained for evidence recovery; the present invention ensures the key privacy of the bastion client through re-encryption technology, and the data user end can directly use its own private key to decrypt and obtain the original log data. The scheme realizes the function that log data cannot be tampered with, ensures the transparent whole process of log data recording, further improves the authenticity of the data source, and conforms to the development trend of bastion log data security recording in the current big data era.
[0073] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0075] Figure 1 This is a system block diagram of the blockchain-based bastion host log security recording system of the present invention;
[0076] Figure 2 A block diagram of the blockchain-based bastion host log security recording system module of the present invention; and
[0077] Figure 3 This is a system flow chart of the blockchain-based bastion host log security recording system of the present invention. DETAILED DESCRIPTION
[0078] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0079] Figure 1 This is a system block diagram of a blockchain-based bastion host log security recording system of the present invention, such as Figure 1 , 2 As shown, the blockchain-based bastion log security encryption logging system includes:
[0080] Bastion client, used for:
[0081] Encrypting the original log data, and sending the encrypted original log data to the Interstellar File System;
[0082] Perform structured analysis on the original log data, upload the encrypted analysis log, interstellar file address and aggregate signature to the blockchain for sharing, wherein the bastion machine client completes the authorization of the data user terminal, so that the data user terminal can search for the expected results and decrypt to obtain the original log data;
[0083] Data client, used for:
[0084] Send a registration application to the bastion server client and be authorized to obtain a re-encryption key and a search token, wherein the search token includes an identity verification code and a search trap;
[0085] Generate a trapdoor set through the required parsing log and public key, call the query smart contract on the blockchain to search and obtain the search results, and verify that the signature is correct;
[0086] The encrypted key ciphertext obtained by searching is re-encrypted by the re-encryption key pair to obtain the required decryption key pair to obtain the permission to access the decrypted original log data of the bastion machine client from the interplanetary file system.
[0087] In addition, the present invention also provides a blockchain-based bastion host log security recording method, the blockchain-based bastion host log security recording method uses the above-mentioned blockchain-based bastion host log security recording system, the method comprising:
[0088] Step 1: Initialize the bastion host log system parameters;
[0089] Step 2, generating keys for the bastion machine client and the data user client respectively;
[0090] Step 3, generating the original log data encrypted file and signature of the bastion machine client;
[0091] Step 4, generating a searchable encrypted parsing log of the bastion host client;
[0092] Step 5, generating a re-encryption key and a search token for the data user;
[0093] Step 6: The data user terminal searches and verifies the correctness of the search results, and re-encrypts and decrypts the encrypted ciphertext of the bastion server client to obtain the symmetric key of the bastion server client;
[0094] Step 7, the bastion machine client completes the secure encrypted recording of the log, ensures that the data user client obtains the authority to access the original log data ciphertext from the interplanetary file system, and decrypts the original log data to complete the secure recording of the log.
[0095] Specifically, the initialization of the bastion machine log system parameters includes:
[0096] Configured with security parameter λ as input, select two large prime numbers p and q, output the multiplication cyclic group G1, G2 and bilinear pairing e: G1×G2→G2 with prime order p, g is a generator on the multiplication cyclic group G1, G2, G is a generator on G1, randomly select h1, h2←G2, calculate L=e(h1,h2), and select the following hash function:
[0097] H1: {0,1} |sk| →{0,1} |q| ;
[0098] H2∶{0,1} * →{0,1} |q| ;
[0099] H3∶{0,1} * →G1;
[0100] The common parameters for initializing the bastion host log system are:
[0101] param=(g,G,h1,h2,G1,G2,e,H1,H2,H3,L).
[0102] Preferably, the generating of the keys of the bastion machine client and the data user terminal includes:
[0103] The bastion client ID i Random Selection calculate The data client ID i The public key and private key are pk i =X i ,sk i=x i ;
[0104] The data user ID u Random Selection calculate The data user ID u The public key and private key are pk u =Y u ,sk u =y u .
[0105] Preferably, the generating of the original log data ciphertext and the encrypted key ciphertext of the bastion machine client includes:
[0106] The bastion host client randomly selects is the symmetric encryption key; encrypt the original log d = <d0,d1,…d l >,(d l ∈{0,1} * ,l=0,1,…,n) to generate ciphertext D l , and calculate the symmetric key ciphertext C1;
[0107] Generate the ciphertext D by the following formula l :
[0108] D l =AES(k s ,d l );
[0109] The bastion machine client uploads the ciphertext C d = <D0,D1,…D l >, go to the Interstellar File System and get the file address IPFS of the original log data ciphertext Addr ;
[0110] The bastion host client randomly selects Calculate C1 = (c0, c1, c2);
[0111] c0=L r ·k s ;
[0112] c1=g r ;
[0113]
[0114] Preferably, the generation of searchable encrypted parsing logs of the bastion host client includes:
[0115] The bastion machine client performs log parsing on the original data, and obtains the parsed log file as W= <w0,w1,…wn >,(w l ∈{0,1} * ,l=0,1,…,n), calculate the encrypted parsing log in
[0116] Preferably, the bastion machine client performs aggregate signing on the encrypted original log data including:
[0117] The bastion client generates two random blind keys a0 and b0 and index Sign the original log data and update the blind key through H1 to calculate A j =a j G,B j =b j G. For the original log ciphertext D = <D0,D1,…D l >Sign, sign the encrypted original log;
[0118] A single signature is: l =a l H2(D l ||(l+m))+b l mod;
[0119] The aggregate signature is:
[0120]
[0121] The bastion host client will Upload to blockchain.
[0122] Preferably, the bastion host client generates a re-encryption key and a search token for the data user terminal including:
[0123] After the data user completes the registration, the private key sk of the bastion machine client is used i and the public key Y of the data user u To generate the re-encryption key;
[0124] The re-encryption key rk is obtained by the following formula:
[0125]
[0126] The bastion machine client sends the re-encryption key rk to the registered data user terminal;
[0127] After the data user completes registration, the bastion host client receives the user information and calculates R U =ID U ||P U ||TU ||B U , R U Upload to the blockchain module for data user end to conduct identity authentication of on-chain information;
[0128] The data user assumes that the time is t for searching, let i = (1, 2, ... t), calculate R' U =ID′ U ||P′ U ||(T′ U +i)||B′ U , if and only if there exists a unique i∈[1,t] such that R′ U =R U When , the data user's identity authentication is passed;
[0129] The data user terminal query and analysis log set W′= <w0′,w1′,…w m ′>(i=0,1,…,m), calculate Td i =H3(w′ i ), generate the search trap set Γ = <Td0,Td1,…Td m >, get search token T= <R′ U ,Γ>.
[0130] Preferably, the data user terminal searches and verifies the correctness of the search results, and the process includes:
[0131] The blockchain provides a searchable encrypted parsing log To search, follow these steps:
[0132] η i =e(Td i ,Y u )(i=0,1,…,m);
[0133] right calculate Obviously m≤n;
[0134] When η i =η j When δ ij =1, otherwise δ ij =0, for δ ij (i=0,1,…,m;j=0,1,…,n) forms a matrix Sending the search results to the data user terminal;
[0135] After the data user obtains the search results, it extracts the aggregate signature σ 0,l The correctness of the search signature is verified by the following formula:
[0136]
[0137] Preferably, the data user terminal generates a symmetric key after obtaining the search result and obtains the authority to decrypt the original log data ciphertext from the InterPlanetary File System, including:
[0138] After the data user verifies that the search results are correct, it extracts C1 from the search results and uses the re-encryption key rk and the data user's private key y u Get the symmetric key k s The process is as follows:
[0139] C2=(c′0,c′1,c′2);
[0140] c′0=c0;
[0141] c′1=c1;
[0142] c′2=e(c2,rk);
[0143]
[0144] The data user obtains the original log permission of the bastion machine client after decryption from the interplanetary file system, and obtains the original log data d through the following formula:
[0145] d=DEC(k s ,D l ).
[0146] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0147] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0150] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0151] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0152] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0153] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0155] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A blockchain-based bastion host log security recording method, characterized in that: The method includes: Step 1: Initialize the bastion host log system parameters; Step 2, generating keys for the bastion machine client and the data user client respectively; Step 3, generating the original log data encrypted file and signature of the bastion machine client; Step 4, generating a searchable encrypted parsing log of the bastion host client; Step 5, generating a re-encryption key and a search token for the data user; Step 6: The data user terminal searches and verifies the correctness of the search results, and re-encrypts and decrypts the encrypted ciphertext of the bastion server client to obtain the symmetric key of the bastion server client; Step 7: The bastion host client completes the secure encryption recording of the log, ensuring that the data user terminal obtains the authority to access the original log data ciphertext from the interstellar file system, and decrypts the original log data to complete the secure recording of the log. Initializing the bastion machine log system parameters includes: Configured with security parameter λ as input, select two large prime numbers p and q, output the multiplication cyclic group G1, G2 and bilinear pairing e: G1×G2→G2 with prime order p, g is a generator on the multiplication cyclic group G1, G2, G is a generator on G1, randomly select h1, h2←G2, calculate L=e(h1,h2), and select the following hash function: H1∶{0,1} |sk| →{0,1}|q|; H2∶{0,1} * →{0,1} |q| ; H3∶{0,1} * →G1; The common parameters for initializing the bastion host log system are: param=(g,G,h1,h2,G1,G2,e,H1,H i ,H3,L); The generating of the keys of the bastion machine client and the data user terminal includes: The bastion client ID i Random Selection calculate The data client ID i The public key and private key are pk i =X i ,sk i =x i ; The data user ID u Random Selection calculate The data user ID u The public key and private key are pk u =Y u ,sk u =y u ; The generating of the original log data ciphertext and the encrypted key ciphertext of the bastion machine client includes: The bastion host client randomly selects is the symmetric encryption key; encrypt the original log d = <d0,d1,…d l >,(d l ∈{0,1} * ,l=0,1,…,n) to generate ciphertext D l , and calculate the symmetric key ciphertext C1; Generate the ciphertext D by the following formula l : D l =AES(k s ,d l ); The bastion machine client uploads the ciphertext C d = <D0,D1,…D l >, go to the Interstellar File System and get the file address IPFS of the original log data ciphertext Addr ; The bastion host client randomly selects Calculate C1 = (c0, c1, c2); c0=L r ·k s ; c1=g r ; The generation of searchable encrypted parsing logs of the bastion host client includes: The bastion machine client performs log parsing on the original data, and obtains the parsed log file as W= <w0,w1,…w n >,(w l ∈{0,1} * ,l=0,1,…,n), calculate the encrypted parsing log in 2. According to the blockchain-based bastion host log security recording method according to claim 1, it is characterized in that: The bastion machine client performs aggregate signing on the encrypted original log data including: The bastion client generates two random blind keys a0 and b0 and index Sign the original log data and update the blind key through H1 to calculate A j =a j G,B j =b j G; for the original log ciphertext D = <D0,D1,…D l >Sign, sign the encrypted original log; A single signature is: l =a l H2(D l ||(l+m))+b l mod; The aggregate signature is: The bastion host client will Upload to blockchain.
3. According to the blockchain-based bastion host log security recording method according to claim 2, it is characterized in that: The bastion machine client generates a re-encryption key and a search token of the data user terminal including: After the data user completes the registration, the private key sk of the bastion machine client is used i and the public key Y of the data user u To generate the re-encryption key; The re-encryption key rk is obtained by the following formula: The bastion machine client sends the re-encryption key rk to the registered data user terminal; After the data user completes registration, the bastion host client receives the user information and calculates R U =ID U ||P U ||T U ||B U , R U Upload to the blockchain module for data user end to conduct identity authentication of on-chain information; The data user assumes that the time is t for searching, let i = (1, 2, ... t), calculate R' U =ID′ U ||P′ U ||(T′ U +i)||B′ U , if and only if there exists a unique i∈[1,t] such that R′ U =R U When , the data user's identity authentication is passed; The data user terminal query and analysis log set W′= <w′0,w′1,…w′ m >(i=0,1,…,m), calculate Td i =H3(w′ i ), generate the search trap set Γ = <Td0,Td1,…Td m >, get the search token T= <R′ U ,Γ>.
4. According to the blockchain-based bastion host log security recording method of claim 3, it is characterized in that: The data user terminal searches and verifies the correctness of the search results, and the process includes: The blockchain provides a searchable encrypted parsing log To search, follow these steps: η i =e(Td i ,Y u )(i=0,1,…,m); right calculate Obviously m≤n; When η i =η j When δ ij =1, otherwise δ ij =0, for δ ij (i=0,1,…,m;j=0,1,…,n) forms a matrix Sending the search results to the data user terminal; After the data user obtains the search results, it extracts the aggregate signature σ 0,l The correctness of the search signature is verified by the following formula:
5. According to the blockchain-based bastion host log security recording method of claim 4, it is characterized in that: After obtaining the search results, the data user terminal generates a symmetric key and obtains the authority to decrypt the original log data ciphertext from the Interplanetary File System, including: After the data user verifies that the search results are correct, it extracts C1 from the search results and uses the re-encryption key rk and the data user's private key y u Get the symmetric key k s The process is as follows: C2=(c′0,c′1,c′2); c′0=c0; c′1=c1; c′2=e(c2,rk); The data user obtains the original log permission of the bastion machine client after decryption from the interplanetary file system, and obtains the original log data d through the following formula: d=DEC(k s ,D l )。 6. A blockchain-based bastion log security encryption logging system, characterized in that: The blockchain-based bastion machine log secure encrypted logging system uses the blockchain-based bastion machine log secure encrypted logging method according to claim 1, and the system includes: Bastion client, used for: Encrypting the original log data, and sending the encrypted original log data to the Interstellar File System; Perform structured analysis on the original log data, upload the encrypted analysis log, interstellar file address and aggregate signature to the blockchain for sharing, wherein the bastion machine client completes the authorization of the data user terminal, so that the data user terminal can search for the expected results and decrypt to obtain the original log data; Data client, used for: Send a registration application to the bastion server client and be authorized to obtain a re-encryption key and a search token, wherein the search token includes an identity verification code and a search trap; Generate a trapdoor set through the required parsing log and public key, call the query smart contract on the blockchain to search and obtain the search results, and verify whether the signature is correct; The encrypted key ciphertext obtained by searching is re-encrypted by the re-encryption key pair to obtain the required decryption key pair to obtain the permission to access the decrypted original log data of the bastion machine client from the interplanetary file system.
