System, method and computer program for dynamic optimization of cryptographic operations

By configuring a processor in the system to determine the execution location of the password operation in software, hardware or software and hardware combination, the problem of different execution efficiency of the password operation in the prior art is solved, and the efficiency, speed and security of the password operation are improved.

CN119862586APending Publication Date: 2025-04-22TOYOTA JIDOSHA KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411459137.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-10-19
Filing Date
2024-10-18
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, the execution efficiency of cryptographic operations in hardware and software is different, resulting in hardware execution slower than software execution in some cases, and requires dynamically determining the execution location to optimize cryptographic operations.

Method used

By configuring a processor in the system to determine the execution location of the password operation in software, hardware, or software and hardware combination, dynamically optimize the amount of execution time of the password operation.

Benefits of technology

Improves the efficiency, speed and security of password operations, and dynamically determines the execution location to adapt to the needs of different input data sizes and password operation types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862586A_ABST
    Figure CN119862586A_ABST
Patent Text Reader

Abstract

This disclosure provides systems, methods, and apparatus for optimizing cryptographic operations. According to an embodiment, a system may include: a storage storing instructions executable by a computer; and at least one processor communicatively coupled to the storage, the at least one processor may be configured to execute instructions for: determining an amount of time for performing one or more cryptographic operations in software of the system, hardware of the system, and a combination of software and hardware; and deciding, for each of the one or more cryptographic operations, which one of the one or more cryptographic operations should be performed in the software, hardware, or a combination of software and hardware, based on the decided amount of time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The system, method, and computer-readable recording medium integrated with the exemplary embodiments of the present disclosure relate to a system, method, and computer-readable recording medium for dynamic optimization of cryptographic operations. Background Art

[0002] Cryptographic operations may refer to operations performed to use cryptographic algorithms for data encryption, authentication, and digital signatures. In the prior art, cryptographic operations may be pre-configured to be performed entirely in software, hardware, or a combination of software and hardware.

[0003] However, the above-mentioned approaches for performing cryptographic operations in the prior art may have at least the following disadvantages.

[0004] In some systems, there may be situations where some cryptographic operations are performed faster in hardware than in software, or vice versa. For example, in a System On Chip (SoC) that provides several integrated hardware accelerators, hardware features, and support capabilities, each hardware feature of the SoC may perform operations at different clock speeds based on different conditions and capabilities of the associated hardware. Therefore, computationally intensive cryptographic operations such as encryption of large amounts of data in such an SoC may be slower when performed in hardware than when performed in software.

[0005] Therefore, there is a need to dynamically optimize cryptographic operations by dynamically deciding whether to perform cryptographic operations in software, hardware, or a combination of software and hardware. Summary of the invention

[0006] The exemplary embodiments of the present disclosure dynamically optimize cryptographic operations by dynamically deciding whether to perform cryptographic operations in software, hardware, or a combination of software and hardware. Therefore, the exemplary embodiments of the present disclosure improve the efficiency, speed, and security of cryptographic operations.

[0007] According to an embodiment, a system is provided. The system may include: a storage device storing instructions executable by a computer; and at least one processor coupled to the storage device in a communicable manner, wherein the at least one processor may be configured to execute instructions for the following processing: determining an amount of time for performing one or more cryptographic operations in software of the system, hardware of the system, or a combination of software and hardware; and for each of the one or more cryptographic operations, determining in which of the software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

[0008] According to an embodiment, the one or more cryptographic operations may include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

[0009] According to an embodiment, the amount of time may be determined for each of one or more cryptographic operations for multiple sizes of input data.

[0010] According to an embodiment, at least one processor may be configured to execute instructions for determining in which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be executed by the following processing: for each of a plurality of sizes of input data, for each of the one or more cryptographic operations, comparing a first amount of time, a second amount of time, and a third amount of time, wherein the first amount of time is the amount of time used to execute each of the one or more cryptographic operations in software of the system, the second amount of time is the amount of time used to execute each of the one or more cryptographic operations in hardware, and the third amount of time is the amount of time used to execute each of the one or more cryptographic operations in a combination of software and hardware; and for each of a plurality of sizes of input data, for each of the one or more cryptographic operations, determining in which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be executed based on which of the first amount of time, the second amount of time, and the third amount of time has a lowest value.

[0011] According to an embodiment, at least one processor may be further configured to execute instructions for storing results of the determination of which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be performed.

[0012] According to an embodiment, at least one processor may be further configured to execute instructions for the following processing: determining whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based at least on the type of the cryptographic operation, the size of the input data, and the stored result.

[0013] According to an embodiment, at least one processor may be further configured to execute instructions for the following processing: 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. The method may include: determining an amount of time for performing one or more cryptographic operations in software of a system, hardware of the system, or a combination of software and hardware; and for each of the one or more cryptographic operations, determining in which of the software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

[0015] According to an embodiment, the one or more cryptographic operations may include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

[0016] According to an embodiment, the amount of time may be determined for each of one or more cryptographic operations for multiple sizes of input data.

[0017] According to an embodiment, the process of determining in which of software, hardware, or a combination of software and hardware each of one or more cryptographic operations should be executed may include: for each of multiple sizes of input data, according to each of the one or more cryptographic operations, comparing a first amount of time, a second amount of time, and a third amount of time, wherein the first amount of time is the amount of time used to execute each of the one or more cryptographic operations in software of the system, the second amount of time is the amount of time used to execute each of the one or more cryptographic operations in hardware, and the third amount of time is the amount of time used to execute each of the one or more cryptographic operations in a combination of software and hardware; and for each of multiple sizes of input data, for each of the one or more cryptographic operations, determining in which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be executed based on which of the first amount of time, the second amount of time, and the third amount of time has a lowest value.

[0018] According to an embodiment, the method may further include storing the result of the decision whether each of the one or more 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: deciding whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based at least on the type of the cryptographic operation, the size of the input data, and the stored result.

[0020] According to an embodiment, the method may further include: performing 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 recording medium is provided. The non-transitory computer-readable recording medium records instructions executable by at least one processor of a system, the instructions causing the at least one processor to perform a method including the following processes: determining an amount of time for performing one or more cryptographic operations in software of the system, hardware of the system, or a combination of software and hardware; and for each of the one or more cryptographic operations, determining in which of the software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

[0022] According to an embodiment, the one or more cryptographic operations may include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

[0023] According to an embodiment, the amount of time may be determined for each of one or more cryptographic operations for multiple sizes of input data.

[0024] According to an embodiment, the process of determining in which of software, hardware, or a combination of software and hardware each of one or more cryptographic operations should be executed may include: for each of multiple sizes of input data, for each of the one or more cryptographic operations, comparing a first amount of time, a second amount of time, and a third amount of time, wherein the first amount of time is the amount of time used to execute each of the one or more cryptographic operations in software of the system, the second amount of time is the amount of time used to execute each of the one or more cryptographic operations in hardware, and the third amount of time is the amount of time used to execute each of the one or more cryptographic operations in a combination of software and hardware; and for each of multiple sizes of input data, for each of the one or more cryptographic operations, determining in which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be executed based on which of the first amount of time, the second amount of time, and the third amount of time has a lowest value.

[0025] According to an embodiment, the method may further include storing the result of the decision whether each of the one or more 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: deciding whether to perform the cryptographic operation in software, hardware, or a combination of software and hardware based at least on the type of the cryptographic operation, the size of the input data, and the stored result.

[0027] Additional aspects are described in part in the description that follows and, in part, are obvious from the description, or may be achieved by practice of the presented embodiments of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Hereinafter, features, advantages, and significance of exemplary embodiments of the present disclosure will be described with reference to the accompanying drawings in which the same reference numerals represent the same elements.

[0029] Figure 1 A block diagram illustrating an exemplary system configuration for optimizing cryptographic operations in accordance with one or more embodiments.

[0030] Figure 2 A block diagram showing exemplary components of a Cryptographic Operation Optimization (COO) system according to one or more embodiments.

[0031] Figure 3 A flow chart illustrating an exemplary method for optimizing cryptographic operations in accordance with one or more embodiments.

[0032] Figure 4 A flow chart representing an exemplary method for determining an amount of time to perform one or more cryptographic operations in software, hardware, or a combination of software and hardware in accordance with one or more embodiments.

[0033] Figure 5 A flow chart illustrating an exemplary method for determining whether a type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware in accordance with one or more embodiments.

[0034] Figure 6 A flow chart illustrating an exemplary method for determining whether to perform cryptographic operations in software, hardware, or a combination of software and hardware in accordance with one or more embodiments.

[0035] Figure 7 An example of a flow of instructions within a cryptographic operations optimization (COO) system representing one or more embodiments. DETAILED DESCRIPTION

[0036] The following detailed description of the embodiments as examples refers to the attached drawings. The same reference numerals in different drawings may identify the same or similar elements.

[0037] The foregoing disclosure provides examples and descriptions, but is not intended to be exhaustive, and in addition, it is not intended to limit the implementation form to the accurate form disclosed. If the above disclosure is considered, modifications and deformations are possible, or can be obtained through the practice of the implementation form. Moreover, one or more features or components (constituent elements) of an embodiment may be incorporated into another embodiment (or one or more features of another embodiment), or may be combined therewith. In addition, it is understood that in the description of the operations provided below, one or more operations may be omitted, one or more operations may be added, one or more operations may be (at least partially) performed simultaneously, and the order of one or more operations may be swapped.

[0038] It is obvious that the system and / or method described in this article 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 restriction on the implementation form. Therefore, in this article, the actions and behaviors of the system and / or method are not described with reference to specific software codes. It is understood that software and hardware can be designed to implement the system and / or method based on the description in this article.

[0039] The particular combination of features is described in detail in the claims and / or disclosed in the specification, but these combinations are not intended to limit the disclosure of possible implementation forms. In fact, many of these features can be combined in a way that is not disclosed in this specification.

[0040] As long as it is not so clearly stated, any element, action or instruction used in this article should not be interpreted as critical or essential. In addition, as used in this article, the article "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 meant, the term "one" or similar language is used. In addition, as used in this article, the terms such as "have", "having", "include", "including", etc. are meant to be open terms that are not restricted. Moreover, as long as it is not clearly stated that it is not so, the phrase such as "based on" means "at least partially based on...". Moreover, such expressions 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 system, method, device, etc. provided in the exemplary embodiments of the present disclosure dynamically optimizes cryptographic operations by dynamically deciding whether to perform cryptographic operations in software, hardware, or a combination of software and hardware.

[0042] According to an embodiment, the system may determine the amount of time used to perform a type of cryptographic operation in software, hardware, or a combination of software and hardware, determine in which of the software, hardware, or a combination of software and hardware the type of cryptographic operation should be performed, and store the results of such determination. Thereafter, the system may determine whether the same type of cryptographic operation should be performed in which of the software, hardware, or a combination of software and hardware based on the stored results.

[0043] Ultimately, the exemplary embodiments of the present disclosure dynamically optimize cryptographic operations by dynamically deciding whether to perform cryptographic operations in software, hardware, or a combination of software and hardware, thereby improving the efficiency, speed, and security of cryptographic operations.

[0044] It is expected that the features, advantages, and significance of the exemplary embodiments described above are only part of the present disclosure and are not intended to be exhaustive or to limit the technical scope of the present disclosure.

[0045] Below, further description is provided of the features, components, configurations, actions, and implementation forms of the cryptographic operation optimization system of the present disclosure in one or more embodiments.

[0046] <System Configuration Example>

[0047] Figure 1 A block diagram of an exemplary system configuration 100 for optimizing cryptographic operations in accordance with one or more embodiments is shown. Figure 1 As shown, the system configuration 100 may include: a cryptographic operation optimization (COO: Cryptographic Operation Optimization) system 110 , hardware 120 and software 130 .

[0048] The COO system 110 may include systems, platforms, modules, etc., which may be configured to perform one or more operations or actions for optimizing cryptographic operations. According to an embodiment, the COO system 110 may be associated with the hardware 120 and the software 130. According to an embodiment, the COO system 110, the hardware 120, and the software 130 may be included in a system capable of performing cryptographic operations, such as a vehicle capable of performing cryptographic operations to verify its hardware and software (i.e., the hardware 120 and the software 130).

[0049] Below, refer to Figures 3 to 6 Exemplary actions that can be performed by the COO system 110 for optimizing cryptographic operations are described below. Figure 2 Several exemplary components that may be included in the COO system 110 of one or more embodiments are described.

[0050] Figure 2 A block diagram showing exemplary components of a COO system 200 according to one or more embodiments. The COO system 200 may be used with Figure 1 Therefore, unless otherwise explicitly stated, features associated with COO system 110 and COO system 200 may be equally applicable to each other.

[0051] like Figure 2 As shown, the 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 is understood that the COO system 200 may include more than 240 without departing from the technical scope of the present disclosure. Figure 2 The components shown may be more or less than the components shown, and / or may be arranged in a manner similar to that shown in the figure. Figure 2 The methods shown are constructed in different ways.

[0052] 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 components of the COO system 200 to communicate with each other and / or communicate with one or more components external to the COO system 200 via a wired connection, a wireless connection, or a combination of a wired and wireless connection.

[0053] For example, the communication interface 210 may couple the processor 220 to the memory 240, thereby enabling them to communicate with each other and to perform actions with each other when they perform one or more actions.

[0054] According to one or more implementations, the communication interface 210 may include one or more application programming interfaces (APIs) that enable the COO system 200 (or one or more components included in the COO system 200) to communicate with one or more software applications.

[0055] The input-output component 230 may include at least one component that enables the COO system 200 to receive information and / or provide output information. It is understood that in several embodiments, the input-output component 230 may include at least one input component (e.g., a touch screen 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 (LED: Light-Emitting Diodes), etc.), each of which may be separated from each other.

[0056] The storage 240 may include one or more storage media suitable for storing data, information and / or computer executable instructions therein. According to an embodiment, the storage 240 may include at least one storage storage such as a random access memory (RAM), a read-only memory (ROM), and / or other types of dynamic storage devices or static storage devices (e.g., flash memory, magnetic memory, and / or optical memory) that store information and / or instructions used by the processor 220. Additionally or alternatively, the storage 240 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optical disk, and / or a solid-state hard disk), a compact disc (CD: Compact Disc), a digital versatile disc (DVD: Digital Versatile Disc), a floppy disk, a cassette tape, a magnetic tape, and / or other types of non-transitory computer-readable media, and include a corresponding drive.

[0057] According to an embodiment, the storage 240 may be configured to store information such as raw data, metadata, etc. Additionally or alternatively, the storage 240 may be configured to store one or more information associated with one or more operations performed by the processor 220. For example, the storage 240 may store information defining historical operations performed by the processor 220 to optimize cryptographic operations, one or more results of operations performed by the processor 220, etc. Moreover, the storage 240 may store data or information required to optimize cryptographic operations. For example, the storage 240 may store at least one calibration file (described below with reference to Figure 5 for explanation).

[0058] In some implementations, the storage 240 may include multiple storage media, and the storage 240 may be configured to store duplicates or copies of at least a portion of the information in multiple storage media to provide redundancy and backup information or associated data. In addition, the storage 240 may also store computer-readable instructions or computer-executable instructions, which, when executed by one or more processors (e.g., processor 220), cause the one or more processors to perform one or more actions / operations described in this specification.

[0059] The processor 220 may include at least one processor that can be programmed or configured to perform the functions or operations described in this specification. For example, the processor 220 may be configured to: execute computer executable instructions stored in at least one storage medium or storage storage (e.g., storage 240, etc.), thereby performing one or more actions or one or more operations described in this specification.

[0060] According to an embodiment, the processor 220 may be configured to receive one or more signals and / or one or more user inputs defining one or more instructions for performing one or more operations (e.g., via the communication interface 210, the input-output component 230, etc.). Moreover, the processor 220 may be implemented by hardware, firmware, or a combination of hardware and software. For example, the processor 220 may include 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 at least one of other types of processing or computing components.

[0061] According to an embodiment, the processor 220 may be configured to collect, extract and / or receive one or more information (in the form of signals, data, etc.), and process the received one or more information, thereby optimizing cryptographic operations.

[0062] Below, refer to Figures 3 to 6 A description of several exemplary operations that may be performed by processor 220 is provided.

[0063] <Operation example for optimizing cryptographic operation in the present disclosure>

[0064] Below, refer to Figures 3 to 6 Several exemplary operations that can be performed by the COO system of the present disclosure are described.

[0065] Figure 3 Flowchart showing an exemplary method 300 for optimizing cryptographic operations according to one or more implementations. One or more operations in the method 300 may be performed by at least one processor (eg, processor 220) of the COO system.

[0066] like Figure 3 As shown, in operation S310, at least one processor may be configured to determine an amount of time for performing one or more cryptographic operations in software, hardware, or a combination of software and hardware.

[0067] Depending on the implementation, a cryptographic operation may refer to an operation that performs a type of cryptographic algorithm, such as an encryption algorithm, a decryption algorithm, a hashing algorithm, a key derivation algorithm, a generation algorithm, etc. For example, a cryptographic operation that performs a cryptographic algorithm may receive input data, encrypt such input data, and provide encrypted data.

[0068] Therefore, according to an embodiment, one or more cryptographic operations may include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, performing a cryptographic operation of a generation algorithm, etc.

[0069] According to an embodiment, software and hardware may refer to software and hardware associated with a COO system, and the COO system may be included in a system capable of performing cryptographic operations. For example, the COO system may also be included in a vehicle, and the hardware may refer to a core processing unit (CPU: Core Processing Unit) of a system on chip (SoC: System on Chip) in the vehicle, hardware functions, etc., and the software may refer to a software library installed on such hardware, etc. It is understood that in such a vehicle, for example, cryptographic operations may be performed to validate and verify components installed in the vehicle. Therefore, it is desirable to understand that at least one processor may be configured to determine the amount of time used to perform one or more cryptographic operations based on the software and hardware currently installed in the vehicle.

[0070] 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 to be processed by the cryptographic operation, and the location (i.e., software, hardware, or a combination of software and hardware) at which the cryptographic operation is being performed.

[0071] Thus, according to an embodiment, at least one processor may be configured to determine an amount of time for performing each of the one or more cryptographic operations in software, an amount of time for performing each of the one or more cryptographic operations in hardware, and an amount of time for performing each of the one or more cryptographic operations in a combination of software and hardware. According to an embodiment, the amount of time may be determined for each of the one or more cryptographic operations for multiple sizes of input data. Figure 4 An example of operations for determining an amount of time to perform one or more cryptographic operations is described.

[0072] It is understood that for cryptographic operations to be performed in a combination of software and hardware, specific functions of the cryptographic operations can be split between software and hardware as needed. For example, in the case of AES-CCM, blockchaining can be performed in software, while hardware can be used for AES. Next, the method enters operation S320.

[0073] In operation S320, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the one or more cryptographic operations should be performed. According to an embodiment, at least one processor may be configured to: for each of the one or more cryptographic operations, based on the determined amount of time for performing each of the one or more cryptographic operations, determine in which of software, hardware, or a combination of software and hardware the one or more cryptographic operations should be performed. According to an embodiment, at least one processor may be configured to: for each of a plurality of sizes of input data, for each of the one or more cryptographic operations, based on the determined amount of time for performing each of the one or more cryptographic operations, determine in which of software, hardware, or a combination of software and hardware the one or more cryptographic operations should be performed.

[0074] For example, at least one processor may be configured to determine that a cryptographic operation should be performed in software based on a determined amount of time for performing a cryptographic operation in software, hardware, or a combination of software and hardware (i.e., the amount of time determined in operation S310), wherein the cryptographic operation is a cryptographic operation that executes an encryption algorithm.

[0075] Similarly, at least one processor may be configured to determine, for example based on a determined amount of time for performing a cryptographic operation in software, hardware, or a combination of software and hardware (i.e., the amount of time determined in operation S310), that the cryptographic operation should be performed in software, wherein the cryptographic operation is a cryptographic operation of performing an encryption algorithm on input data of 10 megabytes in size.

[0076] Below, refer to Figure 5 , an example is described for determining whether a type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware.

[0077] When operation S320 is performed, method 300 may end. Alternatively, method 300 may return to operation S310 so that at least one processor may repeatedly perform, for at least a specified time, determining an amount of time for performing one or more cryptographic operations (in operation S310); and determining the type of cryptographic operation to be performed in software, hardware, or a combination of software and hardware (in operation S320).

[0078] For example, when the hardware of a vehicle is changed, the amount of time used to perform one or more cryptographic operations (determined based on the previous hardware) may no longer be accurate for the vehicle equipped with the new hardware. Therefore, at least one processor may restart: (in operation S310) determine the amount of time used to perform one or more cryptographic operations; and (in operation S320) determine which type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware.

[0079] The above description is associated with the evaluation of the speed (ie, the amount of time) used to perform cryptographic operations, but it will be appreciated that other parameters associated with cryptographic operations such as accuracy and collision resistance may also be evaluated.

[0080] <Exemplary Operations for Determining the Amount of Time to Perform One or More Cryptographic Operations in the Present Disclosure>

[0081] Figure 4 A flowchart of an exemplary method 400 for determining an amount of time to perform one or more cryptographic operations in software, hardware, or a combination of software and hardware, in accordance with 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 of a COO system (e.g., processor 220).

[0082] like Figure 4 As shown, in operation S410, at least one processor may be configured to perform multiple tests. According to an embodiment, at least one processor may be configured to perform multiple tests by performing each of one or more cryptographic operations using input data of multiple sizes in software, performing each of one or more cryptographic operations using input data of multiple sizes in hardware, or performing each of one or more cryptographic operations using input data of multiple sizes in a combination of software and hardware.

[0083] According to an embodiment, each of the one or more cryptographic operations may be performed using blocks of data of different sizes ranging from very small to very large, where uniform block sizes are first used and then non-uniform block sizes are used. According to an embodiment, the multiple sizes of input data may include the size of the input data increasing in stages (e.g., the input data may have a size of 1 megabyte, 2 megabytes, 3 megabytes, etc. in units of 1 megabyte).

[0084] For example, at least one processor may be configured to perform a cryptographic operation in software using 1 megabyte of input data, and then repeatedly perform the process while increasing the size of the input data by 1 megabyte, wherein the cryptographic operation is an operation that performs an encryption algorithm. At least one processor may be configured to perform a cryptographic operation in hardware and in a combination of software and hardware in the same manner, wherein the cryptographic operation is an operation that performs an encryption algorithm. Then, at least one processor may repeatedly perform the process for each of one or more cryptographic operations. Next, the method proceeds to operation S420.

[0085] It is understood that at least one processor may also be configured to obtain any additional data required to perform the test. For example, at least one processor may be configured to obtain a configuration file that specifies a hardware application programming interface (API) list that contains parameters that specify what cryptographic operations can be performed by the system's hardware. The hardware API list may also be provided by the manufacturer of the hardware. As another example, at least one processor may be configured to obtain a list of content supported by a software library as part of the software installation.

[0086] In operation S420, at least one processor may be configured to determine an amount of time for performing one or more cryptographic operations. According to an embodiment, at least one processor may be configured to: determine an amount of time for performing each of the one or more cryptographic operations using multiple sizes of input data in software, determine an amount of time for performing each of the one or more cryptographic operations using multiple sizes of input data in hardware, and determine an amount of time for performing each of the one or more cryptographic operations using multiple sizes of input data in a combination of software and hardware. According to an embodiment, at least one processor may be configured to: determine an amount of time for performing each of the one or more cryptographic operations using multiple sizes of input data by measuring an amount of time for performing each of the one or more cryptographic operations using multiple sizes of input data in operation S410.

[0087] For example, after at least one processor performs a cryptographic operation in software with 1 megabyte of input data in operation S410, the at least one processor may be configured to measure the amount of time used to perform the cryptographic operation in software with 1 megabyte of input data, wherein the cryptographic operation is a cryptographic operation of performing an encryption algorithm. Then, in the case where the cryptographic operation of performing the encryption algorithm is performed in a manner that increases the size of the input data by 1 megabyte, and in the case where the cryptographic operation of performing the encryption algorithm is performed in hardware and a combination of software and hardware, the at least one processor may iterate the process. Then, the at least one processor may iterate the process for each of one or more cryptographic operations.

[0088] According to an embodiment, at least one processor may be configured to make (draw) one or more graphs based on the determined amount of time. According to an embodiment, the one or more graphs may determine: a relationship between the amount of time used to perform each of the one or more cryptographic operations in software and a plurality of sizes of input data, a relationship between the amount of time used to perform each of the one or more cryptographic operations in hardware and a plurality of sizes of input data, and a relationship between the amount of time used to perform each of the one or more cryptographic operations in a combination of software and hardware.

[0089] For example, at least one processor may be configured to plot a graph of cryptographic operations for executing a cryptographic algorithm in software, such a graph may represent the amount of time for executing a cryptographic operation in software relative to the size of input data, wherein the cryptographic operation is a cryptographic operation for executing the cryptographic algorithm. In addition, at least one processor may be configured to calculate an equation for the plotted graph.

[0090] <Exemplary operation for determining whether the type of cryptographic operation should be performed in software, hardware, or a combination of software and hardware in the present disclosure>

[0091] Figure 5 A flowchart of an exemplary method 500 for determining in which of software, hardware, or a combination of software and hardware a type of cryptographic operation should be performed in one or more embodiments. One or more operations of method 500 may be part of action S320 of method 300 and may be performed by at least one processor of the COO system (e.g., processor 220).

[0092] like Figure 5As shown, in operation S510, at least one processor may be configured to compare the amount of time used to perform one or more cryptographic operations in software, hardware, and a combination of software and hardware. According to an embodiment, the amount of time used to perform one or more cryptographic operations may refer to the amount of time determined in action S420 in method 400.

[0093] According to an embodiment, at least one processor may be configured to: for each of multiple sizes of input data, for each of one or more cryptographic operations, compare a first amount of time, a second amount of time, and a third amount of time, wherein the first amount of time is the amount of time used to execute each of the one or more cryptographic operations in software of the system, the second amount of time is the amount of time used to execute each of the one or more cryptographic operations in hardware, and the third amount of time is the amount of time used to execute each of the one or more cryptographic operations in a combination of software and hardware.

[0094] For example, after performing actions S410 and S420 in method 400, at least one processor may determine that the time for performing a cryptographic operation using 1 megabyte of input data in software (i.e., a first amount of time) is 10 seconds, the time for performing a cryptographic operation using 1 megabyte of input data in hardware (i.e., a second amount of time) is 20 seconds, and the time for performing a cryptographic operation using 1 megabyte of input data in a combination of software and hardware (i.e., a third amount of time) is 15 seconds, wherein the cryptographic operation is a cryptographic operation that performs an encryption algorithm. Next, at least one processor may be configured to compare the 10 seconds, 20 seconds, and 15 seconds to each other. Next, at least one processor may repeat the process for each of the one or more cryptographic operations for each of the multiple sizes of input data. Next, the method proceeds to action S520.

[0095] In operation S520, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the one or more cryptographic operations should be performed. According to an embodiment, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the type of cryptographic operation should be performed based on the first amount of time, the second amount of time, and the third amount of time. According to an embodiment, at least one processor may be configured to: for input data of multiple sizes, for each of the one or more cryptographic operations, determine in which of software, hardware, or a combination of software and hardware each of the one or more cryptographic operations should be performed based on which of the first amount of time, the second amount of time, and the third amount of time has a lowest value.

[0096] For example, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the cryptographic operation of performing the encryption algorithm using 1 megabyte of input data should be performed based on which of 10 seconds (i.e., the first time amount), 20 seconds (i.e., the second time amount), and 15 seconds (i.e., the third time amount) has the lowest value. Therefore, at least one processor may be configured to determine that the cryptographic operation of performing the encryption algorithm using 1 megabyte of input data should be performed in software because the first time amount has the lowest value. Then, at least one processor may repeat the process for each of the one or more cryptographic operations for each of the multiple sizes of input data. Next, the method proceeds to operation S530.

[0097] In operation S530, at least one processor may be configured to store the result of the decision (i.e., the decision made in operation S520) in a memory of the system. According to an embodiment, at least one processor may be configured to store the result of the decision in a calibration file. It is to be understood that the calibration file may refer to a file containing calibration parameters, wherein the calibration parameters are input to the software compiled as defined in the ISO26262 standard specification.

[0098] For example, at least one processor may be configured to specify in a calibration file that cryptographic operations of executing an encryption algorithm with 1 megabyte of input data should be executed in software, cryptographic operations of executing an encryption algorithm with 5 megabytes of input data should be executed in hardware, cryptographic operations of executing an encryption algorithm with 1 megabyte of input data should be executed in software, and so on.

[0099] For this purpose, the COO system can determine the best place to perform the cryptographic operation in a security-critical manner, taking into account the currently installed hardware and software, the type of cryptographic operation, and the size of the input data. Moreover, the COO system can also define an upper limit on the execution time based on the stored results.

[0100] <Exemplary operation for determining whether a cryptographic operation is performed in software, hardware, or a combination of software and hardware in the present disclosure>

[0101] Figure 6 A flowchart of an exemplary method 600 for determining whether to perform cryptographic operations in software, hardware, or a combination of software and hardware in one or more embodiments is shown. One or more operations of method 600 may be performed after method 300 and may be performed by at least one processor (e.g., processor 220) of the COO system.

[0102] like Figure 6As shown, in operation S610, at least one processor may be configured to receive an instruction for performing a cryptographic operation on input data. According to an embodiment, at least one processor may be configured to receive an instruction for performing a cryptographic operation from a user device, a server, etc. associated with the COO system. For example, a user may provide an instruction to encrypt data. Next, the method proceeds to operation S620.

[0103] In operation S620, at least one processor may be configured to determine the type of cryptographic operation and the size of the input data. For example, at least one processor may be configured to determine that the type of cryptographic operation (to be performed according 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.

[0104] It is to be understood that at least one processor may be further configured to determine any additional parameters associated with performing the cryptographic operation, such as security relevance. In addition, it is to be understood that each of the one or more cryptographic operations may have a ranking score consisting of complexity, security protocol, library support, hardware support, own implementation, etc. Next, the method proceeds to operation S630.

[0105] In operation S630, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the cryptographic operation should be performed. According to an embodiment, at least one processor may be configured to determine in which of software, hardware, or a combination of software and hardware the cryptographic operation should be performed based at least on the type of cryptographic operation determined in operation S620 and the size of the input data and the result stored in the memory in action S530 of method 500.

[0106] For example, at least one processor may be configured to: when the type of cryptographic operation (to be performed according to the instruction received in operation S610) is a cryptographic operation of performing an encryption algorithm, and the size of the input data is 1 megabyte, and when the calibration file (i.e., the stored result) specifies that the cryptographic operation of performing an encryption algorithm with 1 megabyte of input data should be performed in software, determine that the cryptographic operation should be performed in software. Next, the method proceeds to operation S640.

[0107] In operation S640, at least one processor may be configured to perform cryptographic operations in software, hardware, or a combination of software and hardware. According to an embodiment, at least one processor may be configured to perform cryptographic operations in software, hardware, or a combination of software and hardware based on the decision of operation S630.

[0108] For example, the at least one processor may be configured to: if it is determined in operation S630 that the cryptographic operation should be performed in software, the at least one processor performs the cryptographic operation in software.

[0109] It will be appreciated that cryptographic operations may be performed within a trusted execution environment (TEE) in a manner such that data or keys are not exposed to the normal world operating system.

[0110] Moreover, according to an embodiment, at least one processor may be configured to decide whether to perform a cryptographic operation in software, hardware, or a combination of software and hardware, based additionally 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 performed in hardware because hardware is the best choice, but the same cryptographic operation with a larger input size may be performed in software due to the maximum execution time constraint. Therefore, the COO system may decide the best location for performing the cryptographic operation based on the worst case execution time, thereby enabling the safety association.

[0111] <Exemplary flow of instructions in the present disclosure>

[0112] Figure 7 An example of the flow of instructions within a COO system according to one or more embodiments is shown.

[0113] like Figure 7 As shown, the functions of the operating system 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, and require the use of TEE and forward compatible hardware provided by ARM v8. TEE is, for example, a special mode present in ARM-compatible processors (equivalent technology is Intel SGX or Microsoft's Pluton Core) that enables the associated system on chip (SoC) to support any number and type of cryptographic operations without the need for specific hardware accelerators.

[0114] In an ARM compatible processor, when a command is to be executed within the TEE, the processor performs a context switch to a higher privileged mode, and when the command is executed, the response is signed (certified) by the operating system executing in the TEE and returns to the calling function.

[0115] In particular, the trusted execution environment driver can send instructions to its encryption / decryption middleware. The encryption / decryption middleware can identify hardware and software contexts, the encryption / decryption middleware is configured to obtain and read data from calibration and configuration (e.g., calibration files and / or configuration files), the encryption / decryption middleware determines the amount of time used to perform cryptographic operations in software, hardware, and a combination of software and hardware, and determines whether the cryptographic operation should be performed in which of software, hardware, or a combination of software and hardware.

[0116] <Various modes of implementation>

[0117] The above disclosure provides examples and descriptions, but is not intended to be exhaustive, nor is it intended to limit the implementation forms to the precise forms disclosed. Modifications and variations are possible in light of the above disclosure or can be acquired from practice of the implementation forms.

[0118] In some embodiments, it may involve systems, methods and / or computer-readable media at any possible level of technical detail of the integration. Moreover, one or more of the above-mentioned constituent elements described above may be implemented as instructions stored in a computer-readable medium and executable by at least one processor (and / or may include at least one processor). The computer-readable medium may also include a computer-readable non-transitory storage medium having computer-readable program instructions for causing the processor to perform actions.

[0119] A computer-readable storage medium may be a physical device that can hold and store instructions for use by an instruction execution device. The computer-readable storage medium is, for example, not limited to the following devices, and may be 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. In a non-exhaustive list of more specific examples of computer-readable storage media, the following portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM (ErasableProgrammableReadOnlyMemory) or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick (memory stick), floppy disk, punch card or a mechanically encoded device such as a ridge structure in a groove with recorded instructions, and any suitable combination of the above. Such computer-readable media used in this document should not be interpreted as signals that are themselves temporary, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses passing through fiber optic cables), or electrical signals sent through wires.

[0120] The computer-readable program instructions described in this article 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 via a network such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can have copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and transmits the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0121] The computer readable program code / instructions for performing the actions may be any of 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 source code or object code described in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed in their entirety on the user's computer, in part on the user's computer, as a stand-alone software package that is executed in part on the user's computer and in part on a remote computer, or in their entirety on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via 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., via the Internet using an Internet service provider). In some embodiments, in order to execute a scheme or action, an electronic circuit including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can utilize state information of computer-readable program instructions to individualize the electronic circuit, thereby executing the computer-readable program instructions.

[0122] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device in order to make a machine, so that the instructions executed by the processor of the computer or other programmable data processing device are made into a component for implementing the functions / actions specified in the functional blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, which can instruct a computer, a programmable data processing device, and / or other devices to function in a special manner, so that the computer-readable storage medium with the stored instructions has a product, which includes instructions for implementing the scheme of the functions / actions specified in the functional blocks of the flowchart and / or block diagram.

[0123] Computer-readable program instructions may also be loaded into a computer, other programmable data processing device, or other device to perform a series of action steps on the computer, other programmable device, or other device, thereby generating a process implemented by a computer, so that the instructions executed in the computer, other programmable device, or other device implement the functions / actions specified in the functional blocks of the flowchart and / or block diagram.

[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and actions of possible implementation forms of the systems, methods, and computer-readable media of various embodiments. In this regard, each functional block in the flowchart or block diagram may represent a portion of a microservice module, segment, or instruction, which has one or more executable instructions for implementing the determined logical function. The method, computer system, and computer-readable medium may include additional functional blocks, fewer functional blocks, different functional blocks, or blocks configured to be the same as those in the embodiment. Figure 1 In some alternative implementations, the functions shown in the function blocks may occur in an order different from the order shown in the figure. For example, two function blocks shown in succession may actually be executed simultaneously or substantially simultaneously, or the function blocks may sometimes be executed in reverse order depending on the functions involved. It should also be noted that each function block in the examples of the block diagrams and / or flow charts and the combination of function blocks in the examples of the block diagrams and / or flow charts may be implemented by a system based on special purpose hardware, wherein the system performs the specified functions or actions and executes a combination of special purpose hardware and computer instructions.

[0125] The system and / or method described in this article 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 does not limit the implementation form. Therefore, it is understood that the actions and behaviors of the system and / or method are not described with reference to specific software codes in this article, and software and hardware can be designed to implement the system and / or method based on the description in this article.

[0126] It is understandable that, in light of the above teachings, many modifications and variations of the present disclosure are possible. It is obvious that within the technical scope of the appended clauses, the present disclosure can be implemented in a manner different from that specifically described in this specification.

Claims

1. A system comprising: Storage memory storing computer executable instructions; and at least one processor communicatively coupled to the storage memory, The at least one processor is configured to execute the instructions for: determining an amount of time to perform one or more cryptographic operations in software of the system, hardware of the system, or a combination of the software and the hardware; and For each of the one or more cryptographic operations, a determination is made as to in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

2. The system according to claim 1, wherein: The one or more cryptographic operations include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

3. The system according to claim 1 or 2, wherein: The amount of time is determined for each of the one or more cryptographic operations for multiple sizes of input data.

4. The system according to claim 3, wherein: The at least one processor is configured to execute the instructions for determining in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed by: for each of the plurality of sizes of input data, comparing a first amount of time, a second amount of time, and a third amount of time for each of the one or more cryptographic operations, wherein the first amount of time is the amount of time for performing each of the one or more cryptographic operations in the software of the system, the second amount of time is the amount of time for performing each of the one or more cryptographic operations in the hardware, and the third amount of time is the amount of time for performing each of the one or more cryptographic operations in a combination of the software and the hardware; and For each of the multiple sizes of input data, for each of the one or more cryptographic operations, based on which of the first time amount, the second time amount, and the third time amount has a lowest value, it is determined in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed.

5. The system according to any one of claims 1 to 4, wherein: The at least one processor is further configured to execute the instructions for: The results of the determination of whether each of the one or more cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware are stored.

6. The system according to any one of claims 1 to 5, wherein: The at least one processor is further configured to execute the instructions for: Based at least on the type of the cryptographic operation, the size of the input data, and the stored result, it is determined whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware.

7. The system according to any one of claims 1 to 6, wherein: The at least one processor is further configured to execute the instructions for: In the trusted execution environment TEE, cryptographic operations are performed in the software, the hardware, or a combination of the software and the hardware.

8. A method comprising: determining an amount of time to perform one or more cryptographic operations in software of a system, hardware of said system, and a combination of said software and said hardware; as well as For each of the one or more cryptographic operations, a determination is made as to in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

9. The method according to claim 8, wherein: The one or more cryptographic operations include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

10. The method according to claim 8 or 9, wherein: The amount of time is determined for each of the one or more cryptographic operations for multiple sizes of input data.

11. The method according to claim 10, wherein: The process of determining in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed comprises: for each of the plurality of sizes of input data, comparing a first amount of time, a second amount of time, and a third amount of time for each of the one or more cryptographic operations, wherein the first amount of time is the amount of time for performing each of the one or more cryptographic operations in the software of the system, the second amount of time is the amount of time for performing each of the one or more cryptographic operations in the hardware, and the third amount of time is the amount of time for performing each of the one or more cryptographic operations in a combination of the software and the hardware; and For each of the multiple sizes of input data, for each of the one or more cryptographic operations, based on which of the first time amount, the second time amount, and the third time amount has a lowest value, it is determined in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed.

12. The method according to any one of claims 8 to 11, further comprising: The results of the determination of whether each of the one or more cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware are stored.

13. The method according to any one of claims 8 to 12, further comprising: Based at least on the type of the cryptographic operation, the size of the input data, and the stored result, it is determined whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware.

14. The method according to any one of claims 8 to 13, further comprising: In the trusted execution environment TEE, cryptographic operations are performed in the software, the hardware, or a combination of the software and the hardware.

15. A non-transitory computer-readable recording medium having recorded thereon instructions executable by at least one processor, wherein: The instructions cause the at least one processor to perform a method comprising: determining an amount of time to perform one or more cryptographic operations in software of a system, hardware of said system, and a combination of said software and said hardware; as well as For each of the one or more cryptographic operations, a determination is made as to in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed based on the determined amount of time for performing each of the one or more cryptographic operations.

16. The non-transitory computer-readable recording medium according to claim 15, wherein: The one or more cryptographic operations include performing a cryptographic operation of an encryption algorithm, performing a cryptographic operation of a decryption algorithm, performing a cryptographic operation of a hash algorithm, performing a cryptographic operation of a key derivation algorithm, and performing a cryptographic operation of a generation algorithm.

17. The non-transitory computer-readable recording medium according to claim 15 or 16, wherein: The amount of time is determined for each of the one or more cryptographic operations for multiple sizes of input data.

18. The non-transitory computer-readable recording medium according to claim 17, wherein: The process of determining in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed comprises: for each of the plurality of sizes of input data, comparing a first amount of time, a second amount of time, and a third amount of time for each of the one or more cryptographic operations, wherein the first amount of time is the amount of time for performing each of the one or more cryptographic operations in the software of the system, the second amount of time is the amount of time for performing each of the one or more cryptographic operations in the hardware, and the third amount of time is the amount of time for performing each of the one or more cryptographic operations in a combination of the software and the hardware; and For each of the multiple sizes of input data, for each of the one or more cryptographic operations, based on which of the first time amount, the second time amount, and the third time amount has a lowest value, it is determined in which of the software, the hardware, or a combination of the software and the hardware each of the one or more cryptographic operations should be performed.

19. The non-transitory computer-readable recording medium according to any one of claims 15 to 18, the method further comprising: The results of the determination of whether each of the one or more cryptographic operations should be performed in the software, the hardware, or a combination of the software and the hardware are stored.

20. The non-transitory computer-readable recording medium according to any one of claims 15 to 19, the method further comprising: Based at least on the type of the cryptographic operation, the size of the input data, and the stored result, it is determined whether to perform the cryptographic operation in the software, the hardware, or the combination of the software and the hardware.