Disclosure of Invention
The technical problem to be solved by the invention is as follows: the technical problem that an operation data sharing scheme giving consideration to data security is lacked at present. The block chain-based operation data time-limited open system is provided, the reliability of operation data is improved, and the diffusion range of the operation data is controlled.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a block chain-based management data time-limited open system comprises an access unit, an index unit, an open application unit and a time-limited encryption unit, wherein the access unit receives store registration and management data of a store, the store registration comprises a store name, a store type, a store position, a store owner name and a white list, the store uploads the management data periodically, the index unit distributes codes for the management data, stores and records an encrypted secret Key and a storage address after the management data is encrypted, extracts a hash value of the management data, uploads the hash value as a verification hash value to a block chain for storage, obtains a corresponding block height, establishes a management data index, records the store name, the store type, the store position, the secret Key, the storage address, the verification hash value and the block height of the management data, and the open application unit receives an open application sent by a requester, the open application comprises a requester identity, data conditions and open duration, the data conditions comprise one or more limiting conditions of store names, store types or store placement positions of the business data, the open application unit enumerates stores related to the data conditions, eliminates stores which do not conform to a white list, generates bills according to the final store number and the open duration, after the requester transfers corresponding numbers of certificates to virtual wallet addresses published by the open application unit, the open application unit periodically submits a secret Key Key of the business data related to the open application to a time-limited encryption unit for encryption in the open duration to obtain open ciphertexts, sends the open ciphertexts to the requester, the requester decrypts the open ciphertexts in the limited duration to obtain a secret Key, reads the business data and uses the secret Key Key to decrypt to obtain plaintext business data, extracts a hash value of the business data and compares the hash value of the certificate stored on a block chain, a proof of authenticity of the operational data is obtained.
Preferably, the business data is generated and uploaded to the access unit in a day-by-day period, the business data comprises a shop name, a shop type, a shop location, a business day people flow, a business day sales amount and a business day per hour customer number, the open application unit obtains the business data number related to the open application according to the shop number and the open time length related to the data condition, and the related business data number is multiplied by a preset unit price to obtain the number of certificates to be paid by the open application.
Preferably, the time-limited encryption unit issues a time-limited encrypted intelligent contract on the block chain, the time-limited encrypted intelligent contract comprises a plurality of encryption columns, the encryption columns comprise column identifiers, clocks and prompt columns, the prompt columns show m sample points (xi, yi), i belongs to [1, m ], the clocks are countdown clocks, when the clocks count down to 0, the encryption columns update the prompt columns and reset the clocks, the time-limited encryption unit associates an integer n for each encryption column to generate a univariate polynomial, the univariate polynomial passes through n of the m sample points in the prompt columns, the distances between the remaining sample points and the univariate polynomial are calculated, the distances and the sample distances are recorded as the sample distances, the univariate polynomial with the minimum sample distance is used as the encrypted polynomial of the encryption column, the index unit allocates codes for store names, store types and store positions, the system comprises an access unit, an open application unit, a limit encryption unit, an open application unit and a virtual wallet unit, wherein the access unit generates a date number, splices codes of shop names, shop types and shop positions when receiving operation data, splices the codes of the shop names, the shop types and the shop positions, splices the codes of the operation data corresponding to dates to form codes of the operation data, and uploads the encrypted operation data to a block chain for storage after being encrypted by using a secret Key and associated codes, the open application unit submits the secret Key of the operation data to the limit encryption unit, the limit encryption unit encrypts the secret Key by using an encryption polynomial of each encryption column respectively to serve as an open ciphertext, stores an open ciphertext associated column identifier and the code uploading block chain of the operation data, a requester transfers corresponding number of certificates of bills to a virtual wallet address published by the open application unit, and then the open application unit sends the codes of the shop names, the shop types and the shop positions and the number of the open duration starting dates to the requester, the open application unit sends a column identifier of an encryption column with a clock consistent with open duration and a corresponding integer n to a requester, the requester polls a block chain in the open duration to obtain consistent business data and open ciphertext, reads m sample points, exhales n univariate polynomials in the m sample points in the prompt column, obtains a univariate polynomial with the minimum sample distance as a recovery polynomial, decrypts the open ciphertext by using the recovery polynomial to obtain a Key, and decrypts by using the Key to obtain the business data.
Preferably, when the encryption Key is encrypted by using an encryption polynomial, the time-limited encryption smart contract performs the following steps: converting the Key Key into a binary stream, after bit filling according to a preset rule, cutting the binary stream into a plurality of binary segments with preset length, and converting the binary segments into an integer D; generating a data combination (b1, x1, b2, x2, …, bN, xN, Δ), bi being a positive integer, such that D = ∑ (-1) bi ^ floor (bi/2) f (xi) positive Δ, where i ∈ [1, N ], Δ is a correction value, floor () is a downward forensic function; and combining the data combinations in sequence to be used as the ciphertext Key.
Preferably, the time-limited encryption intelligence combination is that a value set H is set in an encryption column, when a data combination is generated, xi belongs to H, a lookup table is associated with each encryption column, the lookup table records function values of encryption functions corresponding to each argument in the value set H, when the data combination is generated, a plurality of function values are selected from the lookup table, after summation of the function values through a band number, the sum is within a preset range with an integer D, values of arguments xi corresponding to a plurality of functions are obtained, and a data combination (b1, x1, b2, x2, …, bN, xN, and delta) is established by using the values of the arguments xi, so that D = (= 1) ^ bi floor (bi/2) < f (xi) + delta).
Preferably, the time-limited encryption unit sets the encryption polynomials of all the encryption columns to be linked encryption polynomials, the linked encryption polynomials of all the encryption columns encrypt the same ciphertext of the same Key, and when the time-limited encryption unit sets the linked encryption polynomials, the following steps are performed: the time-limited encryption unit generates a main encryption polynomial and a cyclic value sequence; setting a value number k, and periodically reading k values from the cyclic value sequence; k values corresponding to the current period form a single-period value set, and in the data combination of the integer D corresponding to the Key Key, the independent variable xi value is selected from the single-period value set; the time-limited encryption unit acquires all related single-period value sets before the clock countdown reaches 0 according to the clock of each encryption column, and all the single-period value sets form a column set; generating a linkage encryption polynomial for the encryption column, wherein when the independent variable value belongs to the column set, the function value of the linkage encryption polynomial is the same as that of the main encryption polynomial; generating m sample points and an integer n for a prompt bar of an encryption bar, so that a univariate polynomial with the minimum sample distance in n univariate polynomials in the m sample points is the same as the linkage polynomial; when the time-limited encryption unit receives a Key Key to be encrypted, a current one-cycle value set is read, a value of an independent variable xi is generated in the one-cycle value set by using a main encryption polynomial, the Key Key is encrypted, a ciphertext is used as an open ciphertext, and the open ciphertext association column identification and the code of the operation data are uploaded to a block chain for storage; resetting the clock when the clock countdown of the encryption column reaches 0, wherein the time-limited encryption unit acquires all related single-period value sets before the reset clock countdown reaches 0, updates the column set and generates a linkage polynomial corresponding to the updated column set; and updating the values of the m sample points and the integer n of the prompt field of the encryption field, so that the univariate polynomial with the minimum sample distance in the n univariate polynomials in the m sample points is the same as the updated linkage polynomial.
The substantial effects of the invention are as follows: the diffusion range of the operation data is controlled through a white list and time-limited encryption, the safety of the operation data is improved, the original operation data is stored and verified through a block chain, a credible certificate is provided for the operation data, the operation data has higher application value, the details of the operation data are provided, and operation decision or investment decision is facilitated; the efficiency and the safety of time-limited encryption and decryption can be improved through the improved time-limited encryption algorithm.
Detailed Description
The following provides a more detailed description of the present invention, with reference to the accompanying drawings.
The first embodiment is as follows:
a block chain-based management data time-limited open system, please refer to FIG. 1, which comprises an access unit 20, an index unit 30, an open application unit 50 and a time-limited encryption unit 60, wherein the access unit 20 receives a store registration and management data 12 of a store 11, the store registration comprises a store name, a store type, a store position, a shop owner name and a white list, the store 11 uploads the management data 12 periodically, the index unit 30 assigns codes to the management data 12, stores and records an encrypted Key Key and a storage address after encrypting the management data 12, extracts a hash value of the management data 12, stores the hash value as a certificate hash value uploading block chain 40, obtains a corresponding block height, establishes a management data 12 index, and the management data 12 index records the store name, the store type, the store position, the Key Key, the storage address, the certificate hash value and the block height of the management data 12, the open application unit 50 receives an open application sent by a requester 70, the open application comprises an identifier of the requester 70, a data condition and an open duration, the data condition comprises one or more of a shop name, a shop type or a shop location of the business data 12, the open application unit 50 lists shops 11 related to the data condition, eliminates shops 11 not conforming to a white list, generates bills according to the number of final shops 11 and the open duration, after the requester 70 transfers a corresponding number of certificates into a virtual wallet address published by the open application unit 50, the open application unit 50 periodically submits a secret Key of the business data 12 related to the open application to a time-limited encryption unit 60 for encryption in the open duration to obtain an open ciphertext, the open ciphertext is sent to the requester 70, the requester 70 decrypts the open ciphertext in the time limit to obtain the secret Key, and reading the operation data 12, decrypting by using the Key to obtain the plaintext operation data 12, extracting the hash value of the operation data 12, and comparing the hash value with the certificate-storing hash value stored on the block chain 40 to obtain the authenticity certificate of the operation data 12. The hash value is obtained by a data input hash function, and is a hexadecimal number with a preset length, such as 0x 2D3FD3 … 622 A1D. Common hash functions are SHA256, SHA512, and SM 2. When referring to hash values in the art, it is common to refer to the corresponding hash function name along with it. And performing hash value extraction operation on the same data by using the same hash function, wherein the obtained hash values are the same. If there is any change in the data, an avalanche effect is caused, resulting in a significant change in the hash value. The business data 12 and the Key have a one-to-one correspondence relationship, and for business data 12 of different shops 11 or different dates, a corresponding new Key is generated for encryption.
In the present embodiment, the store 11 refers to an off-line physical store 11 or an on-line physical store that sells a certain product, a certain product category or a plurality of product category. The online store operations data 12 is provided directly by the online shopping platform with the associated operations data 12. The offline physical store 11 achieves the acquisition of the business data 12 by manually registering customer entry records and sales records, or by automatically registering customer entry and exit and sales as disclosed in the prior art. The business data 12 of the store 11 is used for business decision and investment attraction, and therefore, when a certain product or a certain product is sold in the store 11, the market and the sales condition of the product or the product of the same type can be accurately and intuitively displayed, so that the technical effect of only selling a certain product or a certain product in the store 11 in the embodiment is better.
When the shop is registered, shop names, shop types, shop positions, shop owner names and white lists are required to be provided, the shop names are set by the shop operating body and are unique in the system, and meanwhile the system assigns unique IDs to the shop names, so that indexes can be conveniently established. The store type indicates a sales commodity class and a sales method, the sales commodity class is a commodity class mainly sold in the store 11, the sales commodity class is set by the store operation subject, and the sales method includes manual sales and automatic sales. The store location includes coordinate values of the store 11 and a store address including a city, a region, a road, a house number, and an associated subject name. The associated subject name is a name of a business establishment where the store 11 is located, and is set by the store owner. For example, when the store is located in a general mall, the associated subject name is the name of the mall, the cell name is located in the cell, and the associated subject name is the name of the larger store 11 if the store is located in the larger store 11. If no associated subject name exists, the associated subject name is omitted. The associated subject name enables quick screening of stores 11 in the same business district. The business of stores 11 with associated subject names have an interplay with each other and are typically geographically close to each other for the offline physical stores 11.
The business data 12 of one hand is shared to the investors through the time-limited open system, so that the investors can be provided with credible and detailed business conditions, and the investors can be attracted or guided to invest. For example, an investor plans to set up a beverage shop in a certain market, in order to evaluate the profitability after the setting, the investor opens the system within a limited time through the business data, checks the monthly operation data 12 of a plurality of fast food restaurants in the same market, and presumes the profitability of the beverage shop by checking the data of the fast food restaurants, thereby providing a reference for decision making. The fast food restaurants that have opened the business data 12 for the investor for a limited period of time can obtain the credit score by the investor paying the virtual wallet address published by the open application unit 50 in the plurality of credits. While profitability can be more accurately assessed by the operational data 12 of other beverage stores within the same store, the beverage stores generally do not wish to have the operational data 12 displayed for review by competing stores. Therefore, in order to protect the security of the business data 12 and prevent the business data 12 from being viewed by users other than the user that the store operator wishes to view, the embodiment provides a white list. A requester 70 who wishes to obtain the operation data 12 registers with the open application unit 50 and provides registration information including a user type and an industry. The user types include operator, primary investor and secondary investor. The operator refers to a shop operator of a shop that has already accessed the access unit 20 of the operation data time limit open system. The first-level investor means an investor who invests only in the filled industry and then converts the invested industry into an operator. The second-level investor only invests capital, does not limit the investment industry, basically does not participate in the operation after investment, and only obtains dividend. The operator and the primary investor need to verify the qualifications and industries of the opened or invested stores. The second-level investor needs to verify the fund size available for investment, and the fund size exceeds a preset threshold condition, so that the second-level investor can be registered as the second-level investor. The open application unit 50 verifies the qualification or the fund size of the opened and invested store, and then applies for the fund by registration. The requestor 70 is given a user identification, an identification, and an industry identification. The user identification is the unique ID identification of the user, the identity identification is the identifications of an operator, a first-level investor and a second-level investor, the industry identification is the industry identification corresponding to the operator and the first-level investor, and the second-level investor has no industry identification.
The accessed stores set up a white list that records the identity and industry identification of the requesters 70 that are able to access the operational data 12. The system provides identification of all industries, and the shop operating body associates the identification of the industry allowing to view the operation data 12 with corresponding allowed identity identification to form a white list item, and adds the white list item to a white list. Several white list entries as set by fast food restaurants are: { clothing, operator, primary investor }, { drink, operator, primary investor }, { ALL, secondary investor }. Where { drink class, operator, primary investor } refers to an operator or primary investor who allows the industry to be a drink class, to view their operational data 12, and { ALL, secondary investor } refers to an operator or primary investor who allows secondary investors to view their operational data 12. All white list entries constitute the white list of the store.
The operation data 12 are generated and uploaded to the access unit 20 in a day period, the operation data 12 comprise store names, store types, store positions, operation day people flow, operation day sales amount and operation day per hour customer number, the open application unit 50 obtains the operation data 12 number related to the open application according to the store number and the open duration related to the data conditions, and the related operation data 12 number is multiplied by the preset unit price to obtain the pass amount to be paid for the open application.
The investor plans to set up a beverage shop and applies for the first month operation data 12 of the fast food shop to the operation data time-limited open system, namely the time-limited duration is 30 days, and the time-limited starting date is the current date.
After the current date operation period is over, the access unit 20 receives the today's operation data 12 submitted by the fast food restaurant a, encrypts and stores the operation data by using the Key, and stores the operation data by using the block chain 40 to establish an index of the operation data 12. And after the Key is encrypted by using a time-limited encryption algorithm, the Key is used as an open ciphertext, and the open ciphertext is provided for investors. The time limit of the time-limited encryption algorithm is calculated from the current date, and the time limit duration is also 30 days. The investor decrypts through the decryption process of the time-limited encryption algorithm to obtain the Key, reads the encrypted business data 12, and decrypts through the Key to obtain the business data 12 of the current date. After the business period of the latter date is received, the access unit 20 can also receive the business data 12 submitted by the fast food restaurant a, store the business data after encryption by using the new Key, and store the business data through the blockchain 40. And then, the encrypted data is used as an open ciphertext after being encrypted by using a time-limited encryption algorithm, and the open ciphertext is provided for investors. The investor decrypts the open ciphertext to obtain a new Key Key, and decrypts to obtain the business data 12 of a new date. The time-limited duration of this time-limited encryption algorithm remains 29 days. Until the 31 st day, the time limit of the time-limited encryption algorithm expires, even if the open ciphertext is obtained, the investor cannot decrypt the open ciphertext and cannot obtain the Key Key of the 31 st day, so that the opening of the business data 12 of the fast food restaurant A to the investor is finished. The investor obtains 30 days of latest shop operation data 12, and has extremely high investment reference value.
The data conditions in the open application include a definition condition for one or more of the store name, the store type, and the store location of the business data 12, and the open application unit 50 discloses the store name, the store type, and the store location of all stores having access to the business data 12 to the registered requester 70, as shown in table 1. When the requester 70 requests the open business data 12, the definition condition of one or more of the store name, the store type, and the store location is specified. If the limited condition for the store position is located at street C, the business data 12 of all stores accessing the business data 12 and having the store position at street C are obtained.
TABLE 1 information sheet of stores having accessed operation data 12
Shop
|
Shop name
|
Shop type
|
Shop location
|
First of all
|
Fast food restaurant armor
|
Fast food
|
Dong district A street 560 number
|
Second step
|
Beverage shop B
|
Beverage product
|
Dong district No. B street 73
|
Third to fourth
|
Clothing shop C
|
Garment
|
273 number C street in west district
|
T-shirt
|
Snack food cube
|
Fast food
|
West region C street 150 |
When the requester 70 requests the opening of the operation data 12 and specifies the store name as clothing store c, only the operation data 12 of the clothing store c within the opening time period is obtained. If the specified store type is fast food, the business data 12 of two restaurants, fast food restaurant a and fast food restaurant d, laid for an open period of time can be obtained. If the designated store location is the west C street, the operation data 12 of the clothing store C and the fast food store d are obtained. If both the type of store is fast food and the location of the store is west C street, only the business data 12 for the fast food restaurant D can be obtained. The corresponding store operation data 12 is obtained on the premise that the requester 70 is in compliance with the white list of the corresponding store. If there is a case where the white list of stores does not correspond to the requester 70, stores whose white lists do not match should be removed. The present embodiment also collects the associated subject names of the stores, and the open application can also realize the definition of one or more of the store names, the store types, or the store positions by the definition of the associated subject names, and the conversion thereof is completed by the open application unit 50. That is, the requester 70 provides the associated subject name, and the open application unit 50 converts the associated subject name into the definition condition of the store location. All store locations belonging to the associated stores of the associated subject name are considered to conform to the definition of the store location.
The time-limited encryption unit 60 issues a time-limited encrypted intelligent contract on the block chain 40, the time-limited encrypted intelligent contract includes a plurality of encryption columns, the encryption columns include column identifiers, clocks and prompt columns, as shown in table 2, the time-limited encrypted intelligent contract establishes 60 encryption columns, the prompt columns display m sample points (xi, yi), i belongs to [1, m ], as shown in table 3, the clocks are countdown clocks, and when the clocks count down to 0, the encryption columns update the prompt columns and reset the clocks. Referring to fig. 2, the process of time-limited encryption includes: step a 01) the time-limited encryption unit 60 associates an integer n for each encryption column to generate a univariate polynomial, which passes through n of the m sample points in the hint column; step A02) calculating the distance between the rest sample points and the univariate polynomial, and recording the distance sum as the sample distance, wherein the univariate polynomial with the minimum sample distance is used as the encryption polynomial of the encryption column; step a 03) the index unit 30 assigns codes to store names, store types, and store positions to generate date numbers; step A04), when the access unit 20 receives the business data 12, splicing the codes of the shop name, the shop type and the shop position, and then splicing the number of the corresponding date of the business data 12 to form the code of the business data 12; step A05) the operation data 12 are encrypted by using a Key and then uploaded to the block chain 40 for storage after being associated and coded; step a 06), the open application unit 50 submits the Key of the business data 12 to the time-limited encryption unit 60, the time-limited encryption unit 60 encrypts the Key respectively by using the encryption polynomial of each encryption column to be used as an open ciphertext, and the open ciphertext association column identifier and the code uploading block chain 40 of the business data 12 are stored; step a 07) after the requester 70 transfers the corresponding amount of the voucher of the bill to the virtual wallet address published by the open application unit 50, the open application unit 50 sends the shop name, the shop type and the shop location code related to the open application and the number of the open duration start date to the requester 70; step a 08) the open application unit 50 sends the column id of the encryption column whose clock matches the open duration and the corresponding integer n to the requester 70; step a 09) within the open duration, the requester 70 polls the blockchain 40 to obtain the matching business data 12 and open ciphertext; step A10) reading m sample points, exhausting n univariate polynomials in the m sample points in the prompt bar, and obtaining the univariate polynomial with the minimum sample distance as a recovery polynomial; step a 11) decrypts the open ciphertext using the recovered polynomial to obtain the Key, and decrypts the open ciphertext using the Key to obtain the administration data 12.
Table 2 time-limited encrypted intelligent contract record content
Encryption column 1
|
{ column identification 1, clock 1, prompt column 1}
|
Encryption column 2
|
{ column identification 2, clock 2, prompt column 2}
|
Encryption column 3
|
{ column identification 3, clock 3, prompt column 3}
|
…
|
|
Encryption column 60
|
{ column identification 60, clock 60, prompt column 60} |
The clock may be disclosed or not, and in the present embodiment, only the time-limited encryption unit 60 can obtain the value of the clock. The time-limited encryption unit 60 requests the time value of the encryption column from the time-limited encrypted intelligent contract, the time-limited encrypted intelligent contract writes the time value into a specified position after encrypting the time value by using the public key of the time-limited encryption unit 60, and the time-limited encryption unit 60 decrypts the time value by using the private key after reading the time value. The time-limited encryption unit 60 also has the authority of setting a clock value, submits the preset write identifier, the column identifier and the clock value to be written to a time-limited encryption intelligent contract after being signed by the private key of the time-limited encryption unit 60, and sets the clock of the encryption column corresponding to the column identifier as the clock value to be written after the time-limited encryption intelligent contract is verified by the public key.
Table 3 time-limited encrypted intelligent contract disclosure
Encryption column 1
|
{ column ID 1, hint column 1: { (2,16), (4,24), (8,36), (12,64) }
|
Encryption column 2
|
{ column identification 2, prompt column 2 { (2,10), (3,14), (6,26), (8,34) }
|
Encryption column 3
|
{ column identification 3, prompt column 3: { (2,6), (3,24), (5,10), (7,54) }
|
…
|
…
|
Encryption column 60
|
{ column identification 60, prompt column 60: { (3,26), (4,16), (9,76), (10,32) } |
The number of sample points disclosed in the prompt column 1 is 4, which are respectively: (2,16), (4,24), (8,36) and (12,64), i.e. m =4, and when n takes the value 2, the univariate polynomial which exhaustively enumerates 2 sample points out of the 4 sample points is shown in table 4.
TABLE 4 univariate polynomial and sample distance table for n =2
Serial number
|
Polynomial of a unit
|
Sample distance
|
1
|
f(x)=4x+8
|
12
|
2
|
f(x)=10/3*x+28/3
|
16
|
3
|
f(x)=4.8x+6.4
|
10.4
|
4
|
f(x)=3x+12
|
18
|
5
|
f(x)=5x+4
|
10
|
6
|
f(x)=7x+-20
|
38 |
The univariate polynomial with the minimum sample distance is f (x) =5x +4, when the sample distances are the same, the coefficients of the highest-order terms are arranged in an ascending order, if the coefficients of the highest-order terms are still the same, the coefficients of the second-order terms are arranged in an ascending order according to the coefficients of the terms until the coefficients of the terms are different. If the two univariate polynomials are completely the same, the ordering of the two polynomials does not need to be limited.
When the encryption polynomial is used to encrypt the Key, please refer to fig. 3, the time-limited encryption intelligent contract performs the following steps: step B01) converting the Key Key into binary stream, after bit filling according to preset rules, cutting the binary stream into a plurality of binary segments with preset length, and converting the binary segments into an integer D; step B02) generating a data combination (B1, x1, B2, x2, …, bN, xN, Δ), bi being a positive integer, such that D = ∑ ((-1) ^ bi _ floor (bi/2) × (xi) positive Δ, where i ∈ [1, N ], Δ is a correction value, floor () is a downward forensic function; step B03) combines the data combinations in order as the ciphertext keys.
If the Key Key is 'EuWk', under ASCII encoding, the character string EuWk is converted into a binary system: 01000101011101010101011101101011, truncated into two integers according to the length of 2 bytes, D1=17781 and D2= 22379. The encryption polynomial f (x) is: f (x) =15 x ^2-32 x + 64. Then D1 may be represented as D1=6 × f (7) + f (31) +844, with the corresponding data set being (12,7,2,31, 844). The same way can be achieved for the data combination of integer D2. The data combination for each integer is not unique. The method for the requester 70 to decrypt the data is as follows: the requester 70 reads the sample points, obtains all univariate polynomials of n samples according to the value of n, wherein the univariate polynomial with the minimum sample distance is recorded as a recovery polynomial f (x), sequentially reads the data combinations, substitutes bi and xi in each data combination into the recovery polynomial f (x), and sums the bi and xi with a correction value delta to obtain an integer D; and converting all the integers D into binary streams, splicing the binary streams in sequence, and removing the complementary bits to obtain decrypted data.
In order to speed up the efficiency of time-limited encryption, this embodiment provides a scheme for establishing a lookup table to improve the efficiency of time-limited encryption, please refer to fig. 4, which includes: step C01), the time-limited encryption intelligent contract is about the encryption column setting value set H, and xi belongs to H when generating the data combination; step C02) associating a lookup table for each encryption column, wherein the lookup table records the function value of the encryption function corresponding to each independent variable in the value set H; step C03), when generating data combination, selecting a plurality of function values from the speed look-up table, summing the function values by a belt coefficient, and making the difference value between the sum and the integer D within a preset range; step C04) obtaining the values of the arguments xi corresponding to the functions, and using the values of the arguments xi to create a data combination (b1, x1, b2, x2, …, bN, xN, Δ) such that D = ∑ (^ 1) bi floor (bi/2) f (xi) Δ +. In this embodiment, the set of argument x values set for the encryption column 1 is {2,4,7}, and the encryption polynomial f (x) of the encryption column 1 is: and f (x) =7 x ^2+12 x-4, the corresponding function value is {48,156,423}, and the lookup table is shown in table 5. By using the values in 48,156,423, the sum with coefficients is calculated, and adding the correction value delta, the arbitrary integer D can be represented, and the encryption process of the information can be completed.
Table 5 quick look-up table corresponding to encryption column 1
Independent variable x
|
Value of function of encryption polynomial f (x)
|
2
|
48
|
4
|
156
|
7
|
423 |
In the first embodiment, if the correct value of n is not obtained and each hint column only includes 4 sample points, 4 encryption polynomials can be recovered through the 4 sample points, that is, 1 encryption polynomial can be obtained by traversing the values of n from 1 to 4, respectively. The time-limited encryption algorithm can be rapidly broken through exhaustive attack. Increasing the number of samples in each hint field can increase security, but also reduce the efficiency of encryption and decryption. Even if the number of samples is increased, the security of the time-limited encryption and decryption algorithm on exhaustive attack cannot be obviously increased. This embodiment provides a specific solution for this.
The method specifically comprises the following steps: in the step A02), arranging n univariate polynomials in all m sample points passing through the prompt bar in ascending order according to the sample distance, and recording the serial number s of each univariate polynomial; in step a 06), the open application unit 50 generates a value of the serial number s, the open application unit 50 submits the Key of the operation data 12 and the serial number s to the time-limited encryption unit 60, and the time-limited encryption unit 60 encrypts each encrypted column by using the univariate polynomial ordered as the serial number s to serve as an open ciphertext, and stores the open ciphertext association column identifier and the code upload block chain 40 of the operation data 12. In step a 08), the open application unit 50 sends the column identification of the encryption column whose clock matches the open duration and the corresponding integer n and the value of the generated serial number s to the requester 70. In step a 10), the requester 70 reads m sample points, exhales n univariate polynomials in the m sample points in the prompt field, arranges the univariate polynomials in ascending order according to the sample distance, and uses the univariate polynomial corresponding to the sequence number s as the recovery polynomial. The Key is obtained by using the recovery polynomial encryption, and the administration data 12 is obtained by using the Key decryption.
After the value of n is determined, the combination of n number value pairs is selected from the m number value pairs exhaustively. A univariate polynomial of n points in each combination is calculated, and then the sample point distances of the univariate polynomial are calculated. C (m, n) univariate polynomials can be obtained. The C (m, n) univariate polynomials are arranged in ascending order of sample point distance, each univariate polynomial will have the order s. So that at each value of n, the number of candidate univariate polynomials which can be the encryption polynomial is C (m, n), one of which is specified as the encryption polynomial by the order s. For hint column m =6 sample points, a total of 64 possible univariate polynomials can be generated. When the prompt bar discloses 1024 sample points, 2^1024 univariate polynomials can be generated, the number is extremely large, and the difficulty of exhaustive cracking is obviously improved.
For example, 6 sample points are disclosed in the hint column 3 of the encryption column 3, which are: (2,36),(3,50),(4,18),(6,26),(8,19),(9,20). When the value of the generated integer n is 2, 15 univariate polynomials can be generated. The univariate polynomial and the corresponding sample point distances are shown in table 6.
TABLE 6 univariate polynomials and corresponding sample point distances
Polynomial of a unit
|
Sample point distance
|
f(x)=14/1*x+8/1
|
327
|
f(x)=-9*x+54
|
133
|
f(x)=-2.5*x+41
|
33
|
f(x)=-17/6*x+125/3
|
34.3
|
f(x)=-16/7*x+284/7
|
33.8
|
f(x)=-32*x+146
|
409
|
f(x)=-8*x+74
|
73
|
f(x)=-31/5*x+343/5
|
58.6
|
f(x)=-5390*x+65
|
61
|
f(x)=4*x+2
|
95
|
f(x)=1/4*x+17
|
59
|
f(x)=2/5*x+82/5
|
59
|
f(x)=-7/2*x+47
|
37
|
f(x)=-2*x+38
|
35
|
f(x)=x+11
|
71 |
When the sample point distances of the two univariate polynomials are the same, sorting is performed according to the smaller value sorting of the higher-order polynomial coefficients of the univariate polynomials. As shown in table 7, the order s of the univariate polynomials sorted in ascending order of sample point distances is shown in table 7.
TABLE 7 univariate polynomial after ascending order of sample point distances
Sequence s
|
Polynomial of unary
|
Sample point distance
|
1
|
f(x)=-2.5*x+41
|
33
|
2
|
f(x)=-16/7*x+284/7
|
33.8
|
3
|
f(x)=-17/6*x+125/3
|
34.3
|
4
|
f(x)=-2*x+38
|
35
|
5
|
f(x)=-7/2*x+47
|
37
|
6
|
f(x)=-31/5*x+343/5
|
58.6
|
7
|
f(x)=1/4*x+17
|
59
|
8
|
f(x)=2/5*x+82/5
|
59
|
9
|
f(x)=-5390*x+65
|
61
|
10
|
f(x)=x+11
|
71
|
11
|
f(x)=-8*x+74
|
73
|
12
|
f(x)=4*x+2
|
95
|
13
|
f(x)=-9*x+54
|
133
|
14
|
f(x)=14/1*x+8/1
|
327
|
15
|
f(x)=-32*x+146
|
409 |
When n =2, s =9 is selected, the corresponding encryption polynomial is f (x) = -5390 x +65, then D1=17781, which may be denoted as (15,4,26,2,6611), corresponding to n =2, s = 9.
The beneficial technical effects of this embodiment are: the diffusion range of the operation data 12 is controlled through a white list and time-limited encryption, the safety of the operation data 12 is improved, the original operation data 12 is stored through a block chain 40, a credible certificate is provided for the operation data 12, the operation data 12 has higher application value, the details of the operation data 12 are provided, and operation decision or investment decision is facilitated; the efficiency and the safety of time-limited encryption and decryption can be improved through the improved time-limited encryption algorithm.
Example two:
a time-limited open system of operation data based on block chain, the time-limited encryption unit 60 sets the encryption polynomial of all encryption columns to linkage encryption polynomial, the linkage encryption polynomial of all encryption columns encrypts the same cipher text of the Key Key, the time-limited encryption unit 60 sets the linkage encryption polynomial, please refer to the attached figure 5, the following steps are executed: step D01) the time-limited encryption unit 60 generates a main encryption polynomial and a cyclic value sequence; step D02), setting a value number k, and periodically reading k values from the cyclic value sequence; step D03), k values corresponding to the current period form a single-period value set, and in the data combination of the integer D corresponding to the Key Key, the independent variable xi values are from the single-period value set; step D04), the time-limited encryption unit 60 obtains all relevant monocycle value sets before the clock countdown reaches 0 according to the clock of each encrypted column, and all monocycle value sets form a column set; step D05) generating a linkage encryption polynomial for the encryption column, wherein when the independent variable value belongs to the column set, the function value of the linkage encryption polynomial is the same as that of the main encryption polynomial; step D06) generating m sample points and an integer n for a prompt bar of an encryption bar, so that the univariate polynomial with the minimum sample distance in the univariate polynomials passing n of the m sample points is the same as the linkage polynomial; step D07), when the time-limited encryption unit 60 receives the Key to be encrypted, reading the current one-cycle value set, using the master encryption polynomial and generating the value of the argument xi in the one-cycle value set, encrypting the Key, using the ciphertext as the open ciphertext, and uploading the open ciphertext association column identifier and the code of the management data 12 to the block chain 40 for storage; step D08), resetting the clock when the clock countdown of the encryption column reaches 0, and the time-limited encryption unit 60 obtains all related single-period value sets before the clock countdown after the resetting reaches 0, updates the column set and generates a linkage polynomial corresponding to the updated column set; step D09) updating the values of m sample points and the integer n of the prompt field of the encryption field, so that the univariate polynomial with the minimum sample distance in the univariate polynomials of n of the m sample points is the same as the updated linkage polynomial.
The time-limited encryption unit 60 generates a primary encryption polynomial f0(x) =5x ^2-24 x +16, and generates a cyclic value sequence as: (2,3,4,6,8,9,12,16), the corresponding function values are: (-12, -11,0,52,144,205,448,912). Setting the value of k to be 3, and selecting 3 independent variable values in corresponding sequence from the circular value sequence when encrypting the Key Key. Taking the time limit duration of 2 days and 3 days as an example, two linkage polynomials are generated. For the time-limited duration of 2 days, the related monocycle value sets are {2,3,4} and {6,8,9}, the formed column set is {2,3,4,6,8,9}, and the function value of the main encryption polynomial in the column set is (-12, -11,0,52,144, 205). Accordingly, 6 sample points (2, -12), (3, -11), (4,0), (6,52), (8,144), (9,205) were formed. In the column set, the function value of the linkage encryption polynomial is the same as the function value of the main encryption polynomial, i.e., the linkage encryption polynomial passes through the 6 sample points. Arbitrarily add a sample point, e.g. (10,360), and generate a 7-point univariate polynomial as: f (x) = 0.03125 x ^6-x ^5+12.71875 x ^4-81.875 x ^3+285.125 x ^2-505.5 x +340 as the linkage polynomial of the encryption column with the time limit duration of 2 days. If any added sample point is changed, such as (12,400), a linkage polynomial can be obtained, which is: (x) = -0.000926 x ^6+0.0296 x ^5-0.3768518 x ^4+2.4259 x ^3-3.3 x ^2-9.73 x + 6.4. Similarly, when two points are added to 6 sample points, the generated univariate polynomial can also be used as a linkage polynomial of an encryption column with a time limit duration of 2 days, and when the two points are added, the obtained linkage polynomial is: f (x) = -0.016 x ^7+0.7069 x ^6-12.6959 x ^5+120.347 x ^4-647.59 x ^3+1975.13 x ^2-3151.13 x + 2008. It can be seen that there are infinite possibilities to obtain the linkage polynomial for each encryption column of a time-limited duration.
For a time-limited duration of 3 days, the related single-cycle value sets are {2,3,4}, {6,8,9} and {12,16,2}, the formed column set is {2,3,4,6,8,9,12,16}, and the function value of the main encryption polynomial in the column set is (-12, -11,0,52,144,205,448, 912). Accordingly, 8 sample points (2, -12), (3, -11), (4,0), (6,52), (8,144), (9,205), (12,448), (16,912) were formed. In the column set, the function value of the linkage encryption polynomial is the same as the function value of the main encryption polynomial, i.e., the linkage encryption polynomial passes through the 6 sample points. Arbitrarily adding a sample point, e.g. (20,1200), generating a univariate polynomial of: f (x) = -0.00000116 x ^8+0.00007 x ^7-0.0017 x ^6+0.0234 x ^5-0.186 x ^4+0.893 x ^3+2.5 x ^2-20.23 x + 13.69.
In this embodiment, the link polynomial of the encryption bar with the time limit duration of 2 days is f (x) = 0.03125 ^ x 6-x ^5+12.71875 ^ x ^4-81.875 ^ x 3+285.125 ^ x 2-505.5 ^ x +340, and the link polynomial of the encryption bar with the time limit duration of 3 days is f (x) = -0.00000116 ^ x 8+0.00007 ^ x ^7-0.0017 ^ x 6+0.0234 +0.893 ^ x 3+2.5 ^ x 2-20.23 ^ x + 13.69.
And generating a prompt bar for the linkage polynomial of the encryption bar with the time limit duration of 2 days, wherein the prompt bar comprises 10 sample points. The method for generating 10 sample points is to generate 10 independent variable x values, such as x ∈ {20,22,24,26,30,32,36,40,50,60}, and the linked polynomial f (x) = 0.03125 ^ x ^6-x ^5+12.71875 ^ x ^4-81.875 ^ x ^3+285.125 ^ x ^2-505.5 ^ x +340, which correspond to the function values {284280,624348,1249720,2325312,6814600,10929828,25452592,53356320,245726940,828546460}, respectively, and the hint column disclosure is: (20,284280), (22,624348), (24,1249720), (26,2325312), (30,6814600), (32,10929828), (36,25452592), (40,53356320), (50,245726940), (60,828546460), while setting the value of n to 7. The univariate polynomials of 7 sample points in 10 sample points are exhausted, the univariate polynomials of which all the highest-order polynomial degrees are 6 can be obtained, the sample distances of all the univariate polynomials are calculated, and the sample distances are arranged in an ascending order. Obtain the serial number s of the linkage polynomial f (x) = 0.03125 x ^6-x ^5+12.71875 x ^4-81.875 x ^3+285.125 x ^2-505.5 x +340, and send the values of n and s to the requester 70. The requester 70 exhausts 7 sample points out of the 10 sample points, and obtains a univariate polynomial corresponding to the sequence number s after arranging the sample distances in ascending order, i.e. f (x) = 0.03125 x ^6-x ^5+12.71875 x ^4-81.875 x ^3+285.125 x ^2-505.5 x +340 can be obtained.
If the Key Key is 'EuWk', under ASCII encoding, the character string EuWk is converted into a binary system: 01000101011101010101011101101011, truncated into two integers according to the length of 2 bytes, D1=17781 and D2= 22379. Taking the encryption D1 as an example, the encryption process of the Key is described.
The time-limited encryption unit 60 encrypts D1 by using a master encryption polynomial f0(x) =5x ^2-24 x +16, and defines the range of the argument x as {2,3,4}, thereby obtaining D1= -900 x f0(2) -600 x f0(3) +10 x f0(4) +381, and the corresponding data combination is (1801,2,1201,3,20,4, 381). The data combination (1801,2,1201,3,20,4,381) is sent to the requester 70. The requester 70 decrypts the data combination (1801,2,1201,3,20,4,381) using the linkage polynomial f (x) = 0.03125 x ^6-x ^5+12.71875 x ^4-81.875 x ^3+285.125 x ^2-505.5 x +340 to obtain the recovery integer D1' ^ 900 ^ 0.03125 x 2^6-2^5+12.71875 ^ 2^4-81.875 ^ 2^3+285.125 ^2-505.5 ^2+ 340) -600 ^2 (0.25 ^ 3^6-3^5+12.71875 ^ 3^ 4-2 ^3+ 3^3+ 353 ^3+ 381 + 3^3+ 3^3+ 27 + 9 ^3+ 3^3+ 9 ^3+ 3^3+ 3^3+ 9 ^ 4-9 ^ 4^3+ 3^3+ 3^ 4^3+ 7 ^ 4^3+ 7 ^ 4^3+ 7 ^ 4^3+ 7 ^ 4^3+ 7 ^4+ 7 ^4+ 7 ^3+ 7 ^4+ 7 ^3+ 7. It can be seen that D1 can be correctly decrypted by using the linkage polynomial, and D2 can be decrypted as well, so that the Key is recovered.
The result of using the linked polynomial f (x) = -0.00000116 ^ x ^8+0.00007 ^ x 7-0.0017 ^ x 6+0.0234 ^ x 5-0.186 ^ x 4+0.893 ^ x 3+2.5 ^ x 2-20.23 ^ x +13.69 for the encryption column with the open duration of 3 days, the decrypted data combination (1801,2,1201,3,20,4,381) can be obtained by using the linked polynomial f (x) = -0.00000116 ^ x ^7+ 0.0013.023 + 3.023 + 7 ^ x 3.0233.8 + 7 ^ 0.0233.8 + 7 ^ 3.0233.8 + 7.8 + 7.8.8 + 3.8 + 3.0234 + 7.3.8 + 7 ^7+ 3.7.7 ^7+ 3.8 + 3.8.8 + 3.00003.8 + 3.8 + 3.8.8 + 3.8 + 3.8.8.8 + 3.8 + 7+ 7.7.7.7 + 3.7.7.7 + 3.7.
After 2 days, the clock of the encryption column with the original time limit duration of 2 days is reset, and the time limit duration after the reset is still 2 days. The two sets of one-cycle values are again read along the cyclic value sequence as {12,16,2} and {3,4,6}, with the corresponding function values as {448,912, -12} and { -11,0,52 }. The 6 sample points are (2, -12), (3, -11), (4,0), (6,52), (12,448), (16,912). At this time, the linkage polynomial f (x) = 0.03125 x ^6-x ^5+12.71875 x ^4-81.875 x ^3+285.125 x ^2-505.5 x +340 no longer matches with the main encryption polynomial. That is, in the column set, the function values of the linkage polynomial and the main encryption polynomial are different. Therefore, the time-limited encryption unit 60 regenerates the linked polynomial that meets the condition, and regenerates the values of the hint field, the integer n, and the sequence number s. However, the new values of integer n and sequence number s are no longer provided to requester 70, and therefore, requester 70 is unable to obtain a new linkage polynomial. After the Key of the next date is encrypted, the requester 70 cannot decrypt correctly. The linkage polynomial of the encryption column with the time limit duration of 3 days has the same function value with the main encryption polynomial in the single-period set, and the open ciphertext can still be correctly decrypted again. Compared with the first embodiment, in the first embodiment, the ciphertexts obtained by encrypting the same Key by the plurality of encryption columns are the same, that is, the open ciphertexts are the same, so that the number of the open ciphertexts to be opened is reduced. The data structure of the operation data 12 when opened is simplified, and the operation data 12 can be shared conveniently. The time-limited encryption unit 60 only needs to encrypt once, so that the efficiency of time-limited encryption is improved. The requester 70 cannot obtain the updated linkage polynomial, and the security of the time-limited encryption is improved.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention in any way, and other variations and modifications may be made without departing from the spirit of the invention as set forth in the claims.