Secure and trusted key generation method and system, communication method and system, device
Patent Information
- Application Number
- CN202211391880.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-11-08
AI Technical Summary
[0003]此外,嵌入式设备需要嵌入式软件、固件来实现产品各项功能,作为设备运行的核心系统,若被不法分子窃取和利用可能造成信息丢失、敏感信息被窃取、设备被远程控制
[0013]本发明能够带来以下至少一种有益效果:通过借助神经网络本身黑盒特征,在系统运行及加密过程中,生成安全技术中最重要的密钥,使得密钥称为安全可信的密钥,不仅密钥不便于被截获甚至被破解,而且密钥生成不会提高成本和增加可操作性难度,非常方便在各种人工智能场景中部署应用,提高人工智能场景中各类关键信息的安全性,有助于将人工智能场景形成安全可信的应用场景,便于在各种安全性要求高的场景中应用部署相关人工智能方案,如人脸识别、图像识别、语音识别等。
Smart Images

Figure CN115913535B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security technology, and particularly relates to a secure and trusted key generation method and system, a communication method and system, and a device. Background Technology
[0002] With the development of artificial intelligence algorithms and chip technology, more and more terminal devices are adopting AI chip-based edge computing solutions to avoid various problems caused by remote data processing, such as latency, computing power pressure, and high costs. Taking facial recognition as an example, because it involves sensitive and private data, protecting facial data, feature data, key parameter data, and core program data has become one of the core directions in the field of facial recognition technology security. This places security requirements on the AI chip edge, requiring trusted information processing and the operation of sensitive programs in a trusted and secure environment, covering multiple aspects such as data collection, algorithm processing, secure storage of registered feature data and algorithms, firmware updates, secure communication, and secure boot.
[0003] Furthermore, embedded devices require embedded software and firmware to implement various product functions. As the core system for device operation, if these are stolen and exploited by criminals, it could lead to information loss, the theft of sensitive information, and remote control of the device. Especially with the application of image recognition technology to areas such as door locks / access control, facial recognition payment, autonomous driving, and security, ensuring the security of systems, software programs, data, and keys has become a crucial research area in the current Internet of Things (IoT) field. Currently, basic secure operation of devices is achieved primarily through security authentication of running software or firmware and data encryption, especially with the development of external encryption chips or processors with built-in encryption modules. However, this is insufficient to cope with the ever-evolving attack methods, and the aforementioned security measures cannot adequately guarantee the overall operational security of the device, whether it's inter-device communication or the secure operation of the device itself.
[0004] Based on the above, this application provides a technical solution to solve the above technical problems. Summary of the Invention
[0005] This invention provides a secure and reliable key generation method and system, communication method and system, and device. By utilizing the black-box characteristics of neural networks and extracting some or all of the data in the network during its operation, a secure and reliable new key (such as a seed key or encryption key) is formed, which avoids the key being intercepted or even cracked, thereby improving key security.
[0006] The embodiments in this specification provide the following technical solutions: This specification provides an embodiment of a secure and reliable encryption key generation method, including: Obtain the seed key from the trusted storage area; The seed key is input into the already loaded and running neural network and processed by the neural network accelerator; Encryption keys are extracted from several output feature layers of the neural network that performs the computation based on encryption key extraction parameters, for use in subsequent encryption / decryption operations.
[0007] This specification also provides a secure and reliable seed key generation method, including: The encryption key is input into the neural network, wherein the encryption key is an encryption key generated by the secure and trusted encryption key generation method according to the initial seed key in any embodiment provided in this specification; Randomly select several feature output layers of the neural network, and extract a new seed key from the selected feature output layer data.
[0008] This specification also provides a secure and reliable seed key generation method, including: Add random noise to the acquired image; The image with added random noise is input into the neural network; Randomly select several feature output layers of the neural network, and extract a new seed key from the selected feature output layer data.
[0009] This specification also provides a secure and reliable processing system, including a main controller, a neural network acceleration module, and a trusted security module. The trusted security module includes a secure and trusted storage area, which is configured to: acquire a seed key and send the seed key to the neural network acceleration module; The neural network acceleration module is configured to run a neural network algorithm on the received seed key and generate an encryption key for subsequent encryption / decryption operations.
[0010] This specification also provides a secure and reliable communication system, including at least a first communication terminal and a second communication terminal, wherein both the first communication terminal and the second communication terminal are equipped with the same neural network to generate a session key using the secure and reliable encryption key generation method described in any embodiment of this specification, and to generate a session seed key using the secure and reliable seed key generation method described in any embodiment of this specification, so that the session communication between the first communication terminal and the second communication terminal uses the session seed key and / or the session key for encryption / decryption communication.
[0011] This specification also provides a secure and reliable communication method, characterized in that it is applied to session communication between a first communication terminal and a second communication terminal in any of the secure and reliable communication systems described in any embodiment of this specification, the secure and reliable communication method comprising: The first communication terminal sends first token plaintext data information and first ciphertext data to the second communication terminal. The first token plaintext data information contains at least a first session seed key and a first session key extraction parameter. The first ciphertext data is ciphertext data encrypted using the first session key. The first session key is a session key generated by the secure and trusted encryption key generation method described in any embodiment of this specification based on the first session seed key and the first session key extraction parameter. After receiving the first token plaintext data and the first ciphertext data, the second communication terminal generates a second session key based on the first session seed key and the first session key extraction parameters in the first token plaintext data, using the secure and trusted encryption key generation method described in any embodiment of this specification, and decrypts the first ciphertext data using the second session key.
[0012] This specification also provides an embedded device that runs and deploys a secure and trusted encryption key generation method, a secure and trusted seed key generation method, or a secure and trusted processing system as described in any embodiment of this specification, or the embedded device is located in a first communication terminal or a second communication terminal of a secure and trusted communication system or secure and trusted communication method as described in any embodiment of this specification.
[0013] This invention can bring at least one of the following beneficial effects: by leveraging the black-box characteristics of the neural network itself, the most important key in security technology is generated during system operation and encryption, making the key a secure and trustworthy key. Not only is the key difficult to intercept or even crack, but key generation does not increase cost or operational difficulty, making it very convenient to deploy and apply in various artificial intelligence scenarios, improving the security of various key information in artificial intelligence scenarios, helping to form a secure and trustworthy application scenario for artificial intelligence, and facilitating the deployment of relevant artificial intelligence solutions in various scenarios with high security requirements, such as face recognition, image recognition, and speech recognition. Attached Figure Description
[0014] The preferred embodiments will now be described in a clear and easy-to-understand manner, with reference to the accompanying drawings, to further explain the above-mentioned characteristics, technical features, advantages, and implementation methods.
[0015] Figure 1An example of a secure and reliable information processing system is shown; Figure 2 An example diagram illustrates the principle of the relationship between seed key and encryption key generation; Figure 3 An example diagram illustrates the principle of seed key and encryption key generation.
[0016] Figure 4 An exemplary schematic diagram of a secure and trusted session communication scheme is shown. Detailed Implementation
[0017] The various aspects of the present invention will be further described in detail below.
[0018] Unless otherwise defined or stated, all technical and scientific terms used herein have the same meaning as are familiar to those skilled in the art. Furthermore, any methods and materials similar to or equivalent to those described herein may be applied to the methods of this invention. Descriptions of conventional technical conditions in the art include, but are not limited to, the following sources: https: / / blog.csdn.net / abyss_miracle / article / details / 103296071 (Introduction to Convolution); https: / / blog.csdn.net / evolone / article / details / 82594264 (Introduction to Cambrian Sparse Acceleration Principle), etc. In addition, Chinese patent application CN201910149310.2 (CN111626410A A Sparse Convolutional Neural Network Accelerator and Computation Method) may also be incorporated herein by reference.
[0019] The following explains the terminology.
[0020] Unless otherwise expressly specified and limited, the term "or" as used in this invention includes the relationship of "and". "And" is equivalent to the Boolean logic operator "AND", and "or" is equivalent to the Boolean logic operator "OR", with "AND" being a subset of "OR".
[0021] It is understood that although the terms "first," "second," etc., may be used herein to describe different elements, these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. Therefore, a first element may be referred to as a second element without departing from the teachings of this application.
[0022] In this invention, the terms "containing," "comprising," or "including" indicate that various ingredients may be used together in the mixtures or compositions of this invention. Therefore, the terms "consistent with..." and "composed of..." are included in the terms "containing," "comprising," or "including."
[0023] Unless otherwise expressly specified and limited, the terms "connected," "linked," and "connected" in this invention should be interpreted broadly. For example, they can refer to a fixed connection, a connection through an intermediary, or a connection within two elements or an interaction between two elements. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0024] For example, if an element (or component) is referred to as being on, coupled to, or connected to another element, then the element may be directly formed on, coupled to, or connected to the other element, or there may be one or more intermediate elements between them. Conversely, if the expressions "directly on," "directly coupled to," and "directly connected to" are used herein, then it indicates that there is no intermediate element. Other terms used to describe relationships between elements should be interpreted similarly, such as "between" and "directly between," "attached" and "directly attached," "adjacent" and "directly adjacent," etc.
[0025] Additionally, it should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings. The terms "inner" and "outer" refer to directions toward or away from the geometric center of a particular component, respectively. It is understood that these terms are used here to describe the relationship of one element, layer, or region relative to another element, layer, or region, as shown in the accompanying drawings. These terms should also encompass other orientations of the device in addition to those described in the accompanying drawings.
[0026] Other aspects of the invention will be apparent to those skilled in the art from the disclosure herein.
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0028] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show components related to this application and are not drawn according to the actual number, shape, and size of the components in the actual implementation. In the actual implementation, the form, quantity, and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex. For example, the thickness of the elements in the drawings may be exaggerated for clarity.
[0029] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Experimental methods in the following embodiments that do not specify specific conditions are generally determined according to national standards. If no corresponding national standard exists, then common international standards, conventional conditions, or conditions recommended by the manufacturer are followed. Experimental methods or apparatus for which specific conditions are specified in this invention may also be determined based on conventional technical conditions in the art.
[0030] Example In current secure and reliable information processing devices, the following are some common scenarios that lead to new problems, along with corresponding solutions to address these problems: Scenario 1: Simple Encryption Currently, most IoT devices rely on simple symmetric encryption and signature authentication to achieve trusted authentication and communication between devices. However, when faced with professional-level attacks, these methods leave the devices essentially vulnerable. In particular, during facial recognition, malicious data / code injection and channel detection attacks can be used to obtain core data, firmware, and algorithm models.
[0031] Scenario 2: Binding the main control chip and the encryption chip To address the threat of professional-level attacks, vendors typically employ encryption methods (software / hardware encryption) to encrypt and store user data in order to ensure data security.
[0032] The main difference between software and hardware encryption methods currently used for encrypting data in mobile smart terminals lies in whether hardware support is available. Software encryption operates at the system level, processing data in a purely software environment, while hardware encryption requires a dedicated hardware device (encryption chip) for processing. From a security perspective, hardware encryption is more advantageous than software encryption. However, although hardware encryption (encryption chip) provides greater security for mobile smart terminal data, it cannot prevent unauthorized personnel from using appropriate techniques to tamper with the main control chip and / or encryption chip at the software and hardware levels to obtain encrypted data and sensitive information stored in the encryption chip, or to eavesdrop on the communication between the main control chip and the encryption chip to obtain sensitive information, thereby providing more useful information for cracking the mobile terminal's security mechanisms.
[0033] Therefore, preventing such hardware and software layer tampering and eavesdropping requires securely binding the main control chip and encryption chip of the mobile smart terminal to improve the terminal's security performance. Existing technologies mainly bind them by modifying the chip circuitry or soldering methods. While this physically binds the main control chip and encryption chip and provides a certain level of security, further modifications to the chip's circuitry or the terminal's physical structure increase operational difficulty and economic costs. Another existing technology involves directly binding the main control chip and encryption chip via software ID binding. This is a superficial binding method and is easily cracked.
[0034] Document CN107508679A discloses a method for binding and authenticating a main control chip and an encryption chip in a smart terminal. By using a device or system to generate random numbers, a key is pre-set on the smart terminal in a secure environment without a network, providing secure binding and authentication between the main control chip and the encryption chip. This enables secure mutual access between the main control chip and the encryption chip, enhancing the security of the mobile smart terminal and effectively preventing attacks such as software theft, tampering, and physical disassembly. Compared with existing technologies, this method is more secure, easier to operate, and lower in cost.
[0035] However, its shortcomings, especially in facial recognition, still include various security issues. Regarding data collection security: as an independent peripheral device, the camera's legitimacy cannot be guaranteed, thus compromising data collection security. Regarding data transmission security: data is transmitted from the camera to the ATM's main control unit and from the main control unit to the cloud service; data leakage and tampering cannot be effectively prevented during transmission. Furthermore, the facial recognition algorithm and comparison results cannot be effectively prevented from being tampered with. Finally, regarding secure data display: during user transactions, the transaction data displayed on the screen cannot be guaranteed to be free from leakage and tampering.
[0036] Scenario 3: Dual security chip device based on Trusted Environment (TEE) technology To address the aforementioned issues, document CN109191131A discloses a secure face recognition device based on a Trusted Execution Environment (TEE) and dual security chips. This device utilizes the TEE and dual security chips to achieve encrypted data interaction during face recognition. Furthermore, it incorporates an anti-tampering detection structure to encapsulate the dual security chips and image processing control unit against tampering. If physical disassembly or camera replacement is detected, the data in the dual security chips and image processing control unit is automatically destroyed.
[0037] The advantage of the above solution is that the device as a whole provides comprehensive protection in the face recognition process through a combination of software and hardware, covering the data acquisition stage, data transmission stage, face recognition algorithm and comparison process stage, and data security display. The overall security level meets the PCI standard and reaches EAL5 level or above.
[0038] However, facial image data is transmitted multiple times before being processed by the facial recognition algorithm. Since the facial recognition algorithm needs to collect enough facial image data to generate feature values, the facial recognition process is slow, which in turn makes the entire payment process take a long time.
[0039] Furthermore, this approach is unlikely to provide 100% protection against professional-grade attacks, and it also increases costs.
[0040] Scenario 4: Technical solutions for eliminating TEE technology As mentioned earlier, facial image data is transmitted multiple times before being processed by facial recognition algorithms.
[0041] More specifically, the process of existing facial recognition technology is as follows: Step 1, the camera module acquires facial image data; Step 2, the facial image data is transmitted to the security chip via the ARM chip; Step 3, the security chip encrypts the data before transmitting it to the ARM chip; Step 4, the ARM chip transmits the data to the TEE, and the TEE decrypts the facial image data via the security chip; Step 5, the facial recognition algorithm uses the decrypted data for computation.
[0042] To address the aforementioned issue of excessive processing time, document CN111476580A discloses a facial recognition payment method and system. For facial image data acquisition during the facial recognition process, there is no need for an intermediate ARM chip for transmission; instead, the data can be directly acquired from the camera module. Furthermore, facial feature value extraction and encryption are performed on a secure chip, eliminating data transmission steps and saving time. For subsequent recognition of encrypted facial feature values, the main control chip sends the data to the facial recognition server based on a secure communication protocol, ensuring the security of data transmission. The main control chip then performs subsequent payment operations based on the recognition results. Since the acquisition and processing of facial image data does not require transmission from other intermediate modules, the efficiency of facial recognition is accelerated, thus solving the technical problem of excessively long payment processes caused by multiple transmissions of facial image data.
[0043] In summary, the existing technology still has the following problems: 1- Insufficient security protection during data communication and processing; 2- While the external encryption chip solution is superior to traditional trusted processing solutions, its security level is insufficient to protect the operating environment in high-security application scenarios. 3- While the solution of binding the main processor and the encryption chip to the physical or specific integrated circuit implementation improves security, it increases the difficulty of operation and cost; 4. Random numbers generated by software or hardware random number generation modules are easily cracked due to the limitations of their generation principles.
[0044] In this invention, the inventors conducted extensive and in-depth experiments and utilized the characteristics of the neural network AI chip itself to achieve a highly secure system operation that is not easily cracked, thus providing a safe and reliable processing solution. At the same time, this solution does not increase costs or operational difficulty.
[0045] The primary technical problem solved by this invention is to improve security and reliability without increasing costs or operational difficulty.
[0046] The technical concept adopted in this invention includes: In the process of system operation and encryption, the most important thing is the generation of the key. Since the existing key generation methods are based on pseudo-random algorithms, the pseudo-random sequences generated by such algorithms are easily cracked by means of detection and eavesdropping. Therefore, in the cryptographic design, it is necessary to ensure the randomness of the generated random key as much as possible. Although some methods can generate uniformly distributed true random number sequences with sufficiently large sequence periods through hardware circuits under different excitation conditions such as temperature, voltage, and clock, this scheme is difficult to design in terms of hardware circuit technology, and the key generation mechanism is prone to failure due to uncertain factors such as circuit aging. Moreover, this additional design not only increases the cost, but also increases the chip area. Therefore, how to achieve high-security system operation by leveraging the characteristics of the neural network AI chip itself is the core means of this invention.
[0047] The first aspect of this invention provides a secure and reliable processing system, comprising a main controller, a neural network acceleration module, and a trusted security module, wherein... The trusted security module includes a secure and trusted storage area, which is configured to: acquire a seed key and send the seed key to the neural network acceleration module; The neural network acceleration module is configured to run a neural network algorithm on the received seed key and generate an encryption key for subsequent encryption / decryption operations.
[0048] This invention leverages the unpredictability between the input and feature output layers during neural network computation and the black-box nature of the neural network itself to generate encryption keys. It uses cryptographic technology to support the operation of measurement, storage, and reporting mechanisms in trusted computing, providing users with trusted services such as ensuring the integrity of platform system resources, secure data storage, and remote platform verification. At the same time, the chip's built-in neural network acceleration module can efficiently and quickly generate random passwords without significantly affecting the overall system's computational efficiency.
[0049] Specifically, such as Figure 1 The illustration shows a specific embodiment of the present invention. It should be understood that the following technical features are all exemplary descriptions and can be combined with other technical solutions to obtain new technical solutions.
[0050] Specifically, in a secure and trusted processing system (i.e., an AI accelerator with security features), the main controller is primarily used to execute program instructions; Specifically, the trusted security module is used for the verification and integrity measurement of sensitive programs and data, the core system's permission management, and the encryption, storage, and authorization management of highly sensitive information such as keys and sensitive parameters. This module cannot be accessed or modified by the kernel system without the highest level of authorization (device vendor) or authentication. Therefore, the trusted security module is a fundamental function of trusted computing, and all of these require various encryption algorithms and a secure and trusted operating environment to implement.
[0051] More specifically, the trusted security module includes a trusted security storage area, an encryption / decryption unit, a trusted unit controller, and other functional blocks.
[0052] The functions of the other functional blocks include, but are not limited to: random number generator, key management, hash function, encryption management, signature authentication, bus management, or a combination thereof.
[0053] Specifically, the neural network acceleration module (neural network accelerator) is used to accelerate the operation of neural network algorithms and for image recognition and key generation.
[0054] Preferably, the neural network acceleration module is configured to: input the seed key into the neural network after regularization processing, and perform computational processing through the neural network accelerator, so that the corresponding encryption key can be extracted from the output data of the output layer of the neural network, and send and save the extraction parameters of the encryption key to the trusted security module for subsequent encryption / decryption operations.
[0055] Preferably, the seed key includes numbers or strings, and the rule-based processing includes processing the seed key according to the input rules of the neural network. Specifically, the first rule-based processing refers to the process where, when using a neural network, based on the current application training or construction of an application model such as face recognition, image recognition, or speech recognition, the seed key cannot be input into the network for computation as numbers or strings. In such cases, the seed key needs to undergo first rule-based processing to transform it into data that can be used as input to the current neural network.
[0056] Preferably, after the seed key is processed according to the input rules of the neural network, it can be applied to the face recognition model, image recognition model, speech recognition model or a combination thereof constructed by the neural network.
[0057] Preferably, the extraction parameters of the encryption key include preset random parameters, so that the encryption key can be extracted from the output data of the output layer of the neural network.
[0058] Preferably, the extraction parameters of the encryption key include selecting one or more output feature layers of the neural network, so that the encryption key can be extracted from the output data of the output layer of the neural network.
[0059] The system may also include an external memory for storing data and programs.
[0060] It should be understood that other functional modules can be added to the system as needed, as is known to those skilled in the art.
[0061] A second aspect of the present invention provides a method for generating encryption keys, which is applicable to the secure and trusted processing system described in the present invention. This includes obtaining a seed key through a trusted security module and sending the seed key to the neural network acceleration module; The neural network acceleration module runs a neural network algorithm on the received seed key and generates an encryption key for subsequent encryption / decryption operations.
[0062] Preferably, the trusted security module is further configured to: use a root key to verify and decrypt the neural network acceleration module.
[0063] like Figure 2 The diagram illustrates the principle of the relationship between the seed key and the encryption key generation of the present invention.
[0064] like Figure 3 The diagram illustrates, for example, how the seed key and encryption key are generated.
[0065] Based on the above principles, in one specific embodiment of the present invention, an encryption key generation method is provided. It should be understood that the following technical features are all exemplary descriptions and can be combined with other technical solutions to obtain new technical solutions.
[0066] 1.1-Encryption Key Generation Specifically, the trusted security module uses the root key to verify and decrypt the neural network program and parameters before loading the neural network. That is, after receiving an encryption / decryption request, the system decrypts the neural network model program and parameter data using the root key, and then loads the model into the system. Figure 1 The neural network accelerator shown performs accelerated neural network computations. It is important to understand that a trained neural network deployed to a device or system contains fixed information such as input layers, intermediate hidden layers, output layers, weight values, and model structure parameters. Therefore, given a fixed input, the neural network outputs a definite value according to the unknowable nonlinear computation rules through the black-box characteristics of the hidden layers. Thus, we can use neural networks to generate encryption keys and / or key sequences for encryption and decryption of plaintext data.
[0067] For the entire secure and trusted operating environment, the generation of encryption keys is the core of the entire process. This invention uses a neural network to generate the corresponding seed key and encryption key. Although the neural network has a complex internal topology and a large number of parameters, if its structural information and parameter information are known to the outside world, the algorithm process of generating encryption keys based on seed keys may also be obtained through other detection techniques. Therefore, it is necessary to encrypt all or part of the structure or parameters of the neural network and store them in a trusted and secure storage area to prevent external access.
[0068] Specifically, the encryption key generation method further includes: obtaining a seed key from the trusted storage area of the trusted security module; wherein the current seed key is the initial seed key obtained from the trusted storage area during system initialization or encryption / decryption, used to generate subsequent encryption keys and generate a new seed key after encryption is completed, used for the next system call to execute a new encryption task, or continuously generating encryption key sequences or sequence ciphers for high-security data encryption transmission, thereby preventing eavesdropping and cracking.
[0069] More specifically, the encryption key generation method further includes: performing a first regularization process on the seed key, then inputting it into a neural network and performing computational processing through a neural network accelerator.
[0070] For the purposes of this article, the first regularization process refers to the fact that the neural network used in this invention is an application model such as face recognition, image recognition, and speech recognition trained or constructed based on the current application. The seed key, as a number or string or other data, cannot be directly input into the network for computation. Therefore, the seed key needs to be processed into data that can be used as input to the current neural network. For example, if the current neural network model is an image recognition model and its input data is image data, then the first regularization process refers to converting the acquired seed key data into the current neural network model's input data format. Specifically, for a 128-bit seed key, it can be divided into 16 8-bit binary data, and each 8-bit binary number can be used as a pixel value (0-255). Therefore, we can repeatedly expand the 16 pixel data to generate an image. For example, if the current neural network input image is specified to be 16×16, we only need to copy the 16 decimal numbers representing the seed key to make them the same size as the model's input image data. In another implementation, the first regularization process refers to generating new data that conforms to the input of a neural network by fusing random key data as random noise with specific image data; wherein the specific image data is QR code data that conforms to the input size of the neural network, so as to facilitate key generation and key data management; Furthermore, the relevant parameters and data in the first regularization process described above are saved as encryption key extraction parameters in a trusted secure storage area. For example, if the first regularization process is a seed key and QR code data fusion processing method, the corresponding QR code information is recorded in the trusted secure storage area. This information is used to generate a decryption key (i.e., the encryption key in the encryption stage) in the decryption device or stage according to the first regularization process described above, based on the seed key and the corresponding QR code data, thereby achieving highly reliable data encryption transmission or communication.
[0071] Furthermore, extracting the encryption key from the output feature layer of the corresponding neural network using the encryption key extraction parameters further includes: selecting one or more output feature layers of the neural network based on a specific program algorithm, and combining the selected features according to preset rules, then selecting a portion of the data as the encryption key based on a specific algorithm; wherein the encryption key extraction parameters can be obtained through... Figure 1 The random number generator module shown generates numbers according to preset instructions; For example, the neural network running on this device has 20 layers. The main controller can generate a random number from 1 to 20, random1, based on a specific program algorithm instruction. If the generated random number random1 is 3 / 6 / 8, the feature output layer of the current neural network layer 3 / 6 / 8 is obtained, and the current layer is arranged according to a preset rule to generate a 1×n vector or array. If the current encryption key is a 128-bit number, 128 random integers between 1 and n, random2, are randomly generated by the random number generation unit and used as parameters to select the encryption key from the n-dimensional vector or array. Among them, random1 and random2 will be saved as encryption key extraction parameters to a trusted secure storage area and used to generate the decryption key (i.e., the encryption key in the encryption stage) during the decryption stage, thereby realizing highly reliable data encryption transmission or communication.
[0072] Furthermore, a specific algorithm can generate encryption keys by substituting some parameters of the neural network convolution kernel.
[0073] The above process includes seed key regularization, selection of specific output data, parameters, and strategies from specific layers of the neural network based on specific program algorithms, all of which are encryption key extraction parameters that cannot be obtained in subsequent decryption or encryption key extraction processes.
[0074] Preferably, only the seed key and encryption key extraction parameters need to be stored at the same time. When an attacker obtains the seed key and the corresponding encryption key extraction parameters, they are unable to obtain the final encryption key due to the black-box nature of the neural network itself and the fact that some parameters or programs are encrypted, thus providing more layers of security for the entire system's security chain. Specifically, the encryption key generation method further includes: saving encryption key extraction parameters and a seed key for use in subsequent encryption / decryption operations.
[0075] In another implementation of the encryption key generation process, the encryption key extraction parameters and seed key are saved for subsequent encryption / decryption operations. The process also includes: dynamically changing the above-mentioned encryption key extraction parameters to generate a serialized encryption key, which is used as a stream cipher to encrypt the data stream to be encrypted. The purpose of the above steps is to generate new encryption keys or encryption key sequences and save them.
[0076] The above-mentioned encryption key generation method can be applied to data encryption / communication between devices, processor chips, and kernels, or between platforms. It provides a secure communication channel and security verification for remote management of terminal devices, firmware and software updates, and data security. At the same time, it can implement multi-level encryption for sensitive data and programs in terminal devices, preventing attackers from inferring the key through the correlation between multiple key-ciphertext-plaintext pairs.
[0077] It should be further explained that the encryption and decryption process requires the deployment of neural network models with the same structure at both ends of the communication. That is, the encryption device sends the seed key and encryption key extraction parameters used to generate the encryption key in the above process to the decryption device through the encryption key generation method. The decryption device runs the same neural network model based on the seed key and encryption key extraction parameters to generate the decryption key (the decryption key is the same as the encryption key in the symmetric encryption process) for decrypting the encrypted data. In the above encryption and decryption process, since the generation of encryption key / decryption key is based on the black box principle of neural network, even if a cryptanalyst steals the seed key and encryption key extraction parameters, he / she cannot recover the encryption key. Therefore, it provides a reliable and secure encryption method and environment for confidential data communication.
[0078] 1.2 - Generating the Seed Key The seed key is generated by performing the operation described in 1.1 on the current seed key to obtain the corresponding encryption key.
[0079] More specifically, after processing the extracted encryption key (such as using divergent functions, nonlinear combination functions, and second regularization, with random parameters for all functions and regularizations), it is input into the same neural network. The output data of a certain feature layer of the network is randomly selected, and then a seed key is extracted from the output data of that layer according to random or preset rules (this part is similar to that in 1.1, but the parameters mentioned above are destroyed after use and not saved, just to ensure that the periodicity of the seed key is long enough to avoid channel attacks, plaintext attacks, and other attack methods).
[0080] More specifically, the new seed key continues to execute the process described in 1.1 to generate a new encryption key, and saves the new encryption key extraction parameters; furthermore, the generation of the new seed key and encryption key can be achieved by changing some parameters of the neural network, and the network modification parameters at the time of encryption key generation are saved as encryption key extraction parameters; according to Figure 2 and Figure 3 As shown, in one implementation, to ensure the security of the seed key and encryption key, and to achieve a longer encryption key cryptographic sequence period, different seed key and encryption key sequences are obtained by iteratively processing the seed key and encryption key, specifically including: The initial seed key is used to generate an encryption key through an encryption key generator, and the current encryption key extraction parameters are saved. The current encryption key extraction parameters and the generated encryption key are respectively denoted as encryption key extraction parameter 1 and encryption key 1. Encryption key 1 is processed by the seed key generator (using divergent functions, nonlinear combination functions, and second regularization, etc.; all functions and regularizations use random parameters) and input into the same neural network. A portion of the network's feature layer output data is randomly selected, and a new seed key is extracted from the output data of that layer according to random or preset rules, denoted as seed key 1, and saved. The current seed key 1 is processed according to the operation described in 1.1 to obtain the corresponding encryption key, denoted as encryption key 2. By repeatedly executing the above steps, an encryption key sequence or sequence cipher can be obtained, thereby achieving data encryption based on multiple encryption keys for serialization of communication data. In another implementation, the seed key is generated by means of... Figure 3 In addition to generating the seed key through a neural network, it can also be generated using any random key generation method. For example, a new seed key can be generated directly using a random number generator, or a new seed key can be generated from other data using a divergent function, a nonlinear combination function, a hash function, etc.
[0081] 1.3 - Optional methods for generating seed keys Optionally, the seed key can also be generated using the following methods: Add random noise to the acquired image; The image with added random noise is input into the neural network; The system randomly selects some feature layer output data from the network and then extracts the seed key from the output data of that layer according to random or preset rules; furthermore, random seed key generation can be achieved by modifying network parameters. The new seed key continues the process to generate a new encryption key and saves the extraction parameters of the new encryption key.
[0082] The above steps enable one-time key encryption, and with the help of existing neural network accelerator modules, uniform and unpredictable encryption keys can be obtained quickly and efficiently without the need for additional key generation units, thus achieving a comprehensive balance in terms of economic cost, chip area, and security.
[0083] 1.4 - Based on the above technical solution, it is further possible to encrypt plaintext using a sequence key by generating an encryption key sequence through multiple iterations, thereby achieving secure data communication.
[0084] A third aspect of the present invention provides a secure and reliable information processing method.
[0085] This includes obtaining a seed key through a trusted security module and sending the seed key to the neural network acceleration module; The neural network acceleration module runs a neural network algorithm on the received seed key and generates an encryption key for subsequent encryption / decryption operations.
[0086] Figure 4 An exemplary schematic diagram of a secure and reliable communication scheme is shown. It should be understood that the following technical features are merely illustrative descriptions and can be combined with other technical solutions to obtain new technical solutions.
[0087] The specific terminal (user end, which can act as a second communication end) receives the first token plaintext data information sent by the host end (such as a host computer device or platform, which can act as a first communication end). The first token plaintext data information includes: device ID + session seed key + first session key extraction parameters + serial number + other data. The session seed key, first session key extraction parameters, serial number, etc. contain the necessary information for generating the session key based on the session seed key. The above information is part of the first session seed key information, which the receiver uses to decrypt the encrypted data based on the same decryption algorithm. It should be noted that the session seed key and session key in this example are the same as the seed key and encryption key in the above examples.
[0088] Before the first token plaintext data information is sent, it also includes: The plaintext data of the first token is processed by a hash function to generate a digest, which serves as the first digital signature. The host calculates the first session key corresponding to the first session seed key information, which is used to encrypt the first digital signature and generate ciphertext; The host sends the generated ciphertext information and the plaintext data information of the first token to the terminal; After receiving the aforementioned ciphertext information and the first token plaintext data information, the terminal uses the first session seed key information (including session seed key, first session key extraction parameters, serial number, etc.) in the first token plaintext data information to obtain the corresponding first session key using the same encryption algorithm through the first session seed key and the first session key extraction parameters, and decrypts the aforementioned received ciphertext to obtain the first digital signature. Further, the first token plaintext data information is encrypted based on the symmetric signature verification key and sent to the terminal. The terminal decrypts the first token plaintext data information based on the symmetric signature verification key to obtain the first token plaintext data information, and processes the first token plaintext data information based on the same hash function to obtain the second digital signature. The terminal compares the decrypted first digital signature with the second digital signature. If they match, the current session is secure; if they do not match, the current session is insecure. If the session is secure, then: The terminal returns the verification result to the host and establishes a secure session connection, which specifically includes: The terminal generates a first session key based on the first session seed key and the first session key extraction parameters in the aforementioned first token plaintext data information, and then, based on this first session key, performs the following actions: Figure 3 The process shown generates a new session key, namely the second session key, and then encrypts the second session seed key, the second session key extraction parameters, and other sensitive information corresponding to the second session key with the first session key before returning them to the host. The host decrypts the ciphertext information based on the first session key to obtain the corresponding second session seed key, second session key extraction parameters, and other sensitive information. Based on the decrypted second session seed key and second session key extraction parameters, it generates the corresponding second session key to encrypt sensitive information in subsequent session communications or updates the signature verification key and / or root key in the trusted secure storage area through negotiation. It should be noted that the signature verification key and / or root key refer to the underlying key information generated and loaded into the trusted security module during the initialization of the terminal device. Generally, the first-layer root key is the core key of the entire trusted system and will not be exposed to external systems or programs during operation. The second-layer encryption key, as a symmetric signature verification key, ensures the security of communication and / or data and program storage. The third-layer encryption key is used for communication encryption during temporary communication or session processes. Each time the system firmware is updated or communication occurs, the symmetric signature verification key or the root key can be updated through a secure channel between the host and the device to prevent attackers from obtaining the symmetric signature verification key or root key through channel detection, public plaintext attacks, or other means. Furthermore, the same key generation neural network and related generation programs (such as random number generation) are running on both the trusted host and the terminal. After a trusted communication authentication is established between the host and the terminal, a new encryption key can be shared as a symmetric signature key or root key. This prevents attackers from obtaining the symmetric signature key or root key through corresponding attack methods due to multiple inter-device communications. Even if the attacker illegally obtains the symmetric signature key or root key at this time, it has expired and can no longer be used as a key for authorization and authentication of the device's core system.
[0089] In another implementation, the terminal can first send a session request to the host, and the host can then verify the communication security. In a preferred embodiment, the host or terminal can, during the session, base itself on... Figure 3 As shown, a serialized session key is generated to encrypt long data.
[0090] A third aspect of the present invention provides an embedded device that includes the secure and trusted processing system described in the present invention or uses the encryption key generation method described in the present invention.
[0091] The embedded device includes embedded devices based on face recognition models, image recognition models, speech recognition models, or other recognition models.
[0092] The encryption / decryption unit is used to encrypt / decrypt sensitive data, programs, or storage areas.
[0093] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0094] All references to this invention are incorporated herein by reference as if each document were individually incorporated by reference.
[0095] Furthermore, it should be understood that after reading the above description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims.
Claims
1. A secure and reliable encryption key generation method, characterized in that, include: Obtain a seed key from a trusted storage area; wherein the seed key includes: random numbers or random strings; The seed key is input into the already loaded and running neural network and processed by the neural network accelerator; Encryption keys are extracted from several output feature layers in the neural network that performs the computation based on encryption key extraction parameters, for use in subsequent encryption / decryption operations; The structure or parameters of the neural network are encrypted in whole or in part and stored in the trusted storage area.
2. The secure and trusted encryption key generation method as described in claim 1, characterized in that, The method further includes: storing the seed key and the encryption key extraction parameters in the trusted storage area.
3. The secure and trusted encryption key generation method as described in claim 1, characterized in that, The seed key is input into the neural network after undergoing a first regularization process.
4. The secure and trusted encryption key generation method as described in claim 3, characterized in that, The first regularization process includes at least one of the following processes: converting random seed key data into the current neural network model input data format; fusing the random seed key data as random noise with preset data to generate new data that conforms to the neural network input, wherein the preset data is QR code data that conforms to the neural network input size, so as to manage key generation and key data through the QR code data.
5. The secure and trusted encryption key generation method as described in claim 3, characterized in that, The parameters and / or data used in the first regularization process to process the seed key are used as the encryption key extraction parameters.
6. The secure and trusted encryption key generation method as described in claim 1, characterized in that, The encryption key extraction parameters include preset random parameters, so that the encryption key is randomly extracted from the output data of several output feature layers of the neural network.
7. The secure and trusted encryption key generation method as described in claim 1, characterized in that, The algorithm selects one or more output feature layers of a neural network based on a preset algorithm, and selects a portion of the data from the selected output feature layers according to preset rules as the encryption key. The preset algorithm includes an algorithm for permuting some parameters of the convolution kernel of the neural network.
8. The secure and trusted encryption key generation method as described in claim 1, characterized in that, The encryption key extraction parameters are dynamically changed to generate a serialized encryption key, which is then used as a stream cipher to encrypt the data stream to be encrypted.
9. The secure and trusted encryption key generation method according to any one of claims 1-8, characterized in that, The method further includes: decrypting the model program and parameter data of the neural network using a root key, wherein the root key is the encryption key stored at the lowest level in a trusted storage area.
10. The secure and trusted encryption key generation method according to any one of claims 1-8, characterized in that, After the encryption key is extracted, the method further includes: performing a preset processing on the encryption key and inputting it into the neural network, randomly selecting a portion of the output feature layers, randomly extracting a new seed key from the data of the selected output feature layers, and using the new seed key to generate a new encryption key.
11. A secure and reliable seed key generation method, characterized in that, include: The encryption key is input into the neural network, wherein the encryption key is an encryption key generated by the secure and trusted encryption key generation method according to any one of claims 1-10 based on an initial seed key; Randomly select several feature output layers of the neural network; Extract a new seed key from the selected feature output layer data.
12. The secure and trusted seed key generation method as described in claim 11, characterized in that, Inputting the encryption key into the neural network includes: The encryption key is then input into the neural network after undergoing a second regularization process. And / or, before performing the second regularization process, the encryption key is subjected to divergence processing and / or nonlinear combination processing, wherein the divergence processing is performed using a divergence function containing a first random parameter, and the nonlinear combination processing is performed using a nonlinear combination function containing a second random parameter.
13. A secure and reliable seed key generation method, characterized in that, include: Add random noise to the acquired image; The image with added random noise is input into a neural network, whereby the neural network processes the input according to unknown nonlinear operation rules based on the black-box characteristics of the hidden layers and outputs a definite value to generate an encryption key. Randomly select several feature output layers of the neural network; Extract a new seed key from the selected feature output layer data; The new seed key is used to generate a new encryption key, and the extraction parameters of the new encryption key are saved.
14. The secure and trusted seed key generation method according to any one of claims 11-13, characterized in that, Extracting a new seed key from the selected feature output layer data includes: modifying the parameters of the neural network according to preset rules to randomly generate a new seed key from the selected feature output layer data.
15. A secure and reliable processing system, characterized in that, Includes a main controller, a neural network acceleration module, and a trusted security module; The trusted security module includes a secure and trusted storage area, which is configured to: acquire a seed key and send the seed key to the neural network acceleration module; The neural network acceleration module is configured to: input the received seed key into the neural network algorithm after regularization processing, and perform computational processing through the neural network accelerator, so as to extract the corresponding encryption key from the output data of the output layer of the neural network to generate the encryption key for subsequent encryption / decryption operations; and send and save the extraction parameters of the encryption key to the trusted security module for subsequent encryption / decryption operations.
16. The secure and reliable processing system as described in claim 15, characterized in that, The trusted security module is further configured to use a root key to verify and decrypt the neural network acceleration module, wherein the root key is an encryption key stored at the lowest level of the trusted security module's storage area.
17. The secure and reliable processing system as described in any one of claims 15-16, characterized in that, The secure and reliable processing system is applied to an artificial intelligence recognition model that includes any one or more of the following combinations of the neural network: face recognition model, image recognition model, and speech recognition model.
18. A secure and reliable communication system, comprising at least a first communication terminal and a second communication terminal, characterized in that, Both the first communication terminal and the second communication terminal are equipped with the same neural network to generate a session key using the secure and trusted encryption key generation method according to any one of claims 1-10, and to generate a session seed key using the secure and trusted seed key generation method according to any one of claims 11-14, so that the session communication between the first communication terminal and the second communication terminal uses the session seed key and / or the session key for encryption / decryption communication.
19. A secure and reliable communication method, characterized in that, The secure and trusted communication method is applied to session communication between a first communication terminal and a second communication terminal in the secure and trusted communication system as described in claim 18, and includes: The first communication terminal sends first token plaintext data information and first ciphertext data to the second communication terminal. The first token plaintext data information includes at least a first session seed key and a first session key extraction parameter. The first ciphertext data is ciphertext data encrypted using the first session key. The first session key is a session key generated by the secure and trusted encryption key generation method according to any one of claims 1-10 based on the first session seed key and the first session key extraction parameter. After receiving the first token plaintext data and the first ciphertext data, the second communication terminal generates a second session key based on the first session seed key and the first session key extraction parameters in the first token plaintext data, using the secure and trusted encryption key generation method according to any one of claims 1-10, and uses the second session key to decrypt the first ciphertext data.
20. The secure and reliable communication method as described in any one of claims 19, characterized in that, The first token plaintext data is encrypted using a symmetric signature key and sent to the second communication terminal. The second communication terminal decrypts the first token plaintext data using the symmetric signature key.
21. The secure and reliable communication method as described in any one of claims 19, characterized in that, The plaintext data of the first token is processed by a hash function to generate a digest as the first digital signature, and the first digital signature is encrypted based on the first session key corresponding to the first session seed key. The encrypted first digital signature is then sent to the second communication terminal. The second communication terminal processes the first token plaintext data information using the same hash function to obtain a second digital signature, and decrypts it using the second session key to obtain a first digital signature. The first digital signature and the second digital signature are then compared to determine whether the session connection is secure.
22. An embedded device, characterized in that, The embedded device operates and is deployed with the secure and trusted processing system as described in any one of claims 15-17, or the embedded device is located in the first communication terminal or the second communication terminal of the secure and trusted communication system as described in claim 18, or the embedded device is located in the first communication terminal or the second communication terminal of the secure and trusted communication method as described in any one of claims 19-21.
Citation Information
Patent Citations
Method for binding and authenticating master control chip and encryption chip of intelligent terminal
CN107508679A
Secure face recognition device based on trusted environment and dual security chips
CN109191131A
Face payment method and system
CN111476580A
Sparse convolutional neural network accelerator and calculation method
CN111626410A
Public key cipher encrypting and decrypting method based on neural network chaotic attractor
CN101977112A