Encryption and decryption circuit, method and mobile platform
By designing power detection and parallelism control circuits on the mobile platform, dynamically adjusting the parallelism of the encryption and decryption channel, the balance problem of the encryption and decryption circuit between security performance and power consumption is solved, and efficient encryption and decryption in different power scenarios is achieved. Processing improves user experience and device battery life.
Patent Information
- Application Number
- CN202211723237.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing encryption and decryption circuits are difficult to balance security performance and power consumption on mobile platforms, making it difficult to meet the dual requirements of information security and battery life in scenarios with high performance requirements.
A circuit including a power detection circuit, a parallel degree control circuit and a parallel encryption and decryption operation circuit is designed. By detecting the remaining power correlation information, the parallelism of the encryption and decryption channel is adjusted, and the conduction or disconnection of the encryption and decryption channel is dynamically controlled to adjust the Safety performance and power consumption.
It realizes adaptive adjustment of the encryption and decryption performance in different power scenarios, reduces power consumption, extends the device usage time, and reduces power consumption under low power conditions.
Smart Images

Figure CN118070353B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an encryption and decryption circuit, method and mobile platform. Background Art
[0002] With the rapid development of computer technology and information technology, information security issues have attracted more and more attention. For autonomous driving technology, the personal safety and property safety of users are particularly important. Data encryption and decryption is the basic technology of information security. For example, by encrypting exchanged data to ensure information security, the personal safety and property safety of users can be guaranteed.
[0003] The encryption and decryption circuit is a component of the automotive chip and is used to protect information security. The faster the encryption and decryption circuit runs and the higher the degree of parallelism, the better the performance, but the greater the power consumption. The applicant found that it is difficult to achieve a balance between the security performance and power consumption of the mobile platform due to the limitation of battery power. For example, the related technology reduces power consumption by reducing the performance of the encryption and decryption circuit, which cannot meet the needs of some application scenarios with high requirements for encryption and decryption performance. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related art, the present application provides an encryption and decryption circuit, method and mobile platform, which can achieve a balance between the security performance and power consumption of the mobile platform in various scenarios and improve the user experience.
[0005] In a first aspect, the present application provides an encryption and decryption circuit, comprising a power detection circuit, a parallelism control circuit, and a parallel encryption and decryption operation circuit. The power detection circuit is configured to detect information associated with the remaining power; the parallelism control circuit is coupled to the power detection circuit, and is configured to determine the parallelism of the encryption and decryption channels corresponding to the information associated with the remaining power, and to control the conduction or disconnection of each encryption and decryption channel based on the parallelism of the encryption and decryption channels; the parallel encryption and decryption operation circuit is coupled to the parallelism control circuit, and is configured to perform encryption and decryption using the conducted encryption and decryption channels.
[0006] The second aspect of the present application provides a mobile platform, comprising the above-mentioned encryption and decryption circuit and a processor, wherein the processor is coupled to the encryption and decryption circuit and is used to process the encrypted and decrypted data to control the movement of the mobile platform.
[0007] The third aspect of the present application provides a method for encryption and decryption, including: detecting remaining power-related information; determining the parallelism of encryption and decryption channels corresponding to the remaining power-related information, and controlling the conduction or disconnection of each encryption and decryption channel based on the parallelism of the encryption and decryption channels; and performing encryption and decryption using the conducted encryption and decryption channels.
[0008] A fourth aspect of the present application provides an electronic device, comprising: a processor; and a memory, on which executable code is stored, and when the executable code is executed by the processor, the processor executes the method as described above.
[0009] A fifth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor executes the above method.
[0010] A sixth aspect of the present application provides a computer program product, including an executable code, which implements the above method when the executable code is executed.
[0011] The technical solution provided by this application may have the following beneficial effects:
[0012] In certain embodiments of the present application, a mapping relationship between the parallelism of the encryption and decryption channels and the information associated with the remaining power is established. After the power detection circuit detects the information associated with the remaining power, the parallelism control circuit can determine the parallelism of the encryption and decryption channels corresponding to the above-mentioned information associated with the remaining power based on the above-mentioned mapping relationship. Therefore, the parallelism control circuit can control the conduction or disconnection of each encryption and decryption channel based on the above-mentioned encryption and decryption channel parallelism, and adjust the security performance and power consumption of the encryption and decryption circuit. The embodiments of the present application use the encryption and decryption performance adapted to the current remaining power, and use the encryption and decryption channels that are turned on for encryption and decryption, which can effectively reduce power consumption and extend the use time of the device.
[0013] In addition, in some embodiments of the present application, a chip design method with multiple power domains can significantly reduce power consumption in low-battery conditions.
[0014] In addition, in some embodiments of the present application, the key length can be adjusted according to the remaining power association information, further adjusting the power consumption of the encryption and decryption circuit.
[0015] In addition, in some embodiments of the present application, the speed of a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) interface can be dynamically adjusted according to the remaining power association information to further adjust the power consumption of the encryption and decryption circuit.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0018] Figure 1 It is a schematic diagram of an application scenario of an encryption and decryption circuit, method, and mobile platform shown in an embodiment of the present application;
[0019] Figure 2 It is a schematic diagram of another application scenario of the encryption and decryption circuit, method and mobile platform shown in an embodiment of the present application;
[0020] Figure 3 It is a block diagram of an encryption and decryption circuit shown in an embodiment of the present application;
[0021] Figure 4 is a block diagram of a parallel encryption and decryption operation circuit shown in an embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the operation process of the parallel encryption and decryption operation circuit shown in an embodiment of the present application;
[0023] Figure 6 is a schematic diagram of a power domain shown in an embodiment of the present application;
[0024] Figure 7 is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application;
[0025] Figure 8 is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application;
[0026] Fig. 9 is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application;
[0027] Fig.10 It is a schematic diagram of a PCIe power consumption mode shown in an embodiment of the present application;
[0028] Fig.11 is a schematic diagram of a mobile platform shown in an embodiment of the present application;
[0029] Fig.12 is a flow chart of an encryption and decryption method shown in an embodiment of the present application;
[0030] Fig.13 is a block diagram of an encryption and decryption device according to an embodiment of the present application;
[0031] Fig.14 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0033] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "an" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0034] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0035] In order to facilitate the understanding of the present application, some concepts involved in the present application are first explained.
[0036] Vehicle-mounted laser radar: By emitting outgoing light (such as a laser beam) with a wavelength of about 900nm, the outgoing light will be reflected by the obstacle after encountering it. The processing unit calculates the distance between the obstacle and the vehicle-mounted laser radar based on the time difference between the reflected light and the outgoing light, and generates point cloud data. Among them, the point cloud data can help the mobile platform determine its environmental information.
[0037] The processing unit of the laser radar can exchange data with other processors to achieve path planning, etc. The information security during the data exchange process can be improved by data encryption and decryption.
[0038] Data encryption is the process of processing the original plain text files or data according to a certain algorithm, making them into unreadable code "ciphertext" to protect the data from being illegally stolen or read.
[0039] Data decryption is the process of decrypting "ciphertext" into plaintext using the corresponding algorithm and key.
[0040] Voltage domain: If several modules use the same voltage source, they are considered to belong to the same voltage domain.
[0041] A power domain refers to a collection of modules that share the same power switching logic within the same voltage domain.
[0042] Artificial Intelligence (AI) is a comprehensive technology in computer science. Among them, the development of autonomous driving technology is particularly rapid. Autonomous driving technology includes high-precision maps, environmental perception, behavioral decision-making, path planning, motion control and other technologies, and has broad application prospects.
[0043] In the autonomous driving scenario, the system architecture applicable to the autonomous driving scenario may include a mobile platform, a network, and a cloud. The network includes a wired network and a wireless network, etc., which are not limited in this application.
[0044] The cloud can include a server cluster or distributed system consisting of multiple physical servers. The cloud can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution (CDN), and big data and artificial intelligence platforms.
[0045] The mobile platform includes, but is not limited to, cars, ships, robots, aircraft, etc. The mobile platform may be provided with electronic devices such as sensors to obtain information about obstacles in the surrounding environment of the mobile platform.
[0046] Taking the vehicle autonomous driving scenario as an example, the car can coordinate road signal control based on the vehicle position information, obstacle information, and road information perceived by the sensor system, thereby improving the quality and efficiency of road management. Specifically, the corresponding autonomous driving vehicle decision can be determined based on the information perceived by the sensor system, and the safe distance between autonomous driving vehicles can be adjusted, so that the vehicle can drive safely and reliably on the road. However, once point cloud data is tampered with due to information security issues, it will bring security risks. In the above-mentioned application scenarios such as assisted driving, autonomous driving, and smart transportation, quickly and accurately perceiving the surrounding environment of movable equipment is a key point.
[0047] The embodiments of the present application provide a circuit, method and mobile platform for encryption and decryption, which adjusts the parallelism of the parallel encryption and decryption operation circuit according to the collected remaining power association information, and realizes encryption and decryption using encryption and decryption operation circuits with different parallelism and power consumption under the actual remaining power. The present application can use high-performance encryption and decryption processing in the scenario of sufficient power to ensure encryption and decryption performance requirements. In the scenario of insufficient power, low-performance encryption and decryption processing is used to ensure battery life, thereby ensuring the personal safety and property safety of users and improving user experience.
[0048] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0049] Figure 1 It is a schematic diagram of an application scenario of an encryption and decryption circuit, method and mobile platform shown in an embodiment of the present application.
[0050] Figure 1 The hardware structure of a vehicle 10 that supports assisted driving or automatic driving functions is shown. For example, at least one laser imaging detection and ranging (LIDAR) 11 is mounted on the roof and / or the side of the vehicle body of the vehicle 10. The detection area of the LIDAR 11 can be fixed, such as a certain LIDAR 11 can be used only to detect a preset area. The detection area of the LIDAR 11 can be adjustable, such as the laser radar on the vehicle body can scan multiple detection areas by adjusting the posture, etc., or by adjusting the field of view of the laser radar itself. Scan multiple detection areas. Specifically, the vehicle 10 can be equipped with 5 LIDARs 11: the top of the vehicle, the front side of the vehicle, the rear side of the vehicle, the left side of the vehicle, and the right side of the vehicle. Through multiple LIDARs 11, the outline of objects in the area around the vehicle and the distance to the object can be detected.
[0051] In addition, a camera may be mounted on the vehicle 10. The camera can capture the environment in front of the vehicle at a predetermined viewing angle. For example, the camera may be a monocular camera, a multi-camera camera, or the like.
[0052] In addition, the vehicle 10 may be equipped with a plurality of millimeter wave radars in a manner surrounding the vehicle 10. For example, the vehicle 10 may be equipped with four millimeter wave radars to detect the left side in front of the vehicle, the right side in front of the vehicle, the left side behind the vehicle, and the right side behind the vehicle. The millimeter wave radars can detect the distance of an object in each detection area, and can detect the relative speed between the object and the vehicle 10.
[0053] Furthermore, the vehicle 10 may also be equipped with a positioning device 12 , such as a Beidou positioning device, a Global Positioning System (GPS), etc. The current position of the vehicle 10 can be determined by the positioning device 12 .
[0054] In addition, the vehicle 10 may also be equipped with an electronic control unit (ECU). The detection signal of at least one of the above-mentioned LIDAR 11, millimeter wave radar and positioning device 12 is sent to the ECU. The ECU can detect and identify obstacles (such as roadblocks, moving objects, trees, adjacent vehicles, etc. around the vehicle 10) based on these signals. In addition, the ECU can be physically divided into multiple units according to their functions, and this application will collectively refer to them as ECUs.
[0055] Information security is particularly important when ECU exchanges information with the above-mentioned laser radar, millimeter-wave radar, GPS and other devices. For example, once the exchanged point cloud data is tampered with, it may cause the car to be unable to identify obstacles in front, causing car damage and casualties. High-performance encryption and decryption operations require high power consumption. The technical solution of this application aims to achieve a balance between information security and power consumption.
[0056] It should be noted that although the movable platform is described as a car, such description is not limiting, and a variety of mobile platforms are applicable, such as land robots, water robots, etc. The encryption and decryption circuits, methods, and mobile platforms of the embodiments of the present application can be applied to any one or more electronic devices applicable to LIDAR.
[0057] Figure 2 It is a schematic diagram of another application scenario of the encryption and decryption circuit, method and mobile platform shown in one embodiment of the present application.
[0058] Figure 2It shows a variety of power consumption reduction measures taken by the embodiments of the present application under different power levels. Specifically, power consumption can be reduced from multiple dimensions. For example, the encryption and decryption performance can be improved by increasing the parallelism of the encryption and decryption circuit. For example, the power consumption can be reduced by reducing the parallelism of the encryption and decryption circuit. For example, the encryption and decryption performance can be improved by increasing the key length. For example, the power consumption can be reduced by shortening the key length. For example, the encryption and decryption performance can be improved by adopting a high-performance interface. For example, the power consumption can be reduced by adopting a low-power interface. In addition, the above-mentioned multiple dimensions can be used in combination. For example, when the mobile platform is in an external power supply, there is no need to consider the battery power. A high-performance interface with a high-parallel multi-channel, full-length key length and full-speed mode can be used to meet the user's demand for high-performance encryption and decryption processing. For example, when the battery of the mobile platform is low in power, a single-channel, last-digit or digit key length, and a low-power interface in sleep mode can be used to meet the user's demand for extended working time.
[0059] Figure 2 The examples of duration are only for the convenience of user understanding, and the specific combination methods are not limited here. For example, you can also add the type of external power supply in the power variable column. For example, when the power is greater than 80%, a low-power interface with 80% channels, 50% key length and standby mode can be used. Through the combined application of the above multiple strategies, the different security needs and extended usage time requirements of users in various scenarios can be met.
[0060] In the above-mentioned application scenarios such as assisted driving, autonomous driving, and smart transportation, it is a key point to quickly and accurately perceive the surrounding environment of the mobile platform and plan the driving path based on the surrounding environment. Among them, whether the surrounding environment information can be correctly and confidentially transmitted between multiple mobile platform components is an area that needs to be strengthened.
[0061] Here, the vehicle's autonomous driving scenario is used as an example for illustrative explanation. According to the vehicle position information, obstacle information, and road information perceived by the sensor system, road signal control is coordinated to improve the quality and efficiency of road management. Specifically, the corresponding autonomous driving vehicle decision can be determined based on the information perceived by the sensor system, and the safe distance between autonomous driving vehicles can be adjusted, so that the vehicle can drive safely and reliably on the road.
[0062] As one of the most important sensors for autonomous driving, LiDAR can provide the decision-making system with the most important information about the location / size / motion of traffic participants in the fields of smart transportation / autonomous driving. Because LiDAR chips are like human eyes for autonomous vehicles, it is particularly important to protect the security of LiDAR data collection and transmission, which is directly related to the personal safety, property safety, and even life safety of the drivers and passengers of the vehicle.
[0063] The main control chip of the laser radar is the core component of the laser radar. The main control chip is responsible for the collection, processing and transmission of at least part of the laser radar information. The encryption and decryption circuit is one of the cores of the security protection of the main control chip as the security protection circuit of the main control chip.
[0064] However, the applicant found that the related technology has become a huge constraint on the use time of the device due to the limited battery power of the mobile platform. Therefore, how to achieve a balance between information security and computing power consumption is of great significance. In the related technology, the faster the speed of the encryption and decryption circuit and the higher the parallelism, the greater the power consumption. If you want to reduce power consumption, you can only reduce the performance of the encryption and decryption circuit, which cannot meet the security requirements in scenarios with high security performance requirements, resulting in a difficult balance between information security and power consumption.
[0065] In addition, the mobile platform only uses the same encryption and decryption processing method in different application scenarios. The processing method is relatively simple, the encryption and decryption security level is not high, and it is easy for hackers to break the protection. In some embodiments of the present application, different encryption and decryption processing methods are adopted in different application scenarios, which increases the complexity of cracking the encryption and decryption algorithm and helps to further improve information security.
[0066] Figure 3 It is a block diagram of an encryption and decryption circuit shown in an embodiment of the present application.
[0067] See also Figure 3 The encryption and decryption circuit 300 may include: a power detection circuit 310, a parallelism control circuit 320 and a parallel encryption and decryption operation circuit 330.
[0068] The power detection circuit 310 is configured to detect the information related to the remaining power. The information related to the remaining power includes but is not limited to: the state of charge (SOC), voltage, current and other related information that can reflect the remaining power of the battery. For example, the method of measuring SOC includes but is not limited to: density method, open circuit voltage method, discharge method, internal resistance method, time integration method, etc. It should be noted that the power detection circuit 310 can be integrated in the encryption and decryption circuit 300, or it can be set outside the encryption and decryption circuit 300. In addition, it is not excluded to obtain the information related to the remaining power by reading external data, such as requesting the SOC value from the battery controller.
[0069] The parallelism control circuit 320 is coupled to the power detection circuit and is configured to determine the parallelism of the encryption and decryption channels corresponding to the remaining power association information, and control the conduction or disconnection of each encryption and decryption channel based on the encryption and decryption channel parallelism. The encryption and decryption channel parallelism can represent how many parallel channels are currently performing encryption and decryption. If the parallelism is 2, two channels perform encryption and decryption processing in parallel. If the parallelism is 4, four channels perform encryption and decryption processing in parallel. Since the mapping relationship between the remaining power association information and the parallel encryption and decryption channels can be pre-constructed, the encryption and decryption channel corresponding to the current remaining power association information can be determined based on the mapping relationship, and then the corresponding encryption and decryption channel is controlled to be in the on state, and the remaining encryption and decryption channels are in the off state, so as to adjust the encryption and decryption performance and power consumption.
[0070] The parallel encryption and decryption operation circuit 330 is coupled to the parallelism control circuit and is configured to perform encryption and decryption using the turned-on encryption and decryption channels.
[0071] The parallel encryption and decryption operation circuit 330 may include multiple encryption and decryption channels, and the encryption and decryption channels in the on state can encrypt and decrypt the input data. The encryption and decryption process may be to use a key to perform a specific logic operation on the input data to obtain an encryption and decryption result. In addition, the encryption and decryption process may also be implemented by using a combination of multiple logic operation circuits. Accordingly, it may be implemented by using a combination of multiple logic operation circuits, which is not limited here. Logical operations include but are not limited to: "or", "and", "not", "or not", "and not", "exclusive or", etc.
[0072] In some embodiments, the parallel encryption and decryption operation circuit includes: at least two parallel encryption and decryption channels, at least part of the encryption and decryption channels each including encryption and decryption sub-circuits of power domain switches coupled to each other.
[0073] The input end of the power domain switch is coupled to the output end of the parallelism control circuit and is configured to control the on or off of the encryption and decryption channel where the power domain switch is located.
[0074] The encryption and decryption sub-circuit is coupled to the power domain switch and is configured to encrypt and decrypt input data when the encryption and decryption channel where the encryption and decryption sub-circuit is located is turned on.
[0075] Figure 4 It is a block diagram of a parallel encryption and decryption operation circuit shown in one embodiment of the present application.
[0076] See also Figure 4, three encryption and decryption channels are shown, each of which includes a set of power domain switches and encryption and decryption subcircuits. For example, power domain switch 1 and encryption and decryption subcircuit 1 together constitute encryption and decryption channel 1. Power domain switch 2 and encryption and decryption subcircuit 2 together constitute encryption and decryption channel 2. Power domain switch 3 and encryption and decryption subcircuit 3 together constitute encryption and decryption channel 3. Among them, the power domain switch is used to control the conduction or disconnection of the encryption and decryption channel in which it is located.
[0077] For example, the information associated with the current remaining power corresponds to encryption and decryption channel 1 and encryption and decryption channel 2. Then, encryption and decryption channel 1 and encryption and decryption channel 2 can be controlled to be turned on, and encryption and decryption channel 3 can be controlled to be turned off. In this way, only encryption and decryption channel 1 and encryption and decryption channel 2 can be used in parallel to encrypt and decrypt input data. Since encryption and decryption channel 3 is in a disconnected state, that is, in a non-working state, power consumption is effectively reduced.
[0078] For ease of understanding, the encryption and decryption subcircuit is exemplarily described.
[0079] During data transmission, the specified key and encryption algorithm can be used to encrypt the data to ensure the integrity and authenticity of the transmitted data, such as the integrity and authenticity of the point cloud data collected by the LiDAR. During decryption, the key and decryption algorithm corresponding to the encryption algorithm can be used for decryption. For example, the ECU can decrypt the encrypted data based on the key to obtain the point cloud data collected by the LiDAR. In order to ensure the security of the key, the key can be generated based on a random number. The random number can be a value output by a random number generation unit. Random numbers can be divided into true random numbers and pseudo-random numbers.
[0080] Among them, in the process of generating true random numbers, random physical processes (such as environmental noise, thermal noise of circuits, radioactive decay, etc.) can be used as random number sources, and implemented using analog circuits, and then true random numbers are obtained through digital post-processing. True random numbers have no regularity at all and are unpredictable. It is impossible for an attacker to predict the next data generated through a large amount of data analysis. True random numbers can be generated by a true random number generator (TRNG). The unpredictability of the true random number generator makes it impossible for an attacker to guess the key through general rules, thereby improving the security of the key.
[0081] Pseudo-random numbers can be generated using a fixed generation algorithm. In order to increase the unpredictability of pseudo-random numbers, an initial seed can be set. However, pseudo-random numbers still follow certain rules. For example, an attacker can obtain the generation algorithm of pseudo-random numbers through a large amount of data analysis. However, pseudo-random numbers have the advantages of being easy to use and not requiring the introduction of additional hardware devices. Pseudo-random numbers can be generated by a pseudo-random number generator (PRNG). In order to facilitate the use of random numbers as keys for encryption and decryption, the keys can be stored in a specific storage space.
[0082] Figure 5 It is a schematic diagram of the operation process of the parallel encryption and decryption operation circuit shown in one embodiment of the present application.
[0083] Figure 5 Two encryption and decryption channels are shown in FIG. 1 , and each encryption and decryption channel uses at least one logical operation. Taking 16 bits of data to be encrypted as an example, the data of bit0 to bit7 is encrypted by encryption and decryption channel 1, and the data of bit8 to bit15 is encrypted by encryption and decryption channel 2. The first random number and the second random number can be the same or different. Taking the case that both encryption and decryption channel 1 and encryption and decryption channel 2 are turned on, and the logical operation is an XOR operation as an example, the data of bit0 to bit7 and the second random number are XORed, and the data of bit8 to bit15 and the first random number are XORed. The two operation results can be obtained by splicing, addition or subtraction operations to obtain the final encryption result. Taking the case that encryption and decryption channel 1 is turned on, encryption and decryption channel 2 is disconnected, and the logical operation is an NOR operation as an example, the data of bit0 to bit7 and the second random number are NORed, and the data of bit8 to bit15 are not processed. The two operation results can be obtained by splicing, addition or subtraction operations to obtain the final encryption result. Taking the case where encryption / decryption channel 1 is disconnected, encryption / decryption channel 2 is connected, and the logical operation is an XOR operation, the data of bit8 to bit15 and the first random number are XORed, and the data of bit0 to bit7 are not processed. The two operation results can be concatenated, added, or subtracted to obtain the final encryption result.
[0084] It should be noted that Figure 5 It can also be understood as a two-stage encryption process of a single encryption and decryption channel for 16-bit first data. For example, the first data includes bit0 to bit15, wherein the 0th to 7th bits of the first data are bit0 to bit7, and the 8th to 15th bits of the first data are bit8 to bit15. Figure 5In the process, bit8 to bit15 of the first data are logically operated with the first random number to obtain the first sub-result; bit0 to bit7 of the first data are logically operated with the second random number to obtain the second sub-result. The number of bits of the first random number can be the same as or different from the number of bits of bit8 to bit15 of the first data. After obtaining the first sub-result and the second sub-result, the first sub-result and the second sub-result can be subjected to secondary encryption operation, such as concatenation, XOR and other logical operations, to obtain the secondary encryption result.
[0085] The first random number and the second random number may be random numbers generated by a true random number generation unit or a pseudo-random number generation unit. In addition, the key may also be a non-random number, such as a root key input by a user or a key obtained through a specific operation. In scenarios where information security requirements are high and may affect the personal safety and / or property safety of users, true random numbers can be used to improve security.
[0086] There are many implementation methods for true random number generation units in circuit design, such as discrete time chaos implementation method, oscillation sampling method, direct amplification thermal noise method, etc. Among them, the random source of the oscillation sampling method mainly comes from the phase jitter and noise of the oscillator, the metastable state in the circuit produces phase jitter, and the thermal noise in the circuit produces phase noise. The implementation circuit of the oscillation sampling method is relatively simple, the quality of the true random numbers generated is high, and it is widely used. Specifically, the random number source part can be implemented using an analog circuit, and the post-processing part can be implemented using a digital circuit. In order to facilitate the use of keys for encryption and decryption operations, the keys can be stored in a specific location in the storage space.
[0087] In this embodiment, encryption technology is used to ensure at least one of the confidentiality, integrity, authentication and non-repudiation of information, and the content before encryption is displayed after decryption using the corresponding key, making the information readable only to recipients who are allowed to read it, thereby preventing private information from being intercepted and stolen in the network.
[0088] In this embodiment, symmetrical encryption can be used, that is, an encryption method using a single-key cryptographic system, and the same key can be used for encryption and decryption of information at the same time. In addition, encryption and decryption can also be performed in a software manner, such as the commonly used algorithms in the symmetric encryption algorithm: DES, 3DES, TDEA, Blowfish, RC2, RC4, RC5, IDEA, SKIPJACK, etc. The advantages of using symmetric encryption include: the speed of encryption and decryption is relatively fast, which is suitable for use when the data is relatively long. The algorithm is open, the calculation amount is small, the encryption speed is fast, and the encryption efficiency is high.
[0089] Figure 6 is a schematic diagram of a power domain according to an embodiment of the present application.
[0090] For example, a power control unit (SCP) may include a microprocessor core plus some peripheral logic circuits. Standard basic design components include power, clock, and interface components. For example: a power policy unit (PPU) that supports SCP programming through a software interface, and a low power interface (LPI) for low power control.
[0091] Among them, PPU implements the function of software-controlled power domain switch control. SCP initiates the on / off operation of the power domain switch to PPU. PPU will initiate reset / de-reset, clock on / off, and power isolation on / off operations to the power domain through LPI. Then PPU controls the on / off of the power domain switch through the power control system state machine (PCSM).
[0092] In order to better control power consumption, power consumption control can be performed based on power domains and voltage domains. A voltage domain can refer to a collection of modules that use the same voltage source. If several modules use the same voltage source, they are considered to belong to the same voltage domain. A power domain can refer to a collection of modules that share the same power switch logic within the same voltage domain. That is, modules in the same power domain are controlled by the same power switch logic and are powered on and off at the same time. Modules within a voltage domain can be split into different power domains based on design requirements.
[0093] See also Figure 6 , shows voltage domain 1 and voltage domain 2. Voltage domain 1 includes power domain 1. Voltage domain 2 includes power domain 2 and power domain 3. Power domain 2 includes small core 1 and small core 3, and power domain 3 includes small core 2 and small core 4. When the power domain switch of power domain 2 is turned on, small core 1 and small core 3 are powered by the same power supply. When the power domain switch of power domain 3 is turned on, small core 2 and small core 4 are powered by the same power supply.
[0094] In addition, after generating a random number, the quality of the random number can be detected to further improve the reliability of encryption and decryption. For example, the quality of the random number can be determined by the Hamming weight. If the quality of the random number meets the requirements, such as the Hamming weight is greater than 1, the random number is used as the root key. The root key can be updated according to a preset period.
[0095] In some embodiments, the parallelism control circuit includes: a first mapping relationship storage unit, a parallelism determination unit, and a power domain control unit. Figure 7 It is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application.
[0096] See also Figure 7 , a first mapping relationship storage unit is configured to store a first mapping relationship between the remaining power association information and the encryption and decryption parallelism. Figure 2 , which exemplarily shows the corresponding relationship between the remaining power and the number of channels.
[0097] The parallelism determination unit is coupled to the power detection circuit and the first mapping relationship storage unit respectively, and is configured to determine the encryption and decryption channel parallelism corresponding to the remaining power association information based on the first mapping relationship. Figure 2 When the remaining power is 60% to 80%, the encryption and decryption parallelism is 80% and the channels are turned on.
[0098] The power domain control unit is coupled to the parallelism determination unit and the power domain switch, respectively, and is configured to control the on or off of each power domain switch based on the parallelism of the encryption and decryption channels to control the on or off of the encryption and decryption channels. The power domain control unit can be a transistor, a MOS tube, a solenoid valve, etc., which can control the on or off of the power domain switch.
[0099] The parallelism determination unit can determine the corresponding encryption and decryption parallelism according to the input parallelism determination unit. Specifically, the parallelism determination unit can be formed by at least one of a wiring switch, a multiplexer (MUX), a look-up table (LUT), etc.
[0100] In order to facilitate the editing of conditions corresponding to various degrees of parallelism, a wiring switch is used as an example for illustrative explanation. The wiring switch may include: a configurable logic block (CLB), wiring resources, and a programmable input / output module. The programmable logic block is surrounded by prefabricated wiring resource channels, and the programmable input / output modules are distributed on the outside of the wiring switch. In addition to the above three modules, it may further include optional resources such as random access memory (RAM), multipliers, etc.
[0101] Among them, the programmable logic block is the basic unit for implementing the search. For example, the programmable logic block may include an interconnection switch matrix and at least one slice (SLICEs), each slice including at least one lookup table, at least one trigger and at least one multiplexer. The interconnection switch matrix is mainly composed of wires of different lengths and multiple switches. The multiplexer includes but is not limited to: 4-to-1 data selector, 8-to-1 data selector, 16-to-1 data selector, etc. Taking the n-to-1 data selector as an example, its input includes: i1 to in. For example, multiple entry information (S) in the lookup circuit table can be stored in the first mapping relationship storage unit.
[0102] In some embodiments, the encryption and decryption circuit may further include an encryption and decryption task allocation unit.
[0103] For example, the encryption and decryption task allocation unit is coupled to each encryption and decryption subcircuit in the parallel encryption and decryption operation circuit, and is configured to allocate encryption and decryption tasks to the encryption and decryption subcircuit to encrypt and decrypt input data. After the user inputs power-on, startup and other instructions to the mobile platform, the encryption and decryption task allocation unit can determine the data to be encrypted and decrypted according to the instructions, and send the data to the parallel encryption and decryption operation circuit for encryption and decryption processing. In addition, the encryption and decryption task allocation unit can allocate data to the corresponding encryption and decryption channel according to the parallelism of the encryption and decryption channel.
[0104] In this embodiment, the encryption and decryption performance is correlated with the battery power, and the performance of the encryption and decryption circuit is fully released when the device has sufficient power or is directly plugged in. When the device has low power, the encryption and decryption performance is reduced to save power consumption and extend the device usage time.
[0105] In some embodiments, in order to increase the dimension of adjusting power consumption so that the user can adjust the power consumption of the encryption and decryption circuit from more adjustable dimensions, for example, in this embodiment, the power consumption can also be adjusted from the dimension of key length.
[0106] Specifically, the encryption and decryption circuit 300 may further include: a key length control circuit to adjust the length of the key according to the required encryption and decryption performance.
[0107] For example, the key length control circuit is coupled to the power detection circuit and the parallel encryption and decryption operation circuit respectively, and is configured to adjust the key length of the encryption and decryption key according to the remaining power associated information, and send the adjusted key to the parallel encryption and decryption operation circuit. Figure 5 In order to reduce the amount of calculation for encryption and decryption operations, some bits (such as bit5 to bit7) in the first random number can be used as bits participating in the logic operation instead of using all bits of the first random number as the key.
[0108] Figure 8 It is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application.
[0109] See also Figure 8 The key length control circuit may include: a key storage unit, a second mapping relationship storage unit, a length determination unit and a key generation unit.
[0110] The key storage unit is configured to store a root key. The root key may be a true random number, a pseudo-random number, a preset number, etc. The key involved in the encryption and decryption operation may be a number generated based on the root key.
[0111] The second mapping relationship storage unit is configured to store a second mapping relationship between the remaining power association information and the key length. The remaining power association information refers to the above-mentioned related content and will not be described in detail here.
[0112] The length determination unit is coupled to the power detection circuit and the second mapping relationship storage unit respectively, and is configured to determine the key length corresponding to the remaining power association information based on the second mapping relationship. Figure 2 , there is a corresponding relationship between the remaining power and the key length. The key length corresponding to the current remaining power can be determined by looking up a table. The length determination unit can be a lookup table circuit, etc., which determines the corresponding key length by matching the remaining power association information and the second mapping relationship. Specifically, the structure of the length determination unit can refer to the parallelism determination unit, which will not be described in detail here.
[0113] The key generation unit is coupled to the length determination unit and the key storage unit respectively, and is configured to generate a key of adjusted length based on the key length and the root key, so that the parallel encryption and decryption operation circuit performs encryption and decryption based on the key of adjusted length. Figure 2 and Figure 5 , the current remaining power is less than 30%, then it can be determined that the key length is the last digit. Therefore, Figure 5 The last bit (bit7) of the first random number in is the key involved in the logic operation. It should be noted that the first random number can be a key after the key length is adjusted.
[0114] In a specific embodiment, the key used by the parallel encryption and decryption operation circuit is generated by the key generation unit, and the length determination unit finds the key length corresponding to the current power according to the second mapping relationship between the current remaining power and the key length, and notifies the key generation unit to intercept the low-order root key of the required length according to the original root key as the current encryption key. The changed key length will be written to the specified area in the flash memory (such as a NAND storage unit), and when reading data, it is decrypted according to the key length of the data written at that time.
[0115] The key length in this embodiment can be adjusted according to the power of the device, so as to further adjust the power consumption of the circuit according to the remaining power.
[0116] In some embodiments, the encryption and decryption circuit may further include: a storage read-write control unit.
[0117] For example, the storage read-write control unit is coupled to the parallel encryption and decryption operation circuit, and is used to control the storage unit to write or read the encrypted and decrypted data from the parallel encryption and decryption operation circuit, and / or the key length, wherein the key length is related to the remaining power association information. The changed key length is correspondingly written to the designated area in the NAND storage unit, so that when reading the data, it is convenient to decrypt according to the key length of the data written at that time.
[0118] In some embodiments, the encryption and decryption circuit may further include an interface mode control circuit that can adjust the interface power consumption mode so as to call interfaces with different interface power consumption modes when the remaining power is different to write or read data.
[0119] For example, the interface mode control circuit is coupled to the storage read-write control unit, and is configured to couple the storage read-write control unit and the storage unit, and adjust the interface power consumption mode according to the remaining power association information. The interface power consumption mode includes but is not limited to: active mode (full speed mode), standby mode, connected power-off mode, sleep mode, low power sleep mode, etc.
[0120] Fig. 9 It is a block diagram of another encryption and decryption circuit shown in an embodiment of the present application.
[0121] See also Fig. 9 The interface mode control circuit may include: a third mapping relationship storage unit, a mode determination unit and an interface controller.
[0122] The third mapping relationship storage unit is configured to store a third mapping relationship between the remaining power association information and the encryption and decryption parallelism. Figure 2 , there is a corresponding relationship between the remaining power and the mode.
[0123] The mode determination unit is coupled to the power detection circuit and the third mapping relationship storage unit respectively, and is configured to determine the interface power consumption mode corresponding to the remaining power association information based on the third mapping relationship. Specifically, the mode determination unit may include a lookup table circuit, and specific reference is made to the parallelism determination unit related content, which will not be described in detail here.
[0124] The interface controller is coupled to the storage read-write control unit and the mode determination unit, respectively, and is configured to control the storage unit to write data or read data based on the interface power consumption mode corresponding to the information associated with the remaining power. For example, the interface may be a PCIe interface, etc. The interface controller may initiate a low power consumption request based on the remaining power of the battery. The device may decide whether to accept the request based on its own working state. For example, the number of valid signal lines may be changed, and by increasing the number of valid signals, the device may pass more working states to the controller. The controller may send an additional set of mode request signals to describe the request to switch the power consumption mode.
[0125] Fig.10 This is a schematic diagram of a PCIe power consumption mode shown in an embodiment of the present application.
[0126] See also Fig.10 , showing 6 power consumption modes, L0 (mode 0), this power consumption mode is full speed working mode. L0s (mode 0s), this power consumption mode is standby mode, fast. L1 (mode 1), this power consumption mode is standby mode, slow recovery. L1.1 (mode 1.1), this power consumption mode PCIe Link is not powered off. L1.2 (mode 1.2), this power consumption mode is PCIeLink powered off. L2 (mode 2), this power consumption mode is in sleep state, only Vaux is powered on.
[0127] In a specific embodiment, before the circuit starts working, the first mapping relationship between the remaining power association information and the encryption and decryption parallelism is written into the first mapping relationship storage unit. For example, 100% to 80% full parallelism, 79% to 50% closes a parallel channel, and only one encryption and decryption channel is retained after it is lower than 20%. The second mapping relationship between the remaining power association information and the key length is written into the second mapping relationship storage unit. The third mapping relationship between the remaining power association information and the encryption and decryption parallelism is written into the third mapping relationship storage unit. There is no order requirement for the three write operations.
[0128] After the chip starts working, the battery power detection circuit monitors the voltage analog value related to the battery power in real time, converts it into a digital signal, and sends it to the parallelism determination unit.
[0129] The parallelism determination unit determines the parallelism information corresponding to the current battery power according to the first mapping relationship between the remaining power association information and the encryption and decryption parallelism, and then sends the switch control information of all power domains to the power domain control unit.
[0130] The power domain control unit performs switching operations on all power domains according to the switch control information of all power domains.
[0131] The encryption and decryption task allocation unit allocates the data to be encrypted and decrypted to all encryption and decryption channels that are still working according to the parallelism of the currently enabled encryption and decryption circuits.
[0132] The parallel encryption and decryption operation circuit is responsible for completing the encryption and decryption operation of the specified algorithm, and then sending the operation result to the read-write control unit to control the writing of data by the NAND storage unit.
[0133] The key used by the parallel encryption and decryption operation circuit is generated by the key generation unit. The parallel encryption and decryption operation circuit finds the key length corresponding to the current power according to the second mapping relationship between the remaining power association information and the key length, and notifies the key generation unit to intercept the low-order root key of the required length according to the original root key as the current encryption key. The changed key length will be written to the designated area in the NAND storage unit accordingly, and when reading data, it will be decrypted according to the key length of the data written at that time.
[0134] The PCIe interface is responsible for connecting the NAND read / write controller and the NAND storage particles. The mode determination unit finds the PCIe power consumption mode corresponding to the current power according to the third mapping relationship between the remaining power association information and the encryption / decryption parallelism, so as to read and write data in the PCIe power consumption mode to save chip power consumption. The specific application of the three mapping relationships can be shown as follows.
[0135] For example, more than 80% of the remaining power is fully parallel, full-length key, and PCIe full speed operation.
[0136] For example, when the remaining power is 50% to 80%, start to reduce the parallelism.
[0137] For example, when the remaining power is from 50% to 20%, start to reduce the key length.
[0138] For example, when the remaining power is below 20%, all devices are set to the lowest power consumption.
[0139] The key length needs to be indicated as a flag after the encrypted packet. The encryption and decryption algorithms can all be symmetric encryption and decryption algorithms.
[0140] In the embodiment of the present application, the encryption and decryption performance is correlated with the battery power, and the performance of the encryption and decryption circuit is fully released when the device has sufficient power or is directly plugged in. When the device power is low, the encryption and decryption performance is reduced to save power consumption and extend the device usage time, thereby improving the personal safety and property safety of users.
[0141] In the embodiment of the present application, the power consumption of the encryption and decryption circuit can dynamically adjust the parallelism according to the battery status of the mobile platform, so that the power consumption can be dynamically adjusted to extend the use time of the device.
[0142] The embodiment of the present application is a chip design method with multiple power domains, which can significantly reduce power consumption in low-battery conditions.
[0143] In an embodiment of the present application, the key length can be adjusted according to the power level of the device to further reduce power consumption in low-power situations.
[0144] In the embodiment of the present application, the PCIe interface speed is also dynamically adjusted according to the battery power so as to further reduce the power consumption in low-battery conditions.
[0145] Another aspect of the present application also provides a mobile platform.
[0146] Fig.11 It is a schematic diagram of a mobile platform shown in an embodiment of the present application.
[0147] See also Fig.11 In addition to the encryption and decryption circuits described above, the mobile platform may also include a processor. The processor is coupled to the encryption and decryption circuits and is used to process the encrypted and decrypted data to control the movement of the mobile platform. For example, the processor may be a central processing unit CPU, an electronic control unit ECU (on-board computer), a battery control unit, etc.
[0148] In some embodiments, the mobile platform further includes at least one of the following: a sensor, a battery, or a storage unit.
[0149] The sensor is coupled to the encryption and decryption circuit and is configured to send the collected information to the encryption and decryption circuit to generate an encryption and decryption task.
[0150] The battery is coupled to the encryption and decryption circuit and is configured to supply power to at least part of the power-consuming devices of the mobile platform, and the encryption and decryption circuit obtains the information related to the remaining power of the battery.
[0151] The storage unit is coupled to the encryption and decryption circuit and is configured to store encrypted and decrypted data and / or key length.
[0152] In addition, the mobile platform also includes but is not limited to the following components: electronic power control / electronic throttle, electronic throttle, engine control unit, signal bus, etc., which are not described in detail here.
[0153] In some embodiments, a mobile platform with assisted driving or automatic driving functions may also be provided with detectors such as radar to obtain environmental information of the mobile platform.
[0154] The radar may be a laser radar or other radar that may be interfered by the ambient light intensity. The radar may be a scanning radar or a non-scanning radar. The scanning laser radar is used as an example for the following description.
[0155] For example, MEMS-type laser radar can dynamically adjust its scanning mode to focus on special objects, collect detailed information of farther and smaller objects, and identify them. For example, Flash-type laser radar can quickly record the entire scene, avoiding various troubles caused by the movement of the target or laser radar during the scanning process. For example, a row of transmitters carried by a phased array laser radar can change the emission direction of the laser beam by adjusting the relative phase of the signal. For example, a mechanical rotating laser radar mainly includes a laser, a scanner, an optical component, a photodetector, a receiving IC, and a position and navigation device.
[0156] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0157] Another aspect of the present application also provides an encryption and decryption method.
[0158] Fig.12 It is a flow chart of an encryption and decryption method shown in an embodiment of the present application.
[0159] See also Fig.12 , the encryption and decryption method may include operations S1210 to S1230.
[0160] In operation S1210, remaining power associated information is detected.
[0161] The remaining power related information includes but is not limited to: remaining power, SOC, battery voltage, battery current, etc.
[0162] In operation S1220, the encryption / decryption channel parallelism corresponding to the remaining power associated information is determined, and the on / off of each encryption / decryption channel is controlled based on the encryption / decryption channel parallelism.
[0163] Specifically, the on or off of each encryption and decryption channel can be controlled by a switch.
[0164] In operation S1230, encryption and decryption are performed using the turned-on encryption and decryption channels.
[0165] The encryption and decryption process can adopt a variety of related encryption and decryption technologies, such as encryption and decryption through hardware circuits, encryption and decryption through software, and circuit encryption and decryption through a combination of hardware and software.
[0166] In some embodiments, the parallelism can be controlled in the following manner: storing a first mapping relationship between the remaining power associated information and the encryption and decryption parallelism; determining the encryption and decryption channel parallelism corresponding to the remaining power associated information based on the first mapping relationship; and controlling the conduction or disconnection of each power domain switch based on the encryption and decryption channel parallelism to control the conduction or disconnection of the encryption and decryption channel.
[0167] In addition, the encryption and decryption methods can refer to the circuit-related contents of the encryption and decryption mentioned above, which will not be described in detail here.
[0168] The encryption and decryption method provided in the embodiment of the present application establishes a correlation between the encryption and decryption performance and the battery power, and fully releases the performance of the encryption and decryption circuit when the device has sufficient power or is directly plugged in. When the device is low on power, the encryption and decryption performance is reduced to save power consumption and extend the device usage time.
[0169] Another aspect of the present application also provides an encryption and decryption device. Fig.13 It is a block diagram of an encryption and decryption device shown in an embodiment of the present application.
[0170] refer to Fig.13 The encryption and decryption device 1300 may include a power detection module 1310 , a parallelism control module 1320 and a parallel encryption and decryption operation module 1330 .
[0171] The power detection module 1310 is configured to detect information related to the remaining power.
[0172] The parallelism control module 1320 is configured to determine the parallelism of the encryption and decryption channels corresponding to the remaining power associated information, and control the on or off of each encryption and decryption channel based on the parallelism of the encryption and decryption channels.
[0173] The parallel encryption and decryption operation module 1330 is configured to perform encryption and decryption using the conducted encryption and decryption channels. Specifically, the modules included in the apparatus 1300 can refer to the relevant contents in the encryption and decryption circuit and encryption and decryption method, which will not be described in detail here.
[0174] Another aspect of the present application provides an electronic device.
[0175] Fig.14 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0176] See also Fig.14 , the electronic device 1400 may include a memory 1410 and a processor 1420. In addition, the electronic device 1400 is also provided with an encryption and decryption circuit.
[0177] The processor 1420 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0178] The memory 1410 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1420 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, an optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1410 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1410 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0179] The memory 1410 stores executable codes, and when the executable codes are processed by the processor 1420 , the processor 1420 may execute part or all of the methods described above.
[0180] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0181] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0182] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. An encryption and decryption circuit, characterized in that: include: A power detection circuit is configured to detect information related to remaining power; a parallelism control circuit, coupled to the power detection circuit, configured to determine the encryption and decryption channel parallelism corresponding to the remaining power associated information, and control the conduction or disconnection of each encryption and decryption channel based on the encryption and decryption channel parallelism, wherein the encryption and decryption channel parallelism is used to characterize the number of encryption and decryption channels participating in encryption and decryption processing in parallel; A parallel encryption and decryption operation circuit, coupled to the parallelism control circuit, configured to perform encryption and decryption using the turned-on encryption and decryption channels; The key length control circuit is coupled to the power detection circuit and the parallel encryption and decryption operation circuit respectively, and is configured to adjust the key length of the encryption and decryption key according to the remaining power associated information, and send the adjusted key to the parallel encryption and decryption operation circuit.
2. The circuit according to claim 1, characterized in that The parallel encryption and decryption operation circuit includes: at least two parallel encryption and decryption channels, at least part of which each includes: A power domain switch, whose input end is coupled to the output end of the parallelism control circuit, and is configured to control the on or off of the encryption and decryption channel where the power domain switch is located; The encryption and decryption sub-circuit is coupled to the power domain switch and is configured to encrypt and decrypt input data when the encryption and decryption channel where the encryption and decryption sub-circuit is located is turned on.
3. The circuit according to claim 2, characterized in that The parallelism control circuit comprises: A first mapping relationship storage unit is configured to store a first mapping relationship between the remaining power association information and the encryption and decryption parallelism; a parallelism determination unit, coupled to the power detection circuit and the first mapping relationship storage unit respectively, and configured to determine the encryption and decryption channel parallelism corresponding to the remaining power association information based on the first mapping relationship; The power domain control unit is coupled to the parallelism determination unit and the power domain switch respectively, and is configured to control the on or off of each power domain switch based on the parallelism of the encryption and decryption channels to control the on or off of the encryption and decryption channels.
4. The circuit according to claim 1, characterized in that Also includes: The encryption and decryption task allocation unit is coupled to each encryption and decryption sub-circuit in the parallel encryption and decryption operation circuit, and is configured to allocate encryption and decryption tasks to the encryption and decryption sub-circuit to encrypt and decrypt input data.
5. The circuit according to claim 1, characterized in that The key length control circuit comprises: a key storage unit configured to store a root key; A second mapping relationship storage unit is configured to store a second mapping relationship between the remaining power association information and the key length; a length determination unit, coupled to the power detection circuit and the second mapping relationship storage unit respectively, and configured to determine a key length corresponding to the remaining power associated information based on the second mapping relationship; The key generating unit is coupled to the length determining unit and the key storing unit respectively, and is configured to generate a key of adjusted length based on the key length and the root key, so that the parallel encryption and decryption operation circuit performs encryption and decryption based on the key of adjusted length.
6. The circuit according to claim 1, characterized in that Also includes: A storage read-write control unit is coupled to the parallel encryption and decryption operation circuit, and is used to control the storage unit to write or read the encrypted and decrypted data from the parallel encryption and decryption operation circuit, and / or the key length, wherein the key length is related to the remaining power association information.
7. The circuit according to claim 6, characterized in that Also includes: The interface mode control circuit is coupled to the storage read-write control unit, configured to couple the storage read-write control unit and the storage unit, and adjust the interface power consumption mode according to the remaining power association information.
8. The circuit according to claim 7, characterized in that The interface mode control circuit comprises: A third mapping relationship storage unit is configured to store a third mapping relationship between the remaining power association information and the encryption and decryption parallelism; a mode determination unit, coupled to the power detection circuit and the third mapping relationship storage unit respectively, and configured to determine an interface power consumption mode corresponding to the remaining power association information based on the third mapping relationship; The interface controller is coupled to the storage read / write control unit and the mode determination unit respectively, and is configured to control the storage unit to write data or read data based on the interface power consumption mode corresponding to the remaining power association information.
9. A mobile platform, characterized in that: include: The encryption and decryption circuit according to any one of claims 1 to 8, used to encrypt and decrypt data based on the remaining power associated information; The processor is coupled to the encryption and decryption circuit and is used for processing the encrypted and decrypted data to control the movement of the mobile platform.
10. The mobile platform according to claim 9, characterized in that: Also includes at least one of the following: A sensor, coupled to the encryption and decryption circuit, configured to send the collected information to the encryption and decryption circuit to generate an encryption and decryption task; A battery, coupled to the encryption and decryption circuit, configured to supply power to at least part of the power-consuming devices of the mobile platform, and the encryption and decryption circuit obtains the information associated with the remaining power of the battery; or The storage unit is coupled to the encryption and decryption circuit and is configured to store encrypted and decrypted data and / or key length.
11. A method for encryption and decryption, characterized in that: include: Detecting information related to remaining power; Determine the encryption and decryption channel parallelism corresponding to the remaining power associated information, and control the conduction or disconnection of each encryption and decryption channel based on the encryption and decryption channel parallelism, wherein the encryption and decryption channel parallelism is used to represent the number of encryption and decryption channels participating in encryption and decryption processing in parallel; Adjusting the key length of the encryption and decryption key according to the remaining power associated information to obtain a key with an adjusted length; Encryption and decryption are performed using the turned-on encryption and decryption channel based on the key with the adjusted length.
12. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to perform the method according to claim 11.
