Metadata-based fast encryption method, device and related products
Through the metadata-based encryption method, elliptic curve constraints are used to generate private keys, and the encryption of blockchain nodes is quickly realized, which solves the problem of low encryption efficiency in blockchain technology and improves system performance and data security.
Patent Information
- Application Number
- CN202210976879.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-08-15
AI Technical Summary
In blockchain technology, existing technology is difficult to quickly implement encryption. Especially when loading code and resource packages on blockchain nodes, the encryption algorithm is inefficient and affects system performance.
Through a fast encryption method based on metadata, use the category of the object to be encrypted to load entity content tags, perform ciphertext processing and vectorization, transfer the feature vector to the encryption plug-in mirror warehouse, and use elliptic curve constraints to generate a private key for encryption, achieving rapid encryption.
It improves the encryption efficiency and security and is suitable for the non-central authentication scenario of the blockchain to ensure the uniqueness and security of the data.
Smart Images

Figure CN115348087B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a metadata-based fast encryption method, device and related products. Background Art
[0002] The blockchain is a chain of blocks, each of which stores certain information. They are connected into a chain in the order of their generation. This chain is stored in all servers. As long as there is one server in the entire system that can work, the entire blockchain is safe. These servers are called nodes in the blockchain system, and they provide storage space and computing power support for the entire blockchain system. If you want to modify the information in the blockchain, you must obtain the consent of more than half of the nodes and modify the information in all nodes. These nodes are usually in the hands of different entities, so it is extremely difficult to tamper with the information in the blockchain.
[0003] In the application process of blockchain technology, terminal block nodes are involved. Each block node is equivalent to a terminal. In order for the block node to participate in the work of the overall blockchain system, the necessary code and resource packages must be loaded on it. In the existing technology, it is often implemented through static libraries. Among them, encryption algorithms are very important functions for blockchain. How to quickly implement encryption based on encryption algorithms has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] Based on the above problems, the embodiments of the present application provide a metadata-based fast encryption method, device and related products.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] A fast encryption method based on metadata, comprising:
[0007] According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted;
[0008] Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext;
[0009] Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted;
[0010] Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address;
[0011] Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0012] Transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted;
[0013] The private key used for encryption is generated as follows:
[0014] Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number;
[0015] Based on the fixed element, the elliptic curve constraint conditions for generating the private key and the public key are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0.
[0016] Optionally, obtaining the data encryption request and parsing the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes: periodically polling based on a set encryption request API interface to obtain the data encryption request, parsing the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address.
[0017] Optionally, parsing the data encryption request to determine a hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes:
[0018] Instantiating the data encryption request to generate instantiation result data;
[0019] The metadata to be encrypted is determined according to the instantiation result data.
[0020] Optionally, determining the metadata to be encrypted based on the instantiation result data includes: calling an instantiation component, vectorizing the instantiation result data, and determining the metadata to be encrypted.
[0021] A fast encryption device based on metadata, characterized by comprising:
[0022] The first program unit is used to perform the following operations:
[0023] According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted;
[0024] Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext;
[0025] Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted;
[0026] A second program unit is used to obtain a data encryption request, and parse the data encryption request to determine a hash address of metadata to be encrypted and search for the metadata to be encrypted based on the hash address;
[0027] A third program unit is used to vectorize the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0028] A fourth program unit is used to transmit the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted;
[0029] The private key used for encryption is generated as follows:
[0030] Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number;
[0031] Based on the fixed element, the elliptic curve constraint conditions for generating the private key and the public key are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0.
[0032] Optionally, the second program unit is further used to: periodically poll based on a set encryption request API interface to obtain the data encryption request, parse the data encryption request to determine a hash address of the metadata to be encrypted, and search for the metadata to be encrypted based on the hash address.
[0033] Optionally, the second program unit is further used to: instantiate the data encryption request to generate instantiation result data;
[0034] The metadata to be encrypted is determined according to the instantiation result data.
[0035] Optionally, the second program unit is further used to: call an instantiation component, vectorize the data according to the instantiation result, and determine the metadata to be encrypted.
[0036] An electronic device includes a memory and a processor, wherein an executable program is stored in the memory, and when the processor runs the executable program, the following steps are performed:
[0037] According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted;
[0038] Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext;
[0039] Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted;
[0040] Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address;
[0041] Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0042] The feature vector of the metadata to be encrypted is transmitted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted.
[0043] A computer storage medium stores a computer executable program, and when the computer executable program is executed, the following steps are performed:
[0044] According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted;
[0045] Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext;
[0046] Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted;
[0047] Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address;
[0048] Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0049] Transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted;
[0050] The private key used for encryption is generated as follows:
[0051] Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number;
[0052] Based on the fixed element, the elliptic curve constraint conditions for generating the private key and the public key are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0.
[0053] In the technical solution of the embodiment of the present application, according to the category of the object to be encrypted, the entity content tag is loaded to the object to be encrypted; the entity content tag is ciphered to obtain a characterized ciphertext; the characterized ciphertext is hidden in the object to be encrypted to obtain the metadata to be encrypted; a data encryption request is obtained, and the data encryption request is parsed to determine the hash address of the metadata to be encrypted and the metadata to be encrypted is searched based on the hash address; the metadata to be encrypted is vectorized to obtain a feature vector of the metadata to be encrypted; the feature vector of the metadata to be encrypted is transmitted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein, and the feature vector of the metadata to be encrypted is ciphered to obtain the ciphertext of the metadata to be encrypted, wherein the private key used for encryption is generated according to the following method: based on the set security parameters, a fixed element is determined, and the fixed element is a prime number; based on the fixed element, the elliptic curve constraint conditions for generating private keys and public keys are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0, thus achieving encryption quickly. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0055] Figure 1 A schematic diagram of a process flow of a metadata-based fast encryption method according to an embodiment of the present application;
[0056] Figure 2 This is a schematic diagram of the structure of a metadata-based fast encryption device according to an embodiment of the present application;
[0057] Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0058] Figure 4 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0059] The implementation of any technical solution of the embodiments of the present application does not necessarily require achieving all of the above advantages at the same time.
[0060] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] In the technical solution of the embodiment of the present application, in the technical solution of the embodiment of the present application, a data encryption request is obtained and the data encryption request is parsed to determine the hash address of the metadata to be encrypted and the metadata to be encrypted is searched based on the hash address; the metadata to be encrypted is vectorized to obtain the feature vector of the metadata to be encrypted; the feature vector of the metadata to be encrypted is transmitted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein, and ciphertext processes the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, wherein the private key used for encryption is generated according to the following method: based on the set security parameters, a fixed element is determined, and the fixed element is a prime number; based on the fixed element, the elliptic curve constraint conditions for generating private keys and public keys are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0; a, b, c are the parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1, and an x is randomly selected as the public key, and y calculated according to the above elliptic curve constraints is used as the private key, thereby quickly realizing encryption.
[0062] Figure 1 FIG. 1 is a flowchart of a fast encryption method based on metadata according to an embodiment of the present application; Figure 1 As shown, it includes:
[0063] S101, according to the category of the object to be encrypted, add an entity content tag to the object to be encrypted, perform ciphertext processing on the entity content tag to obtain a characteristic ciphertext, and embed the characteristic ciphertext into the object to be encrypted to obtain metadata to be encrypted;
[0064] S102: Obtain a data encryption request, and parse the data encryption request to determine a hash address of metadata to be encrypted and search for the metadata to be encrypted based on the hash address;
[0065] S103, vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0066] S104: Transmit the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted.
[0067] The private key calculated by the above-mentioned specific algorithm has extremely strong nonlinear characteristics and high security, and is especially suitable for scenarios such as blockchain where there is no third-party central authentication.
[0068] By determining the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address, the hash address and the metadata to be encrypted are in a one-to-one correspondence, which fundamentally guarantees the uniqueness of the metadata to be encrypted and the security of subsequent encryption.
[0069] According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted; the entity content tag is ciphered to obtain a characterized ciphertext; the characterized ciphertext is embedded in the object to be encrypted to obtain metadata to be encrypted. Different objects to be encrypted have different entity content tags based on different contents, and the characterized ciphertext obtained by ciphering the entity content tag is embedded in the object to be encrypted, which is equivalent to performing a certain degree of encryption in advance, thereby enhancing the data security of the present application.
[0070] Optionally, the obtaining of the data encryption request and parsing of the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes: periodic polling based on a set encryption request API interface to obtain the data encryption request, and parsing the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address, thereby saving resource consumption and improving the efficiency of algorithm execution.
[0071] Optionally, parsing the data encryption request to determine a hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes: instantiating the data encryption request to generate instantiation result data; determining the metadata to be encrypted based on the instantiation result data, thereby quickly and accurately determining the metadata to be encrypted.
[0072] Optionally, determining the metadata to be encrypted based on the instantiation result data includes: calling an instantiation component, vectorizing the instantiation result data, determining the metadata to be encrypted, and removing redundant information based on vectorization to ensure the accuracy of the encrypted metadata.
[0073] Optionally, the calling of the instantiation component vectorizes the instantiation result data to determine the metadata to be encrypted, including: based on a regular expression, streaming the instantiation result data to obtain a data stream; vectorizing the data stream to determine the metadata to be encrypted, thereby improving the real-time performance of data processing and facilitating the rapid implementation of encryption processing.
[0074] Optionally, the transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein, performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, including: mirroring the encryption plug-in from the central repository to the image repository, and based on local dependency, allowing the image repository to call the encryption plug-in therein, performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, thereby ensuring that the encryption plug-in is quickly called for ciphertext processing.
[0075] Optionally, the transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein, performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, including: mirroring the encryption plug-in from the central repository to the image repository, so that the image repository parses the plug-in coordinate declaration to call the encryption plug-in, so as to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, thereby ensuring that the encryption plug-in to be used is accurately located and ciphertext processing is performed.
[0076] Optionally, the transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein and performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, includes: transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository determines the encryption plug-in ID by plug-in prefix matching, accesses the storage directory of the encryption plug-in based on the encryption plug-in ID, so as to call the encryption plug-in and perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted, thereby ensuring that the encryption plug-in to be used is accurately located and ciphertext processing is performed.
[0077] Figure 2 Schematic diagram of a fast encryption device based on metadata according to an embodiment of the present application; Figure 2 As shown, it includes:
[0078] The first program unit 201 loads an entity content tag to the object to be encrypted according to the category of the object to be encrypted; performs ciphertext processing on the entity content tag to obtain a characteristic ciphertext; and embeds the characteristic ciphertext into the object to be encrypted to obtain metadata to be encrypted.
[0079] The second program unit 202 is used to obtain a data encryption request, and parse the data encryption request to determine a hash address of the metadata to be encrypted and search for the metadata to be encrypted based on the hash address;
[0080] The third program unit 203 is used to vectorize the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0081] The fourth program unit 204 is used to transmit the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted;
[0082] Optionally, the second program unit is further used to: periodically poll based on a set encryption request API interface to obtain the data encryption request, parse the data encryption request to determine a hash address of the metadata to be encrypted, and search for the metadata to be encrypted based on the hash address.
[0083] Optionally, the second program unit is further used to: instantiate the data encryption request to generate instantiation result data;
[0084] The metadata to be encrypted is determined according to the instantiation result data.
[0085] Optionally, the second program unit is further used to: call an instantiation component, vectorize the data according to the instantiation result, and determine the metadata to be encrypted.
[0086] Optionally, the second program unit is further used to: based on a regular expression, stream the instantiation result data to obtain a data stream; vectorize the data stream to determine the metadata to be encrypted.
[0087] Optionally, the fourth program unit is further used to: mirror the encryption plug-in from the central warehouse to the mirror warehouse, and based on local dependencies, enable the mirror warehouse to call the encryption plug-in therein to ciphertext the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted.
[0088] Optionally, the fourth program unit is further used to: mirror the encryption plug-in from the central warehouse to the mirror warehouse, so that the mirror warehouse parses the plug-in coordinate declaration to call the encryption plug-in to encrypt the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted.
[0089] Optionally, the fourth program unit is further used to: transmit the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository determines the encryption plug-in ID by plug-in prefix matching, and accesses the storage directory of the encryption plug-in based on the encryption plug-in ID to call the encryption plug-in and encrypt the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted.
[0090] Figure 3 Schematic diagram of the structure of an electronic device according to an embodiment of the present application; Figure 3 As shown, it includes a memory 301 and a processor 302, the memory stores an executable program, and the processor executes the following steps when running the executable program:
[0091] According to the category of the object to be encrypted, an entity content tag is loaded into the object to be encrypted; the entity content tag is ciphered to obtain a characteristic ciphertext; the characteristic ciphertext is embedded into the object to be encrypted to obtain the metadata to be encrypted;
[0092] Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address;
[0093] Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0094] Transmitting the feature vector of the metadata to be encrypted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted;
[0095] The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer executable program, and when the computer executable program is executed, the following steps are performed:
[0096] According to the category of the object to be encrypted, an entity content tag is loaded into the object to be encrypted; the entity content tag is ciphered to obtain a characteristic ciphertext; the characteristic ciphertext is embedded into the object to be encrypted to obtain the metadata to be encrypted;
[0097] Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address;
[0098] Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted;
[0099] The feature vector of the metadata to be encrypted is transmitted to the image repository that manages the encryption plug-in, so that the image repository calls the encryption plug-in therein to perform ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted. In the above embodiment, the private key used for encryption is generated according to the following method:
[0100] Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number;
[0101] Based on the fixed element, the elliptic curve constraint condition for generating the private key and the public key is determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0; a, b, c are parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1, an x is randomly selected and the least common multiple is calculated with the set security parameter as the public key, and the y calculated according to the above elliptic curve constraint condition is used as the private key.
[0102] The private and public keys generated in this specific way improve the security of encryption.
[0103] Figure 4 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application; Figure 4 As shown, the hardware structure of the electronic device may include: the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 406 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0104] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 407 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 404 may include, but is not limited to, a disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0105] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the above steps may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 40*. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above steps in any other appropriate manner (e.g., by means of firmware).
[0106] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0107] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0108] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0109] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0110] (4) Server: A device that provides computing services. The server consists of a processor 410, a hard disk, memory, a system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0111] (5) Other electronic devices with data interaction functions.
[0112] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components indicated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A fast encryption method based on metadata, characterized in that: include: According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted; Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext; Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted; Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address; Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted; The feature vector of the metadata to be encrypted is transmitted to the image warehouse that manages the encryption plug-in, so that the image warehouse determines the encryption plug-in ID by plug-in prefix matching, accesses the storage directory of the encryption plug-in based on the encryption plug-in ID, retrieves the encryption plug-in, and performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted; The private key used for encryption is generated as follows: Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number; Based on the fixed element, the elliptic curve constraint condition for generating the private key and the public key is determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0, a, b, c are parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1, and an x is randomly selected as the public key, and the y calculated according to the above elliptic curve constraint condition is used as the private key.
2. The method according to claim 1, characterized in that The obtaining of the data encryption request, parsing the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes: periodically polling based on a set encryption request API interface to obtain the data encryption request, parsing the data encryption request to determine the hash address of the metadata to be encrypted and searching for the metadata to be encrypted based on the hash address.
3. The method according to claim 1, characterized in that The step of parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address includes: Instantiating the data encryption request to generate instantiation result data; The metadata to be encrypted is determined according to the instantiation result data.
4. The method according to claim 3, characterized in that Determining the metadata to be encrypted according to the instantiation result data includes: calling an instantiation component, vectorizing the metadata according to the instantiation result data, and determining the metadata to be encrypted.
5. A fast encryption device based on metadata, characterized in that: include: The first program unit loads an entity content tag to the object to be encrypted according to the category of the object to be encrypted; Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext; Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted; A second program unit is used to obtain a data encryption request, and parse the data encryption request to determine a hash address of metadata to be encrypted and search for the metadata to be encrypted based on the hash address; A third program unit is used to vectorize the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted; The fourth program unit is used to transmit the feature vector of the metadata to be encrypted to the image warehouse that manages the encryption plug-in, so that the image warehouse determines the encryption plug-in ID by plug-in prefix matching, accesses the storage directory of the encryption plug-in based on the encryption plug-in ID, calls the encryption plug-in and performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted; The private key used for encryption is generated as follows: Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number; Based on the fixed element, the elliptic curve constraint condition for generating the private key and the public key is determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0, a, b, c are parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1, and an x is randomly selected as the public key, and the y calculated according to the above elliptic curve constraint condition is used as the private key.
6. The device according to claim 5, characterized in that The second program unit is further used to: periodically poll based on a set encryption request API interface to obtain the data encryption request, parse the data encryption request to determine the hash address of the metadata to be encrypted and search for the metadata to be encrypted based on the hash address.
7. The device according to claim 6, characterized in that The second program unit is further used to: instantiate the data encryption request to generate instantiation result data; The metadata to be encrypted is determined according to the instantiation result data.
8. The device according to claim 7, characterized in that The second program unit is further used to: call the instantiation component, vectorize the data according to the instantiation result, and determine the metadata to be encrypted.
9. An electronic device, characterized in that: The system comprises a memory and a processor, wherein an executable program is stored in the memory, and the processor executes the following steps when running the executable program: According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted; Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext; Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted; Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address; Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted; The feature vector of the metadata to be encrypted is transmitted to the image warehouse that manages the encryption plug-in, so that the image warehouse determines the encryption plug-in ID by plug-in prefix matching, accesses the storage directory of the encryption plug-in based on the encryption plug-in ID, retrieves the encryption plug-in, and performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted; The private key used for encryption is generated as follows: Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number; Based on the fixed element, the elliptic curve constraint condition for generating the private key and the public key is determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0, a, b, c are parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1, and an x is randomly selected as the public key, and the y calculated according to the above elliptic curve constraint condition is used as the private key.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer executable program, and when the computer executable program is executed, the following steps are performed: According to the category of the object to be encrypted, an entity content tag is loaded on the object to be encrypted; Performing ciphertext processing on the entity content tag to obtain a characterized ciphertext; Embedding the characterized ciphertext into the object to be encrypted to obtain metadata to be encrypted; Obtaining a data encryption request, and parsing the data encryption request to determine a hash address of metadata to be encrypted and searching for the metadata to be encrypted based on the hash address; Vectorizing the metadata to be encrypted to obtain a feature vector of the metadata to be encrypted; The feature vector of the metadata to be encrypted is transmitted to the image warehouse that manages the encryption plug-in, so that the image warehouse determines the encryption plug-in ID by plug-in prefix matching, accesses the storage directory of the encryption plug-in based on the encryption plug-in ID, retrieves the encryption plug-in, and performs ciphertext processing on the feature vector of the metadata to be encrypted to obtain the ciphertext of the metadata to be encrypted; The private key used for encryption is generated as follows: Based on the set security parameter, a fixed element is determined, where the fixed element is a prime number; Based on the fixed element, the elliptic curve constraint conditions for generating the private key and the public key are determined as follows: y^2=x^3+ax^2+bx+c(mod q), 8a^3+33b^2+2c(mod q)≠0, a, b, c are the parameters of the elliptic curve, q is a fixed element, where x and y are between 0 and q-1. Randomly select an x as the public key, and the y calculated according to the above elliptic curve constraints is used as the private key.
Citation Information
Patent Citations
Data encryption method and device, and data decryption method and device
CN109218010A
Data access method, device and system
CN110610102A
