Object mapping driven hybrid cryptography hardware acceleration system, method and chip
The resource-adaptive hardware acceleration system driven by object mapping state solves the problems of low resource utilization and frequent data movement in various cryptographic tasks of existing cryptographic hardware, and achieves efficient and flexible hardware resource management and improved computing efficiency.
Patent Information
- Application Number
- CN202611432972.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing cryptographic hardware suffers from problems such as repetitive control logic, low resource utilization, frequent data migration, high storage bandwidth consumption, and high hardware expansion costs when handling various cryptographic tasks. It is difficult to dynamically adjust the data residence location and execution resource binding while maintaining the stability of cryptographic protocol semantics and logical data object references.
The resource adaptive hardware acceleration system, driven by object mapping state, uses logical data objects and their data blocks as the management granularity. Combined with object mapping state and scheduling control modules, it dynamically generates micro-instruction sequences, optimizes data residence location and execution resource selection, and achieves resource adaptive hierarchical scheduling.
It improves resource utilization for cryptographic tasks, reduces data movement and conflicts, reduces clock cycle usage, improves computational efficiency and hardware scalability, and supports flexible execution of various cryptographic tasks.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of cryptographic hardware acceleration and processor architecture technology, specifically to an object-mapping state-driven resource adaptive hardware acceleration system, method, and chip for hybrid cryptographic tasks. Background Technology
[0002] With the development of quantum computing, the Internet of Things, and edge computing, information systems are placing higher demands on the security, computational efficiency, and hardware evolvability of cryptographic algorithms. During the migration and long-term coexistence phases of cryptographic algorithms, the same device may need to perform multiple types of cryptographic tasks with different data structures, bit widths, core arithmetic types, operational processes, and memory access characteristics. Examples include traditional public-key cryptography tasks and post-quantum cryptography tasks based on mathematical problems such as lattices.
[0003] Existing cryptographic hardware is typically optimized around a specific type of core arithmetic operation, a fixed algorithm flow, or a fixed set of instructions. Even if multiple cryptographic algorithms can share some arithmetic resources, the execution of the complete protocol still requires handling data loading, format organization, condition judgment, data decomposition and compression, hashing, random sampling, and a large number of cross-module data dependencies. When different algorithms use independent data paths, controllers, or fixed data organization methods, it can easily lead to duplicated control logic, reduced on-chip resource utilization, and increased design costs when expanding to new algorithms or security parameters.
[0004] On the other hand, highly parallel cryptographic operations may require simultaneous reading or writing back of multiple data streams within a single execution phase. If object-level operations are directly bound to fixed physical banks, physical addresses, or fixed execution paths, then when the actual write-back location, storage port occupancy status, or available execution resources change, the upper-layer control sequence also needs to be modified accordingly or data relocation operations inserted. Especially when an intermediate result will be read in parallel with other objects in subsequent phases, if the write-back location is determined solely based on the current idle state without considering subsequent access relationships, new bank port conflicts may still occur in the next execution phase. Furthermore, different algorithms may have different data bit widths and representations; frequent packing, unpacking, rearranging, and format conversion between adjacent computation phases will further consume clock cycles and storage bandwidth.
[0005] Furthermore, the computational structures of operations such as conditional detection, counting comparison, data decomposition, recoding, compression, hashing, and sampling differ significantly from those of high-throughput arithmetic operations. If all operations are sequentially completed through the same arithmetic data path, it will not only be difficult to fully utilize heterogeneous hardware resources, but control dependencies may also cause the main arithmetic path to wait. Therefore, a resource adaptive hierarchical scheduling mechanism is needed that can maintain the stability of cryptographic protocol semantics and logical data object references, while using structured data objects and their data blocks as the granularity of resource management. This mechanism jointly determines the data residence location and execution resource binding based on the object's current on-chip location, storage port occupancy, data dependencies, execution resource status, and subsequent object access relationships, and dynamically generates underlying hardware control based on this. Summary of the Invention
[0006] The present invention provides a hardware acceleration system for hybrid cryptographic tasks, including an on-chip storage subsystem, at least one execution resource, and a scheduling control module; the execution resource includes at least an arithmetic execution resource for performing arithmetic operations in the cryptographic task.
[0007] In the above scheme, the scheduling and control module is used to map cryptographic protocol-level tasks into object-level instruction sequences. Object-level instructions use logical data objects containing multiple data elements as the basic operation granularity, and reference operands through logical data object identifiers, thereby forming an object-level control layer between cryptographic protocol semantics and the underlying hardware execution granularity. At least one logical data object can be further divided into multiple data blocks, which can be mapped to one or more independently accessible on-chip storage resources. Object-level instructions do not require fixed binding of logical data objects or their data blocks to a specific physical bank, physical address, or specific execution resource.
[0008] In the above scheme, the scheduling control module includes or is connected to a mapping state storage structure, and maintains the object mapping state through the mapping state storage structure. The object mapping state is used to establish the correspondence between logical data objects or one or more data blocks thereof and one or more current on-chip storage resources and their corresponding storage locations. It may also include data block indexes or block mapping relationships, data layout, bit width, alignment, validity status, version status, or other information that can characterize the current on-chip representation of the logical data object.
[0009] In the above scheme, for the current object-level instruction in the object-level instruction sequence that produces at least one result logical data object, the scheduling control module parses the current on-chip location of the source data based on the object mapping state of the logical data object involved in the current object-level instruction, and determines other logical data objects that need to be accessed in parallel with the result logical data object in the same execution stage from one or more subsequent related object-level instructions. The scheduling control module, at least based on the object mapping state of the other logical data objects and the port occupancy state of the on-chip storage resources, and may further combine the preceding and following data dependencies, the current state of the execution resources, and the hardware parallelism, jointly determines the source on-chip storage resources, candidate destination on-chip storage resources, and execution resources, and generates a micro-instruction sequence; the micro-instructions at least determine the source on-chip storage resources, the actual destination on-chip storage resources, and the execution resources used in this execution, and may further determine the read / write ports, addresses or address generation methods, operation modes, startup control, pipeline control, parameters, and result write-back control.
[0010] In the above scheme, when there is a port access conflict in the candidate destination on-chip storage resource, or when writing the result logical data object to the candidate location would cause at least some of the parallel operands of the result logical data object and other logical data objects that need to be read simultaneously in subsequent related object-level instructions to be located in the same on-chip storage resource that cannot meet the parallel access requirements, the scheduling control module selects another independently accessible on-chip storage resource that meets the write-back conditions as the actual write-back location. When an object-level instruction generates or updates a logical data object, the scheduling control module updates the corresponding object mapping state according to the on-chip storage resource and storage location where the result is actually written back. Subsequent object-level instructions continue to use the original logical data object identifier and resolve its current physical storage location according to the updated object mapping state. Therefore, the object-level task description does not need to change with the dynamic residence of data between on-chip storage resources.
[0011] In the above scheme, the on-chip storage subsystem may include multiple independently accessible storage groups. For object-level instructions that generate result logical data objects, the scheduling control module can determine the result write-back location based on the parallel operand requirements of the current object-level instruction, the port occupancy status of each storage group, and the current mapping location of other logical data objects that need to be accessed in parallel with the result logical data object in one or more subsequent related object-level instructions. This ensures that at least a portion of the parallel operands required in subsequent execution stages are distributed across different independently accessible storage groups. When the originally planned write-back location conflicts with or does not meet the above parallel access requirements, other available on-chip storage resources can be selected and the object mapping status updated accordingly.
[0012] In the above scheme, the on-chip storage subsystem supports stable representation of mixed bit-width data. Data of different bit widths are mapped to on-chip storage locations according to one or more predetermined storage granularities; packing or unpacking can be performed during task input, task output, or capacity optimization phases, and the data layout and alignment of the corresponding logical data objects are maintained during the execution of two or more consecutive object-level instructions to reduce repeated data rearrangement and format conversion.
[0013] In the above scheme, the execution resources may further include at least one auxiliary execution resource among logical judgment and condition detection resources, data decomposition and compression resources, and hashing and sampling resources. The auxiliary execution resources can be connected to the on-chip storage subsystem and scheduling control module through a unified scheduling interface, and can start, run, and return to completion status independently of the arithmetic execution resources, thereby working in parallel or interleaved with the arithmetic execution resources when data dependencies permit.
[0014] In the above scheme, the mapping state storage structure can be implemented using a register table, state RAM, mapping table, control table entries, or other structures that can be queried and updated by hardware scheduling logic. Each object mapping table entry can at least store the logical data object identifier, on-chip storage resource identifier, and address information, and can further store data layout, data bit width, alignment, block information, and valid status or version status.
[0015] In the above scheme, the system can also set up a configuration storage area independent of the mapping state storage structure to store task templates, object-level instruction combinations, object-level instruction definitions, microinstruction expansion parameters, or execution resource configurations. The configuration storage area mainly stores relatively static task or hardware configuration information, while the object mapping state is dynamically updated during the execution of the cryptographic task based on the actual write-back location of the logical data object.
[0016] The technical solutions of the embodiments of the present invention have at least the following beneficial effects:
[0017] (1) By setting up an object-level control layer with structured logical data objects and their data blocks as the granularity of operation and resource management between the cryptographic protocol-level task and the underlying hardware control, and continuously recording the correspondence between logical data objects or their data blocks and the current on-chip physical storage location by the object mapping state, the object semantics of the cryptographic task is decoupled from the specific Bank, address and execution resources.
[0018] (2) By using the object mapping state simultaneously for microinstruction generation and state update after writing back the result, a continuous scheduling closed loop of "logical object reference - current physical resource resolution - resource adaptive selection - hardware execution - actual write back - mapping update - subsequent object reuse" is formed; when the on-chip storage location is adjusted due to port conflict, subsequent parallel access requirements or resource status changes, there is no need to synchronously modify the object-level instruction sequence.
[0019] (3) By introducing the parallel access relationship of subsequent related object-level instructions into the result residence location selection, the write-back location of an intermediate result not only satisfies the current write-back condition, but also coordinates with the current mapping location of other objects that need to be read together in the subsequent stage, thereby reducing multi-way read-write competition in the continuous execution stage and reducing the additional data movement, pauses and rearrangement caused to avoid conflicts.
[0020] (4) By separating the relatively static task or hardware configuration from the dynamically changing object mapping state, and incorporating on-chip storage resources, arithmetic execution resources and auxiliary execution resources into a unified hierarchical scheduling, the same object-level operation can generate different physical storage access, execution resource selection and launch control according to the runtime resource state without changing the logical object reference, thereby forming a resource adaptive hardware execution mode that is oriented towards the binding of data residence location and execution resources; this resource adaptive process can be completed without changing the internal circuit topology of the execution resources. Attached Figure Description
[0021] Figure 1 This schematically illustrates a hardware acceleration system architecture block diagram for hybrid cryptographic tasks according to an embodiment of the present invention;
[0022] Figure 2 This illustration schematically depicts the hierarchical scheduling of task-object level instructions-microinstructions, object mapping states, and write-back feedback relationships according to an embodiment of the present invention.
[0023] Figure 3 This illustration schematically shows the relationship between object-level instructions, object mapping states, and microinstruction fields according to embodiments of the present invention.
[0024] Figure 4 This illustration illustrates the process of selecting the result residence location and updating the object mapping state by combining the current port conflict and the subsequent object parallel access relationship according to an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and not for limiting the invention.
[0026] Figure 1 The illustration schematically depicts a hardware acceleration system 100 according to an embodiment of the present invention. The hardware acceleration system 100 can be implemented as a standalone cryptographic acceleration chip, or as a coprocessor of a main processor, a hardware module in a system-on-a-chip, a logic module in a field-programmable gate array, or other synthesizable digital circuits.
[0027] like Figure 1 As shown, the hardware acceleration system 100 includes an external interface 110, a task scheduling module 120, an instruction / microinstruction control module 130, an on-chip storage subsystem 140, arithmetic execution resources 150, auxiliary execution resources 160, a configuration / instruction storage area 170, and a mapped state storage structure / status register 180. The mapped state storage structure can be located in the instruction / microinstruction control module 130, the status register 180, or an on-chip storage structure connected to both, without needing to exist as an independent physical module; the configuration / instruction storage area 170 and the mapped state storage structure are logically distinct.
[0028] External interface 110 is used to receive a cryptographic task description and the input data required for the task submitted by the main processor, external controller, or upper-layer software. The task description includes at least the task type and parameters, and may also include at least one of the following: key or key index, data length, algorithm parameters, security parameters, input / output addresses, task template index, and exception handling strategy.
[0029] The task scheduling module 120 treats a single high-level cryptographic operation as a cryptographic protocol-level task. For example, a cryptographic protocol-level task could be key generation, encryption, decryption, signing, signature verification, key encapsulation, or key decapsulation. The task scheduling module 120 can expand this task into a sequence of object-level instructions with sequential dependencies based on the task type, task template, or configuration parameters. Different cryptographic tasks can share the same scheduling framework and achieve differences in algorithmic flows through different combinations of object-level instructions.
[0030] The objects operated on by object-level instructions are not limited to a single scalar register, but can be complete or partial polynomials, polynomial vectors, large integers, large integer data blocks, vector data blocks, or other structured logical data objects containing multiple data elements. At least one logical data object can also be divided into multiple data blocks according to the parallel execution granularity, storage granularity, or data layout of the object-level instructions, and the current on-chip storage resources and locations of each data block are recorded by the object mapping state. By using logical data objects and their data blocks as the semantic and resource management granularity, the object-level control layer can directly describe operations such as overall transformations, vector or polynomial arithmetic, conditional processing, and structured data conversion in cryptographic algorithms, without requiring upper-layer tasks to specify each scalar operation of the underlying parallel hardware.
[0031] In one implementation, object-level instructions can take the form of "operation type field + source logical data object identifier field + destination logical data object identifier field + parameter field". For example, a multiplication object-level instruction can be logically represented as "Mul A, B→C", where A, B, and C are all logical data object identifiers. If A, B, or C contains multiple data blocks, the object-level instruction can still reference the corresponding logical object identifiers, and the on-chip storage resources and locations of each data block can be further resolved from the object mapping state. The object-level instructions can be implemented using machine instructions, control entries, task nodes, or other equivalent intermediate representations, but in object-level semantics, it is not necessary to permanently write the physical bank, address, or specific execution resource where A, B, or C reside.
[0032] The instruction / microinstruction control module 130 includes or is connected to a mapping state storage structure, and maintains the object mapping state through the mapping state storage structure. Figure 3 An example of an object mapping table entry is provided. Each entry may include a logical data object identifier OBJ_ID, an on-chip storage resource identifier MEM_ID, an address or base address and offset ADDRESS, and may further include a data block index BLOCK_ID or block mapping relationship, a data layout LAYOUT, a data width WIDTH, a validity status VALID, a version status VERSION, and other information related to the current on-chip representation. For a logical data object consisting of multiple data blocks, multiple data block locations can be associated with a single object table entry, or the current mapping of each data block can be recorded separately by multiple related table entries.
[0033] The mapped state storage structure can be implemented using register tables, mapping tables, state RAM, content-addressable structures, control table entries, or other hardware state structures that can be accessed and updated by scheduling control logic. Unlike ordinary static address tables, object mapped states can be updated during task execution as the actual write-back location of the result changes, continuously representing the currently valid on-chip physical location of the logical object.
[0034] After receiving an object-level instruction, the instruction / microinstruction control module 130 parses the current on-chip location based on the object mapping status of at least one of the source logical data object and the destination logical data object. For object-level instructions that produce a result logical data object, the control module can also identify one or more subsequent related object-level instructions from the object-level instruction sequence or task dependency graph, and determine other logical data objects that need to be accessed in parallel with the result logical data object in the same execution phase. The control module expands the object-level instruction into one or more microinstructions based at least on the current object mapping status of the other logical data objects and the on-chip storage resource port occupancy status, and may further combine hardware parallelism, the current status of execution resources, and the data dependency relationship between preceding and following instructions. The microinstructions are used to directly or through partial decoding to drive the underlying hardware, and may include at least a source storage resource or address control field, an actual destination storage resource or address control field, and an execution resource selection field, and may further include read / write ports, operation modes, startup, waiting conditions, pipeline control, parameters, and result write-back control. Thus, the object-level instruction describes the logical operation and its logical object, and the microinstruction determines where to retrieve data, which resource to execute, and where to write data based on the object location, port status, and subsequent access relationships during the current execution.
[0035] For example, the object-level instruction "Mul A, B→C" can, at the first moment, query the first storage area of Bank0 where A is located and the second storage area of Bank2 where B is located. Based on this, the scheduling control module generates microinstructions to read Bank0 and Bank2, select the first arithmetic execution resource, and write the result to Bank3. At another moment, even if the object-level instruction is still "Mul A, B→C", if the object mapping status of A or B, the Bank port occupancy status, the parallel access relationship of subsequent related object-level instructions to C, or the available execution resources change, the scheduling control module can also reselect the source storage resource, destination storage resource, execution resource, or issue timing and generate different microinstructions while keeping the logical object identifiers of A, B, and C unchanged. This change is an adaptive binding of runtime data residency and execution resources, and does not require modification of the object-level program or change of the internal circuit topology of the execution resources.
[0036] The instruction / microinstruction control module 130 also maintains data dependencies and resource states. For object-level instructions with dependencies, subsequent microinstructions can be initiated after the previous execution resource returns to completion, the target data is valid, or the target data is written back. For independent data objects, execution stages, or execution resources, the corresponding microinstructions can be interleaved or issued in parallel. After an object-level instruction generates or updates a logical data object, the control module updates the corresponding object mapping state based on the on-chip storage resources and storage locations actually written back to the result.
[0037] Figure 4This illustrates a dynamic mapping update process when a conflict occurs between candidate write-back locations. For example, object A is currently mapped to Bank0, and object B is currently mapped to Bank1. An object-level instruction requires operations to be performed on A and B to generate object C. If a candidate destination Bank2 obtained according to a preset mapping or prior scheduling has a port conflict during the expected write-back cycle, the scheduling control module can select Bank3 from other available storage resources as the actual write-back location, generate the corresponding micro-instruction, and update Map[C] to Bank3 and its corresponding address after the result is written back. Subsequently, the object-level instruction D=OP(C,E) still uses the logical object C as an operand reference. The control module resolves the current physical location of C through the updated Map[C] without modifying the object-level encoding of D.
[0038] The selection of destination storage resources can also consider the parallel access requirements of subsequent related object-level instructions. For example, when the subsequent object-level instruction D=OP(C,E) needs to read C and E in parallel during the same execution phase, and object E is currently mapped to candidate Bank2, even if Bank2 is available at the current write-back time, the scheduling control module can choose another independently accessible Bank3 as the actual write-back location for C, so that C and E are distributed in different storage groups during subsequent execution phases. Thus, the selection of the result resident location considers both the current port state and the relationship with subsequent object access. The handling of storage conflicts can be achieved not only by delaying the issuance but also by changing the on-chip storage resource where the result actually resides, and the object mapping state absorbs this change in physical location.
[0039] The on-chip storage subsystem 140 is used to store input data, intermediate data, and output data within the task. In one data-resident mode, at the start of the task, necessary initial data is loaded onto the chip; intermediate logical data objects generated or updated by preceding object-level instructions remain on the chip, and the object mapping state is maintained according to the actual write-back location; subsequent object-level instructions directly obtain the corresponding intermediate logical data objects based on the object mapping state until the task is completed, capacity is insufficient, or there are other data exchange needs, at which point data exchange with external storage occurs.
[0040] The on-chip storage subsystem 140 may include internal cache, temporary storage, register file, special registers, and interfaces for connecting to external storage. The multiple independently accessible on-chip storage resources may consist of physically independent banks, or they may consist of logically independent access areas within multi-port memory, SRAM, BRAM, register file, scratchpad, or other on-chip storage resources. The storage location recorded in the object mapping state may use physical addresses, logical addresses, base addresses and offsets, bank numbers and local addresses, or other representations capable of locating the current on-chip data.
[0041] The on-chip storage subsystem 140 may include multiple storage groups, such as Bank0 to Bankm. For a logical data object consisting of multiple elements, the system can distribute its data blocks to different banks according to a preset or dynamically determined mapping relationship, and save the corresponding data block index, block relationship, and position relationship in the object mapping state, so that the arithmetic execution resource 150 or auxiliary execution resource 160 can obtain multiple operands in the same clock cycle or a few clock cycles. For the result logical data object, the control module can also select the actual write-back bank based on the parallel access requirements of subsequent related object-level instructions and the bank where the related operands are currently located, and update the object mapping state after the write-back.
[0042] In one engineering implementation, on-chip storage can employ multiple dual-port RAMs or multi-port RAMs to form a wideband cache, and convert between the data granularity on the parallel computing side and the data granularity on the storage side through data reorganization logic. Data of different bit widths can be stored according to the natural computational bit width, aligned extended bit width, or other representations that can be directly used by execution resources; compact packing or unpacking is only performed when there is a need for task input, task output, or capacity optimization. The object mapping state can simultaneously record the corresponding data layout and alignment, so that multiple consecutive object-level instructions do not need to repeatedly rearrange the same logical data object.
[0043] Auxiliary execution resource 160 is used to handle operations that are not suitable for efficient completion on arithmetic execution resource 150 but are necessary steps for a complete cryptographic protocol. Auxiliary execution resource 160 can be configured as an independent hardware module or as a functional mode in a reconfigurable execution resource, as long as it can receive scheduling and return status or results to the scheduling control module as an execution resource different from arithmetic operations.
[0044] In one implementation, the auxiliary execution resource 160 includes logical judgment and condition detection resources. These resources can perform equality checks, range checks, threshold checks, non-zero element counts, norm checks, or other condition checks on vector-level data, and write the results to a status register, on-chip storage subsystem 140, or directly feed them back to the task scheduling module 120 in the form of flag bits, count values, comparison results, or compact vectors.
[0045] The auxiliary execution resource 160 may also include data decomposition and compression resources for performing high-low bit decomposition, recoding, compression, decompression, encoding, decoding, or other structured data processing operations with fixed data dependencies; it may also include hashing and sampling resources for performing secure hashing, scalable output functions, pseudo-random data generation, random number generation, or data sampling according to a given distribution. If there is no data dependency between the current arithmetic execution stage and the auxiliary operation, the instruction / microinstruction control module 130 can enable different execution resources to run in parallel or be interleaved.
[0046] Auxiliary execution resource 160 and arithmetic execution resource 150 can be organized using a unified scheduling interface. This unified scheduling interface may include at least one of the following: operation type, logical data object identifier, physical source data location, physical destination data location, parameters, startup, busy / idle status, completion status, and exception status. For subsequently added algorithm functions, the new resources can be connected to the on-chip interconnect as configurable execution resources, and incorporated into the existing scheduling framework by adding corresponding object-level operation definitions, microinstruction control information, and status definitions.
[0047] Arithmetic execution resource 150 is used to perform high-density arithmetic operations in cryptographic tasks. This invention does not necessarily limit the specific internal algorithm, arithmetic data path reconstruction method, or existing dedicated microarchitecture of the arithmetic execution resource 150. It may include at least one of the following: polynomial arithmetic unit, large integer arithmetic unit, modular arithmetic unit, vector arithmetic unit, matrix or array-based computation unit, processor instruction extension unit, and other hardware resources capable of performing corresponding structured data operations. As long as the execution resource can obtain operands, parameters, and startup information through an agreed interface and return results, data validity status, or completion status, it can be included in the unified scheduling of object-level instructions, object mapping status, and microinstructions. The scheduling control module changes the data residency location, execution resource binding, and corresponding control sequence for the runtime state, without requiring changes to the internal circuit topology of the execution resource.
[0048] Figure 2 This diagram illustrates the hierarchical scheduling of tasks, object-level instructions, and microinstructions, as well as the relationship between object mapping states and hardware control. The cryptographic protocol task 201 is first expanded into an object-level instruction sequence 202. These object-level instructions reference logical data objects, and the mapping state storage structure 206 stores the object mapping state between the logical data object or its data blocks and the current on-chip storage resources and storage locations. The object mapping state and dependency / resource state determination 204 together provide conditions for the generation and issuance of the microinstruction sequence 203. The dependency / resource state determination can also utilize the on-chip storage port occupancy status and the access relationships of subsequent related object-level instructions to the result object to determine the source storage resource, the actual destination storage resource, and the execution resource used in this execution. The microinstruction sequence 203 controls the data access and execution of the on-chip block storage 140, arithmetic execution resource 150, and auxiliary execution resource 160. After the execution result is returned via write-back and status feedback 205, the mapping state storage structure 206 updates the corresponding object mapping state according to the actual write-back location of the result, enabling subsequent object-level instructions to resolve the updated on-chip physical location while maintaining the logical object reference unchanged.
[0049] Figure 3This further illustrates the differences in information granularity between object-level instructions, object mapping states, and microinstructions. In object-level instructions, source and destination operands are expressed using logical object identifiers. For objects divided into multiple data blocks, the mapping state storage structure further saves or parses the current on-chip storage resources and locations of each data block. Microinstructions carry source storage resources, actual destination storage resources, execution resources, and control fields specific to the current hardware execution. Therefore, logical object references exhibit stability across physical location changes, while microinstructions can be regenerated based on the current object mapping, port occupancy, execution resource state, and subsequent access relationships, achieving runtime resource adaptation by binding data residency locations to execution resources.
[0050] In one implementation of a post-quantum cryptography task, the task scheduling module 120 can break down a single key generation, signing, verification, key encapsulation, or key decapsulation task into object-level operations such as data loading, several structured arithmetic operations, hashing or sampling, data decomposition or compression, condition detection, and result writing back. Each object-level operation uses polynomials, polynomial vectors, or other structured objects as logical operands; intermediate objects remain on-chip after being generated at different execution stages, and their current on-chip position is recorded by the object mapping state. The condition detection result can be fed back to the task scheduling module 120 to select whether to continue execution, repeat the current or previous stage, switch execution paths, or terminate the task.
[0051] In a traditional public-key cryptography task implementation, the task scheduling module 120 can organize a single dot product, modular exponentiation, signature, or verification task into several large integer object-level instructions and auxiliary object-level instructions. Large integers or large integer data blocks can be stored as logical data objects across multiple execution stages, and their current on-chip position is maintained by the object mapping state. This embodiment does not require traditional public-key cryptography to employ a specific transformation algorithm or an existing arithmetic core for large integer operations; when the connected execution resources, storage organization, or parallelism differ, the same large integer object-level instruction can generate different physical execution methods from the microinstruction layer.
[0052] The configuration / instruction storage area 170 can be used to store task templates, object-level instruction combinations, object-level instruction definitions, microinstruction expansion parameters, or execution resource configurations corresponding to one or more cryptographic tasks. The configuration / instruction storage area 170 and the object mapping state storage structure can be independent of each other: the former mainly stores relatively static task or hardware configurations, while the latter is dynamically updated during the execution of the cryptographic task based on the actual write-back location of the logical data object. The configuration / instruction storage area 170 can be implemented using read-only memory, writable memory, register tables, microcode storage areas, or other configurable storage structures.
[0053] The number of on-chip storage groups, ports, data bit width, number of object-level operations, number of microinstruction control fields, parallel execution granularity, pipeline stage number, and execution resource types in this invention can all be adjusted according to the target algorithm and chip resources. The term "logical data object" as used herein refers to a structured data object or its data block containing multiple data elements as the primary management granularity, and does not require a one-to-one correspondence with a single scalar register or a single fixed physical location. The term "object mapping state" as used herein is used to characterize the current valid on-chip resident location of the logical data object or its data block during task execution, and can be dynamically updated according to the actual write-back location. The term "resource adaptation" as used herein at least includes changing the data resident location based on runtime object mapping, on-chip storage port status, and subsequent object access relationships, while keeping the object-level logical reference unchanged. It can further change execution resource binding, physical access combination, or issue timing. This process can be completed through control information and state updates, without being limited to circuit-level programmable logic reconfiguration. The terms “object-level instruction,” “microinstruction,” and “execution resource” used in this article are used to describe the corresponding technical relationships and are not limited to specific product names, physical bank partitioning methods, machine codes, mapping table implementation methods, or control information carriers.
[0054] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention in detail. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the present invention; those skilled in the art can combine, replace, or modify the task layering, logical data object and data block forms, object mapping state storage and update methods, subsequent access relationship utilization methods, on-chip storage organization, execution resource organization, and microinstruction generation methods without departing from the technical concept of the present invention.
Claims
1. A hardware acceleration system for hybrid cryptography tasks, characterized in that, The system includes an on-chip storage subsystem, at least one execution resource, and a scheduling control module. The on-chip storage subsystem includes multiple independently accessible on-chip storage resources. The scheduling control module is configured to map cryptographic protocol-level tasks to object-level instruction sequences. The object-level instructions use logical data objects containing multiple data elements as the basic operation granularity and identify at least one of a source logical data object and a destination logical data object through the logical data object identifier, without fixing the physical on-chip storage location or execution resource of the logical data object in the object-level instructions. At least one of the logical data objects can be divided into multiple data blocks. The scheduling control module includes or is connected to a mapping state storage structure, which is used to save the object mapping state between the logical data object or its data block and the current on-chip storage resource and its corresponding storage location with hardware-queryable and updatable state information. For at least one current object-level instruction in the object-level instruction sequence that produces a result logical data object, the scheduling control module determines, based on the object mapping state of the logical data object involved in the current object-level instruction, at least one other logical data object in the subsequent related object-level instructions in the object-level instruction sequence that needs to be accessed in parallel with the result logical data object. Furthermore, based at least on the object mapping state of the other logical data objects and the port occupancy state of the on-chip storage resources, combined with the preceding and following data dependencies and execution resource states, the module determines the source on-chip storage resources, candidate destination on-chip storage resources, and execution resources, and generates a micro-instruction sequence for hardware execution. When there is a port access conflict in the candidate destination on-chip storage resources, or when the result logical data object is written to the candidate destination on-chip storage... When storing resources would cause the result logical data object and at least some of the parallel operands of the at least one other logical data object to reside in the same on-chip storage resource that cannot meet the parallel access requirements, the scheduling control module selects another independently accessible on-chip storage resource as the actual destination on-chip storage resource, and the microinstruction sequence controls data reading, operation, and result writing back; after the result logical data object is written back, the scheduling control module updates the object mapping state of the result logical data object according to the actual destination on-chip storage resource and the corresponding storage location; the subsequent related object-level instructions, while keeping the result logical data object identifier unchanged, parse the current on-chip storage location of the result logical data object according to the updated object mapping state and generate the corresponding microinstruction sequence.
2. The hardware acceleration system according to claim 1, characterized in that, The hybrid cryptographic task includes at least a first type of cryptographic task and a second type of cryptographic task. The first type of cryptographic task includes traditional public-key cryptographic tasks with large integers or large integer data blocks as the main logical data objects. The second type of cryptographic task includes post-quantum cryptographic tasks with polynomials, polynomial vectors, or polynomial matrices as the main logical data objects. The first type of cryptographic task and the second type of cryptographic task share the scheduling control module and the on-chip storage subsystem, and are executed in the same hardware acceleration system through different combinations of object-level instructions or different microinstruction expansion methods.
3. The hardware acceleration system according to claim 1, characterized in that, For object-level instructions with the same logical operation and the same logical data object identifier, when at least one of the object mapping state, on-chip storage resource port occupancy state, execution resource state, or hardware parallelism changes, the scheduling control module, while keeping the logical data object identifier in the object-level instruction unchanged, redetermines at least one of the source on-chip storage resource, actual destination on-chip storage resource, execution resource, or microinstruction issue timing, and generates a microinstruction sequence different from the one before the change.
4. The hardware acceleration system according to claim 1, characterized in that, The on-chip storage subsystem includes multiple independently accessible storage groups; the scheduling control module determines one or more other logical data objects that need to be read in the same execution phase as the result logical data object based on the operand set of one or more subsequent related object-level instructions, and selects the destination storage group of the result logical data object according to the object mapping state of the other logical data objects, so that at least some of the parallel operands of the result logical data object and the one or more other logical data objects are distributed in different independently accessible storage groups.
5. The hardware acceleration system according to claim 1 or 4, characterized in that, The on-chip storage subsystem is configured to map data of different bit widths to one or more predetermined storage granularities, and to pack or unpack at least a portion of the data during the task input phase, task output phase, or capacity optimization phase; to maintain the data layout and alignment relationship of the corresponding logical data objects during the execution of two or more consecutive object-level instructions, and to record the corresponding data layout or alignment information in the object mapping state, so as to reduce data rearrangement and format conversion between the consecutive object-level instructions.
6. The hardware acceleration system according to claim 1, characterized in that, The execution resources include arithmetic execution resources for completing arithmetic operations in cryptographic tasks, and auxiliary execution resources that are functionally heterogeneous with the arithmetic execution resources and can be independently scheduled. The auxiliary execution resources include at least one of logical judgment and condition detection resources, data decomposition and compression resources, and hashing and sampling resources. The auxiliary execution resources and the arithmetic execution resources are connected to the scheduling control module through a unified scheduling interface, and execute micro-instructions corresponding to different object-level instructions in parallel or interleaved when data dependencies allow.
7. The hardware acceleration system according to claim 1, characterized in that, The mapping state storage structure stores the object mapping state in hardware-accessible entries; each entry includes at least a logical data object identifier, an on-chip storage resource identifier, and address information for locating the logical data object or its data blocks, and further includes at least one of the following: data block index or block mapping relationship, data layout, data bit width, alignment, validity status, and version status; the mapping state storage structure updates the corresponding entries according to the actual write-back location of the resulting logical data object during task execution, so that different data blocks of the same logical data object can be mapped to one or more current on-chip storage resources respectively.
8. A hardware scheduling method for hybrid cryptographic tasks, characterized in that, include: The system receives cryptographic protocol-level tasks and maps them to object-level instruction sequences. The object-level instructions use logical data objects containing multiple data elements as the basic operation granularity and identify operands through logical data objects without fixing the physical on-chip storage location or execution resources of the operands. At least one logical data object can be divided into multiple data blocks. In the mapped state storage structure, the object mapping state between the logical data object or its data block and the current on-chip storage resources and corresponding storage locations is maintained with hardware-queryable and updatable state information. For at least one current object-level instruction in the object-level instruction sequence that produces a result logical data object, based on the object mapping state of the logical data object involved in the current object-level instruction, at least one other logical data object in subsequent related object-level instructions that needs to be accessed in parallel with the result logical data object is determined. Furthermore, based at least on the object mapping state of the other logical data objects and the port occupancy state of the on-chip storage resources, combined with the preceding and following data dependencies and execution resource states, the source on-chip storage resource, candidate destination on-chip storage resource, and execution resource are determined, and a microinstruction sequence is generated. When the candidate destination on-chip storage resource has a port access conflict, or when writing the result logical data object to the candidate destination on-chip storage resource would cause at least some of the parallel operands of the result logical data object and the at least one other logical data object to be located in the same on-chip storage resource that cannot meet the parallel access requirements, another independently accessible on-chip storage resource is selected as the actual destination on-chip storage resource. The microinstruction sequence controls data reading, processing, and result writing back; The object mapping state of the result logical data object is updated based on the on-chip storage resources and corresponding storage locations actually written back to the result; and the subsequent related object-level instructions, while keeping the identifier of the result logical data object unchanged, parse the current on-chip storage location of the result logical data object based on the updated object mapping state and generate corresponding microinstructions.
9. The hardware scheduling method according to claim 8, characterized in that, Also includes: Distribute data blocks of the same logical data object into multiple independently accessible storage groups according to the parallel execution granularity of object-level instructions; Based on the operand set of one or more subsequent related object-level instructions, determine one or more other logical data objects that need to be read in the same execution phase as the result logical data object; Candidate destination storage groups and microinstruction issuance timing are determined based on the object mapping status of the other logical data objects, the port occupancy status of the storage group, and data dependencies. When the candidate destination storage group has port access conflicts or cannot meet the parallel access requirements of the subsequent related object-level instructions, another storage group that can be accessed independently and meets the write-back conditions is selected as the actual result write-back location, and the object mapping state of the corresponding logical data object is updated after the result is written back.
10. A cryptographic acceleration chip, characterized in that, Includes the hardware acceleration system as described in claim 1.
