Compact representation of transition sequences for singlet storage
By generating and verifying a hash set of system states and using a Merkle tree structure to store state history, the problem of existing technologies being unable to prevent invalid transitions and support multiple ownership transitions is solved, thus achieving effective state management and sustainability in systems with limited resources.
Patent Information
- Application Number
- CN202480036152.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-29
- Filing Date
- 2024-05-23
- Publication Date
- 2025-12-26
AI Technical Summary
Existing technologies cannot effectively prevent invalid transitions of system state, cannot record and verify state transition history in systems with limited resources, and cannot support multiple ownership transitions without damaging the device, leading to the generation of electronic waste.
By generating a hash set of known good states of the system, using aggregate hashes to represent the state history, and verifying the validity of state transitions in the system, transitions are restricted to only known good states. The hash set is stored and verified using a Merkle tree structure.
It enables the effective prevention of invalid state transitions in resource-constrained systems, supports multiple ownership transitions without damaging equipment, reduces storage and processing requirements, improves computing efficiency, and reduces electronic waste.
Smart Images

Figure CN121219702A_ABST
Abstract
Description
Background Technology
[0001] This invention relates to system security, and more specifically, to protecting a system by providing a compact representation of the system's state and efficient transitions that the system can undergo.
[0002] Monitoring the current configuration of a system is a common practice. As used herein, the term "system" also includes subsystems and devices within the system, and can refer to devices, computers, collaborative devices, and computers, etc. The terms "system" and "device" are used interchangeably. The goal of monitoring is to determine whether the system configuration is in an acceptable or compliant state and to take remedial action if necessary. An example of such monitoring is determining whether the latest software updates have been applied or whether the system is running a vulnerable version of the software.
[0003] However, monitoring has its limitations. Without additional data, a snapshot of the current configuration does not reflect the history of updates to the system. If the monitoring system does capture additional data, such as activity logs, the data can become quite large and difficult to analyze, and in some cases, it gets buried within unconstrained logs. Furthermore, if monitoring detects non-compliance, such as after a cyberattack, the damage has already been accomplished.
[0004] Systems conforming to the U.S. government's Platform Firmware Resilience Guidelines, as defined by the National Institute of Standards and Technology (NIST) branch of the U.S. Department of Commerce, must implement three security and integrity principles: protection, detection, and recovery. Monitoring systems for misconfiguration are one method of providing detection. However, protection seeks to prevent misconfiguration in the first place, before it becomes effective.
[0005] While monitoring can provide detection, it does not meet protection requirements. To achieve protection under the NIST guidelines mentioned above, a system must only allow valid transitions to a new state or configuration, and it must prevent invalid transitions. For example, in an encryption device, a valid transition is erasing the key from the previous owner before adding the key for the new owner. An invalid transition is adding the key for the new owner before erasing the key for the previous owner. While simple transitions like this example can be "hardwired" or programmed into the firmware, the valid sequence of events will change over time.
[0006] The solutions attempted and their drawbacks
[0007] Hardware Security Module (HSM)
[0008] HSMs are tamper-proof processing units that perform sensitive operations such as protecting cryptographic operations, encrypting financial transactions, and verifying firmware running within them. The data they protect is of extremely high value. Some users with very high security requirements may want to prevent the transfer of firmware verification keys from the original vendor to keys from any other party. They also want to know the history of all such transfers.
[0009] Current HSMs do not support this functionality. Due to the limited programmability and storage within the tamper-protected shell, they cannot prevent successfully authenticated but invalid transitions, and they can only report the most recent transition. Another issue is that HSMs may not be able to prevent firmware rollback to flawed or vulnerable versions.
[0010] Sustainable Development and Circular Economy
[0011] When data center equipment reaches a certain stage in its lifecycle, it is either decommissioned, salvaged, or sold for reuse. If the equipment contains the owner's firmware verification key, there is no simple and secure way to erase or replace the key before thousands of systems are decommissioned and resold. Buyers may want to install their own keys, but this usually requires authorization from the seller or original vendor for each unique device. There is no infrastructure available for these ownership transfers on a large scale. Currently, devices containing the owner's firmware verification key must be decommissioned, which is an unsustainable solution.
[0012] Telecommunications and Satellite
[0013] Cellular network providers operate hundreds of thousands of small servers to support their networks. While these systems are behind locked doors, they remain vulnerable to physical and logical attacks. Initial setup and remote support are typically provided by companies like Red Hat. Once initialized, these systems support remote system updates and monitoring. The systems are configured as "appliances," meaning thousands of applications share the same hardware, firmware, and software. If someone installs unauthorized software on a system, it can only be detected afterward. Detecting an attack involves processing system logs and looking for anomalies compared to a database of permitted software. Satellites operate in a similar manner because they have limited resources and need to protect against, rather than detect, unauthorized software updates.
[0014] Trusted Platform Module (TPM) and Integrity Measurement Architecture (IMA)
[0015] The Linux kernel's Integrity Subsystem monitors individual files for unauthorized changes. It instructs the TPM (Track Management Processing) to maintain a cumulative hash of files that are executed and opened (in other file operations). IMA can prevent unauthorized changes to individual files, but it cannot identify illegal operations across multiple files. For example, assuming only fifty files are running, it cannot prevent fifty-six files from running to establish a network. Summary of the Invention
[0016] Various aspects of the present invention provide practical methods that conform to the aforementioned NIST principles. In such aspects, permissible transitions are updated without a major firmware rewrite. Furthermore, permissible transitions are provided in a compact representation, such as via one or more hashes or equivalent other compact representations, which is readily adaptable to systems with limited resources (e.g., devices), efficiently encodes state transitions, and takes very little time to transmit. These benefits, for example, reduce the hardware requirements of such systems by reducing the amount of memory required, and improve computer efficiency and reduce processing requirements and transmission bandwidth due to the small size of the hashes.
[0017] Furthermore, some aspects of the present invention overcome limitations in HSMs by enabling the restriction of state changes to certain transitions and the ability to report the entire history from within a resource-constrained system.
[0018] Furthermore, some aspects of this invention support sustainability. By implementing such aspects, the device can support multiple ownership transfers without destroying the device, thereby generating electronic waste.
[0019] Furthermore, by implementing some aspects of the invention, remote systems can prevent unauthorized configuration changes during attempts, rather than simply detecting them afterward. This feature is particularly useful in telecommunications and satellite systems.
[0020] Furthermore, by implementing some aspects of the present invention, subsystem configuration can be enforced across files.
[0021] The following methods can enable some or all of the aforementioned benefits.
[0022] According to one aspect of the invention, a system-implemented (e.g., computer-implemented) method for generating a hash set representing a sequence of known good states includes: a priori determining all known good state sequences of the system. Valid paths for the determined known good state sequences are enumerated by constructing an aggregate hash containing history representing states along these paths, whereby, when the system traverses the known good sequences, the resulting hash set represents all valid states. The aggregate hash containing history is stored. A state advance call is received from the system, and in response to receiving the call, the stored aggregate hash containing history is sent to the system.
[0023] According to one aspect of the invention, a method for verifying whether a state transition is permitted and / or valid in a system implementation includes: requesting a set of aggregate hashes containing history in response to receiving a request to transition to a new state; receiving the aggregate hashes containing history; and performing an evaluation regarding whether to transition to the new state within the system by: calculating a hash of the requested new state; comparing the calculated hash with the received aggregate hashes containing history; and allowing the transition to the new state in response to determining that the calculated hash matches one of the aggregate hashes containing history, otherwise disallowing the transition to the new state in response to determining that the calculated hash does not match one of the aggregate hashes containing history.
[0024] According to one aspect, a computer program product includes one or more computer-readable storage media, and program instructions commonly stored on the one or more computer-readable storage media. The program instructions include program instructions that perform any combination of the foregoing methods.
[0025] According to one aspect, a system includes a processor and logic integrated with the processor and executable by the processor, or integrated with and executable by the processor. The logic is configured to perform any of the foregoing methods.
[0026] Other aspects of the invention will become apparent from the following detailed description, which illustrates the principles of the invention by way of example when taken in conjunction with the accompanying drawings. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of a computing environment according to one aspect of the present invention.
[0028] Figure 2A It is a flowchart of a method for generating a hash set representing a known good state sequence.
[0029] Figure 2B It is a device-centric representation of a process based on a method.
[0030] Figure 3 It is a flowchart of a method for verifying whether a state transition is allowed and / or valid.
[0031] Figure 4 It is a flowchart of a method for representing before-and after state pairs.
[0032] Figure 5 It is a graph representing the set of potentially valid sequences.
[0033] Figure 6This is a flowchart illustrating a method for creating a tree structure.
[0034] Figure 7 It is a graph representing the set of potentially valid sequences. Detailed Implementation
[0035] The following description is for the purpose of illustrating the general principles of the invention and is not intended to limit the inventive concepts claimed herein. Furthermore, specific features described herein can be combined with other described features in every possible combination and permutation.
[0036] Unless otherwise specified herein, all terms shall be given the broadest possible interpretation, including the meaning implied in the specification and the meaning as understood by those skilled in the art and / or the meaning defined in dictionaries, monographs, etc.
[0037] It should also be noted that, as used in the specification and appended claims, the singular forms of "a," "an," and "the" include plural referents unless otherwise stated. It will also be understood that, when used in this specification, the terms "comprising" and / or "including" specify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0038] The following description discloses several preferred systems, methods, and computer program products for protecting a system by providing a compact representation of the system's state and the valid transitions it can undergo. Using this representation, the system can prevent invalid transitions before they occur. Furthermore, this compact representation facilitates the effective detection of misconfigurations. Moreover, if the list of permitted transitions must be changed, only the representation of valid transitions is replaced, preferably through an authentication operation.
[0039] In a general approach, a system implementation (e.g., a computer implementation) for generating a set of hashes representing known good states includes: a priori determining all known good state sequences of the system. Valid paths for the determined known good state sequences are enumerated by constructing aggregate hashes containing the history of the states along these paths, such that, as the system traverses the known good sequences, the resulting set of hashes represents all valid states. The aggregate hashes containing the history are stored. A state advance call is received from the system, and in response to receiving the call, the stored aggregate hashes containing the history are sent to the system.
[0040] The system (e.g., the system's device) can then use the aggregated hash containing the history to determine whether a state change is permitted. If the system computes a hash for a state change that does not match the corresponding one in the aggregated hash containing the history, it can prevent the state change from occurring before it does. Therefore, the system's security is enhanced by preventing invalid and potentially malicious state changes from taking place.
[0041] Furthermore, by storing the hash set in external memory, permissible transitions can be updated without a major firmware rewrite. Additionally, providing permissible transitions in a compact representation, such as via one or more hashes or equivalent other compact representations, is readily adaptable to systems with limited resources (e.g., devices), efficiently encoding state transitions and requiring very little transmission time. These benefits include, for example, reducing the amount of memory required, thus lowering the hardware requirements of such systems, and improving computing efficiency and reducing processing requirements and transmission bandwidth due to the small size of the hashes.
[0042] In a preferred approach, aggregate hashes containing history are stored in a tree structure, such as a Merkle tree. Tree structures provide a simple and accurate way to represent aggregate hashes containing history.
[0043] Tree structures can be normalized, such as by sorting their lowest-level nodes, so that tree construction is deterministic (and the encoding of the same state machine will also be the same). In other words, this normalization ensures that the same state machine is encoded as the same tree.
[0044] In some methods, the hash containing the history representing the terminating state is specially labeled. This is particularly useful for identifying those hashes as associated with the terminating state. This allows the system to explicitly exit from state sequence traversal.
[0045] In one approach, at least some aggregate hashes containing history are constructed by sequentially combining hashes used for the state along corresponding paths (e.g., by hashing leaves at the same level in a tree). This has the effect of encoding and distinguishing different paths that can be taken to reach a particular state.
[0046] One approach involves adding a register of a second hash size to the system, for example, by allocating a portion of existing persistent memory to the second register, or by adding persistent memory to the second register. Adding a register of a second hash size allows traversal of one of the offline enumeration states, regardless of the number of valid paths from the current starting state, as described in more detail below.
[0047] According to one aspect, a computer program product for generating a hash set representing a sequence of known good states includes one or more computer-readable storage media and program instructions commonly stored on the one or more computer-readable storage media. The program instructions include program instructions for performing any combination of the foregoing methods.
[0048] According to one aspect, a system includes a processor and logic integrated with the processor and executable by the processor, or integrated with and executable by the processor. The logic is configured to perform any of the foregoing methods.
[0049] A method for a system implementation to verify whether a state transition is permitted and / or valid includes: in response to receiving a request to transition to a new state, requesting a set of aggregate hashes containing history; receiving the aggregate hashes containing history; and within the system, performing an evaluation of whether to transition to the new state by: calculating a hash of the requested new state; comparing the calculated hash with the received aggregate hashes containing history; and in response to determining that the calculated hash matches one of the aggregate hashes containing history, allowing the transition to the new state; otherwise, in response to determining that the calculated hash does not match one of the aggregate hashes containing history, disallowing the transition to the new state.
[0050] Whether a state change is allowed is determined by using an aggregated hash that includes the history. If the system computes a hash for a state change that does not match the corresponding hash in the aggregated hash containing the history, it can prevent the state change from occurring before it does. Therefore, the system's security is enhanced by preventing invalid and potentially malicious state changes from taking place.
[0051] Furthermore, providing permissible transitions in a compact representation, such as via one or more hashes or equivalent other compact representations, is readily adaptable to systems with limited resources (e.g., devices), efficiently encoding state transitions and requiring very little transmission time. These benefits include, for example, reducing the amount of memory required to lower the hardware requirements of such systems, and improving computer efficiency and reducing processing requirements and transmission bandwidth due to the small size of hashes.
[0052] This approach overcomes the limitations in HSMs by enabling the restriction of state changes to certain transitions and the ability to report the entire history from within a resource-constrained system.
[0053] Furthermore, this approach can support sustainability. By achieving this, the device can support multiple ownership transfers without destroying the device and thus generating e-waste.
[0054] In one approach, aggregate hashes containing history are received as tree structures (such as Merkle trees). Tree structures provide a simple and accurate way to represent aggregate hashes containing history.
[0055] Preferably, the tree structure is retained in the system only as a temporary copy. Therefore, the system's persistent storage requirements are greatly reduced.
[0056] In one approach, the system persistently stores only the root of the tree structure. Since the rest of the tree structure can be retrieved from a remote location, the persistent storage required for the root on the system is minimal.
[0057] In one approach, after transitioning to a new state, a hash of the requested new state is generated using hashes of the system's current state and expected state. The resulting hash of the requested new state can then be compared with a received aggregate hash containing the history to determine whether the transition to the new state is permitted.
[0058] One approach involves replacing the hash of the system's current state in a persistent register with the hash of the computed new state in response to a transition to a new state. In this way, the system stores a representation of its current state, which can be used on the next invocation when a state change occurs.
[0059] In one approach, the calculated hash is replaced with the hash of the final state reached in response to the termination of execution in the state machine within the system. This final state can become the initial state hash (S0) used in the next execution of the state machine.
[0060] Preferably, the calculated hash is stored in a second persistent register. Adding a second hash size allows traversal of one of the offline enumerated states from the current starting state, regardless of the number of valid paths, as described in more detail below.
[0061] In one approach, the aggregate hash containing history is taken in the form of a Merkle tree, and the computed hash is generated using at least a hash identifying the current state of the system. The computed hash is compared to values in the Merkle tree to determine if a requested state transition matches a valid sequence of state transitions in the Merkle tree. Tree structures such as Merkle trees provide a simple and accurate way to represent aggregate hashes containing history. Furthermore, by using a hash identifying the current state of the system, which itself can be a aggregate hash containing history stored in response to transitions to the current state, less computation is required.
[0062] According to one aspect, a computer program product for verifying whether a state transition is permitted and / or valid includes one or more computer-readable storage media and program instructions commonly stored on the one or more computer-readable storage media. The program instructions include program instructions for performing any combination of the foregoing methods.
[0063] According to one aspect, a system includes a processor and logic integrated with the processor and executable by the processor, or integrated with and executable by the processor. The logic is configured to perform any of the foregoing methods.
[0064] Various aspects of this disclosure are described by narrative text, flowcharts, block diagrams of computer systems, and / or block diagrams of machine logic included in a computer program product (CPP). With respect to any flowchart, depending on the art involved, operations may be performed in a different order than shown in a given flowchart. For example, also according to the art involved, two operations shown in consecutive flowchart blocks may be performed in reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time.
[0065] Exemplary computer environment for a system (e.g., a device) or a part thereof
[0066] The term "computer program product aspect" ("CPP aspect" or "CPP") is used in this disclosure to describe any set of one or more storage media (also referred to as "media") collectively included in a set of one or more storage devices, which collectively include machine-readable code corresponding to instructions and / or data for performing the computer operations specified in a given CPP claim. "Storage device" is any tangible device capable of holding and storing instructions used by a computer processor. Without limitation, a computer-readable storage medium can be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include: magnetic disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or pits / platforms formed in the main surface of the disk), or any suitable combination of the foregoing. As used in this disclosure, computer-readable storage medium should not be construed as storage in the form of transient signals such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides, optical pulses transmitted through fiber optic cables, electrical signals transmitted through wires, and / or other transmission media. As those skilled in the art will understand, data is typically moved at some incidental point in time during normal operation of the storage device (such as during access, defrauding, or garbage collection), but this does not render the storage device transient, because the data is not transient when it is stored.
[0067] The computing environment 100 includes examples of environments for executing at least some of the computer code involved in performing the methods of the present invention, such as the code in block 150 for providing a compact representation of the state of the system and the efficient transitions allowed in the system. In addition to block 150, the computing environment 100 includes, for example, a computer 101, a wide area network (WAN) 102, an end-user equipment (EUD) 103, a remote server 104, a public cloud 105, and a private cloud 106. In this method, the computer 101 includes a processor set 110 (including processing circuitry 120 and cache 121), a communication structure 111, volatile memory 112, persistent storage 113 (including an operating system 122 and block 150, as identified above), a peripheral device set 114 (including a user interface (UI) device set 123, storage 124, and an Internet of Things (IoT) sensor set 125), and a network module 115. The remote server 104 includes a remote database 130. Public cloud 105 includes gateway 140, cloud orchestration module 141, host physical machine set 142, virtual machine set 143, and container set 144.
[0068] Computer 101 may take the form of a desktop computer, laptop computer, tablet computer, smartphone, smartwatch or other wearable computer, mainframe computer, quantum computer, or any other form of computer or mobile device now known or to be developed in the future, capable of running programs, accessing networks, or querying databases such as remote database 130. As is well known in the field of computer technology, and depending on the technology, the execution of computer-implemented methods may be distributed among multiple computers and / or multiple locations. On the other hand, in this presentation of computing environment 100, the detailed discussion focuses on a single computer, specifically computer 101, to keep the presentation as simple as possible. Computer 101 may reside in the cloud, even if it is not in... Figure 1 The cloud is shown in the diagram. On the other hand, computer 101 does not need to be in the cloud, except to any extent that can be definitively indicated.
[0069] Processor set 110 contains one or more computer processors of any type now known or to be developed in the future. Processing circuitry 120 may be distributed across multiple packages (e.g., multiple coordinating integrated circuit chips). Processing circuitry 120 may implement multiple processor threads and / or multiple processor cores. Cache 121 is a memory located within the processor chip package and typically used for data or code that should be readily accessible by the threads or cores running on processor set 110. Cache memory is typically organized into multiple tiers based on its relative proximity to the processing circuitry. Alternatively, some or all of the cache for the processor set may be located "off-chip". In some computing environments, processor set 110 may be designed to operate in qubits and perform quantum computing.
[0070] Computer-readable program instructions are typically loaded onto computer 101 to cause a series of operational steps to be executed by processor set 110 of computer 101 and thereby implement a computer-implemented method, such that the instructions executed thereon instantiate the method specified in the flowcharts and / or descriptive passages of the computer-implemented method included in this document (collectively referred to as the "method of the invention"). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 121 and other storage media discussed below. The program instructions and associated data are accessed by processor set 110 to control and direct the execution of the method of the invention. In computing environment 100, at least some of the instructions for performing the method of the invention may be stored in persistent storage 113 in block 150.
[0071] Communication structure 111 is a signal transmission path that allows the components of computer 101 to communicate with each other. Typically, this structure consists of switches and conductive paths, such as switches and conductive paths that form buses, bridges, physical input / output ports, etc. Other types of signal communication paths can be used, such as fiber optic communication paths and / or wireless communication paths.
[0072] Volatile memory 112 is any type of volatile memory now known or to be developed in the future. Examples include dynamically typed random access memory (RAM) or statically typed RAM. Typically, volatile memory 112 is characterized by random access, but this is not required unless explicitly indicated. In computer 101, volatile memory 112 is located in a single package and inside computer 101, but alternatively or additionally, volatile memory may be distributed across multiple packages and / or located externally relative to computer 101.
[0073] Persistent storage 113 is any form of non-volatile storage for a computer, now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is supplied to the computer 101 and / or directly to the persistent storage 113. Persistent storage 113 may be read-only memory (ROM), but typically at least a portion of persistent storage allows data to be written, deleted, and rewritten. Some common forms of persistent storage include hard disks and solid-state storage devices. Operating system 122 may take several forms, such as various known proprietary operating systems or operating systems employing an open-source portable operating system interface type with a kernel. The code included in block 150 generally includes at least some of the computer code involved in performing the methods of the present invention.
[0074] Peripheral device set 114 includes a collection of peripheral devices for computer 101. Data communication connections between the peripheral devices of computer 101 and other components can be implemented in various ways, such as Bluetooth connectivity, near field communication (NFC) connectivity, connections formed by cables (such as Universal Serial Bus (USB) type cables), plug-in type connections (e.g., secure digital (SD) cards), connections formed via local area communication networks, and even connections formed via wide area networks such as the Internet. In various methods, UI device set 123 may include components such as displays, speakers, microphones, wearable devices (such as goggles and smartwatches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. Storage 124 is external storage, such as external hard drives or pluggable storage, such as SD cards. Storage 124 can be persistent and / or volatile. In some methods, storage 124 may take the form of quantum computing storage devices for storing data in the form of qubits. In methods where computer 101 requires a large amount of storage (e.g., where computer 101 locally stores and manages a large database), this storage can be provided by peripheral storage devices designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. The IoT sensor set 125 consists of sensors that can be used in IoT applications. For example, one sensor could be a thermometer, and another sensor could be a motion detector.
[0075] Network module 115 is a collection of computer software, hardware, and firmware that allows computer 101 to communicate with other computers via WAN 102. Network module 115 may include hardware such as a modem or Wi-Fi transceiver, software for packetizing and / or depacketizing data for transmission over the communication network, and / or web browser software for transmitting data over the Internet. In some methods, the network control and network forwarding functions of network module 115 are performed on the same physical hardware device. In other methods (e.g., methods utilizing software-defined networking (SDN), the control and forwarding functions of network module 115 are performed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for performing the methods of the present invention can typically be downloaded to computer 101 from an external computer or external storage device via a network adapter card or network interface included in network module 115.
[0076] A WAN 102 is any wide area network (e.g., the Internet) capable of transmitting computer data over non-local distances using any technology known now or developed in the future for transmitting computer data. In some approaches, a WAN 102 can be replaced and / or supplemented by a local area network (LAN) designed to transmit data between devices located in a local area, such as a Wi-Fi network. WANs and / or LANs typically include computer hardware such as copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and edge servers.
[0077] End User Equipment (EUD) 103 is any computer system used and controlled by an end user (e.g., a customer of the enterprise operating computer 101), and can take any of the forms discussed above in conjunction with computer 101. EUD 103 typically receives helpful and useful data from the operation of computer 101. For example, in the hypothetical scenario where computer 101 is designed to provide recommendations to the end user, these recommendations would typically be transmitted from computer 101's network module 115 via WAN 102 to EUD 103. In this way, EUD 103 can display or otherwise present the recommendations to the end user. In some approaches, EUD 103 can be a client device, such as a thin client, a heavy client, a mainframe computer, a desktop computer, etc.
[0078] Remote server 104 is any computer system that provides at least some data and / or functionality to computer 101. Remote server 104 can be controlled and used by the same entity operating computer 101. Remote server 104 represents a machine that collects and stores helpful and useful data for use by other computers such as computer 101. For example, in a case where computer 101 is designed and programmed to provide recommendations based on historical data, that historical data can be provided to computer 101 from a remote database 130 of remote server 104.
[0079] Public cloud 105 is any computer system available to multiple entities, providing on-demand availability of computer system resources and / or other computing capabilities, particularly data storage (cloud storage) and computing power, without requiring direct active management by users. Cloud computing typically leverages resource sharing to achieve scalability consistency and cost-effectiveness. Direct and active management of the computing resources of public cloud 105 is performed by the computer hardware and / or software of cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented using virtual computing environments that run on various computers constituting host physical set 142, which is multiple physical computers in and / or available to public cloud 105. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 143 and / or containers from container set 144. It is understood that these VCEs can be stored as images and can be transferred between various physical machine hosts as images or after the instantiation of a VCE. The cloud orchestration module 141 manages the transmission and storage of images, deploys new instantiations of VCE, and manages active instantiations of VCE deployments. Gateway 140 is a collection of computer software, hardware, and firmware that allows the public cloud 105 to communicate via WAN 102.
[0080] Now, some further explanation of Virtualized Computing Environments (VCEs) will be provided. A VCE can be stored as an "image." New active instances of a VCE can be instantiated from an image. Two common types of VCEs are virtual machines and containers. A container is a VCE that uses operating system-level virtualization. This refers to the operating system feature where the kernel allows multiple isolated user-space instances called containers to exist. These isolated user-space instances typically appear as real computers from the viewpoint of the programs running within them. Computer programs running on a regular operating system can utilize all the resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running within a container can only use the contents of the container and the devices allocated to that container; this is a characteristic known as containerization.
[0081] Aside from the fact that computing resources can only be used by a single enterprise, private cloud 106 is similar to public cloud 105. While private cloud 106 is depicted as communicating with WAN 102, in other approaches, private cloud can be completely disconnected from the internet and accessed only via a local / private network. Hybrid cloud is a combination of multiple clouds of different types (e.g., private, community, or public cloud types) typically implemented separately by different vendors. Each of the multiple clouds maintains a separate and discrete entity, but the larger hybrid cloud architecture is bound together through standardization or proprietary technologies, enabling orchestration, management, and / or data / application portability across the multiple component clouds. In this approach, both public cloud 105 and private cloud 106 are part of a larger hybrid cloud.
[0082] In some aspects, a system according to various methods may include a processor and logic integrated with and / or executable by the processor, the logic being configured to perform one or more process steps described herein. The processor may have any configuration as described herein, such as a discrete processor or processing circuitry including many components such as processing hardware, memory, I / O interfaces, etc. Integration means that the processor has logic embedded therein as hardware logic, such as application-specific integrated circuits (ASICs), FPGAs, etc. Executable by a processor means that the logic is hardware logic; software logic, such as firmware, parts of an operating system, parts of an application program, etc.; or a combination of hardware and software logic that is accessible to the processor and configured to cause the processor to perform some function when executed by the processor. The software logic may be stored in local and / or remote memory of any memory type, as known in the art. Any processor known in the art may be used, such as software processor modules and / or hardware processors, such as ASICs, FPGAs, central processing units (CPUs), integrated circuits (ICs), graphics processing units (GPUs), etc.
[0083] Of course, depending on the method, this logic can be implemented as a method or computer program product on any device and / or system.
[0084] Overview
[0085] High-guarantee systems for managing configurations can use cryptographic hashes as a compact and explicit representation of the entire system state. Hashes, characterized by data structures, can securely encode the state of systems of arbitrary size in small, fixed-size fields. However, devices capable of storing only a single state cannot store additional fields for things such as a list of specific sequences of states. The various methods described in this paper enable the creation of such lists, thereby enabling things such as describing multiple traversal paths through a set of states, or for other multi-valued scenarios.
[0086] One of the above lists can be useful if, for example, the system needs to describe multiple traversal paths through a set of states, or other multi-valued scenarios. For example, suppose a remote management system (device) is initially provided with a password key A. Subsequently, the system receives a new key B. In the current state of the prior art, the device cannot determine whether it should trust and install the new key B. Furthermore, what if key B is revoked in the future? Key B can be replaced with a new key C, or it can revert to key A, i.e., the latest "known good" key. Initially, the valid transitions are A->B and B->C, as well as B->A. Suppose that after key B is revoked, transitions to key B are no longer allowed, then transition A->B is no longer valid. In some cases, including the history of transitions A->B can be important because the device may have been under the control of an attacker using key B for some time. Keeping track of all valid and past transitions to date is generally impossible in devices with limited resources.
[0087] As will soon become apparent, the system configured as presented in this paper can now evolve through sequences of known states (which may be a priori enumerated offline), even if the actual path taken may only become known at runtime. A particularly important application implemented by the method described in this paper is describing all valid state transition sequences from a given state to ensure that only one of the a priori known transition sequences is followed. The aspects provide a scalable solution to restrict the sequence of transactions through known good sequences while adding only an invariant number of bits, regardless of the size of the sequence set.
[0088] Furthermore, a minimal additional field (another hash) and a compact external data structure can securely and explicitly encode all valid paths through a known set of states. Since only one additional hash field plus a few attribute bits are added to persistent storage, and temporary storage is used for the [external] data structure that scales with the number of possibilities, the system according to the method presented in this paper can be readily implemented in devices with limited storage space. Moreover, the various methods are particularly suitable for implementation in devices where hash-based data structures are already available.
[0089] Single-value password hash
[0090] In some approaches, the system (e.g., the device) has been configured to represent state as a single-value hash field. Such cryptographic representations of state (history) are known in the art, for example, git, Trusted Platform Module: Platform Configuration Register (TPM:PCR), etc. The system is then modified according to the teachings of this paper. In a preferred approach, a register of a single hash size is added to allow traversal of one of the offline enumeration states, regardless of the number of valid paths from the current starting state.
[0091] Other methods include modifying the system to represent the state as a single-valued hash field, and adding additional registers. The system can also be programmed to provide this functionality.
[0092] Description of effective state transitions
[0093] Assuming the system is already configured to represent states as single-valued hash fields, this single-valued case is extended to traversing an offline enumeration state machine, where all possible (allowed or valid) transitions are known a priori, but the extraction path to be taken is not determined before runtime. An auxiliary, non-extendable structure is constructed to represent all valid sequences from the current state, possessing some or all of the following properties: 1. In some methods, this structure can be explicitly identified by a single cryptographic hash (such as a hierarchical, normalized tree structure with a single top-level hash). The structure itself aggregates multiple individually computed hashes. Representing the set of valid paths, the hashes of the entire tree structure are recorded to describe valid transitions. 2. In some approaches, structure is insensitive. It can be safely assumed that the hash has masked the original input, and the structure can be preserved in untrusted media. The integrity of the external data structure (as identified by its top-level hash) is verified with each call. In preferred approaches, only temporary copies are used during command evaluation within the device; the entire structure is persistently retained only in external storage. 3. In some methods, the structure can be traversed efficiently, especially when checking the presence / absence of a specific lower-level hash. Typically, for N hashes (which can be implemented using a hash tree), a time complexity of O(log(N)) is expected. Aside from verifying tree consistency, exactly two lookups can be expected to be performed to evaluate each before-after state pair. 4. In some methods, given a top-level hash, the structure is immutable because it can be explicitly verified that the structure corresponds to a specific top-level hash. For example, since we are using cryptographic hash functions, attempting to construct different structures with the same top-level hash is considered infeasible. 5. In some methods, the structure is constructed from all valid system state hashes that can be encountered during any secure transition, and no other hashes are used. Checking the validity of a transition is equivalent to checking both the current and expected next state hashes in the structure; the absence of either state implies a deviation from all accepted sequences. 6. In some methods, the structure needs to be marked with a valid termination state to allow the device to explicitly exit from the state sequence traversal.
[0094] The well-known data structure, the Merkle tree [MRK], possesses these properties if it is extended by its ability to mark terminating states. Its applicability is described in detail below. Other data structures may also be used in other approaches.
[0095] Combine the current state and past history into a hash field.
[0096] In order to encode a specific sequence of states that the system is expected to pass through, it is preferable to use an additional or otherwise combined hash to create a structure for updating the state.
[0097] In some methods, a construct commonly used by the TPM hash register (PCR) can be employed, where the hash is simply concatenated and rehashed [TPM:PCR]. Other similar schemes can be used in various methods.
[0098] Exemplary process
[0099] Now for reference Figure 2A The flowchart illustrates a method 200 for generating a hash set representing a sequence of known good states, according to a method described above. Among other things, method 200 can be implemented according to the present invention... Figure 1 This can be performed in any environment depicted herein and in any combination of the features of the exemplary architectures and methods described in detail below. Of course, as those skilled in the art will understand upon reading this description, method 200 may include... Figure 2A The specific operations described in the text may include more or fewer operations.
[0100] Each step of method 200 can be performed by any suitable component of the operating environment. For example, in various methods, method 200 can be performed, in part or in whole, by a system such as a computer or some other device having one or more processors. A processor (e.g., a processing circuit, chip, and / or module implemented in hardware and / or software, and preferably having at least one hardware component) can be used in any device to perform one or more steps of method 200. Illustrative processors include, but are not limited to, a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a combination thereof, or any other suitable computing device known in the art.
[0101] like Figure 2A As shown, method 200 can begin with operation 202, wherein the known good state sequence of the device is determined a priori. Preferably, all known good state sequences are generated.
[0102] In operation 204, the valid paths for the determined sequence of known good states are enumerated by constructing aggregate hashes containing history representing the states along these paths. The resulting set of hashes represents all valid states when traversing the known good sequence. The aggregate hashes containing history are constructed by sequentially combining the hashes used for the states along the corresponding paths. The process and examples of constructing aggregate hashes containing history are presented in detail below.
[0103] In operation 206, an aggregated hash containing the history is stored. Preferably, the hash is stored in a known data structure. A tree structure, such as a Merkle tree, is particularly preferred.
[0104] In operation 208, the status is received from the device in advance.
[0105] In operation 210, in response to receiving the call, the stored aggregate hash containing the history is sent to the device. The device can then use the aggregate hash containing the history to determine whether a state change is permitted. If the device computes a hash for a state change that does not match the corresponding hash in the aggregate hash containing the history, it can prevent the state change from occurring. Therefore, the device's security is enhanced by preventing invalid and potentially malicious state changes from taking place.
[0106] Figure 2B A device-centric representation 250 depicting a process according to preferred aspects, including generating a hash set (e.g., such as...) Figure 2A In the method) to use hash (e.g., as Figure 3 The method involves a transition to verify whether a state transition is allowed and / or valid.
[0107] Figure 2B In particular, it has been demonstrated how transient relative to persistent state is preferred in some methods—specifically, by providing redundant and one-time on-demand data, only a negligible amount of persistent memory is required in the preferred methods. As shown in the figure, the system includes a potentially untrusted host and devices, such as resource-constrained devices with temporary and persistent memory.
[0108] Continue to refer to Figure 2B At position 252, the host maintains a tree (structure) of the entire state transition remotely from the device. This tree (structure) is non-extendable, even if stored externally. The device preferably maintains the expected total hash at position 258, so the host does not need to replace this structure. Due to non-extendability, no related structure needs to be maintained continuously except for the current hash at position 258 plus the hash of the currently trusted table.
[0109] At position 254, each state change operation is sent in the expected next state (ID / hash) and a tree structure is attached to it.
[0110] At 256, depending on the implementation, the device can have sufficient transient internal memory to store discarded copies during each call, or a structure with streaming capabilities can be used if even transient memory is limited. Either way, only a small, fixed-size persistent structure is needed at 256. Transient memory is relatively unremarkable even in small devices.
[0111] When processing a request, the comparison at 260 always checks the expected / known good hash (258) against a temporary copy of the expected / known good hash (256), and if they do not match, the tree and the entire request are rejected.
[0112] Regardless of how the request terminates, any transient data attached to the request can be discarded at 262 after completion.
[0113] Figure 2B The representation 250 specifically highlights which elements are small and which scalable structures are only temporarily used in the preferred method illustrated. Therefore, regardless of the state table size, resource requirements for small devices are not prohibited when there is a reason.
[0114] Now for reference Figure 3 The diagram illustrates a flowchart of method 300 for verifying whether a state transition is permitted and / or valid, according to a method of the present invention. Among other things, method 300 can be implemented according to the present invention... Figure 1-2A This can be performed in any environment depicted herein and in any combination of the features of the exemplary architecture and exemplary methods described in detail below. Of course, as those skilled in the art will understand upon reading this description, method 300 may include... Figure 3 The specific operations described in the text may include more or fewer operations.
[0115] Each step of method 300 can be performed by any suitable component of the operating environment. For example, in various methods, method 300 can be performed, in part or in whole, by a system such as a computer or some other device having one or more processors. A processor (e.g., a processing circuit, chip, and / or module implemented in hardware and / or software, and preferably having at least one hardware component) can be used in any device to perform one or more steps of method 300. Illustrative processors include, but are not limited to, a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a combination thereof, or any other suitable computing device known in the art.
[0116] like Figure 3 As shown, method 300 can begin with operation 302, wherein, in response to receiving a request to transition to a new state, the request contains a set of aggregate hashes of the history.
[0117] In operation 304, receive the aggregate hash containing the history.
[0118] In operation 306, within the device, an evaluation of whether to transition to a new state is performed by the following sub-methods: calculating the hash of the requested new state, comparing the calculated hash with a received aggregate hash containing history, and allowing the transition to the new state in response to determining that the calculated hash matches one of the aggregate hashes containing history; otherwise, disallowing the transition to the new state in response to determining that the calculated hash does not match one of the aggregate hashes containing history.
[0119] Exemplary Architecture
[0120] According to various aspects of the present invention, some or all of the following exemplary architectures can be used to configure one or more systems to implement Figure 2 and Figure 3 Methods 200 and 300. Furthermore, the various features described in this section can be used and / or added to Figure 2 and... Figure 3 Methods 200 and 300 will become apparent to those skilled in the art upon reading this disclosure.
[0121] In some methods, the combination of the properties of a known good state enumeration can be achieved by including one or more, and preferably all, of the following additions to a system (e.g., a device) that has been modified to handle state hashes or is already capable of handling state hashes.
[0122] Systems that can represent states in a compact, cryptographically secure format (such as a cryptographic hash) are extended to also use a list of allowed state transitions. This additional data structure can be used to set constraints on the evolution of states, including defining valid sequences of states. See, for example... Figure 2A Operation 202.
[0123] An additional, hash-sized register is added to the device to mark the locations where the system is expected to traverse through one of the known good state sequences. Therefore, in addition to the single hash register in the device used to store the state identifier, an additional, hash-sized register is added to indicate that the transition is proceeding through a predefined state machine (and there are no other sequences, including invalid combinations of states that would otherwise be valid in the state machine). Apart from this additional, hash-sized register, no other persistent structure is needed to describe the data that allows the transition.
[0124] The second hash-sized register can be added to the device using any known technique, such as by allocating a portion of existing persistent memory to the second register, or by adding physical persistent memory to the device for the second register.
[0125] For each known set of good state sequences, it is preferable to enumerate all valid paths by constructing aggregate hashes that include the history. An example of combining states into aggregate hashes that include the history is given below. Each such set of hashes represents all valid states when traversing a known good sequence; any other state hash corresponds to an unexpected and therefore incorrect hash. See also Figure 2A Operation 204.
[0126] Note that auxiliary attributes can be added to the tree to mark special entries as valid termination states, as described below. For example, states that are also valid termination states are specially marked. An example of such special marking is given below.
[0127] All aggregate hashes containing the history representing valid history are fed into a single data structure, preferably a tree structure. This tree structure can be normalized, such as by sorting its lowest-level nodes, so that the tree construction is deterministic (and the encoding of the same state machine will also be the same).
[0128] The tree structure describing the state machine is stored and can be published. See, for example, [link to documentation]. Figure 2A Operation 206.
[0129] When presenting system evolution and the selection of known good sequences, a hash of the entire tree structure is stored to represent the state machine. This tree structure is stored in external memory, ready to be provided to the device in advance using each state. Therefore, the tree structure can be stored on a computer remote from the device, in the cloud, or in external memory coupled to the device, etc. For example, see... Figure 2A Operations 208-210 and Figure 3 Operations 302-304.
[0130] Each potential state change is evaluated within the device, preferably by considering the current state, the expected new state (after the change requested by the current state is applied), and a tree structure encoding the valid sequence. See, for example, [link to relevant documentation]. Figure 3 Operation 306.
[0131] The tree structure can be provided as a parameter for each call; it is only retained as a temporary copy during the evaluation of changes within the device. Under each call, the device verifies that the hash of the recreated identity tree matches the one it intends to trust. The tree's insensitive nature, the infeasibility of generating conflicting hashes, and the implicit immutability of the hash identity structure allow the device to trust even temporary copies provided externally.
[0132] The device evaluates the proposed changes and verifies that the updated state hash calculated for the requested new state exists in the tree as one of the known good states. This means that the current state is also valid. Any other proposed changes are rejected.
[0133] It is possible to request an exit from the multipath state machine. Preferably, the device evaluates the proposed exit, and if it is marked as a valid exit point in the tree structure, removes the hash from the aggregate hash containing the history, indicating that the device now returns to fully deterministic mode.
[0134] When the state machine terminates, the system replaces the currently stored state hash of the historical aggregated termination state with a hash representing the final state. Preferably, if desired or necessary, the last aggregated hash containing the history is recorded.
[0135] Practical Example: MERKLE [HASH] Tree
[0136] A particularly useful data structure, the Merkle tree, allows for explicit and efficient encoding of a virtually unlimited number of hashes within a single, non-extendable hierarchical structure (denoted herein as MRK). In a preferred approach, valid states and aggregate hashes containing history are used as leaves, and the remainder of the tree is constructed as any standard Merkle tree typically constructed.
[0137] Note that, in a preferred embodiment, an appendix to the standard Merkle tree is added to mark valid terminating states as special. This requires only minimal expansion to optionally add one bit per entry. Such implementation details will be trivial and are mentioned here only for completeness. An example of the special marking is given below.
[0138] Example process representing before-after pairs
[0139] Now for reference Figure 4 The diagram shows a flowchart of a method 400 for representing a valid before-and after state pair according to a method. Among other things, method 400 can be implemented according to the present invention. Figure 1-3 This can be performed in any environment described herein. Of course, as those skilled in the art will understand upon reading this description, methods 400 may include... Figure 4 The specific operations described in the text may include more or fewer operations.
[0140] Each step of method 400 can be performed by any suitable component of the operating environment. For example, in various methods, method 400 can be performed, in part or in whole, by a system such as a computer or some other device having one or more processors. A processor (e.g., a processing circuit, chip, and / or module implemented in hardware and / or software, and preferably having at least one hardware component) can be used in any device to perform one or more steps of method 400. Illustrative processors include, but are not limited to, a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a combination thereof, or any other suitable computing device known in the art.
[0141] Assuming the hash combination primitives have been selected, a simple exhaustive traversal of the effective state machine forms all the leaves of the tree structure. For example... Figure 4 As shown, method 400 can begin with operation 402, where all valid state sequences are collected, one of which can be expected to be reached through any valid traversal. The aggregate hashes of these sequences, containing history, form the leaf entries of the tree.
[0142] In Operation 404, extended properties of the tree structure are used to mark potentially valid termination states.
[0143] In operation 406, the leaf hash set is sorted to normalize the tree. This normalization ensures that the same state machine will be encoded as the same tree.
[0144] In operation 408, the rest of the tree structure is built, such as adding higher-level hierarchical aggregation levels to the tree structure.
[0145] In operation 410, the tree structure is saved and may be published. The top-level identifier hash of the tree structure is published to allow matching of the expected functionality with known hashes representing the state machine described by the tree structure.
[0146] Example: Controlled state evolution of a sequence known a priori
[0147] Effective Transformation Sequence
[0148] The following example is a design example with states S1...S6 and an initial state S0. Any one of the following sequences is accepted as valid; there are no other valid sequences. The set of potentially valid sequences is in Figure 5 As shown in the image.
[0149] Note that S4 is a potentially valid terminating state (after S2), but it is not allowed to terminate immediately after the S1 -> S4 sequence; this is intentionally omitted from the list (not an oversight).
[0150] Before-and-after state transition pair
[0151] Suppose a representation where H(X, Y) represents the initial state X and the subsequent state Y, and TH(...) indicates a valid traversal of the terminating transition. (Generally, the TH(...) function can be equivalent to H(...), where out-of-band properties label the result as a potential terminating state.) The following hash list is a complete list of correct final or intermediate states. The illustrative system is expected to proceed through:
[0152] Assuming we start from S0, the system is in a state where both the current and expected next state hashes exist in the list above. Figure 5 One of the correct states.
[0153] In this example, the list of before-after hash pairs also encodes the set of valid terminating states. Specifically, if a termination indication input is received at one of the TH(...) states, the set of valid sequences remains in the expected known good condition. All other terminations, as well as entering states not on the list above, are equivalent to unexpected and therefore incorrect transitions. Note that nested hash functions encoding history result in different aggregate hashes containing the history if the same state can be reached via different paths. In the list above, the (*) entries all mark the sequence reaching state S4, but since all entries are via different paths, their states are different (even though they all have the hash of S4 appended at that particular point).
[0154] Note that path-dependent, distinct hashes allow us to distinguish paths that may be in a terminating state from paths that may not be in a terminating state (this is precisely the case here for the three paths through S4, two of which may terminate). However, when the final aggregate hash containing the history is replaced by the hash of the final state, both of the distinct paths leading to the termination of S4 will revert to the same S4 hash.
[0155] Examples with real hashes
[0156] In this example, SHA-256 is used to calculate the hash, but for readability, these values are truncated to 32 bits each. The first bit of the leaf hash is adjusted to indicate the possible terminating states for each value. The first bit of the hash for non-terminating states is forced to zero (leading hexadecimal digits 0..7); the first bit of the hash for possible terminating states is forced to one (leading hexadecimal digits 8..f).
[0157] In this example, the ASCII representation of S0..S6 is used to describe the state sample input; subsequent hash appending steps operate on the raw, big-endian binary representation of its input.
[0158] Now for reference Figure 6 The flowchart illustrates an exemplary method 600 for creating a tree, according to a method of the present invention. Among other things, method 600 can be implemented according to the present invention... Figure 1-5 This can be performed in any environment described herein. Of course, as those skilled in the art will understand upon reading this description, methods 600 may include... Figure 6 The specific operations described in the text may include more or fewer operations.
[0159] Each step of method 600 can be performed by any suitable component of the operating environment. For example, in various methods, method 600 can be performed, in part or in whole, by a system such as a computer or some other device having one or more processors. A processor (e.g., a processing circuit, chip, and / or module implemented in hardware and / or software, and preferably having at least one hardware component) can be used in any device to perform one or more steps of method 600. Illustrative processors include, but are not limited to, a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a combination thereof, or any other suitable computing device known in the art.
[0160] like Figure 6 As shown, method 600 can begin with operation 602, where SHA-256(ASCII "S0") ..SHA-256(ASCII "S6") is computed and truncated to 32 bits. In operation 604, all values are adjusted to indicate non-terminating states, thus forcing the hash bits to zero (since these states are not terminating states themselves). The result is as follows: S0 -> Hash(original) = xf87980c8 -> Hash(marked) = x787980c8 S1 -> x3696ad59 -> x3696ad59 S2 -> x44d6a8a7 -> x44d6a8a7 S3 -> xadfa2b24 -> x2dfa2b24 S4 -> xb1d3eb8f -> x31d3eb8f S5 -> x1cdcbd57 -> x1cdcbd57 S6 -> xb12f76a4 -> x312f76a4
[0161] In operation 606, when they are reached in the graph, the valid transition sequence is enumerated by appending and then hashing the valid before-and after states: H(S0, S1) -> x0599d4cb from SHA-256(x787980c83696ad59) ==x0599d4cb6bdc55c76... H(S0, S2) -> x1cfa459d TH(S0, S3) -> xfa44bbe3
[0162] The hash can be adjusted: H(S0, S1) and H(S0, S2) are non-terminating, while H(S0, S3) is potentially terminating. In this case, through consensus, the leading bits are already 0, 0, and 1, and the adjustment is equivalent to a no-op (NOP).
[0163] In operation 608, the next reachable graph transitions (those following two state transitions) are enumerated. The hash is adjusted for non-termination / termination. Below, only the adjustment that changes the first bit is shown: H(H(S0, S1), S4) -> x78d5ee42 H(H(S0, S1), S5) -> xa6259078 -> x26259078 TH(H(S0, S2), S4) -> x42e34e53 -> xc2e34e53 H(H(S0, S3), S4) -> xc643af7c -> x4643af7c
[0164] In operation 610, the next reachable graph transition (those after three state transitions) is enumerated, and adjustments are made for non-termination (e.g., only marking changes): H(H(H(S0, S1), S4), S5) -> x59a25028 TH(H(H(S0, S1), S5), S6) -> x902100f2 H(H(H(S0, S2), S4), S5) -> x0c26a36d H(H(H(S0, S3), S4), S5) -> x584b2876 Meanwhile, no value is changed during the termination state adjustment in this step.
[0165] In operation 612, the next reachable graph transitions (those following the four state transitions) are enumerated, and adjustments are made for non-termination (only marking changes:) TH(H(H(H(S0, S1), S4), S5), S6) -> x26c3a40b -> xc6c3a40b TH(H(H(H(S0, S2), S4), S5), S6) -> xc14e6ad8 TH(H(H(H(S0, S3), S4), S5), S6) -> x156cbd12 -> x956cbd12
[0166] In operation 614, the list of aggregate hashes (14 in total) containing history is sorted: x0599d4cb from S0 -> S1 x0c26a36d S0 -> S2 -> S4 -> S5 x1cfa459d S0 -> S2 x26259078 S0 -> S1 -> S5 x4643af7c S0 -> S3 -> S4 x584b2876 S0 -> S3 -> S4 -> S5 x59a25028 S0 -> S1 -> S4 -> S5 x78d5ee42 S0 -> S1 -> S4 x902100f2 S0 -> S1 -> S5 -> S6 x956cbd12 S0 -> S3 -> S4 -> S5 -> S6 xc14e6ad8 S0 -> S2 -> S4 -> S5 -> S6 xc2e34e53 S0 -> S2 -> S4 xc6c3a40b S0 -> S1 -> S4 -> S5 -> S6 xfa44bbe3 S0 -> S3
[0167] In operation 616, the rest of the tree is assembled. Note that no termination / non-termination distinction is needed above the leaf hashes; therefore, the SHA-256 hash can be applied as is without adjustment. Hashes can be combined to create aggregate hashes that include history, for example, hashing x0599d4cb with x0c26a36d yields x6fa03fc4, which hashes with xf2e315d7 yields x5d5e313b, and so on. The resulting tree structure is:
[0168] The top-level tree hash is xcfd0c455, which is a historical aggregate hash influenced by all previous hashes. In the tree identified by this top-level hash, the set of leaf hashes in operation 614 explicitly enumerates fourteen permitted transformations, and tree traversal from any one of them results in the top-level hash.
[0169] Finally, this example can be extended to allow iterative, reverse state reversals as valid transitions. For example, as... Figure 7 As shown, the state transition from S6 back to S5 is a valid transition, and therefore the Merkle tree will include a history-containing aggregate hash reflecting the transition from S5 to S6, as well as a history-containing aggregate hash of the transition from S6 to S5.
[0170] It will be clear that the various features of the aforementioned systems and / or methods can be combined in any way to create multiple combinations based on the description presented above.
[0171] It will also be understood that aspects of the present invention can be provided as services deployed on behalf of customers to provide on-demand services.
[0172] The various aspects of the invention have been presented for illustrative purposes, but these descriptions are not intended to be exhaustive or limited to the disclosed methods. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described aspects. The terminology used herein has been chosen to best describe the principles of the methods, their practical application, or improvements to technologies found in the market, or to enable those skilled in the art to understand the methods disclosed herein.
Claims
1. A method for implementing a system, comprising: Determine the known good state sequence of the system; The valid paths for the determined sequence of known good states are enumerated by constructing a historical aggregate hash representing the states along the path. Store the aggregated hash containing the history; Receive a call from the system; as well as In response to receiving the call, the stored aggregate hash containing the history is sent to the system.
2. The method for implementing the system according to claim 1, wherein, The aggregate hash containing the history is stored in a tree structure.
3. The method for implementing the system according to claim 2, comprising: The tree structure is normalized.
4. The method for implementing the system according to claim 2, wherein, The tree structure is a Merkle tree structure.
5. The method for implementing the system according to claim 1, wherein, Aggregate hashes containing history that indicate a terminated state are specially marked.
6. The method for implementing the system according to claim 1, wherein, At least some of the aggregate hashes containing history are constructed by sequentially combining hashes used for the state along corresponding paths.
7. The method for implementing the system according to claim 1, comprising: Add a register of the second hash size to the system.
8. A computer program product for generating a hash set representing a known sequence of good states, the computer program product comprising: One or more computer-readable storage media, and program instructions commonly stored on the one or more computer-readable storage media, the program instructions comprising: Program instructions for performing the method according to claim 1.
9. A system comprising: processor; as well as Logic integrated with the processor, executable by the processor, or integrated with the processor and executable by the processor, the logic being configured to perform the method according to claim 1.
10. A method for implementing a system, comprising: In response to receiving a request to transition to a new state, the request contains a set of aggregate hashes of the history; Receive the aggregated hash containing the history; as well as Within the system, the decision to transition to the new state is evaluated through the following operations: Calculate the hash of the requested new state. The calculated hash is compared with the received aggregate hash containing history, and In response to determining that the calculated hash matches one of the aggregated hashes containing history, the transition to the new state is permitted; otherwise, in response to determining that the calculated hash does not match one of the aggregated hashes containing history, the transition to the new state is not permitted.
11. The method for implementing the system according to claim 10, wherein, The aggregate hash containing the history is received as a tree structure.
12. The method for implementing the system according to claim 11, wherein, The tree structure is retained in the system only as a temporary copy.
13. The method for implementing the system according to claim 11, wherein, The system only persistently stores the roots of the tree structure.
14. The method for implementing the system according to claim 10, wherein, The hash of the requested new state is generated using the hash of the current state.
15. The method for implementing the system according to claim 10, comprising: In response to the transition to the new state, the hash of the current state of the system is replaced in the persistent register with the hash of the calculated new state.
16. The method for implementing the system according to claim 15, comprising: Replace the calculated hash with the hash of the final state reached in response to the termination of execution in the state machine within the system.
17. The method for implementing the system according to claim 10, wherein, The calculated hash is stored in the second persistent register.
18. The method for implementing the system according to claim 10, wherein, The aggregated hash containing history is in the form of a Merkle tree, and the method includes: generating a computed hash using at least a hash identifying the current state of the system; and comparing the computed hash with the Merkle tree to determine whether a requested state transition matches a valid state transition sequence of the Merkle tree.
19. A computer program product for verifying whether a state transition is permitted and / or valid, the computer program product comprising: One or more computer-readable storage media, and program instructions commonly stored on the one or more computer-readable storage media, the program instructions comprising: Program instructions for performing the method according to claim 10.
20. A system comprising: processor; as well as Logic integrated with the processor, executable by the processor, or integrated with the processor and executable by the processor, the logic being configured to perform the method according to claim 10.