[go: up one dir, main page]

CN120744955A - A method, device, equipment and medium for authorizing tamper-proof table - Google Patents

A method, device, equipment and medium for authorizing tamper-proof table

Info

Publication number
CN120744955A
CN120744955A CN202510918083.0A CN202510918083A CN120744955A CN 120744955 A CN120744955 A CN 120744955A CN 202510918083 A CN202510918083 A CN 202510918083A CN 120744955 A CN120744955 A CN 120744955A
Authority
CN
China
Prior art keywords
key
ciphertext
user
encryption
tamper
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.)
Pending
Application number
CN202510918083.0A
Other languages
Chinese (zh)
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.)
Shenzhen Institute of Computing Sciences
Original Assignee
Shenzhen Institute of Computing Sciences
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 Shenzhen Institute of Computing Sciences filed Critical Shenzhen Institute of Computing Sciences
Priority to CN202510918083.0A priority Critical patent/CN120744955A/en
Publication of CN120744955A publication Critical patent/CN120744955A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The present application relates to the field of database management technologies, and in particular, to a method, an apparatus, a device, and a medium for authorizing a tamper resistant table. In the application, a private key for decrypting the secret key attribute encryption ciphertext is created, the private key is encrypted to obtain the private key ciphertext, the private key ciphertext is authorized to a second user, the second user can decrypt the encrypted tamper-proof table after decrypting the private key ciphertext, the authorization process is initiated and managed by the owner of the data table, the high authority user of the database management system is not relied on, and the encryption key and the data signature private key of the data are stored by the data owner. The whole process is not dependent on a database management system and an authorization system or an external system and is realized only through an internal encryption and signature algorithm, so that the cost is reduced and the security is improved.

Description

Authorization method, device, equipment and medium of tamper-resistant table
Technical Field
The present invention relates to the field of database management technologies, and in particular, to a method, an apparatus, a device, and a medium for authorizing a tamper resistant table.
Background
With increasingly strict data privacy regulations, enterprises need to meet compliance requirements, ensure transparency and non-tamper resistance in the data processing process, and a solution capable of effectively preventing a database from being tampered maliciously is needed to promote the safety management of the enterprises on data and reduce potential data leakage and loss. The general method for tamper resistance of the industry database is realized through a blockchain. The blockchain approach relies on an external system, which is too costly to implement, and therefore, how to reduce the cost in the process of data security management is a problem to be solved.
Disclosure of Invention
In view of this, the embodiment of the invention provides an authorization method, device, equipment and medium for a tamper-resistant table, so as to solve the problem of high cost in the process of data security management.
In a first aspect, an embodiment of the present invention provides an authorization method for a tamper resistant table, where the authorization method is applied to a first user, and the first user and a second user are communicatively connected based on a database management system, and the authorization method includes:
Creating an encryption key and a tamper-proof table, encrypting the tamper-proof table by using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypting the encryption key to obtain the ciphertext of the encryption key;
decrypting the ciphertext of the encryption key to obtain a key plaintext;
Performing attribute encryption on the key plaintext to obtain a key attribute encryption ciphertext, wherein the key attribute encryption ciphertext comprises an authorization policy of the tamper-proof table;
Creating a private key for decrypting the secret key attribute encryption ciphertext, and encrypting the private key to obtain a private key ciphertext;
And sending the key attribute encryption ciphertext and the private key ciphertext to a second user, so that the second user shares the tamper-proof table after decrypting the key attribute encryption ciphertext and the private key ciphertext, thereby realizing the purpose of tamper-proof table authorization.
In a second aspect, an embodiment of the present invention provides an authorization method for a tamper resistant table, where the authorization method is applied to a second user, and the second user is communicatively connected to a first user based on a database management system, and the authorization method includes:
receiving a key attribute encryption ciphertext and a private key ciphertext which are sent by the first user;
decrypting the private key ciphertext to obtain a private key plaintext, decrypting the key attribute encryption ciphertext by using the private key plaintext, and obtaining a decrypted encryption key when the second user meets the authorization policy of the tamper-proof table;
And decrypting the tamper-proof ciphertext by using the encryption key to obtain a decrypted tamper-proof table plaintext.
In a third aspect, an embodiment of the present invention provides an authorization apparatus for a tamper resistant table, where the authorization method is applied to a first user, and the first user and a second user are communicatively connected based on a database management system, and the authorization apparatus includes:
The first creating module is used for creating an encryption key and a tamper-proof table, encrypting the tamper-proof table by using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypting the encryption key to obtain the ciphertext of the encryption key;
The first decryption module is used for decrypting the ciphertext of the encryption key to obtain a key plaintext;
The first encryption module is used for carrying out attribute encryption on the key plaintext to obtain a key attribute encryption ciphertext, wherein the key attribute encryption ciphertext comprises an authorization policy of the tamper-proof table;
The second creation module is used for creating a private key for decrypting the secret key attribute encryption ciphertext and encrypting the private key to obtain the private key ciphertext;
And the sending module is used for sending the key attribute encryption ciphertext and the private key ciphertext to a second user, so that the second user shares the tamper-proof table after decrypting the key attribute encryption ciphertext and the private key ciphertext, thereby realizing the purpose of tamper-proof table authorization.
In a fourth aspect, an embodiment of the present invention provides an authorization apparatus for a tamper-resistant table, where the authorization method is applied to a second user, and the second user is communicatively connected to a first user based on a database management system, and the authorization apparatus includes:
The receiving module is used for receiving the secret key attribute encryption ciphertext and the private key ciphertext which are sent by the first user;
The second decryption module is used for decrypting the private key ciphertext to obtain a private key plaintext, decrypting the key attribute encryption ciphertext by using the private key plaintext, and obtaining a decrypted encryption key when the second user meets the authorization policy of the tamper-proof table;
and the third decryption module is used for decrypting the tamper-proof ciphertext by using the encryption key to obtain a decrypted tamper-proof table plaintext.
In a fifth aspect, an embodiment of the present invention provides a computer device comprising a processor, a memory and a computer program stored in the memory and executable on the processor, the processor implementing the authorization method according to the first aspect when executing the computer program.
In a sixth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the authorisation method as in the first aspect.
Compared with the prior art, the invention has the beneficial effects that:
In the application, the anti-tampering table is encrypted by using the encryption key, so that the anti-tampering table is in a state of effective encryption and data signature, and any attacker cannot bypass the database management system to directly check and modify the file, because the decryption key and the signature private key cannot be acquired. Only through internal encryption and signature algorithm, and is independent of an external system, thereby ensuring safety and reducing cost.
In the application, a private key for decrypting the secret key attribute encryption ciphertext is created, the private key is encrypted to obtain the private key ciphertext, the private key ciphertext is authorized to a second user, the second user can decrypt the encrypted tamper-proof table after decrypting the private key ciphertext, the authorization process is initiated and managed by the owner of the data table, the high authority user of the database management system is not relied on, and the encryption key and the data signature private key of the data are stored by the data owner. The whole process is not dependent on a database management system and an authorization system or an external system and is realized only through an internal encryption and signature algorithm, so that the safety is ensured and the cost is reduced.
In the application, the authorization process is realized by a security policy supported by an encryption algorithm without depending on a database management system, and only the user attribute is consistent with the embedded attribute in the key attribute encryption text, so that the illegal acquisition and transfer of the private key can not decrypt the tamper-proof table.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application environment of an authorization method for a tamper resistant table according to a first embodiment of the present invention;
Fig. 2 is a flow chart of an authorization method of a tamper-resistant table according to a second embodiment of the present invention;
fig. 3 is a flow chart of an authorization method of a tamper-resistant table according to a third embodiment of the present invention;
Fig. 4 is a block diagram of an authorization device of a tamper-resistant watch according to a fourth embodiment of the present invention
FIG. 5 is a block diagram of an authorization device for a tamper resistant meter according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the invention. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It should be understood that the sequence numbers of the steps in the following embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not be construed as limiting the implementation process of the embodiments of the present invention.
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
The authorization method of the tamper resistant table provided in the first embodiment of the present invention may be applied in an application environment as shown in fig. 1, where the first user and the second user are communicatively connected based on a Database management system (Database MANAGEMENT SYSTEM, DBMS). The first user and the second user may use any client, including, but not limited to, a palm computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a Personal Digital Assistant (PDA), and the like.
Referring to fig. 2, a flowchart of a method for authorizing a tamper resistant table according to a second embodiment of the present invention is shown, where the method for authorizing a tamper resistant table may be applied to the first user in fig. 1, and as shown in fig. 2, the method for authorizing a tamper resistant table may include the following steps.
S201, creating an encryption key and a tamper-proof table, encrypting the tamper-proof table by using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypting the encryption key to obtain the ciphertext of the encryption key.
In step S201, an encryption key and a tamper-proof table are created, wherein the encryption key is a data encryption key DEK (Data Encryption Key) for encrypting the tamper-proof table, and the tamper-proof table is a database table that protects data stored therein from unauthorized inquiry, modification or tampering by encryption and signature technology. The design of such a table is to ensure data integrity, security and reliability. And encrypting the encryption key, namely encrypting the data encryption key to obtain the ciphertext of the encryption key.
In this embodiment, the data encryption key may be generated using a random number generator when the encryption key is created. For example, the data encryption key DEK is generated using a random number generator. When the tamper-proof table is created, the type of the tamper-proof table needs to be determined, wherein the tamper-proof table comprises a sharing type table only, an additional type table only, a modification type table and the like. The shared-only table is only authorized to be queried by other users, and other users are not allowed to operate the tamper-resistant table. Only append tables are restricted from modifying and deleting operations by the database management system. The modification table is removed from the limitation of modification and deletion by the database management system, and a modifiable table can be implemented, by which line can be identified by signature and time stamp who modified.
And encrypting the tamper-proof table by using the encryption key, namely encrypting the tamper-proof table by using the data encryption key to obtain the encrypted tamper-proof ciphertext.
The encryption key is encrypted, that is, the data encryption key is encrypted, and when the data encryption key is encrypted, a symmetric encryption algorithm, such as AES or SM4, may be used for encryption. Asymmetric encryption, such as RSA (Rivest-Shamir-Adleman) or SM2, may also be performed, using public and private key pairs for encryption and decryption. In the encryption of DEK, the RSA/SM2 encryption algorithm is typically used to encrypt symmetric encryption keys (e.g., DEK) rather than directly encrypt large amounts of data.
In this embodiment, an encryption key and a tamper-proof table are created, and the tamper-proof table is encrypted by using the encryption key, so that the tamper-proof table is prevented from being checked by unauthorized users, and the purpose that the tamper-proof table cannot be tampered is achieved. Even if authorized to view, the data cannot be modified and tampered with without the proxy signing key. The encryption key is encrypted, ‌ prevents the key leakage, so that even if the data encryption key is intercepted in the storage or transmission process, an attacker cannot directly use the data encryption key, and the security is improved.
Encrypting the encryption key to obtain a ciphertext of the encryption key, comprising:
Acquiring a password during login, and generating a user master key according to the password;
and encrypting the encryption key by using the user master key to obtain the ciphertext of the encryption key.
In this embodiment, when the encryption key is encrypted, the user master key is used to encrypt, obtain the password at the time of login, and generate the user master key according to the password, where the password at the time of login is the information of the user authentication identity. When generating the user master key, a hash function within the USBKey may be used to map the password to a hash value, and the hash value is encrypted using the EK to generate the unique user master key. Other methods may be used to generate the user master key, and the embodiment is not limited.
And encrypting the encryption key by using the user master key to obtain the ciphertext of the encryption key. When encrypting the encryption key using the user master key, the encryption may be performed using a symmetric encryption algorithm, such as AES or SM4, or an asymmetric encryption algorithm, such as RSA (Rivest-Shamir-Adleman) or SM2 encryption algorithm, using a public key and a private key pair. In the encryption of DEKs, RSA or SM2 encryption algorithms are typically used to encrypt symmetric encryption keys (such as DEKs) rather than directly encrypting large amounts of data.
In the embodiment, the password in login is obtained, the user master key is generated according to the password, the encryption key is encrypted by using the user master key, and the security of the encryption key is improved, so that the security of the tamper-proof table encrypted by the encryption key is improved.
In this embodiment, the root key for encrypting the encryption key is not protected by file access control or other hiding measures, but the user master key can be generated after the user logs in, and destroyed after the user goes offline, so that the possibility of attacking the key is reduced, and the security of the key management system is ensured from the technical aspect.
S202, decrypting the ciphertext of the encryption key to obtain a key plaintext.
In step S202, the ciphertext of the encrypted encryption key is decrypted to obtain a key plaintext, where the key plaintext is the original encryption key.
In this embodiment, when decrypting the ciphertext of the encryption key, the user master key is used for decryption.
In the embodiment, the ciphertext of the encryption key is decrypted to obtain a key plaintext, so that the key plaintext is encrypted again.
And S203, carrying out attribute encryption on the key plaintext to obtain a key attribute encryption ciphertext, wherein the key attribute encryption ciphertext comprises an authorization policy of the tamper-proof table.
In step S203, attribute encryption is performed on the key plaintext, where the key plaintext is subjected to attribute encryption, that is, an authorization policy formulated by the data encryptor is embedded into the ciphertext, so as to obtain a key attribute encrypted ciphertext.
In this embodiment, when Attribute Encryption is performed on the key plaintext, a CP-ABE (cipert-Policy Attribute-Based Encryption) algorithm is used to perform Attribute Encryption on the key plaintext, and an authorization Policy formulated by a data encryptor is embedded into the Ciphertext. The user can successfully decrypt the data only when the attribute set of the user meets the authorization policy in the ciphertext.
It should be noted that, when the CP-ABE algorithm is used to encrypt the key plaintext in an attribute manner, an authorization policy is specified during encryption, and the decryption key includes an attribute set. The user can decrypt the data only if the user's set of attributes satisfies the authorization policy for the ciphertext. When the CP-ABE algorithm is used for carrying out attribute encryption on the key plaintext, an encryption party only needs to encrypt data once, and a plurality of users meeting the access strategy can be decrypted.
When the CP-ABE algorithm is used to encrypt the key plaintext in the attribute, all the attributes of the key plaintext are mapped into one access tree. The leaf nodes of the access tree represent attributes of the data and the internal nodes represent attributes of the authorization policy. The first user selects a random number as a key according to an authorization policy, and encrypts a key plaintext by using a symmetric encryption algorithm (such as AES) to obtain a key attribute encrypted ciphertext. The key attribute encryption contains the authorization policy of the tamper-resistant table.
It should be noted that, the public key of the CP-ABE algorithm is used to encrypt the attribute of the key plaintext, wherein the public key of the CP-ABE algorithm is generated by a system initialization algorithm (Setup). The initialization algorithm accepts an implicit security parameter as input, outputs common parameters PK (Public Key) and master key MK (Master Key). The public key PK is public and is used to encrypt the key plaintext, while the master key MK is secret and is used to generate the private key of the user to decrypt the key attribute encrypted ciphertext using the corresponding private key. Wherein MK is stored after being encrypted using the user master key.
In this embodiment, attribute encryption is performed on the key plaintext so as to embed the corresponding authorization policy into the ciphertext, thereby realizing fine-granularity authorization control, preventing unauthorized users from sharing the tamper-proof table, and improving the security of the tamper-proof table.
S204, creating a private key for decrypting the secret key attribute encryption ciphertext, and encrypting the private key to obtain the private key ciphertext.
In step S204, a private key for decrypting the key-attribute encrypted ciphertext is created, wherein the private key is used to decrypt the key-attribute encrypted ciphertext.
In this embodiment, a private key is created to decrypt the encrypted ciphertext with the key attribute, wherein the CP-ABE system is initialized to generate the public parameter PK and the master key MK. After the first user defines the authorization strategy, the PK is used for encrypting the key plaintext to obtain the key attribute encryption ciphertext, and the master key MK is used for generating a private key for decrypting the key attribute encryption ciphertext.
And encrypting the private key to obtain a private key ciphertext, wherein when the private key is encrypted, the public key in the shared key pair of the second user can be used for encrypting, namely the public key in the shared key pair of the authorized user is used for encrypting. Wherein, the shared key pair does not need complex public key infrastructure, thus reducing the cost of certificate management and maintenance.
And S205, transmitting the secret key attribute encryption ciphertext and the private key ciphertext to a second user, and enabling the second user to share the tamper-proof table after decrypting the secret key attribute encryption ciphertext and the private key ciphertext so as to realize the purpose of authorizing the tamper-proof table.
In step S205, the second user is an authorized user, and sends the key attribute encrypted ciphertext and the private key ciphertext to the second user, so that the second user can obtain a corresponding private key after decrypting the private key ciphertext, and decrypt the key attribute encrypted ciphertext by using the private key to obtain an encrypted key plaintext, thereby decrypting the encrypted tamper-proof table according to the encrypted key plaintext.
In this embodiment, the key attribute encrypted ciphertext and the private key ciphertext are sent to the second user, so that the second user shares the tamper-proof table after decrypting the key attribute encrypted ciphertext and the private key ciphertext. Wherein the second user decrypts the private key ciphertext first. And obtaining a corresponding private key, decrypting the secret key attribute encryption ciphertext by using the private key to obtain an encryption key plaintext, and decrypting the encrypted tamper-proof table according to the encryption key plaintext.
Optionally, after sending the key attribute encrypted ciphertext and the private key ciphertext to the second user, the method further includes:
acquiring a first signature private key of a first user;
after receiving an additional operation application of the tamper-proof table by a second user, creating a delegated key according to the first signature private key;
the proxy key is sent to the second user, and the second user generates a proxy signature from the proxy key when operating on the tamper-resistant table.
In this embodiment, when the sharing user, i.e., the second user, performs an operation on the tamper-resistant table, for example, an additional operation or (and) a modification operation, the second user needs to apply for the operation, and after receiving an application of the second user on the tamper-resistant table, the first user creates a delegated key according to its own signature private key, i.e., creates the delegated key according to the first signature private key, where the first signature private key is an asymmetric key pair paired with the first public key, and is used to generate the digital signature. The key pair may be generated using an asymmetric encryption algorithm (e.g., RSA, ECDSA, edDSA), i.e., the first signature private key is the same as the first public key, the private key length being determined according to the algorithm (e.g., RSA-2048, ECDSA-P256) requirements.
Generating a proxy key according to the first signature private key, and sending the proxy key to the second user, so that the second user generates a proxy signature when operating the tamper-resistant table, wherein the proxy signature ‌ is that in a proxy signature scheme, the first user authorizes the second user to have his signature right, and then the second user generates a valid signature on behalf of the first user. A proxy signature is a special digital signature that allows a first user to delegate the right to a second user, who generates a valid signature on behalf of the first user.
In the embodiment, the tamper-proof mechanism is realized through the encryption and proxy signature algorithm, so that the file with the table is always in an encryption state and an effective integrity check mechanism, any user cannot bypass the database management system to directly check or modify the file, and the safety is improved.
Optionally, creating the delegated key from the first signing private key further comprises:
encrypting the first signature private key using the user master key to obtain a signature private key ciphertext,
Decrypting the signature private key ciphertext to obtain a signature private key plaintext;
and generating a delegated key according to the signature private key plaintext.
In the embodiment, a user master Key is used for encrypting a first signature private Key to obtain a signature private Key ciphertext, decrypting the signature private Key ciphertext to obtain a signature private Key plaintext, and a Delegation Key (Delegation Key) is generated according to the signature private Key plaintext. ‌ trusted key ‌ generally refers to a temporary key derived from a private key, such as by HKDFHMAC-based Extract-and-Expand Key Derivation Function or PBKDF2 (Password-Based Key Derivation Function 2) using a ‌ ‌ Key Derivation (KDF) algorithm
Generating a delegated key, etc. Other methods may be used to generate the delegation key, and the embodiment is not limited.
The user master key is generated according to the password when the user logs in, and the life cycle of the user master key is limited to the validity period of the user session, so that the user master key is not stored in any form in a lasting mode, and the security is higher.
In the application, the anti-tampering table is encrypted by using the encryption key, so that the anti-tampering table is in an effective encryption state, any attacker cannot bypass the database management system to directly modify the file, because the decryption key cannot be acquired, a private key for decrypting the key attribute encryption ciphertext is created, the private key is encrypted to obtain the private key ciphertext, the private key ciphertext is authorized to a second user, the second user can decrypt the private key ciphertext and then can decrypt the encrypted anti-tampering table, the authorization process does not depend on the database management system, and the encryption key of the data is stored by the data owner. The whole process is not dependent on an external system and is realized only through an internal encryption and signature algorithm, so that the cost is reduced and the safety is improved.
Referring to fig. 3, a flowchart of an authorization method for a tamper resistant table according to a third embodiment of the present invention is shown, where the authorization method for a tamper resistant table may be applied to the second user in fig. 1, and as shown in fig. 3, the authorization method for a tamper resistant table may include the following steps.
S301, receiving a key attribute encryption ciphertext and a private key ciphertext which are sent by a first user;
S302, decrypting the private key ciphertext to obtain a private key plaintext, decrypting the key attribute encryption ciphertext by using the private key plaintext, and obtaining a decrypted encryption key when the second user meets the authorization policy of the tamper-proof table;
S303, decrypting the tamper-proof ciphertext by using the encryption key to obtain a decrypted tamper-proof table plaintext.
In the embodiment, a second user is used as a shared user of the tamper-proof table, receives a secret key attribute encryption ciphertext and a secret key ciphertext which are sent by a first user, decrypts the secret key ciphertext to obtain a secret key plaintext, decrypts the secret key attribute encryption ciphertext by using the secret key plaintext, judges whether the attribute of the second user is equal to the attribute in the authorization policy according to the authorization policy, considers that the second user meets the authorization policy when the attribute is equal, obtains a decrypted encryption key, namely an encryption key DEK of the tamper-proof table when the second user meets the authorization policy of the tamper-proof table, and decrypts the tamper-proof table ciphertext by using the DEK to obtain a decrypted tamper-proof table plaintext.
In this embodiment, after receiving the key attribute encryption ciphertext and the private key ciphertext sent by the first user, the authorization policy is verified, so that the tamper-proof table is always in an encrypted state and an effective integrity check mechanism, and any user cannot bypass the database management system to directly check or modify the file, thereby improving the security of the tamper-proof table.
Optionally, the authorization method further comprises:
Receiving a delegated key sent by a first user;
And acquiring a second signature private key of the second user, generating a proxy signature key according to the second signature private key and the entrusting key, and generating a proxy signature according to the proxy signature key when the anti-tampering table operation is executed so as to audit the authorization relation of the second user.
In this embodiment, when the authorized user, i.e., the second user, operates the tamper-resistant table, the second user is required to conduct a proxy signature for auditing the authorized relationship of the second user. Wherein the second user manipulation of the tamper resistant table comprises an append manipulation or (and) a modify manipulation of the tamper resistant table. When the second user operates the tamper-proof table, the second user needs to apply for the first user, and the first user generates a delegated key according to the first signature private key and sends the delegated key to the second user. And the second user receives the proxy key sent by the first user, generates a proxy signature key according to the second signature private key and the proxy key, and uses the proxy signature key to carry out data signature on the message to obtain a proxy signature. So as to find the real user operating the tamper-resistant table according to the proxy signature.
After the manipulation of the tamper-resistant table, the integrity of the tamper-resistant table may be verified. If the second user is authenticated through the merck tree (MERKLE TREE), a MERKLE TREE is established for the second user after the second user is authorized, the MERKLE TREE is stored in another auxiliary table, and the MERKLE TREE table is signed by using the first signature private key of the first user, so that the MERKLE TREE table cannot be tampered. Each leaf node MERKLE TREE is each row of the data table. Any modification to the original data of the data table can be quickly located to the corresponding row through MERKLE TREE. Checking whether the accessed row signature is correct, i.e. checking whether the row proxy signature operated by the second user is correct, etc.
Referring to fig. 4, fig. 4 is a block diagram of an authorization device of a tamper-resistant table according to a fourth embodiment of the present invention, where the authorization device of the tamper-resistant table corresponds to the authorization method of the tamper-resistant table in the foregoing embodiment one by one. Refer specifically to fig. 2 and the related description in the embodiment corresponding to fig. 2. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the authorization apparatus 40 includes a first creation module 41, a first decryption module 42, a first encryption module 43, a second creation module 44, and a transmission module 45.
A first creating module 41, configured to create an encryption key and a tamper-proof table, encrypt the tamper-proof table using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypt the encryption key to obtain a ciphertext of the encryption key;
A first decryption module 42, configured to decrypt the ciphertext of the encryption key to obtain a key plaintext;
A first encryption module 43, configured to perform attribute encryption on a key plaintext to obtain a key attribute encrypted ciphertext, where the key attribute encrypted ciphertext includes an authorization policy of the tamper-proof table;
the second creating module 44 is configured to create a private key for decrypting the encrypted ciphertext with the key attribute, and encrypt the private key to obtain a private key ciphertext;
The sending module 45 is configured to send the key attribute encrypted ciphertext and the private key ciphertext to the second user, so that the second user shares the tamper-proof table after decrypting the key attribute encrypted ciphertext and the private key ciphertext, thereby achieving the purpose of authorizing the tamper-proof table.
Optionally, the first creating module 41 includes:
The acquisition unit is used for acquiring a password in login and generating a user master key according to the password;
and the encryption unit is used for encrypting the encryption key by using the user master key to obtain a ciphertext of the encryption key.
Optionally, the authorization device 40 further includes:
The acquisition module is used for acquiring a first signature private key of a first user;
The third creation module is used for creating a delegated secret key according to the first signature private key after receiving an application of the second user for the additional operation of the tamper-proof table;
and the generation module is used for sending the delegated secret key to the second user, so that the second user generates a proxy signature according to the delegated secret key when operating the tamper-proof table.
Optionally, the generating module includes:
and the encryption unit is used for encrypting the first signature private key by using the user master key to obtain a signature private key ciphertext.
And the decryption unit is used for decrypting the signature private key ciphertext to obtain a signature private key plaintext.
And the generating unit is used for generating the entrusting key according to the signature private key plaintext.
Referring to fig. 5, fig. 5 is a block diagram of an authorization device of a tamper-resistant table according to a fifth embodiment of the present invention, where the authorization device of the tamper-resistant table corresponds to the authorization method of the tamper-resistant table in the foregoing embodiment one by one. Refer specifically to fig. 3 and the related description in the embodiment corresponding to fig. 3. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the authorization apparatus 50 includes a receiving module 51, a second decrypting module 52, a third decrypting module 53, and a third decrypting module 54.
A receiving module 51, configured to receive a key attribute encryption ciphertext and a private key ciphertext that are sent by a first user;
The second decryption module 52 is configured to decrypt the private key ciphertext to obtain a private key plaintext, decrypt the key attribute encrypted ciphertext using the private key plaintext, and obtain a decrypted encrypted key when the second user satisfies the authorization policy of the tamper-resistant table;
The third decryption module 53 is configured to decrypt the tamper-proof ciphertext using the encryption key, and obtain a decrypted tamper-proof plaintext.
Optionally, the authorization device 50 further includes:
The receiving module is used for receiving the entrusting key sent by the first user;
The generation module is used for acquiring a second signature private key of the second user, generating a proxy signature key according to the second signature private key and the entrusting key, and generating a proxy signature according to the proxy signature key when the anti-tampering table operation is executed so as to audit the authorization relation of the second user.
It should be noted that, because the content of information interaction and execution process between the above units is based on the same concept as the method embodiment of the present invention, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Fig. 6 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention. As shown in fig. 6, the computer device of this embodiment includes at least one processor (only one shown in fig. 6), a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps in the authorization method embodiments of any of the various tamper-resistant tables described above when the computer program is executed.
The computer device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that fig. 6 is merely an example of a computer device and is not intended to be limiting, and that a computer device may include more or fewer components than shown, or may combine certain components, or different components, such as may also include a network interface, a display screen, an input device, and the like.
The Processor may be a CPU, but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory includes a readable storage medium, an internal memory, etc., where the internal memory may be the memory of the computer device, the internal memory providing an environment for the execution of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. that are provided on a computer device. Further, the memory may also include both internal storage units and external storage devices of the computer device. The memory is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs such as program codes of computer programs, and the like. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above-described embodiment, and may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of the method embodiment described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium can include at least any entity or device capable of carrying computer program code, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The present application may also be implemented as a computer program product for implementing all or part of the steps of the method embodiments described above, when the computer program product is run on a computer device, causing the computer device to execute the steps of the method embodiments described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided by the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other manners. For example, the apparatus/computer device embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing embodiments are merely for illustrating the technical solution of the present application, but not for limiting the same, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solution described in the foregoing embodiments may be modified or substituted for some of the technical features thereof, and that these modifications or substitutions should not depart from the spirit and scope of the technical solution of the embodiments of the present application and should be included in the protection scope of the present application.

Claims (10)

1. An authorization method for a tamper resistant list, wherein the authorization method is applied to a first user, the first user and a second user are communicatively connected based on a database management system, the authorization method comprising:
Creating an encryption key and a tamper-proof table, encrypting the tamper-proof table by using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypting the encryption key to obtain the ciphertext of the encryption key;
decrypting the ciphertext of the encryption key to obtain a key plaintext;
Performing attribute encryption on the key plaintext to obtain a key attribute encryption ciphertext, wherein the key attribute encryption ciphertext comprises an authorization policy of the tamper-proof table;
Creating a private key for decrypting the secret key attribute encryption ciphertext, and encrypting the private key to obtain a private key ciphertext;
And sending the key attribute encryption ciphertext and the private key ciphertext to a second user, so that the second user shares the tamper-proof table after decrypting the key attribute encryption ciphertext and the private key ciphertext, thereby realizing the purpose of tamper-proof table authorization.
2. The authorization method according to claim 1, wherein encrypting the encryption key to obtain a ciphertext of the encryption key comprises:
Acquiring a password during login, and generating a user master key according to the password;
And encrypting the encryption key by using the user master key to obtain a ciphertext of the encryption key.
3. The authorization method according to claim 2, wherein after the sending the key attribute encryption ciphertext and the private key ciphertext to the second user, further comprising:
acquiring a first signature private key of the first user;
after receiving an additional operation application of the second user to the tamper-proof table, establishing a entrusting key according to the first signature private key;
And sending the delegated key to the second user, so that the second user generates a proxy signature according to the delegated key when operating the tamper-resistant table.
4. The authorization method of claim 3, wherein the creating a proxy key from the first signature private key comprises:
Encrypting the first signature private key by using the user master key to obtain a signature private key ciphertext;
decrypting the signature private key ciphertext to obtain a signature private key plaintext;
and generating a delegated secret key according to the signature private key plaintext.
5. An authorization method for a tamper resistant list, the authorization method being applied to a second user, the second user being communicatively coupled to a first user based on a database management system, the authorization method comprising:
receiving a key attribute encryption ciphertext and a private key ciphertext which are sent by the first user;
decrypting the private key ciphertext to obtain a private key plaintext, decrypting the key attribute encryption ciphertext by using the private key plaintext, and obtaining a decrypted encryption key when the second user meets the authorization policy of the tamper-proof table;
And decrypting the tamper-proof ciphertext by using the encryption key to obtain a decrypted tamper-proof table plaintext.
6. The authorization method according to claim 5, wherein the authorization method further comprises:
receiving a delegated key sent by the first user;
And acquiring a second signature private key of the second user, generating a proxy signature key according to the second signature private key and the entrusting key, and generating a proxy signature according to the proxy signature key when performing the operation on the tamper-proof table so as to audit the authorization relationship of the second user.
7. An authorization device for a tamper resistant meter, wherein the authorization method is applied to a first user, the first user and a second user communicatively coupled based on a database management system, the authorization device comprising:
The first creating module is used for creating an encryption key and a tamper-proof table, encrypting the tamper-proof table by using the encryption key to obtain an encrypted tamper-proof ciphertext, and encrypting the encryption key to obtain the ciphertext of the encryption key;
The first decryption module is used for decrypting the ciphertext of the encryption key to obtain a key plaintext;
The first encryption module is used for carrying out attribute encryption on the key plaintext to obtain a key attribute encryption ciphertext, wherein the key attribute encryption ciphertext comprises an authorization policy of the tamper-proof table;
The second creation module is used for creating a private key for decrypting the secret key attribute encryption ciphertext and encrypting the private key to obtain the private key ciphertext;
And the sending module is used for sending the key attribute encryption ciphertext and the private key ciphertext to a second user, so that the second user shares the tamper-proof table after decrypting the key attribute encryption ciphertext and the private key ciphertext, thereby realizing the purpose of tamper-proof table authorization.
8. An authorization device for a tamper resistant meter, the authorization method being applied to a second user communicatively coupled to a first user based on a database management system, the authorization device comprising:
The receiving module is used for receiving the secret key attribute encryption ciphertext and the private key ciphertext which are sent by the first user;
The second decryption module is used for decrypting the private key ciphertext to obtain a private key plaintext, decrypting the key attribute encryption ciphertext by using the private key plaintext, and obtaining a decrypted encryption key when the second user meets the authorization policy of the tamper-proof table;
and the third decryption module is used for decrypting the tamper-proof ciphertext by using the encryption key to obtain a decrypted tamper-proof table plaintext.
9. A computer device, characterized in that it comprises a processor, a memory and a computer program stored in the memory and executable on the processor, which processor implements the authorization method according to any of claims 1 to 6 when it executes the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the authorization method according to any one of claims 1 to 6.
CN202510918083.0A 2025-07-03 2025-07-03 A method, device, equipment and medium for authorizing tamper-proof table Pending CN120744955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510918083.0A CN120744955A (en) 2025-07-03 2025-07-03 A method, device, equipment and medium for authorizing tamper-proof table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510918083.0A CN120744955A (en) 2025-07-03 2025-07-03 A method, device, equipment and medium for authorizing tamper-proof table

Publications (1)

Publication Number Publication Date
CN120744955A true CN120744955A (en) 2025-10-03

Family

ID=97195783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510918083.0A Pending CN120744955A (en) 2025-07-03 2025-07-03 A method, device, equipment and medium for authorizing tamper-proof table

Country Status (1)

Country Link
CN (1) CN120744955A (en)

Similar Documents

Publication Publication Date Title
CN109361668B (en) Trusted data transmission method
EP3585032B1 (en) Data security service
US7526649B2 (en) Session key exchange
CN102986161B (en) Method and system for password protecting an application
US8953805B2 (en) Authentication information generating system, authentication information generating method, client apparatus, and authentication information generating program for implementing the method
CN101359991A (en) Identity-based public key cryptography private key escrow system
CN110505055B (en) External network access identity authentication method and system based on asymmetric key pool pair and key fob
CN114270386A (en) Authenticator application for consent framework
CN117499160B (en) Network security protection method and system based on electronic file
CN106953732A (en) Chip card key management system and method
CN106936588A (en) A kind of trustship method, the apparatus and system of hardware controls lock
CN112685786A (en) Financial data encryption and decryption method, system, equipment and storage medium
CN112910641B (en) Verification method and device for cross-link transaction supervision, relay link node and medium
CN115801232A (en) Private key protection method, device, equipment and storage medium
CN110519222B (en) External network access identity authentication method and system based on disposable asymmetric key pair and key fob
Han et al. Scalable and secure virtualization of HSM with ScaleTrust
CN113508380B (en) Methods used for end-entity authentication
TW201426395A (en) Data security system and method
CN105873043B (en) Method and system for generating and applying network private key for mobile terminal
CN113194090A (en) Authentication method, authentication device, terminal device and computer readable storage medium
CN115549930B (en) Verification method for logging in operating system
CN115412236B (en) Method for managing secret key and calculating password, encryption method and device
CN114553566B (en) Data encryption method, device, equipment and storage medium
Jang-Jaccard et al. Portable key management service for cloud storage
CN116881936A (en) Trusted computing method and related equipment

Legal Events

Date Code Title Description
PB01 Publication