System, method and computer program for dynamic optimization of cryptographic operations
By dynamically determining the optimal execution environment for cryptographic operations in systems-on-chip, the system optimizes efficiency and security by selecting software, hardware, or their combination based on input data size, addressing inefficiencies and vulnerabilities in existing SoC technologies.
Patent Information
- Application Number
- JP2024092975
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-10-19
- Filing Date
- 2024-06-07
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-06-07
AI Technical Summary
Cryptographic operations in systems-on-chip (SoCs) often run slower in hardware than in software due to varying clock speeds and capabilities, leading to inefficiencies and potential security vulnerabilities.
A system dynamically determines whether to perform cryptographic operations in software, hardware, or a combination of both based on the time required for different sizes of input data, optimizing efficiency and security by selecting the optimal execution environment.
This approach enhances the speed and security of cryptographic operations by dynamically allocating tasks to software, hardware, or their combination, improving overall performance and reliability.
Smart Images

Figure 0007729439000001 
Figure 0007729439000002 
Figure 0007729439000003
Abstract
Description
[Technical Field]
[0001] Systems, methods, and computer programs consistent with example embodiments of the present disclosure relate to systems, methods, and computer programs for dynamic optimization of cryptographic operations. [Background technology]
[0002] Cryptographic operations may refer to operations performed using cryptographic algorithms for data encryption, authentication, and digital signatures. In the prior art, cryptographic operations may be preconfigured to be performed exclusively in software, hardware, or a combination of software and hardware.
[0003] However, the above-described approaches to performing cryptographic operations in the prior art may have at least the following drawbacks.
[0004] In some systems, some cryptographic operations may run faster in hardware than in software, or vice versa. For example, in a system-on-chip (SoC) that offers several integrated hardware accelerators, hardware features, and support capabilities, each hardware feature of the SoC may run operations at different clock speeds based on the different conditions and capabilities of the associated hardware. Therefore, computationally intensive cryptographic operations, such as encrypting large amounts of data, in such an SoC may run slower in hardware than in software.
[0005] Therefore, there is a need to dynamically optimize cryptographic operations by dynamically determining whether to perform the operations in software, hardware, or a combination of software and hardware. Summary of the Invention
[0006] Exemplary embodiments of the present disclosure dynamically optimize cryptographic operations by dynamically determining whether to perform them in software, hardware, or a combination of software and hardware. Thus, exemplary embodiments of the present disclosure improve the efficiency, speed, and security of cryptographic operations.
[0007] According to an embodiment, a system is provided that may include a memory storage that stores computer-executable instructions and at least one processor communicatively coupled to the memory storage, where the at least one processor may be configured to execute instructions to determine an amount of time to perform one or more types of cryptographic operations in system software, system hardware, and a combination of the software and hardware, and to determine, for each of the one or more types of cryptographic operations, whether the each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of the software and hardware based on the determined amount of time to perform the each one of the one or more types of cryptographic operations.
[0008] According to an embodiment, the one or more types of cryptographic operations may include a cryptographic operation that performs an encryption algorithm, a cryptographic operation that performs a decryption algorithm, a cryptographic operation that performs a hash algorithm, a cryptographic operation that performs a derived key algorithm, and a cryptographic operation that performs a generation algorithm.
[0009] According to an embodiment, the amount of time may be determined for each of one or more types of cryptographic operations for multiple sizes of input data.
[0010] According to an embodiment, at least one processor may be configured to execute instructions to determine whether each one of one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware by comparing, for each of the one or more types of cryptographic operations, for each of a plurality of sizes of input data, a first amount of time to perform the respective one of the one or more types of cryptographic operations in software of the system, a second amount of time to perform the respective one of the one or more types of cryptographic operations in hardware, and a third amount of time to perform the respective one of the one or more types of cryptographic operations in a combination of software and hardware, and determining, for each of the one or more types of cryptographic operations, for each of the plurality of sizes of input data, whether each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value.
[0011] According to an embodiment, the at least one processor may be further configured to execute instructions to store a result of the determination of whether a respective one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0012] According to an embodiment, the at least one processor may be further configured to execute instructions to determine whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based on at least the type of cryptographic operation, the size of the input data, and the stored result.
[0013] According to an embodiment, the at least one processor may be further configured to execute instructions for performing cryptographic operations in software, hardware, or a combination of software and hardware under a trusted execution environment (TEE).
[0014] According to an embodiment, a method is provided that may include determining an amount of time for system software, system hardware, and a combination of software and hardware to perform one or more types of cryptographic operations, and determining, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on the determined amount of time for performing the respective one of the one or more types of cryptographic operations.
[0015] According to an embodiment, the one or more types of cryptographic operations may include a cryptographic operation that performs an encryption algorithm, a cryptographic operation that performs a decryption algorithm, a cryptographic operation that performs a hash algorithm, a cryptographic operation that performs a derived key algorithm, and a cryptographic operation that performs a generation algorithm.
[0016] According to an embodiment, the amount of time may be determined for each of one or more types of cryptographic operations for multiple sizes of input data.
[0017] According to an embodiment, determining whether each of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware may include, for each of the one or more types of cryptographic operations, for each of a plurality of sizes of input data, comparing a first amount of time to perform each one of the one or more types of cryptographic operations in software of the system, a second amount of time to perform each one of the one or more types of cryptographic operations in hardware, and a third amount of time to perform each one of the one or more types of cryptographic operations in a combination of software and hardware; and determining, for each of the one or more types of cryptographic operations, for each of the plurality of sizes of input data, whether each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value.
[0018] According to an embodiment, the method may further include storing a result of the determination of whether each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0019] According to an embodiment, the method may further include determining whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based on at least the type of cryptographic operation, the size of the input data, and the stored result.
[0020] According to an embodiment, the method may further include performing the cryptographic operations in software, hardware, or a combination of the software and hardware under a trusted execution environment (TEE).
[0021] According to an embodiment, a non-transitory computer-readable storage medium is provided that stores instructions executable by at least one processor of a system to cause the at least one processor to perform a method that includes determining an amount of time for system software, system hardware, and a combination of software and hardware to perform one or more types of cryptographic operations, and determining, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on the determined amount of time for performing the respective one of the one or more types of cryptographic operations.
[0022] According to an embodiment, the one or more types of cryptographic operations may include a cryptographic operation that performs an encryption algorithm, a cryptographic operation that performs a decryption algorithm, a cryptographic operation that performs a hash algorithm, a cryptographic operation that performs a derived key algorithm, and a cryptographic operation that performs a generation algorithm.
[0023] According to an embodiment, the amount of time may be determined for each of one or more types of cryptographic operations for multiple sizes of input data.
[0024] According to an embodiment, determining whether each of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware may include, for each of the one or more types of cryptographic operations, for each of the plurality of sizes of input data, comparing a first amount of time to perform each one of the one or more types of cryptographic operations in software of the system, a second amount of time to perform each one of the one or more types of cryptographic operations in hardware, and a third amount of time to perform each one of the one or more types of cryptographic operations in a combination of software and hardware; and determining whether, for each of the plurality of sizes of input data, each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value.
[0025] According to an embodiment, the method may further include storing a result of the determination of whether each one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0026] According to an embodiment, the method may further include determining whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based on at least the type of cryptographic operation, the size of the input data, and the stored result.
[0027] Additional aspects will be set forth in part in the description that follows, and in part will be obvious from the description, or may be realized by practice of the presented embodiments of the present disclosure. [Brief explanation of the drawings]
[0028] The features, advantages, and benefits of exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings, in which like numerals refer to like elements and in which:
[0029] [Figure 1] FIG. 1 illustrates a block diagram of an exemplary system configuration for optimizing cryptographic operations, according to one or more embodiments.
[0030] [Figure 2] FIG. 2 illustrates a block diagram of exemplary components in a cryptographic operation optimization (COO) system, according to one or more embodiments.
[0031] [Figure 3] FIG. 3 illustrates a flow diagram of an exemplary method for optimal cryptographic operations, according to one or more embodiments.
[0032] [Figure 4] FIG. 4 illustrates a flow diagram of an exemplary method for determining the amount of time to perform one or more types of cryptographic operations in software, hardware, and a combination of software and hardware, according to one or more embodiments.
[0033] [Figure 5] FIG. 5 shows a flow diagram of an exemplary method for determining whether a type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware, according to one or more embodiments.
[0034] [Figure 6] FIG. 6 shows a flow diagram of an exemplary method for determining whether to perform a cryptographic operation in software, hardware, or a combination of software and hardware, according to one or more embodiments.
[0035] [Figure 7]FIG. 7 illustrates an example of the flow of instructions within a cryptographic operation optimization (COO) system, according to one or more embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0036] The following detailed description of example embodiments refers to the accompanying drawings, in which the same reference numbers in different drawings can identify the same or similar elements.
[0037] While the foregoing disclosure provides illustrations and descriptions, it is not intended to be exhaustive or to limit implementations to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired by practice of the implementations. Furthermore, one or more features or components of one embodiment can be incorporated into or combined with other embodiments (or one or more features of other embodiments). Additionally, in the descriptions of operations provided below, it is understood that one or more operations can be omitted, one or more operations can be added, one or more operations can be performed concurrently (at least in part), and the order of one or more operations can be switched.
[0038] It will be apparent that the systems and / or methods described herein can be implemented in different forms of hardware, firmware, or a combination of hardware and software. The actual specialized control hardware or software code used to implement these systems and / or methods is not a limitation on the implementation. As such, the operation and behavior of the systems and / or methods are described herein without reference to specific software code. It will be understood that software and hardware can be designed to implement the systems and / or methods based on the description herein.
[0039] Although particular combinations of features are recited in the claims and / or disclosed in the specification, these combinations are not intended to limit the disclosure of possible implementations, and in fact many of these features can be combined in ways not disclosed herein.
[0040] No element, act, or instruction used herein should be construed as critical or essential unless expressly stated as such. Also, as used herein, the articles "a" and "an" are intended to include one or more items and can be used interchangeably with "one or more." When only one item is intended, the term "a" or similar language is used. Also, as used herein, terms such as "have," "having," "include," "including," and the like are intended to be open-ended and unrestricted. Furthermore, the phrase "based on" is intended to mean "based at least in part on," unless expressly stated otherwise. Furthermore, phrases such as "at least one of [A] and [B]" or "at least one of [A] or [B]" should be understood to include only A, only B, or both A and B.
[0041] The systems, methods, devices, etc. provided in exemplary embodiments of the present disclosure dynamically optimize cryptographic operations by dynamically determining whether to perform the operations in software, hardware, or a combination of software and hardware.
[0042] According to an embodiment, a system can determine the amount of time to perform a type of cryptographic operation in software, hardware, and a combination of software and hardware, determine whether the type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware, and store the results of such determinations. The system can then determine whether the same type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware based on the stored results.
[0043] Ultimately, exemplary embodiments of the present disclosure dynamically optimize cryptographic operations by dynamically determining whether to perform them in software, hardware, or a combination of software and hardware, thereby improving the efficiency, speed, and security of the cryptographic operations.
[0044] It is contemplated that the features, advantages, and benefits of the above exemplary embodiments are only a part of this disclosure and are not intended to be exhaustive or to limit the scope of the disclosure.
[0045] Further descriptions of the features, components, configuration, operation, and implementation of the threshold tuning system of the present disclosure, according to one or more embodiments, are provided below.
[0046] <System configuration example> 1 illustrates a block diagram of an exemplary system configuration 100 for optimizing cryptographic operations, according to one or more embodiments. As shown in FIG. 1, system configuration 100 may include a Cryptographic Operation Optimization (COO) system 110, hardware 120, and software 130.
[0047] COO system 110 may include a system, platform, module, etc., which may be configured to perform one or more operations or actions to optimize cryptographic operations. According to an embodiment, COO system 110 may be associated with hardware 120 and software 130. According to an embodiment, COO system 110, hardware 120, and software 130 may be included in a system capable of performing cryptographic operations, such as a vehicle capable of performing cryptographic operations, to verify the hardware and software (i.e., hardware 120 and software 130).
[0048] Exemplary operations that may be performed by COO system 110 to optimize cryptographic operations are described below with reference to Figures 3 through 6. Additionally, some exemplary components that may be included in COO system 110, according to one or more embodiments, are described below with reference to Figure 2.
[0049] 2 shows a block diagram of exemplary components in a COO system 200, according to one or more embodiments. COO system 200 may correspond to COO system 110 of FIG. 1, and thus features relating to COO system 110 and COO system 200 may be equally applicable to one another, unless expressly stated otherwise.
[0050] As shown in FIG. 2, COO system 200 may include at least one communication interface 210, at least one processor 220, at least one input / output component 230, and at least one storage 240; however, it may be understood that COO system 200 may include more or fewer components than those shown in FIG. 2 and / or may be configured differently than those shown in FIG. 2 without departing from the scope of the present disclosure.
[0051] The communication interface 210 may include at least one transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, a bus, etc.) that enables the components of the COO system 200 to communicate with each other and / or with one or more components outside of the COO system 200, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections.
[0052] For example, communication interface 210 may couple processor 220 to storage 240, thereby allowing them to communicate and interact with each other as they perform one or more operations.
[0053] According to one or more embodiments, communication interface 210 may include one or more application programming interfaces (APIs) that enable COO system 200 (or one or more components included therein) to communicate with one or more software applications.
[0054] Input / output component 230 may include at least one component that enables COO system 200 to receive information and / or provide output information. In some embodiments, input / output component 230 may include at least one input component (e.g., a touchscreen display, a button, a switch, a microphone, a sensor, etc.) and at least one output component (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.), each of which may be understood to be separate from one another.
[0055] Storage 240 may include one or more storage media suitable for storing data, information, and / or computer-executable instructions therein. According to an embodiment, storage 240 may include at least one memory storage, such as random access memory (RAM), read-only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, and / or optical memory) that stores information and / or instructions for use by processor 220. Additionally or alternatively, storage 240 may include a hard disk (e.g., a magnetic disk, optical disk, magneto-optical disk, and / or solid-state disk), compact disk (CD), digital versatile disk (DVD), floppy disk, cartridge, magnetic tape, and / or another type of non-transitory computer-readable medium, along with a corresponding drive.
[0056] According to an embodiment, storage 240 may be configured to store information such as raw data, metadata, etc. Additionally or alternatively, storage 240 may be configured to store one or more pieces of information related to one or more operations performed by processor 220. For example, storage 240 may store information defining historical operations performed by processor 220 to optimize cryptographic operations, one or more results of operations performed by processor 220, etc. Furthermore, storage 240 may store data or information necessary to optimize cryptographic operations. For example, storage 240 may store at least one calibration file (described below with reference to FIG. 5).
[0057] In some implementations, storage 240 may include multiple storage media, and storage 240 may be configured to store duplicates or copies of at least a portion of the information in the multiple storage media to provide redundancy and to back up the information or associated data. Additionally, storage 240 may also store computer-readable or computer-executable instructions that, when executed by one or more processors (e.g., processor 220), cause the one or more processors to perform one or more acts / operations described herein.
[0058] Processor 220 may include at least one processor that can be programmed or configured to perform the functions or operations described herein. For example, processor 220 may be configured to execute computer-executable instructions stored in at least one storage medium or memory storage (e.g., storage 240, etc.) to thereby perform one or more actions or one or more operations described herein.
[0059] According to an embodiment, processor 220 may be configured to receive one or more signals and / or one or more user inputs (e.g., via communications interface 210, input / output component 230, etc.) that define one or more instructions for performing one or more operations. Furthermore, processor 220 may be implemented in hardware, firmware, or a combination of hardware and software. For example, processor 220 may include at least one of a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), and / or another type of processing or computing component.
[0060] According to an embodiment, processor 220 may be configured to collect, extract, and / or receive one or more pieces of information (e.g., in the form of signals or data) and process the received one or more pieces of information to thereby optimize cryptographic operations.
[0061] A description of some exemplary operations that may be performed by processor 220 is provided below with reference to FIGS.
[0062] <Example of operation for optimizing cryptographic operations in this disclosure> Some exemplary operations that can be performed by the COO system of the present disclosure are described below with reference to FIGS.
[0063] 3 shows a flow diagram of an example method 300 for optimal cryptographic operations, according to one or more embodiments. One or more operations in method 300 may be performed by at least one processor (e.g., processor 220) of the COO system.
[0064] As shown in FIG. 3, in operation S310, at least one processor may be configured to determine an amount of time to perform one or more types of cryptographic operations in software, hardware, and a combination of software and hardware.
[0065] According to an embodiment, a cryptographic operation may refer to an operation that performs a type of encryption algorithm, such as a cryptographic algorithm, a decryption algorithm, a hashing algorithm, a derived key algorithm, a generation algorithm, etc. For example, a cryptographic operation that performs a cryptographic algorithm may receive input data and encrypt such input data to provide encrypted data.
[0066] Thus, according to an embodiment, the one or more types of cryptographic operations may include a cryptographic operation that performs an encryption algorithm, a cryptographic operation that performs a decryption algorithm, a cryptographic operation that performs a hash algorithm, a cryptographic operation that performs a derived key algorithm, a cryptographic operation that performs a generation algorithm, etc.
[0067] According to embodiments, software and hardware may refer to software and hardware associated with a COO system, which may be included in a system capable of performing cryptographic operations. For example, the COO system may be included in a vehicle, and hardware may refer to a core processing unit (CPU) or hardware functionality of a system on chip (SoC) within the vehicle, and software may refer to software libraries installed on such hardware. It may be understood that cryptographic operations may be performed in such a vehicle, for example, to enable and establish use of components installed in the vehicle. Thus, it should be understood that at least one processor may be configured to determine the amount of time to perform one or more types of cryptographic operations based on the software and hardware currently installed in the vehicle.
[0068] It will be appreciated that the time to perform a cryptographic operation may vary depending at least on the type of cryptographic operation, the size of the input data processed by the cryptographic operation, and where the cryptographic operation is being performed (i.e., software, hardware, and a combination of software and hardware).
[0069] Thus, according to embodiments, at least one processor may be configured to determine an amount of time to perform each of one or more types of cryptographic operations in software, an amount of time to perform each of one or more types of cryptographic operations in hardware, and an amount of time to perform each of one or more types of cryptographic operations in a combination of software and hardware. According to embodiments, the amount of time may be determined for each of one or more types of cryptographic operations for multiple sizes of input data. Example operations for determining the amount of time to perform one or more types of cryptographic operations are described below with reference to FIG. 4.
[0070] For cryptographic operations performed in a combination of software and hardware, it may be understood that certain functions of the cryptographic operations may be divided between software and hardware as needed. For example, in the case of AES-CCM, block chaining may be performed in software, while hardware may be used for AES. The method then proceeds to operation S320.
[0071] In operation S320, the at least one processor may be configured to determine whether the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware. According to embodiments, the at least one processor may be configured to determine, for each of the one or more types of cryptographic operations, whether each of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on the determined amount of time to perform each of the one or more types of cryptographic operations. According to embodiments, the at least one processor may be configured to determine, for each of the one or more types of cryptographic operations for a plurality of sizes of input data, whether each of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on the determined amount of time to perform each of the one or more types of cryptographic operations.
[0072] For example, based on the determined amount of time for performing the cryptographic operations that perform the encryption algorithm in software, hardware, and a combination of software and hardware (i.e., the amount of time determined in operation S310), the at least one processor may be configured to determine that the cryptographic operations that perform the encryption algorithm should be performed in software.
[0073] Similarly, for example, based on the determined amount of time (i.e., the amount of time determined in operation S310) to perform a cryptographic operation that performs an encryption algorithm on input data of 10 megabytes in size in software, hardware, and a combination of software and hardware, the at least one processor may be configured to determine that the cryptographic operation that performs an encryption algorithm on input data of 10 megabytes in size should be performed in software.
[0074] Below, with reference to FIG. 5, an example of an operation for determining the type of cryptographic operation in software, hardware, or a combination of software and hardware will be described.
[0075] After performing operation S320, method 300 may end. Alternatively, method 300 may return to operation S310 such that at least one processor may iteratively, over at least a predetermined period of time, determine (in operation S310) an amount of time to perform one or more types of cryptographic operations and determine (in operation S320) whether the types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0076] For example, if the vehicle's hardware is changed, the amount of time to perform one or more types of cryptographic operations (determined based on the previous hardware) may no longer be accurate for the vehicle with the new hardware. Thus, the at least one processor may resume determining (in operation S310) the amount of time to perform one or more types of cryptographic operations and determining (in operation S320) whether the types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0077] While the above description relates to evaluating the speed (i.e., amount of time) to perform a cryptographic operation, it will be appreciated that other parameters related to cryptographic operations, such as accuracy, collision resistance, etc., may also be evaluated.
[0078] Exemplary Operations for Determining the Amount of Time to Perform One or More Cryptographic Operations in the Present Disclosure 4 shows a flow diagram of an example method 400 for determining the amount of time to perform one or more types of cryptographic operations in software, hardware, and a combination of software and hardware, according to one or more embodiments. One or more operations of method 400 may be part of operation S310 of method 300 and may be performed by at least one processor (e.g., processor 220) of the COO system.
[0079] 4, in operation S410, the at least one processor may be configured to perform a plurality of tests. According to an embodiment, the at least one processor may be configured to perform the plurality of tests by performing one or more types of cryptographic operations each with multiple sizes of input data in software, performing one or more types of cryptographic operations each with multiple sizes of input data in hardware, and performing one or more types of cryptographic operations each with multiple sizes of input data in a combination of software and hardware.
[0080] According to an embodiment, each of the one or more types of cryptographic operations may be performed using blocks of data of different sizes ranging from very small to very large, where a uniform block size is used first, then a non-uniform block size is used, etc. According to an embodiment, the multiple sizes of input data may include input data sizes that increase in increments of 1 megabyte (e.g., input data may have sizes in increments of 1 megabyte, such as 1 megabyte, 2 megabytes, 3 megabytes, etc.).
[0081] For example, the at least one processor may be configured to perform cryptographic operations that perform an encryption algorithm in software with 1 megabyte of input data, and then repeat the process while increasing the size of the input data in increments of 1 megabyte. The at least one processor may be configured to perform cryptographic operations that perform an encryption algorithm in a similar manner in hardware and in a combination of software and hardware. The at least one processor may then repeat the process for each of one or more types of cryptographic operations. The method then proceeds to operation S420.
[0082] It may be understood that the at least one processor may also be configured to obtain any additional data needed to perform the test. For example, the at least one processor may be configured to obtain a configuration file specifying a hardware application programming interface (API) list containing parameters specifying what types of cryptographic operations can be performed by the system's hardware. The hardware API list may be provided by the hardware manufacturer. As another example, the at least one processor may be configured to obtain a list of what software libraries support as part of the software installation.
[0083] In operation S420, the at least one processor may be configured to determine an amount of time to perform one or more types of cryptographic operations. According to embodiments, the at least one processor may be configured to: determine in software an amount of time to perform each of the one or more types of cryptographic operations using input data of multiple sizes; determine in hardware an amount of time to perform each of the one or more types of cryptographic operations using input data of multiple sizes; and determine in a combination of software and hardware an amount of time to perform each of the one or more types of cryptographic operations using input data of multiple sizes. According to embodiments, the at least one processor may be configured in operation S410 to determine the amount of time to perform each of the one or more types of cryptographic operations using multiple sizes by measuring the amount of time to perform each one of the one or more types of cryptographic operations using input data of multiple sizes.
[0084] For example, after at least one processor performs cryptographic operations performing an encryption algorithm in software on one megabyte of input data in operation S410, the at least one processor may be configured to measure the amount of time to perform the cryptographic operations performing an encryption algorithm in software on one megabyte of input data. The at least one processor may then repeat the process when the cryptographic operations performing the encryption algorithm are performed with increasing megabyte sizes of input data, and when the cryptographic operations performing the encryption algorithm are performed in hardware and in a combination of software and hardware. The at least one processor may then repeat the process for each of one or more types of cryptographic operations.
[0085] According to embodiments, the at least one processor may be configured to generate (plot) one or more graphs based on the determined amount of time. According to embodiments, the one or more graphs may identify a relationship between the amount of time to perform each of the one or more types of cryptographic operations and multiple sizes of input data in software, a relationship between the amount of time to perform each of the one or more types of cryptographic operations and multiple sizes of input data in hardware, and a relationship between the amount of time to perform each of the one or more types of cryptographic operations and multiple sizes of input data in a combination of software and hardware.
[0086] For example, the at least one processor may be configured to create a graph for cryptographic operations that implement an encryption algorithm in software, where such graph may indicate an amount of time to perform the cryptographic operations that implement the encryption algorithm in software versus an input data size, and the at least one processor may be configured to calculate an equation for the plotted graph.
[0087] Exemplary Operations for Determining Whether Types of Cryptographic Operations Should Be Performed in Software, Hardware, or a Combination of Software and Hardware in the Present Disclosure 5 shows a flow diagram of an example method 500 for determining whether a type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware, according to one or more embodiments. One or more operations of method 500 may be part of operation S320 of method 300 and may be performed by at least one processor of the COO system (e.g., processor 220).
[0088] 5, in operation S510, the at least one processor may be configured to compare amounts of time to perform one or more cryptographic operations in software, hardware, and a combination of software and hardware. According to an embodiment, the amounts of time to perform the one or more cryptographic operations may refer to the amount of time determined in operation S420 in method 400.
[0089] According to an embodiment, the at least one processor may be configured to compare, for each of one or more types of cryptographic operations for input data of multiple sizes, a first amount of time to perform each one of the one or more types of cryptographic operations in the system's software, a second amount of time to perform each one of the one or more types of cryptographic operations in hardware, and a third amount of time to perform each one of the one or more types of cryptographic operations in a combination of software and hardware.
[0090] For example, after performing operations S410 and S420 in method 400, the at least one processor may determine that the time to perform a cryptographic operation that performs an encryption algorithm using 1 megabyte of input data in software (i.e., a first amount of time) is 10 seconds, the time to perform a cryptographic operation that performs an encryption algorithm using 1 megabyte of input data in hardware (i.e., a second amount of time) is 20 seconds, and the time to perform a cryptographic operation that performs an encryption algorithm using 1 megabyte of input data in a combination of software and hardware (i.e., a third amount of time) is 15 seconds. Subsequently, the at least one processor may be configured to compare the 10 seconds, 20 seconds, and 15 seconds with each other. The at least one processor may then repeat the process for one or more types of cryptographic operations for each of a plurality of sizes of input data. The method then proceeds to operation S520.
[0091] In operation S520, the at least one processor may be configured to determine whether one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware. According to an embodiment, the at least one processor may be configured to determine whether the types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on the first amount of time, the second amount of time, and the third amount of time. According to an embodiment, the at least one processor may be configured to determine, for each of the one or more types of cryptographic operations for input data of multiple sizes, whether a respective one of the one or more types of cryptographic operations should be performed in software, hardware, or a combination of software and hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value.
[0092] For example, the at least one processor may be configured to determine whether a cryptographic operation performing an encryption algorithm with 1 megabyte of input data should be performed in software, hardware, or a combination of software and hardware based on which of 10 seconds (i.e., a first time amount), 20 seconds (i.e., a second time amount), and 15 seconds (i.e., a third time amount) has the lowest value. Thus, because the first time amount has the lowest value, the at least one processor may be configured to determine that the cryptographic operation performing the encryption algorithm with 1 megabyte of input data should be performed in software. The at least one processor may then repeat the process for each of the one or more types of cryptographic operations for each of the multiple sizes of input data. The method then proceeds to operation S530.
[0093] In operation S530, the at least one processor may be configured to store the result of the determination (i.e., the determination made in operation S520) in a memory of the system. According to an embodiment, the at least one processor may be configured to store the result of the determination in a calibration file. It should be understood that a calibration file may refer to a file containing calibration parameters to be input into the compiled software as defined in the ISO 26262 standard.
[0094] For example, the at least one processor may be configured to specify in a calibration file that cryptographic operations performing an encryption algorithm with 1 megabyte of input data should be performed in software, that cryptographic operations performing an encryption algorithm with 5 megabytes of input data should be performed in hardware, that cryptographic operations performing an encryption algorithm with 1 megabyte of input data should be performed in software, etc.
[0095] To this end, the COO system can determine the optimal location for performing cryptographic operations in a safety-critical manner, taking into account the currently installed hardware and software, the type of cryptographic operation, and the size of the input data. Additionally, the COO system can also define an upper bound on execution time based on stored results.
[0096] Exemplary Operations for Determining Whether to Perform a Cryptographic Operation in Software, Hardware, or a Combination of Software and Hardware in the Present Disclosure 6 shows a flow diagram of an example method 600 for determining whether to perform a cryptographic operation in software, hardware, or a combination of software and hardware, according to one or more embodiments. One or more operations of method 600 may be performed after method 300 and may be performed by at least one processor of the COO system (e.g., processor 220).
[0097] 6, at operation S610, at least one processor may be configured to receive instructions to perform a cryptographic operation on input data. According to an embodiment, the at least one processor may be configured to receive the instructions to perform the cryptographic operation, such as from a user device associated with the COO system or a server. For example, a user may provide instructions to encrypt data. The method then proceeds to operation S620.
[0098] In operation S620, the at least one processor may be configured to determine a type of cryptographic operation and a size of the input data. For example, the at least one processor may be configured to determine that the type of cryptographic operation (performed in accordance with the instruction received in operation S610) is a cryptographic operation that performs an encryption algorithm, and that the size of the input data is 1 megabyte.
[0099] It should be understood that the at least one processor may also be configured to determine any additional parameters associated with performing the cryptographic operations, such as security associations. It should also be understood that each of the one or more types of cryptographic operations may have a ranking score comprising complexity, security protocol, library support, hardware support, proprietary implementation, etc. The method then proceeds to operation S630.
[0100] In operation S630, the at least one processor may be configured to determine whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware. According to an embodiment, the at least one processor may be configured to determine whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based on at least the type of cryptographic operation and the size of the input data determined in operation S620 and the results stored in memory in operation S530 of method 500.
[0101] For example, if the type of cryptographic operation (performed pursuant to the instruction received in operation S610) is a cryptographic operation that performs an encryption algorithm and the size of the input data is 1 megabyte, then if the calibration file (i.e., the stored results) specifies that the cryptographic operation that performs the encryption algorithm with 1 megabyte of input data should be performed in software, then the at least one processor may be configured to determine that the cryptographic operation should be performed in software. The method then proceeds to operation S640.
[0102] In operation S640, the at least one processor may be configured to perform the cryptographic operation in software, hardware, or a combination of software and hardware. According to an embodiment, the at least one processor may be configured to perform the cryptographic operation in software, hardware, or a combination of software and hardware based on the determination of operation S630.
[0103] For example, if the at least one processor determines in operation S630 that the cryptographic operation is to be performed in software, the at least one processor may be configured to perform the cryptographic operation in software.
[0104] It may be appreciated that cryptographic operations may be performed under a Trusted Execution Environment (TEE) so that data or keys are not exposed to the normal world operating system.
[0105] Furthermore, according to an embodiment, the at least one processor may be configured to determine whether to execute a cryptographic operation in software, hardware, or a combination of software and hardware, additionally based on the ranking score, the maximum size of input data supported by the hardware, and the safety impact (maximum execution time) associated with the cryptographic operation. For example, a cryptographic operation with a small input size that needs to be AES may be executed in hardware because hardware is the best choice, while the same cryptographic operation with a larger input size may be executed in software due to the maximum execution time constraint. Thus, the COO system may determine the optimal location for executing a cryptographic operation based on worst-case execution time, thereby relating this safety.
[0106] Example Flow of Instructions in This Disclosure FIG. 7 illustrates an example of the flow of instructions within a COO system, according to one or more embodiments.
[0107] As shown in Figure 7, operating system functions can be configured to send instructions to a Trusted Execution Environment (TEE) driver to optimize cryptographic operations given the currently installed hardware and software. In particular, cryptographic operations must be performed reliably and securely, using the TEE provided by ARM v8 and forward-compliant hardware. TEE is a special mode present in, for example, ARM-compliant processors (equivalent technologies are Intel SGX or Microsoft's Pluton Core) that allows the associated system-on-chip (SoC) to support any number and type of cryptographic operations without requiring specific hardware accelerators.
[0108] In an ARM-compliant processor, when a command is executed within the TEE, the processor performs a context switch to a higher privileged mode, and once the command is executed, the response is signed (certified) by the operating system running in the TEE and returned to the calling function.
[0109] In particular, the trusted execution environment driver can send instructions to its encryption / decryption middleware, which can be aware of the hardware and software context, and which is configured to obtain and read data from calibration and configuration (e.g., calibration and / or configuration files) to determine the amount of time to perform cryptographic operations in software, hardware, and a combination of software and hardware, and whether the cryptographic operations should be performed in software, hardware, or a combination of software and hardware.
[0110] <Various Aspects of the Embodiments> While the above disclosure provides illustration and description, it is not intended to be exhaustive or to limit the implementations to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of the implementations.
[0111] Some embodiments may relate to systems, methods, and / or computer-readable media at any possible level of technical detail of integration. Furthermore, one or more of the above components described above may be implemented as instructions stored on a computer-readable medium and executable by at least one processor (and / or may include at least one processor). The computer-readable medium may include a computer-readable non-transitory storage medium having computer-readable program instructions for causing a processor to perform operations.
[0112] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. The computer-readable storage medium can be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves having instructions recorded thereon, and any suitable combination of the above. Computer-readable media, as used herein, should not be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.
[0113] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or can be downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within each computing / processing device.
[0114] The computer-readable program code / instructions for performing operations may be either source code or object code written in any combination of one or more programming languages, including assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or object-oriented programming languages such as Smalltalk, C++, etc., and procedural programming languages such as the "C" programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, partially on the user's computer as a standalone software package and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can execute computer-readable program instructions by utilizing state information in the computer-readable program instructions to personalize the electronic circuitry to perform aspects or operations.
[0115] These computer-readable program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to fabricate a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram blocks. These computer-readable program instructions can also be stored on a computer-readable storage medium that can instruct a computer, programmable data processing apparatus, and / or other apparatus to function in a particular manner, such that the computer-readable storage medium having stored thereon instructions comprises an article of manufacture containing instructions that implement aspects of the functions / acts specified in the flowchart and / or block diagram blocks.
[0116] The computer-readable program instructions can also be loaded into a computer, other programmable data processing device, or other device to cause a series of operational steps to be performed on the computer, other programmable device, or other device to generate a computer-implemented process such that the instructions, executed on the computer, other programmable device, or other device, implement the functions / acts specified in the flowchart and / or block diagram blocks.
[0117] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer-readable media according to various embodiments. In this regard, each block in a flowchart or block diagram may represent a microservice module, segment, or portion of an instruction, which comprises one or more executable instructions for implementing the specified logical function. The method, computer system, and computer-readable media may include additional, fewer, different, or differently arranged blocks than shown in FIG. 1. In some alternative implementations, the functions shown in the blocks may occur in a different order than shown in the figures. For example, two blocks shown in succession may actually be executed concurrently or substantially concurrently, or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block in the block diagram and / or flowchart illustrations, and combinations of blocks in the block diagram and / or flowchart illustrations, may be implemented by special-purpose hardware-based systems that perform the specified functions or operations and execute a combination of special-purpose hardware and computer instructions.
[0118] The systems and / or methods described herein may be implemented in different forms of hardware, firmware, or a combination of hardware and software. The actual specialized control hardware or software code used to implement these systems and / or methods is not intended to limit the implementation. As such, the operation and behavior of the systems and / or methods have been described herein without reference to specific software code, and it will be understood that software and hardware can be designed to implement the systems and / or methods based on the descriptions herein.
[0119] It will be appreciated that numerous modifications and variations of the present disclosure are possible in light of the above teachings. It will be apparent that, within the scope of the appended clauses, the present disclosure may be practiced otherwise than as specifically described herein.
Claims
1. memory storage for storing computer-executable instructions; at least one processor communicatively coupled to the memory storage; A system comprising: The at least one processor determining an amount of time for one or more cryptographic operations to be performed by the system software, the system hardware, and the combination of the software and the hardware; configured to execute the instructions to determine, for each of the one or more types of cryptographic operations, whether each one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on the determined amount of time to perform each one of the one or more types of cryptographic operations; the amount of time is determined for each of the one or more types of cryptographic operations for a plurality of sizes of input data; The at least one processor for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, comparing a first amount of time to perform the respective one of the one or more types of cryptographic operations with the software of the system, a second amount of time to perform the respective one of the one or more types of cryptographic operations with the hardware, and a third amount of time to perform the respective one of the one or more types of cryptographic operations with the combination of the software and the hardware; for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, determining whether a respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value; configured to execute the instructions to determine whether a respective one of the one or more types of cryptographic operations should be performed by the software, the hardware, or a combination of the software and the hardware. system.
2. the one or more types of cryptographic operations include: a cryptographic operation that performs an encryption algorithm; a cryptographic operation that performs a decryption algorithm; a cryptographic operation that performs a hash algorithm; a cryptographic operation that performs a derived key algorithm; and a cryptographic operation that performs a generation algorithm. The system of claim 1 .
3. The at least one processor further configured to execute the instructions to store a result of a determination whether a respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware.
3. The system according to claim 1 or 2.
4. The at least one processor further configured to execute the instructions to determine whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware based on at least the type of cryptographic operation, the size of input data, and the stored result. The system of claim 3.
5. The at least one processor configured to execute the instructions to further perform cryptographic operations with the software, the hardware, or a combination of the software and the hardware under a trusted execution environment (TEE).
3. The system according to claim 1 or claim 2.
6. determining an amount of time for the system's software, the system's hardware, and the combination of the software and the hardware to perform one or more cryptographic operations; determining, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on the determined amount of time to perform the respective one of the one or more types of cryptographic operations; Including, the amount of time is determined for each of the one or more types of cryptographic operations for a plurality of sizes of input data; Determining whether each of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware includes: for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, comparing a first amount of time to perform the respective one of the one or more types of cryptographic operations in the software of the system, a second amount of time to perform the respective one of the one or more types of cryptographic operations in the hardware, and a third amount of time to perform the respective one of the one or more types of cryptographic operations in the combination of the software and the hardware; determining, for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value; A method comprising:
7. the one or more types of cryptographic operations include: a cryptographic operation that performs an encryption algorithm; a cryptographic operation that performs a decryption algorithm; a cryptographic operation that performs a hash algorithm; a cryptographic operation that performs a derived key algorithm; and a cryptographic operation that performs a generation algorithm; The method of claim 6.
8. storing a result of the determination whether each one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware.
8. The method according to claim 6 or 7.
9. determining whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware based on at least the type of cryptographic operation, the size of input data, and the stored result; The method of claim 8.
10. further performing cryptographic operations with the software, the hardware, or a combination of the software and the hardware under a trusted execution environment (TEE).
8. The method according to claim 6 or 7.
11. A non-transitory computer-readable storage medium having instructions executable by at least one processor, comprising: the at least one processor; determining the amount of time to perform one or more cryptographic operations using the system's software, the system's hardware, and the combination of the software and the hardware; determining, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on the determined amount of time to perform the respective one of the one or more types of cryptographic operations; performing a method including the amount of time is determined for each of the one or more types of cryptographic operations for a plurality of sizes of input data; Determining whether each of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware includes: for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, comparing a first amount of time to perform the respective one of the one or more types of cryptographic operations in the software of the system, a second amount of time to perform the respective one of the one or more types of cryptographic operations in the hardware, and a third amount of time to perform the respective one of the one or more types of cryptographic operations in the combination of the software and the hardware; determining, for each of the plurality of sizes of input data, for each of the one or more types of cryptographic operations, whether the respective one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware based on which of the first amount of time, the second amount of time, and the third amount of time has the lowest value; Including, A non-transitory computer-readable recording medium.
12. the one or more types of cryptographic operations include: a cryptographic operation that performs an encryption algorithm; a cryptographic operation that performs a decryption algorithm; a cryptographic operation that performs a hash algorithm; a cryptographic operation that performs a derived key algorithm; and a cryptographic operation that performs a generation algorithm; 12. The non-transitory computer-readable storage medium of claim 11.
13. storing a result of the determination whether each one of the one or more types of cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware.
13. The non-transitory computer-readable storage medium of claim 11 or 12.
14. determining whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware based on at least the type of cryptographic operation, the size of input data, and the stored result; 14. The non-transitory computer-readable storage medium of claim 13.
Citation Information
Patent Citations
Encryption device and encryption / Decryption processing method
JP2003069555A
Network security processing method and system for selecting either a software or hardware cryptographic module based on multimedia session information.
JP2010507266A
Cryptography processor
JP2019096045A
Encryption device, decryption device, encryption method, and decryption method
WO2008018318A1