KR20200031671A - Counter integrity tree for memory security - Google Patents

Counter integrity tree for memory security Download PDF

Info

Publication number
KR20200031671A
KR20200031671A KR1020207004945A KR20207004945A KR20200031671A KR 20200031671 A KR20200031671 A KR 20200031671A KR 1020207004945 A KR1020207004945 A KR 1020207004945A KR 20207004945 A KR20207004945 A KR 20207004945A KR 20200031671 A KR20200031671 A KR 20200031671A
Authority
KR
South Korea
Prior art keywords
counter
node
tree
memory
counters
Prior art date
Application number
KR1020207004945A
Other languages
Korean (ko)
Other versions
KR102532395B1 (en
Inventor
프라카시 에스. 람라키아니
로베르토 아반지
웬디 아노트 앨새서
Original Assignee
에이알엠 리미티드
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US15/668,322 external-priority patent/US10540297B2/en
Priority claimed from US15/892,770 external-priority patent/US10733313B2/en
Application filed by 에이알엠 리미티드 filed Critical 에이알엠 리미티드
Publication of KR20200031671A publication Critical patent/KR20200031671A/en
Application granted granted Critical
Publication of KR102532395B1 publication Critical patent/KR102532395B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2113Multi-level security, e.g. mandatory access control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2145Inheriting rights or properties, e.g., propagation of permissions or restrictions within a hierarchy

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Storage Device Security (AREA)
  • Exchange Systems With Centralized Control (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

메모리 보안을 위한 카운터 무결성 트리는, 적어도 2개의 카운터들 사이에서 공유된 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로 각각 정의되는 적어도 2개의 카운터들을 지정하는 적어도 한 개의 분할-카운터 노드를 포함한다. 이것은, 트리의 부모 노드 당 설치될 수 있는 자식 노드들의 수를 증가시켜, 특정한 사이즈의 메모리 영역을 커버하는 트리에서 가로질러야 하는 트리 레벨들의 수를 줄인다. 부 카운터 무결성 트리 내부에 노드들을 할당하여 주 카운터 무결성 트리의 대응하는 노드 내에 끼워넣어지지 않는 더 큰 부 카운터들을 수용함으로써, 부 카운터 사이즈가 동적으로 변경될 수 있다. The counter integrity tree for memory security designates at least two counters each defined as a combination of a primary count value shared between at least two counters and a respective minor count value designated separately for each of the at least two counters. It includes at least one split-counter node. This increases the number of child nodes that can be installed per parent node of the tree, reducing the number of tree levels that must be traversed in the tree covering a memory area of a particular size. By allocating nodes inside the sub-counter integrity tree to accommodate larger sub-counters that are not embedded in corresponding nodes of the main counter-integrity tree, the sub-counter size can be dynamically changed.

Figure P1020207004945
Figure P1020207004945

Description

메모리 보안용 카운터 무결성 트리Counter integrity tree for memory security

본 발명은 데이터 처리 분야에 관한 것이다. 특히, 본 발명은 메모리 보안에 관한 것이다. The present invention relates to the field of data processing. In particular, the present invention relates to memory security.

일부 데이터 처리 시스템은 잠재적인 공격자에게 노출되지 않아야 하는 비밀의 또는 민감한 정보의 처리를 포함하는 소프트웨어를 실행할 필요가 있다. 그러나, 공격자에 의해 부정하게 조작될 수 없는 메모리에 이와 같은 정보를 기억하는데 충분한 용량을 설치하는 것은 불가능할 수 있으므로, 일부 민감한 정보를 공격에 취약한 메모리에 내보내는 것이 필요한 경우가 있다. 예를 들어, 온칩에 기억된 데이터는 공격자로부터 안전하게 보호되지만, 온칩 메모리 스토리지가 제한되므로, 데이터를 오프칩의 외부 메모리에 기록하는 것이 필요할 수도 있다. 공격자는 외부 메모리에서 데이터를 판독하거나 데이터가 외부 메모리로 전달될 때 가로채거나, 및/또는 이와 같은 외부에 기억된 데이터가 그후 처리 시스템 내부로 다시 되돌려줄 때 올바르지 않은 거동을 발생하기 위한 시도에서 외부 메모리에 기억된 데이터 값들을 부정 조작하는 것이 가능할 수 있다. 잠재적으로 안전하지 않은 메모리에 기억된 데이터에 대해 보안을 제공하기 위해, 데이터 값들이 메모리에 기억되기 전에 데이터 값들을 부호화하고, 무결성 검사를 제공하여, 안전하지 않은 메모리에서 데이터가 판독될 때, 데이터가 메모리에 기억된 이후에 데이터가 수정되지 않았는지 검사하는 것이 가능하다. 그러나, 이와 같은 메모리 보안 동작은, 데이터가 메모리에 기록되거나 메모리에서 판독될 때마다 추가적인 계산과 메모리 액세스를 god할 필요가 있기 때문에, 성능 비용을 발생한다. Some data processing systems need to run software that involves the processing of confidential or sensitive information that should not be exposed to potential attackers. However, since it may not be possible to install sufficient capacity to store such information in a memory that cannot be tampered with by an attacker, it may be necessary to export some sensitive information to a memory vulnerable to attack. For example, data stored on-chip is secured from an attacker, but since on-chip memory storage is limited, it may be necessary to write data to off-chip external memory. An attacker attempts to generate incorrect behavior when reading data from external memory, intercepting when data is transferred to external memory, and / or when such externally stored data is then returned back into the processing system. It may be possible to tamper with data values stored in the external memory. To provide security for data stored in potentially unsafe memory, data values are encoded before data is stored in memory, and an integrity check is provided so that when data is read from unsafe memory, data It is possible to check if data has not been modified since is stored in memory. However, such a memory security operation incurs a performance cost because it is necessary to trust additional calculations and memory access whenever data is written to or read from the memory.

적어도 일부 실시예는, At least some embodiments,

메모리에 기억된 데이터에 대한 액세스를 제어하는 메모리 액세스회로와, A memory access circuit for controlling access to data stored in the memory,

메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안회로를 구비하고, And a memory security circuit for verifying the integrity of data stored in the protected memory area of the memory.

상기 메모리 보안회로는 복수의 노드들을 포함하는 주 카운터 무결성 트리를 유지하도록 구성되고, 각각의 노드는 상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 지정하고, 복수의 노드들은, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드(leaf node)를 포함하고, The memory security circuit is configured to maintain a main counter integrity tree including a plurality of nodes, each node designating a plurality of counters associated with respective data blocks of the protected memory area, and the plurality of nodes counter At least one parent node associated with a data block storing a child node at least one of which provides additional counters of the primary counter integrity tree, and at least one of the counters stores data other than the primary counter integrity tree It includes at least one leaf node associated with a data block,

상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 메모리 보안회로는, 상기 타겟 데이터 블록과 관련된 기억된 인증 코드를, 상기 타겟 데이터 블록과 상기 타겟 데이터 블록과 관련되는 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 상기 타겟 데이터 블록의 무결성을 검증하도록 구성되고, In response to access to the target data block of the protected memory area, the memory security circuit may store the stored authentication code associated with the target data block, the target of the counter integrity tree associated with the target data block and the target data block. It is configured to verify the integrity of the target data block by comparing with the calculated authentication code generated based on a counter,

상기 주 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터(split-counter) 노드를 포함하고, At least one of the nodes of the main counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub count value designated separately for each of the at least two counters. It includes a split-counter node designating two counters,

상기 주 카운터 무결성 트리의 특정한 분할-카운터 노드와 관련된 사이즈 증가 트리거 이벤트에 응답하여, 상기 메모리 보안회로는, 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키고, 상기 특정한 분할-카운터 노드의 부 카운터들의 서브셋을 적어도 한 개의 미러(mirror) 카운터 무결성 트리의 대응하는 분할-카운터 노드에 할당하도록 구성된 장치를 제공한다. In response to a size increase trigger event associated with a particular split-counter node of the primary counter integrity tree, the memory security circuit increases the size of the sub-counters of the particular split-counter node, and the portion of the specific split-counter node. Provided is a device configured to allocate a subset of counters to a corresponding split-counter node of at least one mirror counter integrity tree.

적어도 일부 실시예는, 메모리의 보호 메모리 영역에 기억된 데이터에 대한 액세스를 제어하는 방법으로서, At least some embodiments are methods of controlling access to data stored in a protected memory area of the memory,

상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 각각 지정하고, 카운터들 중에서 적어도 한 개가 주 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하는 복수의 노드들을 포함하는 상기 주 카운터 무결성 트리를 유지하는 단계와, At least one parent associated with a data block that respectively specifies a plurality of counters associated with each data block in the protected memory area, and at least one of the counters stores a child node that provides additional counters in the main counter integrity tree. Maintaining the main counter integrity tree comprising a node and a plurality of nodes comprising at least one leaf node associated with a data block in which at least one of the counters stores data other than the main counter integrity tree,

상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 타겟 데이터 블록과 관련된 기억된 인증 코드를, 상기 타겟 데이터 블록과 상기 타겟 데이터 블록과 관련되는 상기 주 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 상기 타겟 데이터 블록의 무결성을 검증하는 단계를 포함하고, In response to access to the target data block of the protected memory area, the stored authentication code associated with the target data block is based on the target counter of the target data block and the primary counter integrity tree associated with the target data block. Verifying the integrity of the target data block by comparing it with the generated authentication code,

상기 주 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하고, At least one of the nodes of the main counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub count value designated separately for each of the at least two counters. Includes a split-counter node that specifies two counters,

상기 제어방법은, The control method,

상기 주 카운터 무결성 트리의 특정한 분할-카운터 노드와 관련된 사이즈 증가 트리거 이벤트에 응답하여, 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키고, 상기 특정한 분할-카운터 노드의 부 카운터들의 서브셋을 적어도 한 개의 미러 카운터 무결성 트리의 대응하는 분할-카운터 노드에 할당하는 단계를 더 포함하는 제어방법을 제공한다. In response to a size increase trigger event associated with a particular split-counter node of the primary counter integrity tree, increase the size of the sub-counters of the particular split-counter node and at least a subset of the sub-counters of the specific split-counter node. It provides a control method further comprising the step of assigning to the corresponding split-counter node of the mirror counter integrity tree.

적어도 일부 실시예는 데이터 처리장치를 제어하여 전술한 방법을 행하게 하는 컴퓨터 프로그램을 제공한다. 컴퓨터 프로그램은 기억매체에 기억된다. 기억매체는 비일시적인 기억매체이어도 된다. At least some embodiments provide a computer program that controls a data processing device to perform the methods described above. Computer programs are stored in the storage medium. The storage medium may be a non-transitory storage medium.

본 발명의 또 다른 발명내용, 특징 및 이점은, 다음의 첨부도면을 참조하여 주어지는 이하의 실시예의 설명으로부터 명확해질 것이다:
도 1은 메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안회로를 갖는 장치의 일례를 개략적으로 나타낸 것이다.
도 2는 비교를 위해 해시 트리를 이용하여 보호 메모리 영역에 기억된 데이터의 무결성을 검사하는 일례를 나타낸 것이다.
도 3은 비교를 위해 트리의 각각의 노드가 데이터의 무결성을 검사하는 모노리식 카운터들을 지정하는 카운터 무결성 트리의 일례를 나타낸 것이다.
도 4는 카운터들 사이에서 공유된 주 카운트 값과 각각의 카운터에 대해 별개로 지정된 각각의 부 카운트 값들의 조합으로서 카운터들이 지정되는 분할-카운터 노드들을 포함하는 카운터 무결성 트리의 일례를 나타낸 것이다.
도 5는 루트 노드를 향해 트리를 올라가면서 카운터 무결성 트리의 노드들의 애리티(arity)가 감소하는 일례를 나타낸 것이다.
도 6은 카운터 무결성 트리의 한 개의 노드가 한 개보다 많은 수의 주 카운트 값을 지정하고, 각각의 주 카운트 값이 이 노드에 의해 지정된 부 카운트 값들의 다른 서비스에 대응하는 일례를 나타낸 것이다.
도 7은 특정한 데이터 블록에 대한 기억된 인증 코드가 이 데이터 블록에서 분리되어 기억되는 일례를 나타낸 것이다.
도 8은 메모리에 대한 판독 액세스를 제어하는 방법을 나타낸 흐름도이다.
도 9는 메모리에 대한 기록 액세스를 행하는 방법을 나타낸 흐름도이다.
도 10 및 도 11은 성기게 채워진 미러 카운터 무결성 트리의 대응하는 노드에 부 카운터들의 서브셋을 위한 공간을 할당함으로써 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키는 일례를 나타낸 것이다.
도 12는 한 개보다 많은 수의 미러 카운터 무결성 트리가 사용되는 일례를 나타낸 것이다.
도 13은 주 및 부 카운터 무결성 트리들의 대응하는 노드들에 대해 기준 어드레스에 대해 동일한 어드레스 오프셋들을 사용하는 것을 나타낸 것이다.
도 14는 변화하는 애리티와 가변의 부 카운터 사이즈를 갖는 트리의 일례를 나타낸 것이다.
도 15는 다양한 구현예의 카운터 무결성 트리에 대한 성능을 비교하는 그래프이다.
도 16은 사용되는 시뮬레이터의 일례를 나타낸 것이다.
Still other inventions, features and advantages of the present invention will become apparent from the following description of examples given with reference to the accompanying drawings:
1 schematically shows an example of a device having a memory security circuit that verifies the integrity of data stored in a protected memory area of a memory.
2 shows an example of checking the integrity of data stored in a protected memory area using a hash tree for comparison.
3 shows an example of a counter integrity tree in which each node of the tree specifies monolithic counters that check the integrity of the data for comparison.
FIG. 4 shows an example of a counter integrity tree comprising split-counter nodes to which counters are designated as a combination of a primary count value shared among counters and respective sub-count values designated separately for each counter.
FIG. 5 shows an example in which the nodes of the counter integrity tree decrease as the tree goes up toward the root node.
6 shows an example in which one node of the counter integrity tree specifies more than one main count value, and each main count value corresponds to another service of the sub count values specified by this node.
Fig. 7 shows an example in which the stored authentication code for a specific data block is stored separately in this data block.
8 is a flow diagram illustrating a method of controlling read access to memory.
9 is a flowchart showing a method of performing write access to a memory.
10 and 11 show an example of increasing the size of sub-counters of a split-counter node by allocating space for a subset of sub-counters to a corresponding node of a sparse-filled mirror counter integrity tree.
12 shows an example in which more than one mirror counter integrity tree is used.
13 shows using the same address offsets for the base address for corresponding nodes of the primary and secondary counter integrity trees.
Fig. 14 shows an example of a tree having varying analytes and variable sub-counter sizes.
15 is a graph comparing performance for counter integrity trees of various implementations.
16 shows an example of a simulator used.

장치는, 메모리에 기억된 데이터에 대한 액세스를 제어하는 메모리 액세스회로와, 메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안회로를 갖는다. 예를 들어, 무결성 검증은, 공격자에 의해 보호 메모리 영역에 기억된 데이터를 공격자가 부정 조작하는 것을 검출하기 위한 것이다. 예를 들어, 메모리는 메모리 액세스회로를 포함하는 집적회로와 별개의 집적회로 상의 오프칩 메모리일 수도 있다. The apparatus has a memory access circuit that controls access to data stored in the memory, and a memory security circuit that verifies the integrity of the data stored in the protected memory area of the memory. For example, integrity verification is for detecting that an attacker tampered with data stored in the protected memory area by the attacker. For example, the memory may be off-chip memory on an integrated circuit separate from the integrated circuit including the memory access circuit.

무결성 검증은 기억된 데이터와 메모리 보안회로에 의해 유지된 무결성 메타데이터 사이의 비교에 의존한다. 예를 들어, 보호 메모리 영역에 데이터를 기록할 때, 메모리 보안회로는 보호 메모리 영역에 기억된 데이터의 속성들에 근거하여 무결성 메타데이터를 생성하고, 보호 메모리 영역에서 데이터를 판독할 때, 메모리 보안회로는 무결성 메타데이터를 사용하여 데이터가 기록된 이후에 변경되었는지 여부를 검사한다. 그러나, 이와 같은 무결성 메타데이터는 보호 메모리 영역의 전체 어드레스 범위를 보호하기 위한 모든 메타데이터를 제공하기 위해서는 상당한 양의 스토리지 공간을 필요로 할 수 있다. 공격자에게 취약하지 않은 스토리지 유닛에 데이터를 유지할 수 있는 용량이 제한되므로, 실제로는 보호 메모리 영역 그 자체에 무결성 메타데이터의 적어도 일부를 기억하는 것이 필요한 경우가 자주 있다. 이것은 메타데이터가 공격자에게 취약하게 만들기 때문에, 보통 보호 영역에 마찬가지로 기억되는 추가적인 메타데이터를 사용하여, (실제 해당 데이터와 유사하게) 무결성 메타테이터가 판독될 때 이 무결성 메타데이터 그 자체를 무결성 검증을 겪게 할 필요가 있다. 이 때문에, 보호 메모리 영역 내부의 "실제" 데이터의 판독시마다, 실제 해당 데이터 이외에 무결성 메타데이터의 복수의 판독과 무결성 메타데이터가 유효한지 여부의 검사를 위한 이에 대응하는 비교를 기동하므로, 보호 메모리 영역의 사이즈가 증가함에 따라, 전체 시스템 성능에 미치는 무결성 검증의 성능 충격을 제한하는 것이 점점 더 어려워질 수 있다. Integrity verification relies on a comparison between stored data and integrity metadata maintained by the memory security circuitry. For example, when writing data in the protected memory area, the memory security circuit generates integrity metadata based on attributes of data stored in the protected memory area, and when reading data in the protected memory area, memory security The circuit uses integrity metadata to check whether the data has changed since it was written. However, such integrity metadata may require a significant amount of storage space to provide all metadata to protect the entire address range of the protected memory area. Since the capacity to hold data in storage units that are not vulnerable to an attacker is limited, it is often necessary to actually remember at least a portion of the integrity metadata in the protected memory area itself. Since this makes the metadata vulnerable to an attacker, this integrity metadata itself is verified for integrity when the integrity metadata is read (similar to the actual corresponding data), usually using additional metadata that is remembered as well in the protected area. Need to go through. For this reason, every time the "real" data in the protected memory area is read, a plurality of reads of the integrity metadata in addition to the actual corresponding data and a corresponding comparison for checking whether the integrity metadata is valid are started, so the protected memory area As the size of, increases, it may become increasingly difficult to limit the performance impact of integrity verification on overall system performance.

이하에서 설명하는 기술에서는, 메모리 보안회로가 다수의 노드들을 포함하는 카운터 무결성 트리를 유지한다. 카운터 무결성 트리의 노드들은, 부모 노드에 의해 지정된 카운터들 중에서 적어도 한 개가 추가적인 데이터 블록들의 추가적인 카운터들을 제공하는 카운터 무결성 트리의 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드를 포함한다. 또한, 노드들은, 카운터들 중에서 적어도 한 개가 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함한다. In the technique described below, the memory security circuit maintains a counter integrity tree including a plurality of nodes. The nodes of the counter integrity tree include at least one parent node associated with a data block storing a child node of the counter integrity tree, where at least one of the counters designated by the parent node provides additional counters of additional data blocks. In addition, the nodes include at least one leaf node associated with a data block in which at least one of the counters stores data other than the counter integrity tree.

트리 내부의 각각의 카운터는 대응하는 데이터 블록의 진정성(authenticity)을 검사하는 인증 코드를 생성하기 위해 사용된다. 이 때문에, 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 메모리 보안회로는, 타겟 데이터 블록과 관련된 기억된 인증 코드를, 타겟 데이터 블록과 이 타겟 데이터 블록과 관련되는 카운터 무결성 트리의 타겟 카운터에 근거하여 발생되는 산출된 인증 코드와 비교함으로써, 타겟 데이터 블록의 무결성을 검증한다. 이때, 타겟 데이터 블록은, "실제" 해당 데이터를 기억하는 데이터 블록이거나, 또는 다른 "실제" 데이터 블록의 무결성을 검사하기 위한 검증처리의 일부로서 액세스되는, 카운터 무결성 트리 그 자체의 노드들 중에서 한 개를 기억하는 데이터 블록일 수도 있다. Each counter within the tree is used to generate an authentication code that checks the authenticity of the corresponding block of data. For this reason, in response to access to the target data block in the protected memory area, the memory security circuit stores the stored authentication code associated with the target data block, the target counter in the target data block and the counter integrity tree associated with the target data block. The integrity of the target data block is verified by comparing with the calculated authentication code generated based on. At this time, the target data block is one of the nodes of the counter integrity tree itself, which is a data block that stores the “real” data, or is accessed as part of a verification process to check the integrity of another “real” data block. It could be a block of data that remembers the dog.

무결성 트리의 사용은, 공격자가 (예를 들어, 메모리 그 자체를 판독하거나 메모리와 데이터의 소스 사이의 인터페이스를 감시함으로써) 현재의 데이터 값과 그것의 유효한 인증 코드를 한꺼번에 캡처한 후, 나중에 이 데이터 값이 더 이상 통용되지 않게 된 후, 메모리 내부에 기억된 올바른 값들을 오래된 데이터 블록과 그것의 관련된 인증 코드로 대체하려도 시도함으로써, 장치 내부에서 올바르지 않은 거동을 일으킬 수 있는 재생 공격(replay attack)에 대해 보호하도록 돕는다. 한 개의 노드로부터의 데이터가 다른 노드에 근거하여 산출된 인증 코드에 의해 보호되는 무결성 트리를 제공함으로써, 한 개의 노드에 대한 오래된 쌍의 데이터 및 인증 코드와 부모 노드로부터의 산출된 인증 코드 및 카운터 사이의 불일치로부터 오래된 데이터의 재생을 검출할 수 있다. 무결성 트리를 구현하는 한가지 방법은, 트리가 카운터들로 구축되어 부모 노드가 그것의 자식 노드들 각각에 대한 인증 코드들을 생성하는데 사용되는 카운터들을 제공하는 무결성 트리의 한가지 종류인 카운터 무결성 트리이다. 그러나, 카운터들의 빈번한 오버플로우를 피하기 위해, 카운터들에는 특정한 수의 비트들을 제공할 필요가 있다. 이것은, 트리 노드 당 얼마나 많은 수의 카운터들이 설치될 것인지를 제한하므로, 카운터 무결성 트리가 구현될 수 있는 효율을 제한할 수 있다. The use of the integrity tree allows the attacker to capture the current data value and its valid authentication code all at once (for example, by reading the memory itself or by monitoring the interface between the memory and the source of the data), and then this data later. A replay attack that can cause incorrect behavior inside a device by attempting to replace the correct values stored in memory with old data blocks and its associated authentication code after the values are no longer available. Help protect against By providing an integrity tree where data from one node is protected by an authentication code calculated based on another node, between an old pair of data and authentication code for one node and the authentication code and counter calculated from the parent node. The reproduction of old data can be detected from the mismatch of. One way to implement an integrity tree is a counter integrity tree, which is a kind of integrity tree where the tree is built with counters and the parent node provides counters that are used to generate authentication codes for each of its child nodes. However, in order to avoid frequent overflow of counters, it is necessary to provide a certain number of bits to the counters. This limits how many counters per tree node will be installed, thus limiting the efficiency with which a counter integrity tree can be implemented.

후술하는 기술에서는, 카운터 무결성 트리의 노드들 중에서 적어도 한 개가, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드이다. 이 때문에, 주 카운트 값은 분할-카운터 노드에 의해 커버되는 데이터 블록들 중에서 적어도 2개의 데이터 블록들에 대응하는 2개 이상의 카운터들 각각 사이에서 공유된 공통 부분을 지정하고, 각각의 부 카운트 값들 각각은 카운터마다 다른 부분을 지정한다. In the technique described below, at least one of the nodes of the counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub count value designated separately for each of the at least two counters. Is a split-counter node that specifies at least two counters. For this reason, the main count value designates a common portion shared among each of two or more counters corresponding to at least two data blocks among data blocks covered by the split-counter node, and each of the sub count values Designates a different part for each counter.

카운터 무결성 트리 내부에서의 이와 같은 분할-카운터 노드들의 사용은 더욱 효율적인 메모리 성능을 가능하게 한다. 모든 필요한 수의 비트들이 전체가 각각의 카운터에 대해 별개로 설치되어야만 했단 경우보다 카운터마다 별개로 지정된 부 카운트 값이 더 작을 때(일부 비트들이 카운터들의 그룹에 대해 한번 설치된 공유된 주 카운터에 의해 커버되므로), 이것은, 특정한 사이즈의 데이터 블록 내에 끼워넣어질 수 있는 부 카운트 값들의 수가 더 크므로, 사실상 카운터 무결성 트리의 한 개의 노드 내에 지정될 수 있는 카운터들을 갖는 데이터 블록들의 수가 증가될 수 있다는 것을 의미한다. 즉, 카운터 무결성 회로 노드들의 애리티가 더 커질 수 있다(애리티는 부모 노드 당 설치되는 자식 노드들의 수를 말한다). 특정한 사이즈의 보호 메모리 영역을 가정할 때, 분할-카운터 노드들의 애리티가 증가할 수 있으면, 데이터 블록의 무결성과 카운터들 자체의 무결성을 검사하기 위한 모든 카운터들을 얻기 위해 가로지를 필요가 있는 카운터 무결성 트리의 레벨들의 수가 감소될 수 있다. 이것은, 카운터 무결성 트리의 횡단중에 더 적은 메모리 트래픽이 발생되므로, 보호 메모리 영역 내부의 "실제" 데이터에 대한 각각의 액세스에 대해 더 적은 수의 판독 동작을 필요로 함으로써 성능 향상이 존재하게 된다는 것을 의미한다. The use of such split-counter nodes inside the counter integrity tree enables more efficient memory performance. When all the necessary number of bits are smaller than the counters, where the total number must be installed separately for each counter, the number of separately designated sub counts is smaller (some bits are covered by a shared main counter installed once for a group of counters). This means that the number of data blocks with counters that can be specified in one node of the counter integrity tree can actually be increased, since the number of sub-count values that can be embedded in a data block of a particular size is larger. it means. That is, the integrity of the counter integrity circuit nodes may be greater (the analytical power refers to the number of child nodes installed per parent node). Assuming a specific size of the protected memory area, if the parity of the split-counter nodes can increase, counter integrity needs to be traversed to obtain all counters to check the integrity of the data block and the integrity of the counters themselves The number of levels of the tree can be reduced. This means that there is a performance improvement by requiring fewer read operations for each access to "real" data inside the protected memory area, as less memory traffic is generated during traversal of the counter integrity tree. do.

또한, 일부 구현예는 메모리에서의 데이터의 서브셋을 기억하는 캐시를 가지며, 데이터를 메모리 그 자체에서 판독해야 하는 경우보다 캐시에서의 액세스에 대해 데이터 액세스 대기시간이 더 짧다. 분할-카운트 노드는 더 큰 수의 카운터들이 특정한 사이즈의 데이터 블록에 표시될 수 있도록 하기 때문에, 이것은, 더 많은 수의 카운터들이 특정한 양의 캐시 공간에서 캐시될 수 있도록 하여, 특정한 데이터 액세스의 무결성을 검사하는데 필요한 카운터가 캐시 내부에 존재할 확률을 증가시켜, 데이터가 이미 캐시에 기억되었을 때, 메모리 내부의 보호 메모리 영역에 대한 더 많은 수의 액세스가 생략될 수 있도록 할 수 있다. In addition, some implementations have a cache that stores a subset of the data in memory, and the data access latency for accessing from the cache is shorter than if the data had to be read from the memory itself. Since the split-count node allows a larger number of counters to be displayed in a block of data of a particular size, this allows a larger number of counters to be cached in a certain amount of cache space, thereby ensuring the integrity of specific data access. It is possible to increase the probability that the counter needed to check is present in the cache, so that when data is already stored in the cache, a larger number of accesses to the protected memory area inside the memory can be omitted.

실제로, 부 카운터는 특정한 인증 코드에 대해 보통 필요한 것보다 적은 수의 비트들을 사용하여 지정될 수 있으므로, 분할(주-부) 카운터 접근방법도, 트리 내부의 각각의 부모 노드가 다수의 자식 노드들에 대한 카운터들을 지정하는 것이 아니라 다수의 자식 노드들에 대한 인증 코드들을 지정하는 대안적인 "해시 트리" 구현보다 더 효율적인 경향이 있다. 실제로, 충분한 레벨의 보안을 제공하기 위해 보통 필요한 각각의 해시에 대한 비트들의 수가 주어지는 경우 해시 트리에 대해 실제적인 것보다 트리의 분할 카운터 노드들에 대해 트리의 애리티가 더 클 수 있으므로, 인증 코드를 생성하는데 사용되는 비밀 키를 알지 못하는 경우, (무차별 대입법(brute force) 등에 의해) 특정한 데이터 블록과 관련된 인증 코드(해시)를 추론하거나 추측하는 것이 암호적으로 실현불가능하다. In practice, the sub-counter can be specified using fewer bits than is usually required for a particular authentication code, so the split (main-sub) counter approach also allows each parent node in the tree to have multiple child nodes. It tends to be more efficient than an alternative "hash tree" implementation of specifying authentication codes for multiple child nodes rather than specifying counters for. Indeed, if the number of bits for each hash that is usually required to provide a sufficient level of security is given, the tree may have a larger Attribute for the split counter nodes of the tree than the one for the hash tree, so the authentication code If the secret key used to generate is not known, it is cryptographically impossible to infer or guess the authentication code (hash) associated with a particular data block (by brute force, etc.).

따라서, 전술한 분할-카운터 노드들로 구현된 트리의 노드들 중에서 적어도 일부를 사용하여 카운터 무결성 트리로서 무결성 메타데이터를 구현함으로써, 트리의 생성 및/또는 데이터 무결성의 검증을 위한 트리의 사용 중에 카운터 무결성 트리를 가로지르는 것이 더 효율적이 되어, 시스템 성능을 향상시킬 수 있다. Thus, by implementing integrity metadata as a counter integrity tree using at least some of the nodes of the tree implemented with the above-described split-counter nodes, counters during use of the tree for generation of the tree and / or verification of data integrity Traversing the integrity tree can be more efficient, improving system performance.

주 카운터 무결성 트리의 특정한 분할-카운터 노드와 관련된 사이즈 증가 트리거 이벤트에 응답하여, 메모리 보안회로는, 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키고, 특정한 분할-카운터 노드의 부 카운터들의 서브셋을 적어도 한 개의 미러 카운터 무결성 트리의 대응하는 분할-카운터 노드에 할당한다. 이와 같은 구성은, 더 큰 부 카운터들을 기억하는데 필요한 추가적인 공간이 미러 카운터 무결성 트리의 대응하는 노드 내부에 수용될 수 있으므로, 이 노드의 애리티(이 노드 아래의 자식 노드들의 수)를 감소시키지 않으면서, 주 트리의 특정한 노드 내부의 부 카운터들의 사이즈를 증가시킬 수 있다. 부 카운터 사이즈가 사이즈 증가 트리거 이벤트가 검출되었던 주 카운터 무결성 트리의 선택된 노드들에 대해 증가될 수 있지만, 주 카운터 무결성 트리의 모든 노드들에 대해 증가될 필요는 없다. 따라서, 부 카운터 무결성 트리는 미러 카운터 무결성 트리의 모든 노드에 대해 유효한 데이터를 갖지 않는 성기게 채워진 트리이다. 이 때문에, 이와 같은 접근방법은 가능한한 작은 부 카운터 사이즈를 사용하여 각각의 노드가 개시할 수 있도록 하여, 특정한 데이터 블록의 무결성을 검증시에 가로지를 필요가 있는 트리의 레벨들의 수를 줄임으로써 성능을 향상시킬 수 있지만, 메모리의 빈번하게 액세스된 영역들에 대응하는 노드들에 대해서는, 추가적인 카운터들을 수용하기 위해 미러 트리를 이용하여 카운터 사이즈를 증가시켜, 필요한 부 카운터 오버플로우에 대해 기동된 성능 집약적인 재암호화 또는 인증 코드 재계산 연산의 가능성을 줄인다. 이 때문에, 가변의 부 카운터 사이즈 접근방법은 트리의 특정한 노드에 대해 특정한 고정된 부 카운터 사지를 갖는 트리보다 전체적으로 더 우수한 성능을 제공할 수 있다. In response to a size increase trigger event associated with a particular split-counter node of the main counter integrity tree, the memory security circuit increases the size of the sub-counters of the specific split-counter node and sets a subset of the sub-counters of the specific split-counter node. Assign to the corresponding split-counter node of at least one mirror counter integrity tree. Such a configuration does not reduce the node's parity (the number of child nodes under this node), since additional space needed to store larger sub-counters can be accommodated inside the corresponding node of the mirror counter integrity tree. Therefore, it is possible to increase the size of sub-counters inside a specific node of the main tree. The sub counter size can be increased for selected nodes of the main counter integrity tree where the size increase trigger event was detected, but need not be increased for all nodes of the main counter integrity tree. Thus, the sub-counter integrity tree is a sparsely populated tree that does not have valid data for all nodes of the mirror counter integrity tree. For this reason, this approach allows each node to initiate using a sub counter size as small as possible, thereby reducing the number of tree levels that need to be traversed when verifying the integrity of a particular data block. , But for nodes that correspond to frequently accessed areas of memory, increase the counter size using a mirror tree to accommodate additional counters, resulting in performance-intensive startup for the necessary minor counter overflow Reduces the possibility of re-encryption or authentication code recalculation. Because of this, the variable sub-counter size approach can provide better overall performance than a tree with specific fixed sub-counter limbs for specific nodes in the tree.

장치는 제2 메모리를 갖고, 메모리 보안회로는, 주 카운터 무결성 트리의 루트 노드를 지정하거나, 주 카운터 무결성 트리의 루트 노드의 무결성을 검증하기 위한 정보를 지정하는(두번째의 경우에는, 루트 노드 그 자체는 보호 메모리 영역에 기억된다) 루트 검증 데이터를 제2 메모리에 기억한다. 제2 메모리는 신뢰 경계선 내부에 존재하므로, 공격에 취약하지 않다. 예를 들어, 제2 메모리는 온칩 메모린 반면에, 보호 메모리 영역은 오프칩 메모리에 위치할 수 있다. 루트 노드는 트리의 다른 모든 노드들의 조상 노드인 노드이다. 이 때문에, 루트 검증 데이터는 보호 메모리 영역 내부에 놓인 카운터 무결성 트리의 모든 부분이 공격에 취약하지 않은 신뢰된 데이터에 근거하여 인증될 수 있게 할 수 있다. 일부 경우에, 제2 메모리에 기억된 루트 노드 그 자체는 전술한 것과 같은 분할-카운터 노드일 수도 있다. 이와 달리, 루트 노드는 모노리식(비분할) 카운터들을 사용하여 구현될 수도 있다. 또한, 루트 노드의 무결성을 검증하기 위해 제2 메모리에 기억된 정보는 루트 노드 그 자체가 아니라, 보호 메모리 영역에 기억된 루트 노드로부터 유도된 인증값과 비교하기 위한 기억된 인증값을 포함하거나, 및/또는 루트 노드로부터 유도된 인증값을 산출하기 위해 사용되는 기억된 카운터를 포함해도 된다. 미러 카운터 무결성 트리가 할당되었고 미러 카운터 무결성 트리의 루트 노드가 채워진 경우, 제2 메모리는, 미러 카운터 무결성 트리의 루트 노드의 무결성을 검증하기 위한 루트 무결성 데이터를 더 기억하거나, 또는 미러 카운터 무결성 트리 그 자체의 루트 노드를 기억할 수도 있다. The device has a second memory, and the memory security circuit designates a root node of the main counter integrity tree, or designates information for verifying the integrity of the root node of the main counter integrity tree (in the second case, the root node. Itself is stored in the protected memory area) route verification data is stored in the second memory. Since the second memory exists inside the trust boundary, it is not vulnerable to attack. For example, the second memory may be on-chip memory, while the protected memory area may be located in off-chip memory. The root node is a node that is the ancestor node of all other nodes in the tree. Because of this, the root verification data can enable all parts of the counter integrity tree placed inside the protected memory area to be authenticated based on trusted data that is not vulnerable to attack. In some cases, the root node itself stored in the second memory may be a split-counter node as described above. Alternatively, the root node may be implemented using monolithic (non-partitioning) counters. Further, the information stored in the second memory to verify the integrity of the root node includes not the root node itself, but a stored authentication value for comparison with an authentication value derived from the root node stored in the protected memory area, And / or a stored counter used to calculate an authentication value derived from the root node. When the mirror counter integrity tree is allocated and the root node of the mirror counter integrity tree is filled, the second memory further stores root integrity data for verifying the integrity of the root node of the mirror counter integrity tree, or the mirror counter integrity tree You can also remember your own root node.

따라서, 타겟 데이터 블록이 액세스될 때, 메모리 보안회로는, 1회 이상의 검증 검사를 행하여, 타겟 카운터 및 루트 노드를 포함하는 주 카운터 무결성 트리의 분기 상의 카운터들(그리고, 주 카운터 무결성 트리의 전체 사이즈에 따라, 개재하는 노드들 상의 한 개 이상의 개재하는 카운터들)의 무결성을 검증하고, 이들 검증 검사들 중에서 적어도 한 개는 제2 메모리에 기억된 루트 검증 데이터에 의존한다. Therefore, when the target data block is accessed, the memory security circuit performs one or more verification checks, and counters on the branch of the main counter integrity tree including the target counter and the root node (and the total size of the main counter integrity tree). Accordingly, the integrity of one or more intervening counters on intervening nodes is verified, and at least one of these verification checks relies on route verification data stored in the second memory.

보호 메모리 영역의 타겟 데이터 블록이 갱신될 때, 메모리 보안회로는, 타겟 카운터를 갱신하고, 타겟 데이터 블록에 기록된 갱신된 데이터와 갱신된 타겟 카운터에 근거하여 타겟 데이터 블록과 관련되는 기억된 인증 코드를 재계산한다. 이 때문에, 타겟 데이터 블록이 갱신될 때마다 인증 코드를 산출하기 위해 사용된 타겟 카운터를 갱신함으로써, 인증 코드의 계산시 신선도를 제공하여, 인증 코드를 생성하는데 사용되는 비밀 키들의 추론을 더 어렵게 한다. When the target data block of the protected memory area is updated, the memory security circuit updates the target counter, and the stored authentication code associated with the target data block based on the updated data and the updated target counter recorded in the target data block. Recalculate For this reason, by updating the target counter used to calculate the authentication code whenever the target data block is updated, it provides freshness in the calculation of the authentication code, making it more difficult to infer the secret keys used to generate the authentication code. .

카운터의 갱신은, 카운터 값들의 반복을 피하고, 카운터의 모든 가능한 값이 이미 사용되었을 때 검출될 수 있는 갱신들의 시퀀스를 제공하는 모든 방식으로 행해질 수 있다(데이터가 암호화 또는 인증되는 방식에 대한 변경이 없이 동일한 카운터 값을 재사용하는 것은 성공적인 재생 공격의 위험이 있을 수 있다). 비교적 간단한 접근방법은, 타겟 데이터 블록의 대응하는 데이터가 갱신될 때마다 타겟 카운터를 증분시킴으로써, 카운터를 갱신하는 것일 수 있다. 이와 달리, 다른 구현예는 (예를 들어, 공격자가 카운터의 변화 패턴을 결정하는 것을 더 어렵게 하기 위해, 상수를 사용한 XOR 연산을 적용하여, 갱신시마다 타겟 카운터에 기록되는 카운트 값들의 비단조 증가하는 시퀀스를 제공함으로써) 대응하는 데이터의 갱신시마다 카운터를 비단조적으로 갱신하는 것일 수 있다. The update of the counter can be done in any way that avoids repetition of the counter values and provides a sequence of updates that can be detected when all possible values of the counter have already been used (changes to the way data is encrypted or authenticated). Reusing the same counter value without it can be a risk of a successful replay attack). A relatively simple approach may be to update the counter by incrementing the target counter each time the corresponding data in the target data block is updated. Alternatively, other implementations (e.g., to make it more difficult for an attacker to determine the counter's change pattern, apply an XOR operation using a constant, to increase the non-monotonically increasing count values written to the target counter at each update) By providing a sequence), the counter may be updated monotonically every time the corresponding data is updated.

카운터가 오버플로우하면(이전에 사용된 카운터 값으로 복귀하면), 오버플로우는, 데이터를 암호화하는데 사용된 암호화 키들을 변경하거나 인증 코드를 생성하는데 사용된 비밀 키 또는 다른 파라미터를 변경하는 것 등의 다른 조치를 기동하여, 암호화/인증 처리의 일부 다른 파라미터가 변경되었을 때, 이전의 카운터 값들을 재사용하는 것을 더 안전하게 만든다. When the counter overflows (returning to the previously used counter value), the overflow can change the encryption keys used to encrypt the data, or change the secret key or other parameters used to generate the authentication code. Initiate another action, making it safer to reuse the previous counter values when some other parameter of the encryption / authentication process is changed.

타겟 데이터 블록과 관련된 타겟 카운터가 모호 메모리 영역의 추가적인 데이터 블록에 기억될 때, 카운터에 대한 갱신은 보호 메모리 영역에 있는 다른 데이터 블록에 대한 추가적인 기록 액세스를 필요로 하므로, 이것은 이 데이터 블록과 관련된 추가적인 카운터가 갱신되는 것을 필요로 하고, 이것은 그 자체가 추가적인 기록 액세스를 기동하며, 이하 등등이다. 이 때문에, 원래의 기록 액세스는, 루트에 도달할 때까지 트리를 위로 가로지르면서, 성공적인 카운터 갱신 및 인증 코드 재계산들의 시퀀스를 시동한다. When the target counter associated with the target data block is stored in an additional data block in the ambiguous memory area, the update to the counter requires additional write access to other data blocks in the protected memory area, so this The counter needs to be updated, which itself initiates additional write access, and so on. Because of this, the original write access starts a sequence of successful counter update and authentication code recalculations, traversing the tree up until the root is reached.

카운터 무결성 트리의 모든 노드들이 분할-카운터 접근방식을 사용하는 것은 필수적인 것은 아니다. 예를 들어, 보호 메모리 영역 내에서 보호해야 하는 데이터 블록들의 총 수는 카운터 무결성 트리에서 구현되는 애리티(부모 노드 당 자식 노드들의 수)의 정확한 거듭제곱이 아닐 수도 있으며, 이 경우, 필요한 애리티를 제공하기 위해서는 더 적은 수의 모노리식 카운터들을 기억하는 것이 충분할 수 있으므로, 더 낮은 애리티를 가져 분할-카운터 접근방법을 사용하지 않는 일부 노드가 존재할 수 있다. 이 때문에, 모든 노드가 분할-카운터들을 사용할 필요는 없다. It is not essential that all nodes in the counter integrity tree use a split-counter approach. For example, the total number of data blocks that need to be protected within the protected memory area may not be the exact power of the parity (number of child nodes per parent node) implemented in the counter integrity tree, in which case the required parity It may be sufficient to remember fewer monolithic counters in order to provide, so there may be some nodes that have a lower parity and do not use the split-counter approach. Because of this, not all nodes need to use split-counters.

분할-카운터 노드들로 구현되는 노드들에 대해, 분할 형태로 구현되는 타겟 카운터가 대응하는 타겟 데이터 블록 내의 대응하는 데이터에 대한 기록으로 인해 갱신될 필요가 있을 때, 메모리 보안회로는 타겟 카운터에 대응하여 부 카운트 값을 갱신한다. 또한, 메모리 보안회로는, 타겟 데이터 블록의 갱신된 데이터, 해당 타겟 카운터에 대응하는 해당하는 주 카운트 값과, 해당 타겟 카운터에 대응하는 갱신된 부 카운트 값에 근거하여, 타겟 데이터 블록과 관련되는 기억된 인증 코드를 재계산한다. 부 카운트 값의 갱신이 오버플로우를 기동하지 않는 경우에는, 타겟 데이터 블록과 동일한 주 카운트 값을 공유하는 다른 데이터 블록들과 관련된 다른 인증 코드들을 갱신할 필요가 없다. For nodes implemented with split-counter nodes, the memory security circuitry corresponds to the target counter when the target counter implemented in split form needs to be updated due to the writing of the corresponding data in the corresponding target data block. To update the negative count value. In addition, the memory security circuit stores memory associated with the target data block based on the updated data of the target data block, the corresponding main count value corresponding to the target counter, and the updated sub count value corresponding to the target counter. Recalculate the old authentication code. If the updating of the negative count value does not trigger the overflow, there is no need to update other authentication codes associated with other data blocks sharing the same major count value as the target data block.

그러나, 부 카운트 값의 갱신이 오버플로우(이전에 사용된 부 카운트 값의 재사용)를 발생할 때, 메모리 보안회로는 해당 타겟 카운터에 대한 대응하는 주 카운트 값을 갱신한다. 이들 카운터에 대한 이 주 카운트 값을 공유하는 타겟 데이터 블록 이외의 다수의 데이터 블록들이 존재하므로, 주 카운트 값을 갱신하는 것은, 이전에 기억된 인증 코드들이 주 카운트 값과 이들 데이터 블록의 데이터 및 부 카운터들로부터 산출된 인증 코드와 더 이상 일치하지 않게 된다는 것을 의미한다. 따라서, 메모리 보안회로는, 타겟 데이터 블록 그 자체에 대한 기억된 인증 코드를 재계산하는 것 이외에, 주 카운트 값을 공유하는 카운터들과 관련되는 다른 데이터 블록들 각각과 관련된 기억된 인증 코드들을 재계산한다. 이 때문에, 각각의 부 카운터들 사이에서의 주 카운트 값의 공유가, 타겟 데이터 블록 그 자체 이외의 블록들에 대한 인증 코드들의 추가적인 계산을 필요로 한다는 것을 의미하는 경우가 있다. 그러나, 이와 같은 성능상의 불이익은 좀처럼 발생하지 않는 반면에, 분할-카운터 접근방법을 사용하여 트리 노드들의 애리티를 증가시키는 것에 의한 성능상의 이득은 카운터 트리의 각각의 횡단을 가속화하도록 도움으로써, 평균적으로 분할-카운터 접근방법을 사용할 때 성능이 더 우수하다. However, when the update of the sub count value overflows (reuse of the previously used sub count value), the memory security circuit updates the corresponding main count value for the target counter. Since there are a number of data blocks other than the target data block sharing this main count value for these counters, updating the main count value means that the previously stored authentication codes are the main count value and the data and sub data of these data blocks. This means that it no longer matches the authentication code calculated from the counters. Thus, the memory security circuit recalculates the stored authentication codes associated with each of the other data blocks associated with counters that share the main count value, in addition to recalculating the stored authentication code for the target data block itself. do. For this reason, sharing of the main count value between each sub-counter sometimes means that additional calculation of authentication codes for blocks other than the target data block itself is required. However, while this performance penalty rarely occurs, the performance gain by increasing the parity of tree nodes using a split-counter approach is averaged by helping to accelerate each traversal of the counter tree. The performance is better when using the split-counter approach.

또한, 적어도 한 개의 미러 카운터 무결성 트리의 특정한 노드의 부 카운트 값의 오버플로우에 응답하여(또는 임계값의 초과 등과 같이, 소정의 조건을 만족하는 특정한 노드의 부 카운터들의 오버플로우의 레이트(rate)에 응답하여), 메모리 보안회로는 이 노드의 부 카운터들의 사이즈를 더 증가시키고 부 카운터들의 서브셋을 적어도 한 개의 미러 카운터 무결성 트리의 대응하는 노드에 할당한다. 즉, 부 카운터가 오버플로우하면(또는 너무 자주 오버플로우하면), 이것은, 부 카운터들의 현재의 사이즈가 너무 작아, 부 카운터들의 사이즈를 증가시켜 동일한 블록에 있는 다른 부 카운터들이 자주 할 가능성을 줄이는 것이 유용할 수 있다는 표시일 수 있다. 부 카운터의 오버플로우에 응답하여 부 카운터들의 사이즈를 항상 증가시키는 것은 필수적인 것은 아니며, 어떤 경우에는 특정한 코드에 대해 부 카운터 사이즈 증가시를 기동하기 위해 다수의 조건들을 만족해야 하며, 이들 조건중 한 개는 이 노드의 부 카운터의 오버플로우이다. 부 카운터 오버플로우의 레이트는, 다양하게, 예를 들어, 시간에 대한 레이트(특정한 시간의 오버플로우의 수) 또는 메모리 액세스 횟수에 대한 레이트(특정한 횟수의 메모리 액세스들에 대해 검출된 오버플로우의 수), 또는 메모리에 대한 기록 동작의 횟수에 대한 레이트로서 모니터링될 수도 있다. 부 카운터 사이즈도 설정된 임계값을 초과하는 데이터 재암호화 또는 인증 코드 재계산의 레이트에 응답하여 증가될 수도 있다(마찬가지로, 데이터 재암호화 또는 인증 코드 재계산의 레이트는 시간, 메모리 액세스의 횟수 또는 메모리에 대한 기록 동작의 횟수에 대해 정의될 수도 있다). In addition, in response to an overflow of a sub-count value of a specific node of at least one mirror counter integrity tree (or exceeding a threshold, a rate of overflow of sub-counters of a specific node satisfying a predetermined condition) In response), the memory security circuit further increases the size of this node's sub-counters and allocates a subset of the sub-counters to the corresponding node of the at least one mirror counter integrity tree. That is, if the sub-counter overflows (or overflows too often), this means that the current size of the sub-counters is too small, increasing the size of the sub-counters to reduce the likelihood of other sub-counts in the same block frequently. It can be an indication that it can be useful. It is not necessary to always increase the size of the sub-counters in response to the overflow of the sub-counter, and in some cases, it is necessary to satisfy a number of conditions in order to start upon increasing the sub-counter size for a specific code, and one of these conditions Is the overflow of the sub counter of this node. The rate of the sub-counter overflow can vary, for example, the rate over time (the number of overflows at a particular time) or the rate over memory accesses (the number of overflows detected for a specific number of memory accesses) ), Or as a rate for the number of write operations to the memory. The sub-counter size may also be increased in response to a rate of data re-encryption or authentication code recalculation that exceeds a set threshold value (similarly, the rate of data re-encryption or authentication code recalculation is time, number of memory accesses, or memory). It may be defined for the number of write operations for).

분할 카운터 노드는, 부모 노드 및 리프 노드를 포함하는 카운터 무결성 트리의 모든 노드에 설치될 수 있다. 그러나, 부모 노드들 중에서 적어도 한 개가 분할-카운터 노드인 것이 특히 유용할 수 있다. 이것은 트리의 더 신속한 부채 모양으로의 펼쳐짐(fanning)을 가능하게 하여, 특정한 사지의 보호 메모리 영역을 커버하는데 더 적은 레벨들의 트리가 필요하게 된다. 일부 구현예에서, 메모리 보안회로는 카운터 무결성 트리의 다양한 레벨에 적어도 2개의 분할-카운터 노드들을 포함하는 카운터 무결성 트리를 유지한다. The split counter node can be installed in all nodes of the counter integrity tree, including the parent node and leaf node. However, it may be particularly useful that at least one of the parent nodes is a split-counter node. This enables faster fanning of the tree, requiring fewer levels of the tree to cover the protected memory area of a particular limb. In some implementations, the memory security circuit maintains a counter integrity tree including at least two split-counter nodes at various levels of the counter integrity tree.

일부 구현예에서, 카운터 무결성 트리의 각각의 노드가 동일한 애리티를 가질 수 있는데, 즉 각각의 노드는 동일한 수의 데이터 블록들 또는 자식 노드들에 대한 카운터들을 지정한다. 그러나, 트리의 적어도 2개의 노드가 서로 다른 수의 자식 노드들에 대해 카운터들을 지정하는 것도 가능하다. In some implementations, each node of the counter integrity tree can have the same ity, ie each node specifies counters for the same number of data blocks or child nodes. However, it is also possible for at least two nodes in the tree to specify counters for different numbers of child nodes.

특히, 트리에서 더 높은 곳에 있는(즉, 루트 노드에 더 가까운) 노드들이 루트로부터 더 멀리 떨어지고 트리의 리프들에 더 가까운 노드들보다 낮은 애리티를 갖도록 주 카운터 무결성 트리의 적어도 일부가 구현되는 것이 유용할 수 있다. 이 때문에, 트리의 애리티는 레벨마다 변경가능하고, 트리를 가로질러 루트 노드에 접근함에 따라 줄어든다. In particular, it is recommended that at least a portion of the main counter integrity tree be implemented such that nodes higher up in the tree (i.e. closer to the root node) are farther away from the root and have a lower parity than nodes closer to the leaves of the tree. It can be useful. Because of this, the tree's Attribute can be changed from level to level, and decreases as the root node is traversed across the tree.

예를 들어, 주 카운터 무결성 트리는, 제1 수의 데이터 블록들에 대한 카운터들을 지정하는 제1 분할-카운터 노드와, 제1 수보다 큰 제2 수의 데이터 블록들에 대한 카운터들을 지정하는 제2 분할-카운터 노드를 포함하고, 제1 분할-카운터 노드는 제2 분할-카운터 노드의 부모 노드이다. 자식들에 대한 부모 노드들의 애리티를 줄임으로써, 자식 노드에 비해 부모 노드에 더 적은 수의 카운터들이 존재하므로, 더 큰 수의 비트들을 갖는 카운터들을 포함시킬 더 많은 공간이 존재한다. 이 때문에, 제1 분할-카운터 노드에 의해 지정된 부 카운트 값들은 제2 분할-카운터 노드에 의해 지정된 부 카운트 값보다 더 큰 비트 수를 갖는다. 이것은, 루트를 향해 트리의 위로 올라갈 때, 트리의 더 높은 레벨에 있는 각각의 노드가 트리에서 더 멀리 아래쪽에 있는 노드들보다 더 넓은 범위의 어드레스들을 커버하기 때문에, 트리의 각 레벨에 대한 기록 트래픽의 양이 지수적으로 증가하는 경향이 있으므로, 매우 유용할 수 있다. 애리티를 더 작게 하고 부 카운트 값들을 더 크게 함으로써, 루트 노드를 향해 트리를 올라갈 때, 이것은 이들 더 높은 레벨에서의 카운터 오버플로우의 가능성을 줄여, 더 높은 레벨에 있는 노드들에 대해 인증 코드를 재계산할 필요가 있는 빈도를 줄인다. 이 때문에, 더 낮은 레벨에 더 높은 애리티를 제공하고 더 높은 레벨에 더 낮은 애리티를 제공하는 것은, 개별적인 판독 동작에 대한 개시시간과 카운터 오버플로우가 발생할 때의 대기시간 모두를 고려한 더 양호한 성능상의 균형을 제공할 수 있다. For example, the main counter integrity tree includes a first split-counter node that specifies counters for a first number of data blocks, and a second that specifies counters for a second number of data blocks greater than the first number. It includes a split-counter node, and the first split-counter node is a parent node of the second split-counter node. By reducing the parity of parent nodes for children, there are fewer counters in the parent node than in the child node, so there is more space to include counters with a larger number of bits. For this reason, the sub-count values specified by the first division-counter node have a greater number of bits than the sub-count values specified by the second division-counter node. This is because, as you climb up the tree towards the root, each node at the higher level of the tree covers a wider range of addresses than the nodes further down the tree, so write traffic for each level of the tree. Since the amount of tends to increase exponentially, it can be very useful. By going down the tree towards the root node, by making the parity smaller and the sub-count values larger, this reduces the likelihood of counter overflow at these higher levels, which will cause authentication codes for nodes at higher levels. Reduce the frequency of recalculation. For this reason, providing a higher level of arithmetic at a lower level and providing a lower level of arithmetic at a higher level provides better performance considering both the start time for individual read operations and the latency when counter overflow occurs. Can provide a balance.

마찬가지로, 트리에 조부모, 부모 및 자식 노드들을 각각 포함하는 3개 이상의 레벨이 존재하는 경우, 조부모 노드는 부모 노드에 비해 애리티의 더 큰 축소를 가져, 조부모 노드가 부모 노드보다 )더 작은 수의 자식 노드들을 커버하는) 더 적은 수의 카운터들을 지정하고, 조부모 노드에 대한 부 카운트 값들이 부모 노드의 부 카운트 값들보다 더 큰 비트 수를 갖는다. 이 때문에, 전술한 것과 같이 제1 분할-카운터 노드가 부모 노드에 대응하고 제2 분할-카운터 노드가 자식 노드에 대응하면, 제3 분할-카운터 노드를 포함하는 추가적인 조부모 노드가 제1 (부모) 분할-카운터 노드에 대해 사용된 제1 수보다 작은 제3 수의 데이터 블록들에 대한 카운터들을 지정한다. Likewise, if there are three or more levels in the tree, each containing grandparent, parent, and child nodes, the grandparent node will have a greater reduction in the parity than the parent node, and the number of grandparent nodes will be less than that of the parent node. Specify fewer counters (which cover the child nodes), and the sub count values for the grandparent node have a greater bit number than the sub count values of the parent node. For this reason, if the first split-counter node corresponds to the parent node and the second split-counter node corresponds to the child node as described above, then the additional grandparent node including the third split-counter node is the first (parent). Specifies counters for a third number of data blocks less than the first number used for the split-counter node.

일부 구현예에서, 트리의 각각의 노드에 대한 애리티가 2의 정확한 거듭제곱이어도 된다. 아 때문에, 주 카운터 무결성 트리의 각각의 노드는 2의 정확한 거듭제곱, 예를 들어, 8, 16, 32 또는 64인 다수의 데이터 블록들에 대해 카운터들을 지정할 수도 있다. In some implementations, the arithmetic power for each node in the tree may be an exact power of two. Because of this, each node of the main counter integrity tree may specify counters for multiple data blocks that are exact powers of 2, eg 8, 16, 32 or 64.

그러나, 일 구현예에서는, 주 카운터 무결성 트리의 적어도 한 개의 노드가 2의 정확한 거듭제곱 이외, 예를 들어 36 또는 48의 다수의 데이터 블록들에 대한 카운터들을 지정해도 된다. 즉, 적어도 한 개의 분할-카운터 노드의 애리티는 2의 정확한 거듭제곱 이외의 값이어도 된다. 메모리 공간은 보통 어드레스 계산을 간단하게 하기 위해 2의 거듭제곱 단위의 어드레스들에 대응하는 블록들로 구성되므로, 2의 거듭제곱이 아닌 수의 데이터 블록들에 대응하는 트리 노드들을 사용하는 것은 당업자에게 있어서는 매우 직관에 벗어나는 것일 것이다. 그러나, 다음의 가장 큰 2의 거듭제곱에 대응하는 애리티를 갖는 트리 노드를 구현하는 것은 각각의 카운터의 사이즈를 너무 많이 줄여, 실행 시간을 좌우하는 상당한 수의 오버플로우가 존재할 수 있는 반면에, 다음의 가장 작은 2의 거듭제곱을 사용하는 것은 비트들이 과도하게 제공되는(over-provisioned) 카운터들을 발생하여 오버플로우의 가능성을 무시할 수 있지만 카운터들의 비트들 중 다수가 좀처럼 사용되지 않을 수 있기 때문에, 2개의 인접한 2 거듭제곱들 사이에 놓이는 애리티를 제공하는 것은 더 양호한 성능상의 균형을 제공할 수 있다는 것이 인식되었다. 이 때문에, 가끔 카운터 무결성 트리의 특정한 노드에 의해 커버되는 다수의 데이터 블록들에 대해 2의 거듭제곱이 아닌 수를 이용하는 것은 오버플로우의 가능성에 대한 판독/기록 액세스시에 가로지르는 트리 레벨들의 총 수의 균형을 더 양호하게 유지하여, 동작 기간에 걸쳐 평균적으로 성능을 향상시킨다. 트리 노드에 대해 2의 거듭제곱이 아닌 애리티를 사용하는 것은 카운터 무결성 트리의 특정한 노드가 기억되는 어드레스를 결정하기 위한 어드레스 계산을 복잡하게 할 수 있지만, 이와 같은 추가적인 오버헤드보다는, 오버플로우의 가능성에 대해 트리를 가로지르는데 필요한 메모리 액세스 횟수의 균형을 더 양호하게 유지한다는 추가적인 성능상의 이점이 더 클 수 있다. However, in one implementation, at least one node of the main counter integrity tree may specify counters for multiple data blocks, for example 36 or 48, other than the exact power of 2. That is, the at least one split-count node may have an attribute other than an exact power of two. Since memory space is usually composed of blocks corresponding to addresses in powers of 2 to simplify address calculation, using tree nodes corresponding to a number of data blocks other than powers of 2 is of skill in the art. For, it would be very out of intuition. However, implementing a tree node with an ity corresponding to the next largest power of 2 reduces the size of each counter too much, while there may be a significant number of overflows that influence execution time, Using the next smallest power of 2 can result in over-provisioned counters where the bits can be ignored, but because many of the bits of the counters are rarely used, It has been recognized that providing an analyte that lies between two adjacent powers of two can provide a better performance balance. Because of this, sometimes using a non-power of 2 number for multiple data blocks covered by a particular node of the counter integrity tree is the total number of tree levels traversed upon read / write access to the possibility of overflow. By keeping the balance better, the performance is improved on average over the operation period. Using a non-power of 2 power for a tree node can complicate address computation to determine the address at which a particular node in the counter integrity tree is stored, but rather than this additional overhead, the possibility of overflow The additional performance benefit of maintaining a better balance of the number of memory accesses needed to traverse the tree may be greater.

메모리 보안회로는, 일부 실시예에서는, 타겟 데이터 블록과 보호 메모리 영역의 동일한 캐시 라인으로부터 타겟 데이터 블록에 대한 기억된 인증 코드를 판독한다. 캐시 라인은, 메모리에 의한 한번의 데이터 액세스로서 반환될 수 있는 메모리 어드레스 공간의 단위이다. 동일한 캐시 라인 내부에 타겟 데이터 그 자체와 함께 기억된 인증 코드를 기억함으로써, 타겟 데이터 블록에 대해 계산된 인증 코드와 비교하기 위한 기억된 인증 코드를 판독하기 위해 두 번째 메모리 액세스를 행할 필요가 없어진다. The memory security circuit, in some embodiments, reads the stored authentication code for the target data block from the same cache line in the target data block and the protected memory area. A cache line is a unit of memory address space that can be returned as a single data access by memory. By storing the authentication code stored together with the target data itself inside the same cache line, there is no need to perform a second memory access to read the stored authentication code for comparison with the calculated authentication code for the target data block.

그러나, 다른 구현예는 타겟 데이터 블록과 별개의 캐시 라인에 기억된 인증 코드를 기억할 수도 있다. 예를 들어, 일부 메모리 칩은 주 기억 영역에 있는 데이터와 관련된 오류 검출/정정 코드들을 기억하는 보조 기억 영역을 제공한다. 이와 같은 메모리 칩은, 주 데이터와 그것의 관련된 오류 검출/정정 코드가 별개의 캐시 라인들에 기억되더라도, 이것들을 메모리 액세스에 응답하여 효율적으로 반환하도록 구성된다. 이 때문에, 일부 구현예에서는, 기억된 인증 코드가 오류 검출/정정 코드들에 사용하도록 설계된 메모리 칩의 보조 기억 영역에 기억될 수도 있다. However, other implementations may store the authentication code stored in a cache line separate from the target data block. For example, some memory chips provide an auxiliary storage area that stores error detection / correction codes related to data in the main storage area. Such a memory chip is configured to efficiently return the main data and its associated error detection / correction code in response to memory access, even if they are stored in separate cache lines. Because of this, in some implementations, the stored authentication code may be stored in an auxiliary storage area of a memory chip designed for use in error detection / correction codes.

액세스되고 있는 타겟 데이터 블록에 대한 기억된 인증 코드와 계산된 인증 코드 사이에 불일치가 검출되면, 메모리 보안회로는 보안 위반 응답을 기동한다. 보안 위반 응답은, 메모리에 대한 성공적인 액세스를 금지하거나 혹시나 모르는 공격에 대한 대응책을 취하기 위한 다수의 동작들 중 어느 것일 수 있다. 예를 들어, 보안 위반 응답은 다음 중에서 어느 것을 포함할 수도 있다: 타겟 데이터 블록에서의 데이터 액세스의 복호화를 허용하기 위한 암호화 키들에 대한 액세스 거부, 타겟 데이터 블록을 액세스하려는 요구의 거부. 타겟 데이터 블록의 이전의 콘텐츠와 연관되지 않은 더미 데이터, 랜덤 데이터 또는 기타 데이터로 타겟 데이터 블록을 오버라이트하여 이 데이터의 액세스를 금지, 공격에 대해 대응책을 취하기 위해 운영체계 등의 소프트웨어 프로세스를 기동하기 위한 예외 발생, 데이터가 손상된 경우 보호 메모리 영역에 있는 모든 데이터(타겟 데이터 블록만이 아니라)의 오버라이트 또는 소거, 및/또는 (예를 들어, 공격을 받은 경우 장치의 올바른 이용을 방지하기 위해 메모리 또는 장치 내부의 퓨즈로 연결된 접속부를 거친 버닝(burning) 등의 물리적인 대응책을 취함으로써) 장치 또는 메모리의 더 이상의 올바른 이용을 방지하기 위해 장치 또는 메모리를 디스에이블시키는 것. 보안 위반이 식별될 때 취해지는 조치의 정확한 상세내용은 구현마다 변경될 수 있다. When a discrepancy between the stored authentication code for the target data block being accessed and the calculated authentication code is detected, the memory security circuit triggers a security violation response. The security breach response can be any of a number of actions to prevent successful access to memory or to take countermeasures against an unexpected attack. For example, the security violation response may include any of the following: Denial of access to encryption keys to allow decryption of data access in the target data block, denial of request to access the target data block. Overwrite the target data block with dummy data, random data, or other data that is not associated with the previous content of the target data block to prevent access to this data, and to launch a software process such as an operating system to take countermeasures against attacks Exceptions, overwrites or erases all data in the protected memory area (not just the target data block) if the data is corrupted, and / or memory to prevent correct use of the device (e.g. if attacked) Or disabling the device or memory to prevent further correct use of the device or memory (by taking physical countermeasures, such as burning, through a fused connection inside the device). The exact details of the action taken when a security breach is identified can vary from implementation to implementation.

메모리 보안회로는, 보호 메모리 영역의 데이터 블록에 기록된 데이터를 암호화하고 보호 메모리 영역의 데이터 블록에서 판독된 데이터를 복호화하는 암호화/복호화 회로를 갖는다. 이 때문에, 보호 메모리 영역으로부터 데이터를 판독할 수도 있는 공격자에게 데이터가 평문으로 노출되지 않는다. 카운터 무결성 트리는, 데이터가 보호 메모리 영역에 있는 동안 데이터의 부정 조작과 재생 공격을 검출하는 조치를 제공함으로써 추가적인 보호를 제공한다. 보호 메모리 영역에 기록되는 카운터 무결성 트리의 모든 노드는 "실제" 데이터 그 자체와 유사하게 암호화 및 복호화를 겪을 수도 있다. The memory security circuit has an encryption / decryption circuit that encrypts data recorded in a data block in the protected memory area and decrypts data read from the data block in the protected memory area. For this reason, data is not exposed in plain text to an attacker who may read data from the protected memory area. The counter integrity tree provides additional protection by providing measures to detect fraudulent manipulation and replay attacks while data is in the protected memory area. All nodes of the counter integrity tree written to the protected memory area may undergo encryption and decryption similar to the "real" data itself.

일부 구현예에서, 메모리 보안회로에 의한 제어를 겪는 메모리에 매핑되는 모든 어드레스 공간은 보호 메모리 영역인 것으로 생각할 수 있으므로, 이 메모리에 대한 모든 액세스는 카운터 무결성 트리를 사용하는 암호화, 복호화 및 무결성 검증을 겪을 수 있다. 메모리 액세스 회로는 동일한 보호를 겪지 않는 별개의 메모리 유닛 등의 적어도 한 개의 다른 메모리에 대한 액세스를 더 제어해도 된다. 이와 달리, 동일한 메모리 장치 내에서, 메모리 내부의 서로 다른 어드레스 범위들이 각각 보호 영역과 비보호 메모리 영역에 매핑될 수도 있다. 비보호 메모리 영역에서는, 메모리 액세스 회로가, 메모리 보안회로에 의해 제공된 보호들에 무관하게, 예를 들어, 암호화/보호화를 필요로 하지 않고, 또한 카운터 무결성 트리 및 인증 코드에 근거한 무결성 검증을 필요로 하지 않고, 아 영역에 있는 데이터에 대한 액세스를 제어해도 된다. 이 때문에, 비보호 메모리 영역에 대한 액세스는 카운터 무결성 트리에 무관하게 제어될 수도 있다. 예를 들어, 공격자에 대해 보호될 필요가 없는 민감하지 않은 일부 데이터가 존재할 수도 있다. 비보호된 메모리 영역에 이 데이터를 기록함으로써, 데이터의 진정성을 검증하기 위해 무결성 트리 데이터 및 인증 코드를 판독/기록하기 위해 추가적인 메모리 액세스를 행할 필요가 없기 때문에, 성능이 향상된다. In some implementations, all address spaces mapped to memory subject to control by the memory security circuit can be thought of as protected memory regions, so all access to this memory is subject to encryption, decryption and integrity verification using a counter integrity tree. Can suffer. The memory access circuit may further control access to at least one other memory, such as separate memory units that do not undergo the same protection. Alternatively, in the same memory device, different address ranges in the memory may be mapped to the protected area and the unprotected memory area, respectively. In the unprotected memory area, the memory access circuit does not require, for example, encryption / protection, regardless of the protections provided by the memory security circuit, and also requires integrity verification based on the counter integrity tree and authentication code. Instead, access to data in the sub-area may be controlled. Because of this, access to the unprotected memory area may be controlled independently of the counter integrity tree. For example, some insensitive data may need to be protected against an attacker. By writing this data in an unprotected memory area, performance is improved because there is no need to perform additional memory access to read / write integrity tree data and authentication code to verify the authenticity of the data.

전술한 기술은 메모리 보안회로의 기능을 하드웨어로 제공하는 맞춤형 회로를 갖는 물리 장치에서 구현될 수 있다. 이 때문에, 처리장치 상에서 실행되는 소프트웨어는 암호화 또는 복호화 또는 무결성 검증 동작이 행해지고 있는지 알 필요가 없는데, 이것은 이와 같은 동작이 하드웨어로 설치된 메모리 보안회로에 의해 자동으로 행해질 수 있기 때문이다. 따라서, 소프트웨어가 데이터가 보호 메모리 영역에 매핑된 어드레스에 기록되도록 지시하면, 메모리 보안회로는 이것을 메모리에 기록하기 전에 이 데이터를 암호화하고, 공격자에 의해 메모리가 손상되지 않은 카운터 무결성 트리에 근거한 대응하는 카운터 무결성 트리 노드들의 생성 및/또는 검증을 제어할 수도 있다. 마찬가지로, 소프트웨어에 의한 보호 메모리 영역에 대한 판독시에, 메모리 보안 하드웨어는, 판독된 데이터의 복호화와, 판독된 데이터가 여전히 유효한지 검증하기 위한 카운터 무결성 트리 노드들의 검사를 제어할 수도 있다. The above-described technology may be implemented in a physical device having a custom circuit that provides a function of a memory security circuit in hardware. For this reason, the software executed on the processing device does not need to know whether an encryption or decryption or integrity verification operation is being performed, because such an operation can be automatically performed by a memory security circuit installed in hardware. Thus, if the software instructs the data to be written to an address mapped to the protected memory area, the memory security circuitry encrypts this data before writing it to memory, and the corresponding counter based on the counter integrity tree where the memory is not damaged by the attacker. It may also control the creation and / or verification of counter integrity tree nodes. Similarly, upon reading to the protected memory area by software, the memory security hardware may control decryption of the read data and inspection of counter integrity tree nodes to verify that the read data is still valid.

그러나, 다른 실시예에서는, 암호화/복호화, 기억된 인증 코드 및 카운터 무결성 트리의 생성과, 기억된 인증 코드 및 카운터 무결성 트리에 근거한 무결성 검증 동작은, 그 자체가 이와 같은 메모리 보안 동작을 자동으로 행하는 하드웨어를 갖지 않는, 장치 내의 범용 처리회로 상에서 실행되는 소프트웨어에 의해 행해질 수도 있다. 예를 들어, 소프트웨어는, 그것의 제어하에서 밑에서 실행되는 다른 어플리케이션을 지원하는 운영체계나 하이퍼바이저 등의 플랫폼 레벨의 코드이어도 된다. 예를 들어, 가상 모신 또는 시뮬레이터 프로그램은, 하드웨어가 실제로 메모리 보안회로를 갖는 것처럼 어플리케이션 코드를 실행하지만, 보호 메모리 영역에 매핑된 어드레스들에 대한 메모리 액세스를 검출하고, 이와 같은 액세스에 대해서는, 데이터가 실제로 보호 메모리 영역에 기록되기 전에, 기억된 인증 코드 및 카운터 무결성 트리에 근거하여 카운터 무결성 트리를 유지하고 데이터의 무결성을 검증하기 위한 데이터의 추가적인 암호화 또는 복호화 또는 동작을 행한다. 이 때문에, 일부 실시예에서는, 본 발명은 데이터 처리장치를 제어하여 전술한 방법을 제공하게 하는 컴퓨터 프로그램을 기억하는 기억매체를 제공한다. 컴퓨터 프로그램은 네트워크를 거쳐 다운로드하는 것 등에 의해 비일시적인 형태로 기록될 수도 있다. However, in other embodiments, the encryption / decryption, generation of the stored authentication code and counter integrity tree, and the integrity verification operation based on the stored authentication code and counter integrity tree, automatically perform such a memory security operation. It may be done by software running on general purpose processing circuitry in the device, without hardware. For example, the software may be platform-level code such as an operating system or a hypervisor that supports other applications running under its control. For example, a virtual machine or simulator program executes application code as if the hardware actually has memory security circuitry, but detects memory access to addresses mapped to the protected memory area, and for such access, data Before actually being recorded in the protected memory area, the counter integrity tree is maintained based on the stored authentication code and the counter integrity tree, and additional encryption or decryption or operation of data is performed to verify the integrity of the data. For this reason, in some embodiments, the present invention provides a storage medium that stores a computer program that controls a data processing apparatus to provide the above-described method. The computer program may be recorded in a non-transitory form by downloading through a network or the like.

도 1은 프로그램 명령을 실행하여 데이터 처리 연산을 행하는 적어도 한 개의 프로세서 코어(6)를 포함하는 집적회로 또는 시스템 온 칩(4)을 구비한 데이터 처리 시스템(2)의 일례를 개략적으로 나타낸 것이다. 도 1은 한 개의 프로세서 코어만을 나타내었지만, 시스템 온 칩(4)이 복수의 프로세서를 구비하는 경우도 있다. 각각의 프로세서 코어 또는 프로세서 코어 클러스터는 캐시(8)(또는 복수 레벨의 캐시 8, 10)을 갖는다. 메모리 제어기(12)는, 시스템 온 칩(4)과 별개의 집적회로 상에 있는 오프칩 메모리(14)에 대한 액세스를 제어하는 메모리 액세스 회로로서 동작한다. 온칩의 데이터에 대한 액세스는 공격자에 의해 부정 조작되기 어렵지만, 시스템 온칩의 가장자리가 신뢰 경계로서 작용하고, 메모리 제어기(12)와 오프칩 메모리(14) 사이의 물리 채널(16) 상의 데이터를 가로채거나, 데이터가 오프칩 메모리(14)에 기억되는 동안 데이터를 수정함으로써, 이 경계를 벗어나 지나가는 데이터는 공격에 취약하다. 도 1에는 신뢰 경계가 시스템 온 칩의 가장자리에 대응하는 일례를 나타내었지만, 다른 경우에는, 신뢰 경계를 벗어나 잠재적인 공격에 데이터를 노출시킬 수 있는 시스템 온 칩 내부에 신뢰 경계가 존재할 수도 있다. 1 schematically shows an example of a data processing system 2 with an integrated circuit or system on chip 4 comprising at least one processor core 6 which executes program instructions to perform data processing operations. 1 shows only one processor core, the system-on-chip 4 may have a plurality of processors. Each processor core or processor core cluster has a cache 8 (or multiple levels of cache 8, 10). The memory controller 12 operates as a memory access circuit that controls access to the off-chip memory 14 on an integrated circuit separate from the system on chip 4. Access to data on the chip is difficult to be tampered with by an attacker, but the edge of the system on chip acts as a trust boundary and intercepts the data on the physical channel 16 between the memory controller 12 and off-chip memory 14 Or, by modifying data while the data is stored in off-chip memory 14, data passing beyond this boundary is vulnerable to attack. Although an example in which the trust boundary corresponds to the edge of the system-on-chip is shown in FIG. 1, in other cases, a trust boundary may exist inside the system-on-chip that can expose data to potential attacks beyond the trust boundary.

시스템 온 칩(4)은, 시스템에 대한 물리적인 액세스를 하고 마이크로프로세서와 오프칩 시스템 메모리(14) 사이에서 교환되고 있는 데이터 또는 코드를 관찰 및/또는 재생할 수 있는 능력을 갖는 악의적인 당사자로부터 오프칩(14)의 보호 메모리 영역(22)에 기억된 데이터를 보호하기 위해 설치된 메모리 보안 유닛(20)을 구비한다. 보호 메모리 영역(22)은, 보호할 데이터(24)와, 데이터(24)의 검증에 사용된 무결성 트리 메타데이터(26)를 포함한다. 비보호 메모리 영역(28)이 오프칩 메모리(14) 내부에 더 설치되는데, 이 비보호 영역에 기억된 데이터(30)는 메모리 보안 유닛(20)에 의해 보호되지 않으므로, 공격자가 자유롭게 액세스하여 수정한다. 일부 구현예에서는, 보호 및 비보호 메모리 영역들 22, 28에 대한 어드레스들의 매핑은 하드웨어에 의해 고정되므로, 운영체계나 프로세서 코어(6)에 의해 실행된 다른 소프트웨어가 보호 메모리 영역(22) 또는 비보호 메모리 영역(28)에 어떤 어드레스가 매핑될 것인지 변경하는 것이 불가능하다. 이와 달리, 어드레스 매핑을 제어하는 운영체계가 신뢰될 수 있으면, 어떤 어드레스들이 보호 영역 또는 비보호 영역에 매핑될 것인지 제어하는 어드레스 매핑이 소프트웨어의 제어하에서 프로세서에 의해 변경되므로, 보호 및 비보호 영역들이 항상 오프칩 메모리(14) 내부의 동일한 물리 위치에 매핑될 필요가 없다. 일부 구현예에서는, 오프칩 메모리(14) 내부에 비보호 메모리 영역(28)이 존재하지 않을 수도 있는데, 이 경우에는 전체 오프칩 메모리가 보호 메모리 영역(22)인 것으로 간주할 수 있다. The system on chip 4 is off from a malicious party that has physical access to the system and has the ability to observe and / or reproduce data or code being exchanged between the microprocessor and off-chip system memory 14 And a memory security unit 20 installed to protect data stored in the protection memory area 22 of the chip 14. The protected memory area 22 includes data to be protected 24 and integrity tree metadata 26 used for verification of the data 24. The unprotected memory area 28 is further installed inside the off-chip memory 14, and since the data 30 stored in the unprotected area is not protected by the memory security unit 20, an attacker can freely access and correct it. In some implementations, the mapping of addresses to protected and unprotected memory areas 22, 28 is fixed by hardware, such that the operating system or other software executed by the processor core 6 may protect the protected memory area 22 or unprotected memory. It is impossible to change which address will be mapped to the area 28. Alternatively, if the operating system controlling the address mapping can be trusted, protected and unprotected areas are always off because the address mapping that controls which addresses are mapped to the protected or unprotected area is changed by the processor under software control. There is no need to map to the same physical location inside the chip memory 14. In some implementations, the unprotected memory area 28 may not exist inside the off-chip memory 14, in which case the entire off-chip memory may be considered to be the protected memory area 22.

메모리 보안 유닛(20)은 오프칩 메모리(14)에 기록되고 있는 데이터를 암호화하고 오프칩 메모리에서 판독된 데이터를 복호화하는 암호화/복호화 회로(32)를 구비한다. 이것은 악의적인 관찰자가 오프칩 메모리(14)에서 판독되거나 오프칩 메모리에 기억되는 데이터를 평문으로 보지 못하도록 함으로써 프라이버시를 제공한다. 암호화 및 복호화에 의해 사용되는 암호화 키는 시스템 온 칩 상의 온칩 메모리(예를 들어, SRAM)(34) 내부 또는 메모리 보안 유닛(20) 그 자체 내부에 기억된다. 암호화 및 복호화를 위해 모든 공지된 기술이 사용되고, 암호화 키를 보호하기 위한 모든 공지된 접근방법이 사용될 수 있다. The memory security unit 20 includes an encryption / decryption circuit 32 that encrypts data being recorded in the off-chip memory 14 and decrypts data read from the off-chip memory. This provides privacy by preventing malicious observers from viewing data stored in or off-chip memory 14 in plain text. The encryption key used by encryption and decryption is stored in the on-chip memory (for example, SRAM) 34 on the system-on-chip or in the memory security unit 20 itself. All known techniques are used for encryption and decryption, and all known approaches for protecting encryption keys can be used.

메모리 보안 유닛(20)은, 이하에서는 일반적으로 검증회로(36)로 부르는, 무결성 트리 생성 및 검증 회로(36)를 더 구비한다. 검증회로(36)는, 보호 메모리 영역에 무결성 트리(26)를 유지하는 역할을 한다. 무결성 트리는, 보호 영역(22)에 현재 기억된 데이터가 이 영역에 기록되었을 때와 여전히 같은지 여부를 검증하기 위한 다수의 정보를 제공한다. 데이터 무결성의 검사는, 예를 들어, AES-GCM이나 SHA-256 등의 일방향 암호 함수를 사용하여 기억된 데이터로부터 생성되는 메시지 인증 코드(MAC)를 사용하여 달성될 수 있는데, 이 일방향 암호 함수는, 공격자가 인증 코드를 생성하는데 사용된 비밀 키를 알지 못할 때 무차별 대입법에 의해 특정한 데이터 값과 관련된 인증 코드를 추측하는 것을 계산상 실현불가능하게 만드는 함수를 사용한다. 인증 코드는 데이터(24)와 함께 보호 메모리 영역(22)에 또는 별개의 데이터 구조로 기억된다. 데이터에 대한 기억된 MAC를 기억된 MAC를 생성하는데 사용된 것과 동일한 일방향 함수를 사용하여 기억된 데이터로부터 유도된 계산된 MAC와 대조하여, 기억된 MAC와 계산된 MAC 사이에 불일치가 검출되면, 이것은 데이터가 부정하게 조작되었다는 것을 표시한다. The memory security unit 20 further includes an integrity tree generation and verification circuit 36, hereinafter generally referred to as a verification circuit 36. The verification circuit 36 serves to maintain the integrity tree 26 in the protected memory area. The integrity tree provides a number of pieces of information to verify whether the data currently stored in the protected area 22 is still the same as when it was written in this area. The check of data integrity can be achieved using a message authentication code (MAC) generated from data stored using, for example, a one-way cryptographic function such as AES-GCM or SHA-256, which one-way cryptographic function In other words, when the attacker does not know the secret key used to generate the authentication code, it uses a function that makes it impossible to compute the authentication code associated with a specific data value by brute force. The authentication code is stored in the protected memory area 22 together with the data 24 or in a separate data structure. If a discrepancy between the stored MAC and the calculated MAC is detected, by contrasting the stored MAC for the data with the calculated MAC derived from the stored data using the same one-way function used to create the stored MAC, this is Indicates that data has been tampered with.

그러나, MAC만 제공하는 것은 모든 공격을 방지하는데 충분하지 않을 수 있다. 또 다른 종류의 공격은, 시스템에 물리적으로 액세스하는 악의적인 사람이 암호화된 데이터와 버스 상에서 이전에 관찰된 MAC의 정당한 조합을 기억한 후, 특정한 메모리 위치에 있는 데이터를 오래된 값으로 변경하려는 의도에서 나중에 버스 상에서 이것들을 재생하여 시스템의 동작을 위태롭게 하는 재생 공격이다. 이와 같은 재생 공격은 무결성 트리(26)를 사용하여 방지될 수 있는데, 이 무결성 트리는, 트리의 각각의 리프 노드가 보호 메모리 영역(22) 내부의 데이터(24)의 블록들 중에서 한 개가 유효하다는 것을 검증하기 위한 무결성 데이터를 제공하고 리프 노드의 부모 노드가 리프 노드 그 자체가 유효한지 검사하기 위한 또 다른 무결성 데이터를 제공하는 노드들의 트리 구조를 제공한다. 부모 노드들 그 자체는 트리의 또 다른 부모 노드들을 사용하여 검사되고, 이것은 트리의 루프까지 위로 가로지를 때 계속되어, 이 루프가 최종적인 검증 소스를 제공한다. 온칩 메모리(34)에 기록된 루트 검증 데이터(38)를 사용하여, 트리의 루프 노드 그 자체를 온칩 위에 기억하거나, 또는 보호 메모리 영역에 기억된 루트 노드가 인증될 수 잇도록 하는 다른 정보를 기억함으로써, 트리의 루트가 진짜인지 검증한다. However, providing only the MAC may not be enough to prevent all attacks. Another kind of attack is the intention of a malicious person physically accessing the system to remember the legitimate combination of the encrypted data and the MAC previously observed on the bus, and then change the data in a particular memory location to an old value. It is a replay attack that later replays these on the bus, jeopardizing the operation of the system. Such a replay attack can be prevented using the integrity tree 26, which ensures that each leaf node in the tree is valid of one of the blocks of data 24 inside the protected memory area 22. It provides a tree structure of nodes that provides integrity data to verify and another node to provide validity to check if the leaf node's parent node is valid. The parent nodes themselves are examined using the other parent nodes of the tree, which continues when traversing up to the tree's loop, which provides the final source of verification. Using the root verification data 38 recorded in the on-chip memory 34, the loop node of the tree itself is stored on-chip, or other information that allows the root node stored in the protected memory area to be authenticated. By doing so, we verify that the root of the tree is real.

메모리 보안 유닛(20)은, 특정한 데이터 블록들을 검사하는데 필요한 무결성 트리(25)의 노드들이 보호 메모리 영역(22) 내부에 위치하는 어드레스들을 계산하는 어드레스 산출회로(40)를 갖는다. 옵션으로, 메모리 보안 유닛(20)은, 무결성 트리의 노드들을 오프칩 메모리(14)에서 다시 판독해야 하는 경우보다 빠른 액세스를 위해 무결성 트리의 최근에 사용된 노드들을 캐싱하는 캐시(42)를 더 갖는다. 이와 달리, 메모리 보안 유닛(20)은 프로세서 코어(6)에 의해서도 사용되는 캐시들(10) 중에서 한 개를 액세스할 수 있으므로, 공유된 캐시(10) 내부에의 무결성 트리(26)로부터의 데이터의 캐싱은 메모리 보안 유닛(20)의 동작을 가속화하는데 도움이 될 수 있다. The memory security unit 20 has an address calculation circuit 40 that calculates addresses at which nodes of the integrity tree 25 required to examine specific data blocks are located inside the protected memory area 22. Optionally, the memory security unit 20 further caches the cache 42 to cache recently used nodes in the integrity tree for faster access than when nodes in the integrity tree need to be read back from the off-chip memory 14. Have Alternatively, the memory security unit 20 can access one of the caches 10 also used by the processor core 6, so data from the integrity tree 26 inside the shared cache 10 Caching of may help accelerate the operation of the memory security unit 20.

무결성 트리가 구현될 수 있는 다양한 방법이 존재한다. 도 2는, 비교를 위해, 각각의 데이터 블록들에 대한 해시들(MAC들)로부터 구축된 해시 트리로서 무결성 트리(26)를 구현하는 제1 실시예를 나타낸 것이다. 도 2에 도시된 것과 같이, 각각의 데이터 블록(50)은 데이터 블록(50)의 콘텐츠에 MAC 해시 함수(54)를 적용하여 계산된 대응하는 MAC(52)을 갖는다. MAC 해시 함수(54)는, 데이터 블록의 갱신시마다 갱신되는 카운터(56)에 더 의존하여, 공격자가 비밀 키를 추론하기 더 곤란해지도록 신선도(데이터 및 비밀 키로부터 MAC이 유도되는 방식의 변화)를 제공한다. 이와 같은 접근방법에서, 각각의 MAC 생성을 위해 사용되는 카운터들(56)은 해시 트리(26)와 별개로 별도의 데이터 구조로 기억된다. 카운터들을 기억하는데 사용되는 데이터 블록들은 그 자체가 MAC을 사용하여 보호되는 데이터 블록들(50)의 일부일 수도 있다. 이와 달리, 카운터의 부정 조작이 대응하는 데이터 블록의 MAC 인증을 실패하게 만들 때 이 카운터의 부정 조작이 여전히 검출가능하기 때문에, 카운터들이 비보호 메모리 영역(28)에 기억될 수도 있다. There are various ways an integrity tree can be implemented. FIG. 2 shows a first embodiment of implementing the integrity tree 26 as a hash tree constructed from hashes (MACs) for each data block, for comparison. As shown in FIG. 2, each data block 50 has a corresponding MAC 52 calculated by applying a MAC hash function 54 to the content of the data block 50. The MAC hash function 54 relies more on the counter 56 which is updated each time a block of data is updated, so that the freshness becomes more difficult for an attacker to infer the secret key (change in the way the MAC is derived from the data and secret key) Provides In this approach, the counters 56 used for each MAC generation are stored in a separate data structure separately from the hash tree 26. Data blocks used to store counters may themselves be part of data blocks 50 protected using a MAC. Alternatively, the counters may be stored in the unprotected memory area 28 because the counter's fraudulent operation is still detectable when the counter's fraudulent operation causes the MAC authentication of the corresponding data block to fail.

특정한 그룹의 데이터 블록들에 대해 계산된 모든 MAC들(52)은 무결성 트리(26)의 리프 노드(60) 내부에 함께 모여, 리프 노드가 특정한 범위의 어드레스 공간을 커버하는 MAC을 지정한다. 그후, 트리의 리프 노드(60)의 무결성은, 리프 노드(60)의 콘텐츠와 또 다른 카운터(64)에 근거하여 또 다른 MAC(62)을 계산하여, 그 자체가 무결성 트리(26)의 비리프(non-leaf) 노드(66) 내부에 다른 리프 노드들(60)로부터의 MAC들과 함께 기억되는 또 다른 MAC을 생성함으로써, 보호될 수 있다. 이와 같은 비리프 노드(66)는, 비리프 노드(66)에 기억된 MAC들을 갖는 리프 노드들(60) 각각의 부모 노드로서의 역할을 한다. 따라서, 각각의 부모 노드는 그것의 자식 노드들 각각에 기억된 모든 MAC들에 의해 커버되는 전체 메모리와 사이즈가 동등한 메모리의 블록을 보호하기 위해 MAC들을 기억한다. 예를 들어, 도 2의 경우에는, 트리가 8진(8-ary) 해시 트리이므로, 각각의 부모 노드가 8개의 자식 노드를 가져, 그것의 자식들 중에서 한 개에 의해 커버된 메모리 영역의 사이즈의 8배의 메모리 영역을 커버한다. 마찬가지로, 각각의 비리프 노드에 대해, 비리프 노드에 동일한 MAC 계산 함수를 적용하지만 이 비리프 노드 특유의 다른 카운터를 이용하여 또 다른 MAC이 계산된다. 한 개의 MAC에 의해 보호된 부모 노드에 자식 노드들의 MAC들을 함께 계속해서 그룹화함으로써, 결국 전체 보호 메모리 영역(22)이 함께 전체 보호 메모리 영역(220을 커버하는 다수의 자식 노드들에 대한 MAC들을 기억하는 루트 노드(66-R)로 줄어든다. 필요한 트리의 레벨들의 수는 보호 메모리 영역의 사이즈에 의존한다. 루트 노드(66-R)의 진정성은, 루트 노드 그 자체를 온칩 메모리(34)에 루트 검증 데이터(38)로서 기억하거나, 또는 도 2에 도시된 것과 같이 루트 노드의 또 다른 MAC을 계산하고 이 MAC(68)을 온칩 메모리(34)에 루트 검증 데이터(38)로서 기억함으로써 검증될 수 있다. All the MACs 52 computed for a particular group of data blocks are gathered together inside the leaf node 60 of the integrity tree 26, designating the MAC where the leaf node covers a specific range of address spaces. Thereafter, the integrity of the leaf node 60 of the tree is calculated by calculating another MAC 62 based on the content of the leaf node 60 and another counter 64, and thus the ratio of the integrity tree 26 itself. It can be protected by creating another MAC that is remembered with MACs from other leaf nodes 60 inside the non-leaf node 66. The non-leaf node 66 serves as a parent node of each of the leaf nodes 60 having MACs stored in the non-leaf node 66. Thus, each parent node remembers MACs to protect a block of memory equal in size to the total memory covered by all MACs stored in each of its child nodes. For example, in the case of FIG. 2, since the tree is an 8-ary hash tree, each parent node has 8 child nodes, and the size of the memory area covered by one of its children 8 times the memory area. Similarly, for each non-leaf node, the same MAC calculation function is applied to the non-leaf node, but another MAC is calculated using another counter specific to the non-leaf node. By continuously grouping the MACs of the child nodes together in a parent node protected by one MAC, the entire protected memory area 22 together stores MACs for multiple child nodes covering the entire protected memory area 220 The number of levels of the tree required depends on the size of the protected memory area, the authenticity of the root node 66-R is to route the root node itself to the on-chip memory 34. It can be verified by storing it as verification data 38, or by calculating another MAC of the root node as shown in Fig. 2 and storing this MAC 68 as on-chip memory 34 as root verification data 38. have.

따라서, 데이터 값을 액세스하려고 할 때, 대응하는 데이터 블록(50)이 그것의 MAC을 발생하는데 사용되었던 것과 동일한 MAC 함수(54)를 겪으며, 그 결과를 트리의 대응하는 리프 노드(60)에 기억된 MAC과 비교한 후, 루트 노드에 도달하고 루트 노드도 검증될 때까지, 각각의 연속된 자식 노드를 그것의 부모 모드에서 얻어진 MAC에 근거하여 검증하면서 트리를 가로지른다. 타겟 데이터 블록(50)으로부터 루트 노드까지에 이르는 분기 상에의 각각의 노드들의 모든 검증이 성공하면, 데이터 액세스가 허용된다. 대응하는 데이터 블록이 갱신될 때(기록될 때) 각각의 카운터(56)가 증분되므로, 데이터 블록과 그것의 MAC 사이의 매핑이 시간 결과에 따라 변한다. Thus, when trying to access a data value, the corresponding data block 50 undergoes the same MAC function 54 that was used to generate its MAC, and stores the result in the corresponding leaf node 60 of the tree. After comparison with the MAC, it traverses the tree, verifying each successive child node based on the MAC obtained in its parent mode, until the root node is reached and the root node is also verified. If all verification of each node on the branch from the target data block 50 to the root node is successful, data access is allowed. Since each counter 56 is incremented when the corresponding data block is updated (when it is written), the mapping between the data block and its MAC changes over time.

도 2에 도시된 접근방법의 문제점은, 특정한 데이터 값이 주어지지만 비밀 키를 알지 못할 때, 공격자가 대응하는 MAC를 추측하거나 무차별 대입법에 의해 그것을 크래킹할 수 있는 것이 계산상 실현불가능한 충분한 보안을 제공하기 위해서는, 각각의 MAC이 합당하게 큰 수의 비트, 예를 들어 64비트를 필요로 한다는 것이다. 이것은 한 개의 캐시 라인에 끼워넣어질 수 있는 MAC들의 수를 제한한다. 예를 들어, 캐시 라인이 512비트이면, 8개의 64비트 MAC들이 각각의 캐시 라인 내에 끼워넣어지므로, 트리의 각각의 노드는 8개의 자식 노드들을 갖도록 제한된다. 8진 해시 트리를 사용하면, 보호 메모리 영역의 사이즈가 증가함에 따라, 리프 모드로부터 루트까지 계속해서 가로질러야 하는 트리의 레벨의 수가 비교적 커진다. 한 개의 데이터 블록(50)이 부정 조작되지 않은 것을 검증하기 위해 액세스해야 하는 각각의 캐시 라인이 오프칩 메모리(14)와 메모리 제어기(12) 사이의 여분의 메모리 트래픽에 부가될 때, 이것이 성능에 영향을 미칠 수 있다. 마찬가지로, 오프칩 메모리 내부에서 데이터가 갱신될 때, 리프 노드에서 카운터를 증분하는 것은, 이 블록의 메모리에 대응하는 더 높은 노드에 있는 모든 MAC들이 갱신되는 것을 요구할 수 있으며, 한 개의 노드와 관련된 카운터에 대한 각각의 증분이 부모 노드에 있는 대응하는 MAC이 재계산되고 갱신되는 것을 필요로 하여, 그후 이것이 이 노드와 관련된 카운트의 증분을 기동하여, 루트에 도달할 때까지, 다음의 가장 높은 부모 노드에 기억된 MA의 재계산을 필요로 하고, 카운터의 추가적인 증분을 기동한다. 트리의 애리티가 낮을수록, 특정한 사이즈의 메모리 영역을 보호하기 위해 가로지를 필요가 있는 레벨의 수가 더 커지고, 성능에 대한 영향이 더 커진다. The problem with the approach shown in FIG. 2 is that, given a specific data value, but not knowing the secret key, an attacker can guess the corresponding MAC or crack it by brute force to provide sufficient security that is computationally unfeasible. To do this, each MAC requires a reasonably large number of bits, for example 64 bits. This limits the number of MACs that can fit into one cache line. For example, if the cache line is 512 bits, each node of the tree is limited to have 8 child nodes, since 8 64 bit MACs are embedded in each cache line. When an octal hash tree is used, as the size of the protected memory area increases, the number of levels of the tree that must continuously traverse from the leaf mode to the root becomes relatively large. When each cache line that needs to be accessed to verify that one data block 50 has not been tampered with is added to the extra memory traffic between the off-chip memory 14 and the memory controller 12, this will affect performance. It can affect. Likewise, when data is updated inside the off-chip memory, incrementing the counter at the leaf node may require that all MACs at the higher node corresponding to the memory in this block are updated, and the counter associated with one node. Each increment for the needs of the corresponding MAC in the parent node to be recalculated and updated, and then it starts the increment of the count associated with this node, until it reaches the root, the next highest parent node. The recalculation of the MA stored in is required, and an additional increment of the counter is started. The lower the tree's parity, the greater the number of levels that need to be traversed to protect a particular size of memory area, and the greater the impact on performance.

도 3은 해시 트리 대신에 카운터 트리를 이용하여 무결성 트리(26)를 구현하는 또 다른 방법을 나타낸 것이다. 이 경우, 트리의 특정한 노드가 트리의 다음 노드에 있는 블록들을 인증하기 위해 사용하는 모든 MAC들을 제공하는 것이 아니라, 각각의 노드가 그 대신에 트리의 현재 노드의 각각의 자식 노드에 대한 별개의 카운터들을 정의한다. 무결성 트리(26) 그 자체의 일부가 아닌 보호 메모리 영역(22)의 각각의 데이터 블록은, 데이터 블록(50)의 콘텐츠와 카운터 무결성 트리(26)의 리프 노드(84)에서 판독되는 카운터에 근거하여 산출되는 MAC(80)에 의해 보호된다. 리프 노드(84)는 다양한 데이터 블록들(50)에 각각 대응하는 다수의 카운터들의 값을 지정한다. 본 실시예에서는, 특정한 데이터 블록(50)에 대해 계산된 MAC(80)이 대응하는 데이터와 동일한 캐시 라인 내부에 기억된다. 이것은 필수적인 것은 아니며, 다른 실시예에서는, MAC이 대응하는 데이터와 별개로 기억될 수도 있다. 트리의 각각의 리프 노드(84)에 대해, 리프 노드(84)와 리프 노드(84)의 부모 노드로서 동작하는 비리프 노드(88)로부터 판독된 카운터(86)의 콘텐츠에 근거하여 이와 유사한 MAC(80)이 산출된다. 각각의 비리프 노드(88)는 복수의 자식 노드들(84)을 위해 사용된 카운터들을 제공한다. 마찬가지로, 트리의 각각의 레벨에서, 특정한 자식 노드에 대해 MAC(80)을 계산하는데 사용된 카운터(86)는, 루트 노드(88-R)까지 계속해서, 이 자식 노드의 부모 노드에 대응하는 데이터 블록(88)으로부터 판독된다. 메모리 보안 유닛(20)의 어드레스 산출회로(40)는, 해당 주어진 타겟 데이터 블록에 대해, 어떤 다른 데이터 블록들이 관련된 카운터들을 제공하는 무결성 트리(26)의 필요한 노드들을 기억하는지 식별한다. 결국, 루트 노드(88-R)에 도달하고, 루트 노드에 대한 MAC(80)을 루트 노드와 루트 카운터(89)의 콘텐츠의 함수로서 산출한다. 루트 카운터(89)는 온칩 메모리(34)에 루트 검증 데이터(38)로서 기억될 수도 있다. 이와 달리, 트리의 전체 루트 노드(88-R)가 온칩 메모리의 루트 검증 데이터에 기억될 수도 있으며, 이 경우에는 이 루트 노드에 대한 추가적인 MAC을 산출할 필요가 없다. 3 shows another method of implementing the integrity tree 26 using a counter tree instead of a hash tree. In this case, rather than providing all the MACs that a particular node in the tree uses to authenticate blocks in the next node of the tree, each node instead has a separate counter for each child node of the tree's current node. Define them. Each data block in the protected memory area 22 that is not part of the integrity tree 26 itself is based on the contents of the data block 50 and the counter read from the leaf node 84 of the counter integrity tree 26. It is protected by the MAC 80 calculated. The leaf node 84 specifies values of a number of counters, each corresponding to various data blocks 50. In this embodiment, the MAC 80 calculated for a specific data block 50 is stored in the same cache line as the corresponding data. This is not essential, and in other embodiments, the MAC may be stored separately from the corresponding data. For each leaf node 84 in the tree, a similar MAC based on the content of the counter 86 read from the leaf node 84 and the non-leaf node 88 acting as the parent node of the leaf node 84 80 is calculated. Each non-leaf node 88 provides counters used for a plurality of child nodes 84. Similarly, at each level of the tree, the counter 86 used to calculate the MAC 80 for a particular child node continues to the root node 88-R, data corresponding to the parent node of this child node. Read from block 88. The address calculation circuit 40 of the memory security unit 20 identifies, for that given target data block, which other data blocks store the necessary nodes in the integrity tree 26 that provide related counters. Eventually, the root node 88-R is reached, and the MAC 80 for the root node is calculated as a function of the contents of the root node and the root counter 89. The route counter 89 may be stored in the on-chip memory 34 as route verification data 38. Alternatively, the entire root node 88-R of the tree may be stored in the root verification data of the on-chip memory, in which case there is no need to calculate additional MAC for this root node.

요약하면, 도 3에 도시된 카운터 트리에 따르면, 트리의 각 레벨에서, 트리의 부모 노드로부터 판독된 카운터를 사용하여 산출되는 동일한 캐시 라인에 기억된 MAC을 사용하여 카운터 캐시 라인의 무결성이 확보된다. In summary, according to the counter tree shown in FIG. 3, at each level of the tree, the integrity of the counter cache line is ensured using MAC stored in the same cache line calculated using the counter read from the parent node of the tree. .

해당하는 데이터 블록이 기록될 때마다 각각의 카운터가 증분되거나 갱신된다. 예를 들어, 비무결성(non-integrity) 트리 데이터를 제공하는 데이터 블록(50)이 갱신되면, 트리의 리프 노드들(84) 중에서 한 개의 내부에 있는 대응하는 카운터가 증분된다. 이때, 이것은 리프 노드(84)와 관련된 MAC(80)의 재계산을 요구하며, 이것은 루트까지 계속해서 트리의 다음의 가장 높은 부모 노드(88) 내부의 카운터의 증분을 기동하고, 이하 마찬가지이다. Each counter is incremented or updated each time the corresponding data block is written. For example, when the data block 50 that provides non-integrity tree data is updated, the corresponding counter within one of the tree's leaf nodes 84 is incremented. At this time, this requires recalculation of the MAC 80 associated with the leaf node 84, which continues up to the root and starts incrementing the counter inside the next highest parent node 88 of the tree, hereinafter.

카운터들 중에서 한 개가 오버플로우하여, 예를 들어, 카운터의 가장 큰 양의 값으로부터 가장 큰 음의 값 또는 제로값으로 랩 어라운드(wrap around)하면, 이전의 카운터 값들 중에서 한 개가 반복되므로, 재생 공격이 가능하게 될 수 있는 위험이 존재한다. 이 경우, 메모리 보안 유닛(20)은, 암호화 회로(32)에 의해 사용된 암호화 카들을 갱신하여, 마찬가지로 이것이 평문으로 보이는 특정한 데이터 값과 암호화된 데이터 값 및 카운터에 근거하여 생성된 MAC 사이의 다른 매핑을 강요하게 된다. 그러나, 암호화 키가 변경될 때, 보호 메모리 영역(22)에 있는 모든 데이터가 이전 키를 사용하여 복호화되고 새로운 키를 사용하여 재암호화된 후 메모리에 다시 기록할 필요가 있기 때문에, 이와 같은 암호화 키의 갱신은 비용이 많이 들 수 있다. 이것은 다수의 판독 및 기록을 필요로 하기 때문에 성능 면에서 비용이 많이 드는 동작이 될 수 있다. 이와 같은 보호 메모리 영역(22)의 전체 재암호화가 필요한 빈도를 줄이기 위해서는, 각각의 데이터 블록에, 이와 같은 오버플로우를 드물게 만드는데 충분한 수의 비트를 갖는 카운터를 설치하는 것이 바람직할 것이다. 예를 들어, 도 3에 도시된 접근방법에서는, 각각의 512비트 캐시 라인이 MAC을 위해 사용된 64비트를 갖고, 이것은 각각 56비트의 8개의 카운터들로 분할될 수 있는 카운터들에 대해 448비트를 남긴다. 각각의 카운터를 줄이는 것은 더 많은 카운터들이 한 개의 캐시 라인 내에 끼워넣어질 수 있도록 하지만, 이것은 성능에 영향을 미치는 더 빈번한 오버플로우를 발생한다. 이 때문에, 도 3에 도시된 접근방법도 트리의 애리티를 제한하는 경향이 있어(도 3의 실시예에서는 8의 애리티), 전체 트리가 보호 메모리 영역(22)의 특정한 사이즈를 커버하게 하기 위해 얼마나 빨리 트리가 부채 모양으로 펼쳐져 가로지를 필요가 있는 레벨들의 수를 증가시킬 수 있는지 제한한다. If one of the counters overflows and wraps around, for example, from the largest positive value of the counter to the largest negative or zero value, one of the previous counter values is repeated, resulting in a replay attack There is a danger that this could be possible. In this case, the memory security unit 20 updates the encryption cars used by the encryption circuit 32, likewise different between the specific data value it appears in plain text and the MAC generated based on the encrypted data value and counter. The mapping is forced. However, when the encryption key is changed, all of the data in the protected memory area 22 is decrypted using the old key and re-encrypted using the new key, and then it is necessary to write to the memory again. Updating can be expensive. This can be a costly operation in terms of performance since it requires multiple reads and writes. In order to reduce the frequency with which the entire re-encryption of the protected memory area 22 is required, it would be desirable to provide a counter with a sufficient number of bits in each data block to make this overflow uncommon. For example, in the approach shown in FIG. 3, each 512-bit cache line has 64 bits used for MAC, which is 448 bits for counters that can be divided into 8 counters of 56 bits each. Leaves Decreasing each counter allows more counters to fit within one cache line, but this creates a more frequent overflow that affects performance. For this reason, the approach shown in FIG. 3 also tends to limit the tree's ity (the ity of 8 in the embodiment of FIG. 3), so that the entire tree covers a specific size of the protected memory area 22 To limit how fast the tree can unfold and increase the number of levels needed to traverse.

도 4는 도 2 및 도 3에 도시된 실시예에 대해 성능을 향상시키기 위해 메모리 보안 유닛(20)에 의해 사용될 수 있는 분할-카운터 무결성 트리(26)를 나타낸 것이다. 카운터 트리는 도 3에 도시된 것과 유사한 리프 노드들 및 비리프 노드들 84, 88의 구성을 가져, 각각의 부모(비리프) 노드(88)가 각각의 그것의 자식 노드들에 대한 MAC들(80)을 산출하기 위한 카운터들을 제공하고 리프 노드들(84)이 다른 비무결성 트리 관련 데이터 블록들(50)에 대한 MAC들을 산출하기 위한 카운터들(820을 제공한다. 그러나, 도 4에서는, 트리의 노드들 중에서 적어도 일부가 분할-카운터 접근방법을 사용하는데, 이때 트리의 이 노드의 카운터들은 주 카운트 값(95)과 다수의 부 카운트 값들(97)을 이용하는 분할 형태로 표시된다. 부 카운트 값들 각각은 트리의 이 노드에 의해 커버되는 데이터 블록들 중에서 한 개에 대응한다. 특정한 데이터 블록에 대한 실제 카운터는, 주 카운트 값(95)(이것은 이 노드에 의해 커버된 모든 블록들 사이에서 공유된다)과 이 데이터 블록에 대해 지정된 특정한 부 카운트 값(97)의 조합에 의해 정의된다. 예를 들어, 블록 0에 대한 카운터는 블록 0에 대해 선택된 특정한 부 카운트 값과 연접된 주 카운트 값에 대응할 수 있으며, 블록 1에 대한 카운터는 블록 1에 대해 선택된 특정한 부 카운트 값과 연접된 공유된 주 카운트 값에 대응할 수 있으며, 이하 마찬가지이다. 이 때문에, 특정한 블록의 데이터에 대해 MAC(80)이 산출될 때, 부모 노드로부터의 공유된 주 카운터(95)와 특정한 데이터 블록에 대해 선택된 부 카운터들(97) 중에서 한 개와 함께 데이터 블록의 콘텐츠에 MAC 함수(54)가 적용된다. 각각의 부 카운터(97)는 대응하는 데이터 블록의 갱신시마다 증분된다. 부 카운터들(97)의 대응하는 세트의 어느 것이 오버플로우하면 공유된 주 카운터(95)가 증분된다. 4 shows a split-counter integrity tree 26 that can be used by the memory security unit 20 to improve performance for the embodiments shown in FIGS. 2 and 3. The counter tree has a configuration of leaf nodes and non-leaf nodes 84, 88 similar to that shown in FIG. 3, such that each parent (non-leaf) node 88 has MACs 80 for each of its child nodes. ), And the leaf nodes 84 provide counters 820 for calculating MACs for other non-integrity tree related data blocks 50. However, in FIG. At least some of the nodes use a split-counter approach, where the counters of this node in the tree are represented in a split form using a major count value 95 and multiple minor count values 97. Each of the negative count values Corresponds to one of the data blocks covered by this node in the tree The actual counter for a particular data block is the main count value 95 (this is the space between all blocks covered by this node). And the specific sub-count value 97 specified for this data block. For example, the counter for block 0 will correspond to the primary sub-count value associated with the specific sub-count value selected for block 0. The counter for block 1 may correspond to a shared primary count value concatenated with a specific sub-count value selected for block 1, as follows: For this reason, MAC 80 is calculated for data of a specific block When, the MAC function 54 is applied to the content of the data block with one of the shared main counter 95 from the parent node and one of the sub counters 97 selected for the particular data block. 97) is incremented each time the corresponding data block is updated, the shared main counter 95 is incremented if any of the corresponding sets of sub-counters 97 overflow.

분할-카운터 접근방법을 사용함으로써, 각각의 데이터 블록에 대해 별개의 카운터들을 여전히 가지면서, 각각의 데이터 블록에 대해 제공된 카운터의 전체 사이즈를 비교적 크게 할 수 있어, 공격자가 특정한 데이터 블록에 적용된 카운터 값을 구축하는 것을 더 어렵게 할 수 있다. 예를 들어, 64비트 MAC을 사용하는 512비트 캐시 라인에 64비트 주 카운터와 32개의 12비트 부 카운터가 설치되어, 각각의 데이터 블록에 대해 76비트 카운터를 효율적으로 제공할 수 있다. 이 때문에, 충분히 큰 주 카운터와 한 개의 부 카운터의 총 비트 수를 제공함으로써 전체 보호 메모리 영역의 재암호화를 필요로 하는 카운터 오버플로우의 가능성을 줄일 수 있다. By using the split-counter approach, the overall size of the counter provided for each data block can be made relatively large, while still having separate counters for each data block, allowing an attacker to apply the counter value applied to a particular data block. To make it more difficult. For example, a 64-bit major counter and 32 12-bit sub-counters are installed on a 512-bit cache line using a 64-bit MAC, effectively providing a 76-bit counter for each data block. For this reason, it is possible to reduce the possibility of a counter overflow requiring re-encryption of the entire protected memory area by providing the total number of bits of the main counter and one sub counter that are sufficiently large.

그러나, 한 개의 부모 노드에 의해 커버될 수 있는 자식 노드들의 수가 부 카운터들의 수에 의존하기 때문에, 도 4에 도시된 접근방법에서 부 카운터들은 도 3에 도시된 모노리식 카운터들보다 작은데, 이것은, 트리의 애리티가 크게 증가하여, 캐시 라인의 임의의 특정한 사이즈에 대해, 부모 모드 당 더 큰 수의 자식 노드들을 허용한다는 것을 의미한다. 도 4의 실시예에서는, 트리의 분할-카운터 노드에 대해 애리티가 32이다. 이것은, 트리의 부채 모양의 펼쳐짐이 훨씬 더 크므로, 특정한 양의 메모리를 커버하기 위해 더 적은 수의 레벨이 필요하다는 것을 의미한다. 도 4의 리프 노드(84)에 나타낸 것과 같이, 트리의 모든 노드들이 분할-카운터 접근방법을 사용하는 것은 필수적인 것은 아니며, 예를 들어, 일부는 여전히 도 3에 도시된 모노리식 접근방법을 사용할 수 있으므로, 도 4의 실시예에 대해 다른 애리티, 예를 들어 8을 가져도 된다. 이것은, 보호 메모리 영역의 전체 사이즈가 분할 카운터 노드들에서 사용된 애리티의 정확한 거듭제곱에 대응하는 블록들의 수에 매핑되지 않아, 더 낮은 애리티의 일부 노드들이 필요한 경우에 유용할 수 있다. However, since the number of child nodes that can be covered by one parent node depends on the number of sub-counters, the sub-counters in the approach shown in FIG. 4 are smaller than the monolithic counters shown in FIG. This means that the tree's parity has increased significantly, allowing for a larger number of child nodes per parent mode, for any particular size of the cache line. In the embodiment of Figure 4, the parity is 32 for the split-counter node of the tree. This means that the fan-shaped unfolding of the tree is much larger, so fewer levels are needed to cover a certain amount of memory. As shown in leaf node 84 of FIG. 4, it is not essential that all nodes in the tree use a split-counter approach, for example, some may still use the monolithic approach shown in FIG. Therefore, for the embodiment of Fig. 4, other traits, for example, 8, may be provided. This may be useful when the total size of the protected memory area is not mapped to the number of blocks corresponding to the exact power of the parity used in the split counter nodes, so some nodes with a lower parity are needed.

도 5에 도시된 것과 같이, 각각의 분할-카운터 노드에 대해 애리티가 동일할 필요는 없다. 트리가 루트 노드를 향해 위로 가로지름에 따라 애리티를 줄이는 것이 유용할 수 있다. 이것은, 트리가 루트 노드를 향해 상승함에 따라, 기록 트래픽이 지수적으로 증가하므로, 카운터가 오버플로우할 가능성이 더 크기 때문이다. (리프에 더 가까운) 하부 레벨보다 더 낮은 애리티를 갖는 (루트에 더 가까운) 트리의 상부 레벨을 구현함으로써, 전체적으로 더 양호한 성능을 제공할 수 있다. 도 5에는, 48개의 8비트 부 카운터들이 설치되는 48진 노드(100)와, 36개의 10비트 부 카운터들이 설치되는 36진 부모 노드들(102)과, 32개의 12비트 부 카운터들을 갖는 32진 조부모 노드(104)를 갖는 예를 나타낸다. 트리의 위로 감에 따라 부 카운터들의 사이즈를 증가시킴으로써, 카운터 오버플로우로 인해 메모리의 더 큰 영역들이 그들의 MAC들을 재계산해야 하는 횟수를 줄일 수 있다. 물론, 도 5에 도시된 주 카운터, 부 카운터들 및 MAC의 특정한 사이즈는 단지 일례이며, 이용가능한 캐시 라인 사이즈와 특정한 시스템의 요구사항에 따라 이들 사이즈가 변경될 수 있다. As shown in Fig. 5, the parity need not be the same for each split-counter node. It can be useful to reduce the parity as the tree traverses upward towards the root node. This is because as the tree rises toward the root node, the write traffic increases exponentially, so the counter is more likely to overflow. By implementing an upper level of the tree (closer to the root) with a lower parity than the lower level (closer to the leaf), overall better performance can be provided. In FIG. 5, a 48-bit node 100 in which 48 8-bit sub-counters are installed, a 32-bit parent node 102 in which 36 10-bit sub-counters are installed, and 32 12-bit sub-counters An example of having a grandparent node 104 is shown. By increasing the size of the sub-counters as they go up the tree, it is possible to reduce the number of times larger areas of memory have to recalculate their MACs due to counter overflow. Of course, the specific sizes of the main counter, sub-counters and MAC shown in Fig. 5 are only examples, and these sizes can be changed according to the available cache line size and specific system requirements.

도 5에 도시된 것과 같이, 트리의 노드들 중에서 일부는 2의 정확한 거듭제곱이 아닌 애리티, 예를 들어 도 5에 도시된 36진 또는 48진을 갖는다. 이것은 더 복합한 어드레스 산출회로(40), 예를 들면, 어드레스 비트들의 서브셋에 근거한 색인 대신에 룩업 테이블을 필요로 하지만, 2의 거듭제곱이 아닌 애리티를 사용하는 것은, 오버플로우의 가능성과 판독/기록시마다 가로지를 필요가 있는 트리 레벨들의 수 사이에서 더 양호한 균형을 제공하여, 더 복잡한 어드레스 생성에도 불구하고 전체적인 성능 향상을 제공하므로, 유용할 수 있다. As shown in FIG. 5, some of the nodes of the tree have an arithmetic power that is not an exact power of 2, for example, the 36 or 48 digits shown in FIG. This requires a more complex address calculation circuit 40, e.g., a lookup table instead of an index based on a subset of address bits, but using an arithmetic power other than 2 is likely to overflow and read It can be useful, as it provides a better balance between the number of tree levels that need to be traversed per / proxy, providing an overall performance improvement despite more complex address generation.

도 4 및 도 5의 실시예에서는, 트리의 각각의 분할-카운터 노드가 이 노드의 모든 자식 노드들에 대해 모든 주 카운터들 사이에서 공유되는 한 개의 주 카운터(95)를 지정한다. 그러나, 도 6에 도시된 것과 같이, 이것은 필수적인 것은 아니며, 어떤 경우에는 트리의 특정한 노드가 부 카운터들(97)의 일부에 각각 대응하는 복수의 주 카운터(95)를 지정할 수도 있다. 노드 당 추가적인 주 카운터들을 지정하는 것은 캐시 라인의 특정한 사이즈에 설치될 수 있는 부 카운터들의 수를 줄일 수 있지만, 어떤 경우에는, 부 카운터가 오버플로우할 때, 동일한 주 카운터를 공유하는 다수의 데이터 블록들이 주 카운터가 증분될 때 그들의 MAC들을 재계산해야 하는 것은 아니기 때문에, 오버헤드를 줄이는데 바람직할 수 있다. In the embodiment of Figures 4 and 5, each split-counter node in the tree designates one primary counter 95 shared among all primary counters for all child nodes of this node. However, as shown in FIG. 6, this is not essential, and in some cases, a specific node of the tree may designate a plurality of main counters 95 corresponding to some of the sub counters 97, respectively. Specifying additional major counters per node can reduce the number of minor counters that can be installed at a particular size of the cache line, but in some cases, multiple data blocks sharing the same major counter when the minor counter overflows Since they do not have to recalculate their MACs when the main counter is incremented, it may be desirable to reduce overhead.

도 4 및 도 5의 실시예는 데이터 블록과 관련된 MAC(80)을 데이터 그 자체와 동일한 캐시 라인에 기억하지만, 도 7에 도시된 것과 같이, 이것은 필수적인 것은 아니며, 다른 구현예는 캐시 라인(112)과 별개의 캐시 라인에 MAC(80)을 기억할 수 있는데, 이것은 MAC에 의해 보호되는 데이터 블록 또는 무결성 트리 노드를 제공한다. 예를 들어, MAC980)은 류 정정 코드(ECC)를 기억하기 위한 전용 영역을 갖는 메모리 칩의 ECC 영역에 기억될 수도 있다. The embodiment of FIGS. 4 and 5 stores the MAC 80 associated with the data block in the same cache line as the data itself, but as shown in FIG. 7, this is not essential, and other implementations include cache line 112 ) And the MAC 80 in a separate cache line, which provides a data block or integrity tree node protected by the MAC. For example, MAC980) may be stored in the ECC area of the memory chip having a dedicated area for storing the flow correction code (ECC).

도 8은 데이터가 오프칩 메모리(14)에서 판독되도록 하는 요구에 대한 판독 액세스를 처리하는 방법을 나타낸 흐름도이다. 판독 액세스는, 예를 들어, 프로세서 코어(6)에 의해 실행된 로드 명령에 의해, 또는 캐시 제어기에 의해 개시된 프리페치 요구에 의해 기동된다. 스텝 200에서, 메모리 제어기(12)에 의해 판독 액세스 요구가 수신된다. 스텝 202에서, 메모리 제어기는, 판독 액세스 요구의 어드레스에 의해 지정된 타겟 데이터 블록이 보호 메모리 영역(22)에 매핑되는지 여부를 판정한다. 타겟 어드레스가 비보호 메모리 영역(28)에 매핑된 경우, 스텝 204에서, 판독 액세스는, 무결성 트리(26)에 무관하게, 무결성 검증이 없이 처리하도록 허용되고, 복호화를 행하지 않고 데이터가 판독된다. 오프칩 메모리에서 판독된 데이터는 프로세서 코어 및/또는 캐시에 반환된다. 8 is a flow diagram illustrating a method of handling read access to a request for data to be read from off-chip memory 14. Read access is activated, for example, by a load instruction executed by the processor core 6 or by a prefetch request initiated by the cache controller. In step 200, a read access request is received by the memory controller 12. In step 202, the memory controller determines whether the target data block designated by the address of the read access request is mapped to the protected memory area 22. If the target address is mapped to the unprotected memory area 28, in step 204, read access is allowed to process without integrity verification, regardless of the integrity tree 26, and data is read without performing decryption. Data read from the off-chip memory is returned to the processor core and / or cache.

타겟 어드레스가 보호 메모리 영역(22) 내부의 데이터 블록에 매핑되면, 스텝 206에서, 검증회로(36)는, 타겟 데이터 블록으로부터 판독된 데이터와, 트리가 트리(26)의 루트 노드까지 위로 가로지를 때 타겟 데이터 블록과 동일한 분기 위에 있는 카운터 무결성 트리의 한 개 이상의 조상 노드들에 대해 무결성 검증을 행한다. 해당 무결성 트리 분기 상의 데이터 블록들 각각에 대해, 무결성 트리 검증회로(36)는, 해당 데이터 블록에 기억된 데이터와 트리의 부모 노드에 의해 지정된 그것의 대응하는 카운터의 함수인 계산된 MAC을 산출한다. 부모 노드가 분할-카운터 노드인 경우, 공유된 주 카운터와, 이 부모 노드에 의해 커버된 메모리의 블록 내부의 해당 데이터 블록의 위치에 따라 부모 노드로부터 선택되는 선택된 부 카운터의 조합에 의해 그것의 카운터가 정의된다. 검사되고 있는 데이터 블록에 대해 계산된 MAC를 기억된 MAC와 비교하여, 스텝 208에서, 타겟 블록 각각과, 카운터 무결성 트리의 한 개 이상의 선조 노드들에 대해 기억된 MAC와 계산된 MAC가 일치하는지 여부를 판정한다. 스텝 206에서 테스트된 데이터 블록들 중에서 어느 것에 대해 기억된 MAC와 계산된 MAC 사이에 불일치가 존재하면, 스텝 210에서, 운영체계를 끌여들여 보안 위반을 처리하게 하는 것, 또는 오프칩 메모리(14)에 대한 액세스를 불능으로 하는 것, 또는 전기 접속부를 통한 퓨징(fusing)하여 메모리에 대한 계속된 액세스를 금지하는 것 등의 물리적인 대응책을 취하는 것 등의 보안 위반 응답이 기동된다. 테스트된 블록의 어느 것에 대해 불일치가 검출되면, 스텝 212에서, 데이터 액세스가 허용되므로, 원래의 대상으로 하는 데이터 블록에서 판독된 데이터가 암호화/복호화 회로(32)에 의해 복호화된 후, 프로세서나 캐시들 중에서 한 개에 의해 사용하기 위해 복호화된 형태로 반환된다.  If the target address is mapped to a data block inside the protected memory area 22, in step 206, the verification circuit 36 crosses the data read from the target data block and the tree up to the root node of the tree 26. In this case, integrity verification is performed on one or more ancestor nodes of the counter integrity tree on the same branch as the target data block. For each of the data blocks on the corresponding integrity tree branch, the integrity tree verification circuit 36 calculates the calculated MAC, which is a function of the data stored in that data block and its corresponding counter designated by the parent node of the tree. . If the parent node is a split-counter node, its counter is a combination of a shared main counter and a selected sub-counter selected from the parent node according to the location of the corresponding data block within the block of memory covered by this parent node. Is defined. The calculated MAC for the data block being checked is compared to the stored MAC, and in step 208, whether the calculated MAC matches the stored MAC for each target block and one or more ancestor nodes in the counter integrity tree. To judge. If a discrepancy exists between the stored MAC and the computed MAC for any of the data blocks tested in step 206, in step 210, the operating system is brought in to handle the security breach, or off-chip memory 14 A security breach response is initiated, such as disabling access to or taking physical countermeasures, such as fusing through an electrical connection to prohibit continued access to the memory. If a discrepancy is detected for any of the tested blocks, in step 212, data access is permitted, so that data read from the original target data block is decrypted by the encryption / decryption circuit 32, and then the processor or cache. It is returned in decrypted form for use by one of them.

따라서, 스텝 206에서의 검증은 무결성 트리의 각 단계를 검사하기 위해 보호 메모리 영역에 있는 일련의 다양한 데이터 블록들의 검증을 요구한다. 이와 같은 검증을 위해 필요한 판독은 임의의 순서로 기동될 수 있으며, 마찬가지로 판독된 데이터 블록들 각각에 대해 예측된 MAC를 산출하고 이것들을 기억된 MAC들과 비교하는 대응하는 검증 계산도 임의의 순서로 기동될 수 있다. 일부 실시예에서는 원래의 타겟 데이터 블록에 대한 판독이 이 타겟 데이터 블록에 대한 타겟 카운터를 얻기 위해 다른 데이터 블록의 판독을 기동한 후, 이 판독 그 자체가 추가적인 판독을 기동하므로, 판독이 실제로 타겟 데이터 블록에서 개시하여 루트 노드에 이를 때까지 트리의 각각의 더 높은 레벨에 대한 추가적인 판독을 연속적으로 기동하는 시퀀스로 발생하지만, 이것은 필수적인 것은 아니다. 판독 액세스 요구에 의해 지정된 타겟 데이터 블록을 식별하는 판독 타겟 어드레스가 주어지며 다른 실시예에서는, 어드레스 산출회로(40)가 판독된 타겟 어드레스를 타겟 데이터 블록의 무결성을 검증하는데 필요한 무결성 트리의 각 노드에 대한 어드레스에 매핑하므로, 트리 노드 가계의 시퀀스와 다른 순서로 다수의 병렬 판독이 발생하거나, 트리의 판독의 일부가 기동될 수도 있다. 따라서, 판독 액세스시에, 트리에서의 필요한 검증이 행해지는 순서는 중요하지 않다. Thus, verification at step 206 requires verification of a series of various data blocks in the protected memory area to check each step of the integrity tree. The readout required for such verification can be initiated in any order, and similarly the corresponding verification calculations that compute the predicted MAC for each of the read data blocks and compare them to the stored MACs in any order. Can be activated. In some embodiments, a read to the original target data block initiates a read of another data block to obtain a target counter for this target data block, and then this read itself triggers an additional read, so the read actually target data It occurs in a sequence that starts at the block and continuously fires additional reads for each higher level of the tree until it reaches the root node, but this is not required. A read target address that identifies the target data block specified by the read access request is given, and in other embodiments, the address calculation circuit 40 assigns the read target address to each node in the integrity tree required to verify the integrity of the target data block. Since it maps to the address of the tree node, multiple parallel reads may occur in a different order than the sequence of the tree node family, or a portion of the reads of the tree may be activated. Therefore, the order in which necessary verification in the tree is performed at the time of read access is not important.

도 9는 메모리 제어기(12) 및 메모리 보안 유닛(20)에 의해 오프칩 메모리(14)에 대한 기록 액세스를 제어하는 방법을 나타낸 흐름도이다. 스텝 250에서, 메모리 제어기(12)는 오프칩 메모리(14)에 매핑된 어드레스를 지정하는 기록 액세스를 검출한다. 기록 액세스는, 예를 들면, 프로세서 코어(6)에 의해 실행된 스토어 명령, 또는 캐시 제어기에 의해 기동된 캐시 후기록(writeback)에 의해 기동될 수도 있다. 스텝 252에서, 메모리 제어기는, 기록 액세스 요구에 의해 지정된 어드레스가 보호 메모리 영역(22)에 있는 타겟 데이터 블록을 식별하는지 여부를 판정한다. 식별하지 않은 경우에는, 마찬가지로 메모리 보안 유닛(20)에 의해 제공된 보호가 필요하지 않으므로, 스텝 254에서 암호화가 적용되지 않고 무결성 검증이 행해지지 않으면서 타겟 데이터 블록에 기록 데이터가 기록된다. 또한, 무결성 트리(26)에 대한 수정이 행해지지 않는다. 9 is a flowchart illustrating a method of controlling write access to the off-chip memory 14 by the memory controller 12 and the memory security unit 20. In step 250, the memory controller 12 detects write access specifying an address mapped to the off-chip memory 14. Write access may be initiated, for example, by store instructions executed by processor core 6, or by cache writeback initiated by a cache controller. In step 252, the memory controller determines whether the address specified by the write access request identifies the target data block in the protected memory area 22. If it is not identified, since the protection provided by the memory security unit 20 is similarly unnecessary, in step 254 encryption is not applied and the write data is written to the target data block without integrity verification being performed. Also, no modification is made to the integrity tree 26.

스텝 252에서, 타겟 데이터 블록이 보호 영역(22)에 있는 것으로 밝혀지면, 스텝 262에서, 무결성 트리 생성회로(36)는 기록 액세스 요구에 의한 기록 액세스를 겪은 타겟 데이터 블록과 관련된 카운터가 무결성 트리(26)의 분할-카운터 노드에 의해 정의되는지 여부를 판정한다. 정의되지 않는 경우에는, 스텝 264에서, 타겟 블록과 관련된 모노리식 카운터가 증분된다. 증분은, 카운터의 현재 값에 1을 가산하는 것에 대응하거나, 각각의 카운터가 취하는 일부 알려진 시퀀스에서 카운트 값을 그것의 현재 값으로부터 다음 값으로 전환하는 것에 대응할 수도 있다. 스텝 266에서, 카운터에 대한 증분이 카운터가 이전에 사용된 값으로 랩 백(wrap back)한 오버플로우를 일으켰는지 여부가 무결성 트리 생성회로(360)에 의해 판정된다. 오버플로우가 발생하면, 이것은, 마지막으로 전체 보호 메모리 영역(22)에 대한 전역 암호화 또는 MAC 계산에 영향을 미치는 파라미터들이 갱신되었을 때 이후에 타겟 블록에 대해 제공될 수 있는 모든 가능한 카운트 값들이 사용되었다는 것을 의미한다. 따라서, 스텝 268에서, 보호 메모리 영역(22)의 모든 데이터 블록에 대해 사용되는 모든 전역 암호화 키들 또는 MAC 생성 피연산자들이 갱신된다. 암호화 키들의 갱신될 때, 이것은, 보호 메모리 영역(22)에 있는 모든 데이터가 판독되고, 암호화/복호화 로직(32)에 의해 복호화된 후, 새로운 키들로 재암호화되어 보호 메모리 영역(22)에 다시 기록되어야 한다는 것을 의미한다. 재암호화가 행해지는지 여부에 무관하게, MAC을 생성하는데 사용된 함수가 변경되거나 MAC을 산출하기 위해 사용하는 암호화된 데이터가 변경되었기 때문에, 전체 보호 메모리 영역에 대해 카운터 무결성 트리와 MAC들이 재계산되어야 한다. 이 때문에, 스텝 268에서의 연산은 성능면에서 비교적 비용이 많이 들지만, 충분한 수의 비트들의 카운터를 사용하는 경우 이들 이벤트가 드물 수 있다. In step 252, if it is found that the target data block is in the protected area 22, in step 262, the integrity tree generation circuit 36 displays a counter associated with the target data block that has undergone write access by the write access request. It is determined whether it is defined by the split-counter node of 26). If not defined, in step 264, the monolithic counter associated with the target block is incremented. The increment may correspond to adding 1 to the current value of the counter, or it may correspond to converting the count value from its current value to the next value in some known sequence each counter takes. In step 266, it is determined by the integrity tree generation circuit 360 whether the increment for the counter caused an overflow that caused the counter to wrap back to the previously used value. If an overflow occurs, this means that all possible count values that could be provided for the target block afterwards were used when parameters affecting global encryption or MAC computation for the last protected memory area 22 were updated. Means Thus, in step 268, all global encryption keys or MAC generated operands used for all data blocks in the protected memory area 22 are updated. When the encryption keys are updated, this means that all data in the protected memory area 22 is read, decrypted by the encryption / decryption logic 32, and then re-encrypted with new keys to return to the protected memory area 22. It means that it should be recorded. Regardless of whether or not re-encryption is performed, the counter integrity tree and MACs must be recalculated for the entire protected memory area because the function used to generate the MAC has changed or the encrypted data used to calculate the MAC has changed. do. For this reason, the operation in step 268 is relatively expensive in terms of performance, but these events may be rare when using a sufficient number of counters.

스텝 266에서 오버플로우가 발생하지 않으면, 전체 보호 영역에 대한 MAC들과 카운터들을 재계산할 필요가 없다. 그 대신에, 스텝 270에서, 기록 데이터 액세스시에 지정되었던 기록 데이터의 새로운 암호화된 버전에 근거하여, 또한 스텝 264에서 발생된 증분된 모노리식 카운터에 근거하여, 타겟 데이터 블록에 대응하는 MAC이 재계산된 후, 재계산된 MAC의 보호 영역(22), 예를 들어, 데이터 그 자체와 동일한 캐시 라인에 기억된다. 카운터가 스텝 264에서 갱신되었을 때, 갱신된 카운트 값이 트리의 더 높은 레벨에 위치한 리프 노드 또는 부모 노드에 기록될 필요가 있으므로, 스텝 272에서 이 더 높은 노드의 어드레스를 지정하고 기록될 카운터의 갱신된 갑을 지정하는 추가적인 기록 액세스가 기동된다. 이 때문에, 이것은 이 추가적인 기록 액세스에 대한 도 9의 방법을 행하는 또 다른 인스턴스를 기동한다. If no overflow occurs in step 266, there is no need to recalculate MACs and counters for the entire protected area. Instead, in step 270, the MAC corresponding to the target data block is replayed based on the new encrypted version of the record data that was specified at the time of accessing the record data, and also based on the incremented monolithic counter generated in step 264. After being calculated, it is stored in the same recalculated MAC protected area 22, for example, the same cache line as the data itself. When the counter is updated in step 264, the updated count value needs to be written to the leaf node or parent node located at a higher level of the tree, so in step 272 address the higher node and update the counter to be written An additional record access is initiated, which designates the former box. Because of this, it launches another instance that performs the method of Figure 9 for this additional write access.

한편, 스텝 262에서, 원래의 기록 액세스에 의해 지정된 타겟 데이터 블록에 대한 카운터가 무결성 트리의 분할-카운터 노드에 의해 정의되는 것으로 판정된 경우, 스텝 274로 방법이 진행한다. 스텝 274에서, 무결성 트리 생성회로(36)는 타겟 데이터 블록에 대응하여 선택된 부 카운터를 증분한다. 이것은 원래의 기록 요구에 의해 기록되고 있는 타겟 블록 전용의 특정한 부 카운터이다. 스텝 276에서는 이와 같은 증분으로 인해 부 카운터가 오버플로우하였는지 여부를 판정한다. 오버플로우하지 않은 경우에는, 스텝 278에서, 원래의 기록 요구의 암호화된 기록 데이터, 타겟 블록과 동일한 주 카운터를 사용하는 다른 모든 블록들 사이에서 공유되는 공유된 주 카운터와, 스텝 274에서 선택된 특정한 부 카운터의 증분된 버전에 근거하여, 타겟 데이터 블록에 대한 MAC이 재계산되고, 결과적으로 얻어지는 MAC이 암호화된 기록 데이터와 관련하여 메모리에 기억된다. On the other hand, if it is determined in step 262 that the counter for the target data block designated by the original write access is defined by the split-counter node of the integrity tree, the method proceeds to step 274. In step 274, the integrity tree generation circuit 36 increments the selected sub counter corresponding to the target data block. This is a specific sub-count dedicated to the target block being recorded by the original write request. In step 276, it is determined whether or not the sub counter overflowed due to the increment. If not overflowed, in step 278, the encrypted record data of the original write request, the shared main counter shared among all other blocks using the same main counter as the target block, and the specific portion selected in step 274. Based on the incremented version of the counter, the MAC for the target data block is recalculated, and the resulting MAC is stored in memory in association with the encrypted record data.

스텝 276에서 부 카운터의 오버플로우가 발생하면, 스텝 280에서 타겟 블록의 부모 노드에 있는 공유된 주 카운터가 증분된다. 스텝 282에서 주 카운터가 오버플로우하였는지 판정된다. 오버플로우하지 않은 경우에는, 스텝 284에서, 타겟 데이터 블록과 주 카운터를 공유하는 각각의 다른 블록에 대해 MAC들이 재계산되고, 재계산된 MAC들이 이들 블록 각각에 대해 메모리에 기억된다. 이 다른 블록들에 대한 각각의 MAC은, (MAC을 재계산할 목적으로 메모리에서 판독된) 이들 블록에 기억된 현재 데이터와, 이들 다른 블록들 각각에 대한 증분된 주 카운터와 특정한 부 카운터에 근거하여 산출된다. 즉, 각각의 다른 블록은 부 카운터들 중에서 다른 한 개와, 동일한 증분된 주 카운터를 사용한다. 오버플로우한 부 카운터를 갖는 노드가 무결성 트리의 리프 노드인 경우, MAC들을 재계산하기 전에 재계산된 MAC들을 갖는 다른 블록들 각각과 관련된 데이터가 새로운 카운터를 사용하여 재암호화된다. 부모 노드가 비리프 노드이면, 다른 블록들에 있는 데이터를 재암호화할 필요가 없다. 스텝 284 후에, 전술한 것과 동일하게 스텝 278을 행하여, 타겟 블록에 대한 새로운 암호화된 기록 데이터, 증분된 공유된 주 카운터와, 타겟 블록에 특정한 증분된 부 카운터에 근거하여 타겟 블록에 대한 MAC을 재계산한다. 스텝 284가 행해졌는지 아닌지에 무관하게, 스텝 278 이후에, 스텝 272로 방법이 다시 진행하여, 추가적인 기록 액세스 요구를 기동하여 스텝 274 또는 280에서 발생된 증분된 카운터를 갱신한다. 한편, 스텝 282에서 주 카운터가 오버플로우하면, 이 상황이 스텝 266과 유사하므로, 마찬가지로 스텝 268에서 전역 갱신 동작을 행하여 암호화 키들이나 MAC 생성 피연산자를 갱신한 후, 필요한 경우에는 보호 메모리 영역(220의 재암호화를 행하고, 새롭게 갱신된 파라미터들에 대해 무결성 트리(26)가 완전히 재계산된다. 루트 노드에 대한 MAC이 갱신되고 루트 노드 카운터(89)가 증분되면 도 9의 방법이 종료한다. If an overflow of the sub-counter occurs in step 276, the shared main counter in the parent node of the target block is incremented in step 280. In step 282, it is determined whether the main counter has overflowed. If not overflowed, in step 284, MACs are recalculated for each other block that shares the main counter with the target data block, and the recalculated MACs are stored in memory for each of these blocks. Each MAC for these other blocks is based on the current data stored in these blocks (read from memory for the purpose of recalculating the MAC) and the incremental main counter and specific sub-count for each of these other blocks. Is calculated. That is, each other block uses the same incremented main counter as the other of the sub counters. If the node with the overflowed sub counter is a leaf node of the integrity tree, the data associated with each of the other blocks with the recalculated MACs is re-encrypted using the new counter before recalculating the MACs. If the parent node is a non-leaf node, there is no need to re-encrypt data in other blocks. After step 284, step 278 is performed in the same manner as described above, and the MAC for the target block is restarted based on the new encrypted record data for the target block, the incremented shared main counter, and the incremented sub-count specific to the target block. To calculate. Regardless of whether step 284 has been performed or not, after step 278, the method proceeds back to step 272 to trigger an additional write access request to update the incremented counter generated in step 274 or 280. On the other hand, if the main counter overflows in step 282, since this situation is similar to step 266, similarly, in step 268, a global update operation is performed to update the encryption keys or the MAC generation operand, and then, if necessary, the protected memory area 220 Re-encryption is performed, and the integrity tree 26 is completely recalculated for newly updated parameters, and the method of FIG. 9 ends when the MAC for the root node is updated and the root node counter 89 is incremented.

도 9에는 이해를 용이하게 하이 위해 스텝 270/278/284 및 272 각각에서 메모리에 재계산된 MAC들과 증분된 카운터들을 기록하기 위한 별개의 기록이 도시되어 있지만, 특정한 부모 노드에 대한 MAC이 이 부모 노드의 자식 노드들과 관련된 카운터들과 동일한 캐시 라인에 기억되는 실시예에서는, 한 개의 캐시 라인에 대한 모든 필요한 갱신이 준비가 될 때까지 MAC과 카운터 갱신이 메모리 보안 유닛(20) 내부에 버퍼링되므로, 오프칩에 갱신된 캐시 라인을 기록하는데 단지 한번의 기록 요구가 필요하다. 마찬가지로, 병렬로 행해지는 서로 다른 비무결성(non-integrity) 트리 타겟 데이터 블록들(50)에 대한 복수의 기록 요구가 존재하는 경우에는, 서로 다른 타겟 데이터 블록들(50)에 대한 카운터 갱신들 중에서 일부가 동일한 무결성 트리 노드에 있는 서로 다른 카운터들이 갱신되는 것을 요구할 수 있으므로, 카운터를 버퍼링함으로써 메모리 시스템 유닛(20) 내부의 갱신이 한 개의 캐시 라인에 있는 이와 같은 복수의 카운터 갱신들이 한번의 기록 트랜잭션시에 오프칩 메모리(14)에 행해질 수 있도록 할 수도 있다. 이 때문에, 카운터 및 MAC 갱신을 행하기 위해 오프칩 메모리(14)에 트랜잭션에 개시되는 정확한 방식은 구현마다 변동될 수도 있다는 것을 알 수 있다. Figure 9 shows separate records for recording the recalculated MACs and incremented counters in memory at steps 270/278/284 and 272, respectively, for ease of understanding, but the MAC for a particular parent node is shown. In embodiments where the counters associated with the child nodes of the parent node are stored in the same cache line, MAC and counter updates are buffered inside the memory security unit 20 until all necessary updates to one cache line are ready. Therefore, only one write request is needed to write the updated cache line off-chip. Similarly, if there are multiple write requests for different non-integrity tree target data blocks 50 performed in parallel, among counter updates for different target data blocks 50, Since some of the counters in the same integrity tree node may require different counters to be updated, multiple counter updates such as these in the cache system unit 20 update in one cache line by buffering the counters are one write transaction It can also be performed at the off-chip memory 14 at the time. Because of this, it can be seen that the exact manner in which transactions are initiated in the off-chip memory 14 to perform counter and MAC updates may vary from implementation to implementation.

특정한 노드의 부 카운터들(97)을 가능한한 작게 하는 것이 메모리의 동일한 영역을 보호하기 위한 카운터-트리의 레벨의 수의 감소를 허용하여, 트리의 횡단 중에 더 적은 메모리 트래픽과 그후의 성능 향상을 제공하기 때문에 바람직하다. 더구나, 카운터 캐시라인 당 부 카운터들의 더 큰 수는 더 양호한 캐시가능성(cacheability)을 제공하고(캐시 내부에서의 적중시까지만 횡단이 계속되므로) 트리 횡단중에 카운터들을 페치하기 위한 메모리 액세스들의 횟수를 줄인다. Making the sub-counters 97 of a particular node as small as possible allows a reduction in the number of levels of the counter-tree to protect the same area of memory, resulting in less memory traffic during tree traversal and subsequent performance improvements. It is preferable because it provides. Moreover, a larger number of sub-counts per counter cacheline provides better cacheability (since traversal continues only until hits within the cache) and reduces the number of memory accesses to fetch counters during tree traversal. .

플립(flip)측에서는, 리프 노드에서의 부 카운터의 오버플로우는, 오버플로우로 인해 증분되었던 주 카운터를 사용하여 암호화되고 인증되는 메모리 내에 존재하는 모든 캐시 라인들에 대해 MAC들의 재암호화 및 재계산을 의미한다. 무결성 트리 그 자체는 암호화되지 않은 포맷으로 기억되기 때문에, 비리프 노드에서의 부 카운터 오버플로우는 MAC 재계산 오버플로우를 일으킨다. 그러나, 부모 노드 부 카운터는 자식 노드에 있는 부 카운터들 중에서 어느 것에 대한 기록시에 증분되므로, 트리에서 상승함에 따라, 기록 수가 증가하여 더 많은 오버헤드를 일으킬 수 있다. 따라서, 재암호화 및 MAC 재계산 오버헤드를 관리할 수 있는 경우에만, 작은 부 카운터들에 의해 제공되는 작은 발자국(footprint)과 더 양호한 캐시가능성 특성이 무결성 보호에 대한 메모리 트래픽 오버헤드를 줄일 수 있다. 특정한 노드에 대해 부 카운터 사이즈가 고정되면, 이들 경쟁하는 요구를 화합시키는 것이 곤란하다. On the flip side, overflow of the sub-counter at the leaf node is performed by re-encrypting and recalculating MACs for all cache lines existing in memory that are encrypted and authenticated using the main counter incremented due to overflow. it means. Since the integrity tree itself is stored in an unencrypted format, a minor counter overflow at a non-leaf node causes a MAC recalculation overflow. However, since the parent node sub-counter is incremented at the time of writing to any of the sub-counters in the child node, as the number rises in the tree, the number of records increases, which may cause more overhead. Thus, only if the re-encryption and MAC recalculation overhead can be managed, the small footprint and better cacheability characteristics provided by small sub-counters can reduce the memory traffic overhead for integrity protection. . If the sub-counter size is fixed for a particular node, it is difficult to unite these competing requests.

이를 위해, 트리의 애리티에 영향을 미치지 않으면서 부 카운터들의 사이즈를 변경하는 메카니즘을 제공한다. 이것을 도 10 내지 도 13에 나타낸다. 메모리에 빈번하게 기록되는 경향이 있는 캐시라인들에 대해, 트리의 애리티에 영향을 미치지 않고 부 카운터 사이즈가 증가된다. 높은 애리티의 콤팩트한 트리는 무결성 보호를 위한 더 적은 수의 메모리 액세스의 이점을 제공하고, 빈번하게 기록된 캐시라인들에 대한 더 큰 부 카운터들은 재암호화 및 MAC 재계산 오버헤드의 검사에 도움이 된다. 이와 같은 거동을 달성하기 위해, 부 카운터들의 사이즈를 표시하는데 사용되는 카운터 캐시 카운터 캐시 라인에 있는 MAC으로부터 적은 수의 비트들을 훔친다. 이들 비트들 중에서 최소의 값(00)을 사용하여 최소의 부 카운터 사이즈(도 10-13의 실시예에서는 3비트)를 표시할 수 있다. To this end, a mechanism is provided to change the size of sub-counters without affecting the tree's parity. This is shown in FIGS. 10 to 13. For cache lines that tend to be frequently written to memory, the sub-count size is increased without affecting the tree's parity. The compact tree with high Attribute provides the advantage of fewer memory accesses for integrity protection, and larger sub-counts for frequently written cache lines help in re-encryption and inspection of MAC recalculation overhead. do. To achieve this behavior, a small number of bits are stolen from the MAC in the counter cache counter cache line used to indicate the size of sub counters. Of these bits, the smallest value (00) can be used to indicate the smallest sub counter size (3 bits in the embodiment of FIGS. 10-13).

도 10에 도시된 것과 같이, 메모리 보안 유닛(20)은, 모든 카운터들이 최소의 사이즈(예를 들어, 3비트)를 갖는 주 카운터 트리(26)를 구성함으로써 개시한다. 각각의 노드에 있는 부 카운터들의 사이즈는, 본 실시예에서는 MAC의 사이즈를 64비트 대신에 62비트로 줄임으로써 이용가능하게 되는 2비트인, 사이즈 필드(402)에 표시된다. 이때, 부 카운터 사이즈를 증가시키는 것이 필요한 경우에 추가적인 미러 노드들을 수용하게 되는 미러 트리(400)가 아직 존재하지 않는데, 미러 트리(400)는 후술하는 것과 같이 필요할 때 할당될 수 있다. 이와 달리, 미러 트리(9400)에 대한 공간은 메모리 내부에 이미 할당될 수도 있지만, 미러 트리(400)가 아직 채워지지 않아도 된다. As shown in FIG. 10, the memory security unit 20 starts by constructing a main counter tree 26 in which all counters have a minimum size (eg, 3 bits). The size of the sub-counters in each node is indicated in the size field 402, which is 2 bits available in this embodiment by reducing the size of the MAC to 62 bits instead of 64 bits. At this time, if it is necessary to increase the sub counter size, the mirror tree 400 that accommodates additional mirror nodes does not exist yet, and the mirror tree 400 may be allocated when necessary, as described below. Alternatively, the space for the mirror tree 9400 may already be allocated in the memory, but the mirror tree 400 does not need to be filled yet.

주 카운터 트리(26)를 전술한 실시예와 동일하게 사용하여, 데이터 블록의 콘텐츠와, 이 데이터 블록과 관련된 부모 노드에서 취한 주 카운터 및 부 카운터에 근거하여 산출된 MAC과 그것의 관련된 MAC을 비교함으로써 특정한 데이터 블록의 무결성을 검사한다. 트리 위로 가로지르는 각 노드의 복수의 무결성 검사를 루트까지 행하여, 각 카운터가 그 자체가 유효한지 검사할 수 있다. 루트 노드의 무결성을 검증하기 위한 루트 검증 정보(89)는 전술한 것과 같이 온칩 메모리에 기억된다. 데이터 블록에 대한 기록시에, 관련된 리프 노드 카운터가 증분되고, 이 노드의 MAC이 재계산된다. Using the main counter tree 26 in the same manner as in the above-described embodiment, the content of the data block is compared with the MAC calculated based on the main counter and the sub counter taken from the parent node associated with the data block and its associated MAC. By doing so, the integrity of a particular data block is checked. Multiple integrity checks of each node traversing the tree up to the root can be performed to check that each counter is itself valid. The route verification information 89 for verifying the integrity of the root node is stored in the on-chip memory as described above. Upon writing to the data block, the associated leaf node counter is incremented, and the MAC of this node is recalculated.

이것은, 주 트리의 특정한 노드 88의 부 카운터들의 사이즈를 증가시키는 것이 유용할 것으로 표시하는 사이즈 증가 트리거 이벤트가 검출될 때까지 계속된다. 예를 들어, 사이즈 증가 트리거 이벤트는 특정한 노드에서의 부 카운터의 검출된 오버플로우일 수 있다. 또한, 사이즈 증가 트리거 이벤트는, 임계값을 초과하는 특정한 노드의 주 카운터들의 오버플로우의 레이트이거나, 일부 다른 조건을 만족하는 오버플로우들의 레이트일 수 있다. 또한, 일반적으로, 특정한 트리 노드에 대해 검출된 오버플로우의 빈도나 패턴, 재암호화나 MAC 재계산에 관한 측정기준(metric)을 모니터링하여, 부 카운터들의 사이즈를 증가시킬 것인지 여부를 판정하는데 사용할 수 있다. 다른 실시예에서, 사이즈 증가 트리거 이벤트는, 보호 영역의 관련된 서브셋과 관련된 메모리 트래픽의 레벨이 임계값보다 큰 것을 검출하는 것을 포함하고, 이때 보호 영역의 관련된 서브셋은 관련된 서브셋 내부의 임의의 타겟 블록의 무결성을 검증하는 것이 특정한 분할-카운터 노드에 의존하는 보호 영역의 일부분을 포함한다. 예를 들어, 메모리 보안 유닛은 보호 영역의 특정한 부분들과 관련된 메모리 트래픽의 볼륨을 모니터링할 수도 있다. (루트에 더 가까운) 트리의 더 높은 레벨에 있는 노드는 보통, (트리를 가로지르는 각각의 연속적인 카운터를 검증하는데 필요한 MAC 계산의 시퀀스로 인해) 그들의 카운터가 더 큰 수의 데이터 블록들의 무결성을 검사하는데 관여하기 때문에, 더 낮은 레벨에 있는 노드 들보다 보호 영역의 더 큰 부분과 관련된다. 이 때문에, 트리의 특정한 노드에 따라 무결성이 검증되는 부분에 큰 볼륨의 트래픽이 존재하는 경우, 대응하는 노드가 그것의 부 카운터 사이즈를 증가시킬 수도 있다. 예를 들어, 메모리 트래픽의 모니터링은, 프로세서 코어(6)의 최종 레벨 캐시(10)로부터 오프칩 메모리(14)에의 기록 횟수의 추적에 근거하거나, 또는 메모리 보안 유닛(20)에 의한 그 자신의 내부 캐시(42)로부터 오프칩 메모리(14)까지의 기록 횟수의 추적에 근거할 수도 있다. This continues until a size increase trigger event is detected indicating that it will be useful to increase the size of the sub-counters of a particular node 88 of the main tree. For example, a size increase trigger event may be a detected overflow of a sub counter at a particular node. Further, the size increase trigger event may be a rate of overflow of main counters of a particular node exceeding a threshold, or a rate of overflows satisfying some other condition. In addition, in general, it can be used to determine whether to increase the size of sub-counters by monitoring the frequency or pattern of overflow detected for a specific tree node, metrics related to re-encryption or MAC recalculation. have. In another embodiment, the size increase trigger event includes detecting that a level of memory traffic associated with an associated subset of the protected area is greater than a threshold, wherein the associated subset of the protected area is of any target block within the associated subset. Verifying the integrity includes a portion of the protected area that depends on a particular split-counter node. For example, the memory security unit may monitor the volume of memory traffic associated with certain portions of the protected area. Nodes at the higher level of the tree (closer to the root) usually have their counters (due to the sequence of MAC calculations needed to verify each successive counter across the tree) to ensure the integrity of a larger number of data blocks. Because it is involved in checking, it is associated with a larger portion of the protected area than nodes at lower levels. For this reason, when a large volume of traffic exists in a portion where integrity is verified according to a specific node of the tree, the corresponding node may increase its sub counter size. For example, monitoring of memory traffic is based on tracking the number of writes from the final level cache 10 of the processor core 6 to the off-chip memory 14, or by the memory security unit 20 itself. It may be based on tracking the number of writes from the internal cache 42 to the off-chip memory 14.

따라서, 일반적으로, 메모리 보안 유닛(20)은, 주 트리(26)의 특정한 노드에 있는 부 카운터들이 너무 작다는 것을 나타내는 사이즈 증가 트리거 이벤트를 식별한다. 부 카운터의 사이즈를 증가시킬 필요성이 식별되면, 메모리 보안 유닛(20)은 같은 사이즈를 갖는 한 개 이상의 미러 서브트리(들)(400)를 주 트리(26)에 할당한다. 주 트리의 식별된 노드에 있는 모든 부 카운터들에 대한 부 카운터 사이즈가 최소 사이즈(예를 들어, 도 1에서는 6비트)의 정수배로 증가되고, 이 노드의 부 카운터들의 분율 f만이 원래 위치에 기억된다(예를 들어, 도 11에서는 f=0.5). 이 노드의 부 카운터들의 나머지는, 주 트리 내부의 주 노드에 대해 사용된 오프셋과 미러 트리(400) 내부의 동일한 오프셋에 배치되는 미러 트리(400)의 대응하는 노드에 할당된다. 이 노드의 부 카운터들의 서브셋이 미러 트리(400)의 대응하는 미러 노드(404)에 실제로 기억되는 것을 나타내도록 주 노드의 사이즈 필드(402)가 갱신된다. Thus, in general, the memory security unit 20 identifies a size increase trigger event indicating that the sub-counters at a particular node of the main tree 26 are too small. When the need to increase the size of the sub counter is identified, the memory security unit 20 allocates one or more mirror subtree (s) 400 of the same size to the main tree 26. The sub counter size for all sub counters in the identified node of the main tree is increased by an integer multiple of the minimum size (eg, 6 bits in FIG. 1), and only the fraction f of the sub counters of this node is stored in the original position (For example, f = 0.5 in FIG. 11). The rest of the sub-counters of this node are assigned to the corresponding node of the mirror tree 400 which is placed at the same offset inside the mirror tree 400 and the offset used for the main node inside the main tree. The size field 402 of the main node is updated to indicate that the subset of sub-counters of this node are actually stored in the corresponding mirror node 404 of the mirror tree 400.

도 11은 주 트리의 노드 N127이 더 큰 부 카운터들을 필요로 하는 예를 나타낸 것이다. 따라서, 부 카운터들이 6비트 카운터들로 증가되는데, 이것은, 노드 N127의 128개의 자식 노드들 N127_0 내지 N127_127과 관련된 128개의 부 카운터들 중에서 64개를 기억하기 위한 공간만 존재한다는 것을 의미한다. 이 때문에, 노드 N127의 필드 402에 있는 사이즈 필드 값 0b01은, 부 카운터들 0-63이 이 노드 자체에 기억되지만, 부 카운터들 64-127이 미러 트리(400) 내부의 대응하는 미러 노드 127'에 기억된다는 것을 식별한다. 11 shows an example in which node N127 of the main tree requires larger sub-counters. Accordingly, the sub-counters are incremented to 6-bit counters, which means that there is only a space for storing 64 of the 128 sub-counters associated with the node N127's 128 child nodes N127_0 to N127_127. For this reason, the size field value 0b01 in field 402 of node N127 is that sub-counters 0-63 are stored in this node itself, but sub-counters 64-127 have corresponding mirror nodes 127 'in the mirror tree 400. Identifies that it is remembered.

미러 트리 내부의 새롭게 할당된 노드를 사용하여 특정한 주 트리 노드의 부 카운터들의 사이즈를 증가시킬 때, 메모리 보안 유닛(20)은 다음과 같은 단계들을 행한다: When increasing the size of sub-counters of a particular main tree node using a newly allocated node inside the mirror tree, the memory security unit 20 performs the following steps:

1. 방금 오버플로우한 부 카운터를 오버플로우 이전의 값으로 롤백한다.1. Roll back the sub counter that just overflowed to the value before the overflow.

2. 부 카운터가 사이즈 증가전에 M 비트를 갖고 사이즈 증가 이후에 N 비트를 갖는 경우, 주 노드와 적어도 한 개의 미러 노드에 있는 각각의 N비트 미러 카운터에 대해,2. If the minor counter has M bits before the size increase and N bits after the size increase, for each N-bit mirror counter in the primary node and at least one mirror node,

부 카운터의 M개의 최하위 비트들을 오버플로우 이전의 대응하는 부 카운터의 값과 같이 설정하고, Set the M least significant bits of the sub counter as the value of the corresponding sub counter before overflow,

부 카운터의 (N-M)개의 최상위 비트들을 특정한 주 트리 노드의 주 카운터의 (N-M)개의 최하위 비트들과 같게 설정한다. Set the (N-M) most significant bits of the sub counter to the (N-M) least significant bits of the main counter of the specific main tree node.

3. 특정한 주 트리 노드의 주 카운터를 (N-M) 비트만큼 우측으로 시프트한다(이에 따라, 부 카운터들로 시프트된 비트들이 시프트 아웃되고 (N-M)개의 선두 0들이 주 카운터의 나머지 비트들 앞에 붙는다).3. Shift the main counter of a particular main tree node to the right by (NM) bits (thus, the bits shifted into sub-counters are shifted out and (NM) leading zeros are prepended to the remaining bits of the main counter) .

4. 그후, 오버플로우한 부 카운터를 다시 증분한다.4. Thereafter, the overflowed sub-count is incremented again.

예를 들어, (간략을 위해 더 작은 카운터 사이즈를 사용하는) 4비트 주 카운터와 4개의 2 비트 부 카운터들을 갖는 노드를 고려하자. 더구나, 카운터가 다음과 같은 (이진) 값들을 갖는 것으로 가정한다: For example, consider a node with a 4-bit major counter and 4 2-bit minor counters (using a smaller counter size for simplicity). Moreover, suppose the counter has the following (binary) values:

주 C 부 C들State C Part C

0101 01 10 11 000101 01 10 11 00

(4번째 미러 카운터가 11->00으로 오버플로우하였기 때문이) 사이즈 증가 이벤트가 부 카운터를 4비트로 증가시킨 경우, 갱신된 주 트리 노드와 미러 노드들은 다음과 같이 보일 것이다:If the size increase event increased the minor counter to 4 bits (because the 4th mirror counter overflowed 11-> 00), the updated main tree node and mirror nodes would look like this:

주 트리 노드: 부 트리 노드:Primary tree node: Secondary tree node:

주 C 부 C들 주 C 부 C들State C Part Cs State C Part Cs

0001 0101 0110 0001 0111 10000001 0101 0110 0001 0111 1000

이때, N=4, M-2이므로, (N-M)=2, 즉 모든 부 카운터들에 2개의 추가적인 비트를 부가하였다. 따라서, 모든 부 카운터들을 주 카운터의 2개의 lsb의 비트들로 앞에 붙이고, 주 카운터를 2개의 0들로 앞에 붙인다.At this time, since N = 4 and M-2, (N-M) = 2, that is, two additional bits were added to all sub-counters. Thus, all sub-counters are prepended with two lsb bits of the main counter, and the main counter is prepended with two zeros.

이와 같은 연산은, 주 카운터:부 카운터의 조합이 영향을 받는 노드에 있는 다른 모든(오버플로우하지 않은) 부 카운터들에 대해 변경되지 않은 채 유지되므로, 비용이 많이 드는 재암호화/MAC-재계산이 필요가 없어진다. This operation is costly re-encryption / MAC-recalculation, because the combination of the main counter: sub counter remains unchanged for all other (non-overflowing) sub counters on the affected node. This need is eliminated.

이 때문에, 노드 127의 자식 노드 N127_0의 MAC을 인증할 때, 부 카운터가 부모 노드 N127 그 자체로부터 선택되지만, 노드 N127의 다른 자식 노드 127_127의 MAC을 인증할 때에는, 부 카운터가 미러 노드 127'으로부터 판독된다. 주 노드 N127과 미러 노드 N127' 노드가 주 트리에 동일한 부모 노드를 공유하므로, (본 실시예에서는 루트 노드에서 취한) 동일한 주 및 부 카운터들을 사용하여 주 및 미러 노드들 N127, N127'과 관련된 MAC들을 계산한다. 각각의 미러 노드(404)가 주 트리의 노드들 88과 동일한 레이아웃을 갖더라도, 미러 노드(404)와 이에 대응하는 주 노드(88)에서 모든 부 카운터들 사이에서 공유되는 주 카운터(95)가 주 노드(88) 그 자체에서 지정되므로, 주 카운터 필드(95)가 미러 노드(404)에서 사용될 필요가 없다. For this reason, when authenticating the MAC of the child node N127_0 of the node 127, the sub counter is selected from the parent node N127 itself, but when authenticating the MAC of the other child node 127_127 of the node N127, the sub counter is from the mirror node 127 '. Is read. Since the main node N127 and the mirror node N127 'node share the same parent node in the main tree, the MAC associated with the primary and mirror nodes N127, N127' using the same primary and minor counters (taken from the root node in this embodiment) Count them. Although each mirror node 404 has the same layout as the nodes 88 of the main tree, the main counter 95 shared among all sub-counters at the mirror node 404 and its corresponding main node 88 Since the main node 88 is specified by itself, the main counter field 95 need not be used in the mirror node 404.

도 11에 도시된 나머지 노드들(루트 노드, NO, N127_0, N127_127)에 대해, 부 카운터들의 사이즈를 증가시킬 필요가 아직 없으므로, 미러 트리 내부의 대응하는 위치들(456)이 아직 채워지지 않는다. 미러 트리(400)는 성기게 채워진 구조이며, 이것에 대해 메모리 내부의 공간이 주 트리(26)와 같은 사이즈를 갖는 전체 트리를 수용하기 위해 할당되지만, 주 트리의 어떤 노드들(88)이 가장 많은 메모리 트래픽을 갖는지에 따라 미러 트리(400)의 선택된 노드들만 채워지므로, 오버플로우의 빈도를 줄이기 위해 각각의 부 카운터에 대해 추가적인 비트들을 필요로 할 것으로 판정된다. 이 때문에, 필요한 것보다 더 큰 사이즈를 갖는 부 카운터를 불필요하게 할당할 필요가 없으므로, 각각의 노드의 애리티가 가능한한 높을 수 있지만, 메모리의 빈번하게 액세스된 영역들에 대해서는, 해당하는 노드들에게 애리티를 희생하지 않고 더 큰 카운터들이 주어질 수 있으므로, 빈번하게 데이터를 재암호화하거나 MAC들을 재계산해야 하는 비용이 많이 드는 성능상의 오버헤드를 줄일 수 있다. 주 트리의 루트 노드(402)에게 미러 트리(400) 내부의 미러 노드가 할당되면, 온칩 메모리 내부의 루트 무결성 검증 정보(89)가 미러 트리(400)의 루트 노드의 무결성을 검증하기 위한 정보를 더 지정한다. 주 트리의 루트 노드(402)가 미러 노드를 필요로 하지 않으면, 주 트리(26)의 부모 노드, 또는 부모 노드가 부 카운터들을 확장시킨 경우에는 이 부모 노드에 대응하는 미러 노드(404)에 지정된 정보에 근거하여, 미러 트리(400)의 임의의 노드가 그 자신의 무결성을 검증하게 할 수 있다. For the remaining nodes shown in FIG. 11 (root node, NO, N127_0, N127_127), there is still no need to increase the size of the sub-counters, so the corresponding positions 456 inside the mirror tree are not yet filled. The mirror tree 400 is a sparse filled structure, in which space in memory is allocated to accommodate the entire tree having the same size as the main tree 26, but some nodes 88 of the main tree are the most Since only selected nodes of the mirror tree 400 are filled according to whether there is a lot of memory traffic, it is determined that additional bits are required for each sub counter to reduce the frequency of overflow. Because of this, there is no need to unnecessarily allocate a sub-counter having a size larger than necessary, so that each node may have as high ability as possible, but for frequently accessed areas of memory, corresponding nodes Since larger counters can be given to the user without sacrificing erection, it can reduce the costly performance overhead of frequently re-encrypting data or recalculating MACs. When a mirror node in the mirror tree 400 is allocated to the root node 402 of the main tree, the root integrity verification information 89 in the on-chip memory provides information for verifying the integrity of the root node in the mirror tree 400. Specify more. If the root node 402 of the main tree does not require a mirror node, the parent node of the main tree 26, or, if the parent node has expanded sub-counters, is assigned to the mirror node 404 corresponding to this parent node. Based on the information, any node of the mirror tree 400 can have its own integrity verified.

도 12에 도시된 것과 같이, 일부 경우에, 복수 레벨들의 부 카운터 사이즈가 지원되므로, 주 트리의 지정된 노드에 대해 사이즈 증가 트리거 이벤트가 검출될 때마다, 부 카운터 사이즈가 메모리 보안 유닛(20)에 의해 지원된 다음의 가장 큰 사이즈로 증가될 수도 있다. 예를 들어, 도 12에는 지원되는 3가지 레벨이 존재하는데, 카운터 사이즈 필드들 0b00, 0b01 및 0b10은 각각 3비트, 6비트 또는 12비트의 카운터 사이즈를 나타낸다. 주 카운터 사이즈가 지원된 최소 카운터 사이즈의 2배보다 큰 주 트리의 노드들에 대해서는, 이 노드의 자식 노드들에 대한 모든 부 카운터들을 수용하기 위해 1개보다 많은 수의 미러 트리에 있는 추가적인 미러 노드들이 필요하다. 예를 들어, 도 12의 노드 N0_127에 대해, 사이즈 필드 값 0b10은 12비트 부 카운터들이 사용되는 것을 나타내므로, 128개의 3비트 부 카운터들에 대해 이전에 할당된 공간 내에 단지 32개의 12비트 부 카운터들이 끼워넣어진다. 이 때문에, 노드 N0_127의 자식 노드들에 대한 나머지 96개의 12비트 카운터들은 도 12에 도시된 것과 같이 3개의 추가적인 미러 트리들(400) 내부의 대응하는 노드들 N0_127', N0_127", N0_127"'에 걸쳐서 퍼진다. 이와 달리, 6비트 부 카운터들이 사용되는 도 12의 노드 N0에 대해서는, 단지 1개의 대응하는 노드 N0'이 제1 미러 트리(400)에 할당될 필요가 있고, 이것은 필요한 128개의 부 카운터들을 기억하는데 충분하므로, 미러 트리들 2 및 3에 있는 대응하는 노드들 N0", N0"'은 채워지지 않는다. 나중에 노드 N0에 대해 또 다른 사이즈 증가 트리거 이벤트가 발생하면, 부 카운터 사이즈가 12비트로 증분할 수 있으며, 이때 노드들 N0" 및 N0"'이 채워지게 된다. 각각의 추가적인 미러 카운터 무결성 트리는, 임의의 노드가 그것의 노드들이 채워지는 것을 처음으로 필요로 할 때 메모리 내부의 그것에 할당된 공간을 갖는다(예를 들어, 도 12의 미러 트리 2 및 3은 주 트리의 노드 N0_127에 대한 부 카운터 사이즈가 12비트로 증가하였을 때 할당되었다). As shown in FIG. 12, in some cases, since multiple levels of sub-counter sizes are supported, whenever a size increase trigger event is detected for a designated node in the main tree, the sub-counter size is set to the memory security unit 20. It can also be increased to the next largest size supported by. For example, there are three levels supported in FIG. 12, and the counter size fields 0b00, 0b01, and 0b10 represent counter sizes of 3 bits, 6 bits, or 12 bits, respectively. For nodes in the main tree whose main counter size is greater than twice the minimum supported counter size, additional mirror nodes in more than one mirror tree to accommodate all minor counters for this node's child nodes. Need For example, for node N0_127 in FIG. 12, the size field value 0b10 indicates that 12-bit sub-counters are used, so only 32 12-bit sub-counts in the previously allocated space for 128 3-bit sub-counters Are embedded. For this reason, the remaining 96 12-bit counters for the child nodes of node N0_127 are assigned to corresponding nodes N0_127 ', N0_127 ", N0_127"' in three additional mirror trees 400 as shown in FIG. Spreads across. Alternatively, for node N0 in FIG. 12 where 6-bit sub-counters are used, only one corresponding node N0 'needs to be allocated to the first mirror tree 400, which stores 128 necessary sub-counters. Since it is sufficient, the corresponding nodes N0 ", N0" 'in the mirror trees 2 and 3 are not filled. Later, when another size increase trigger event occurs for node N0, the sub counter size may be incremented by 12 bits, where nodes N0 "and N0" 'are filled. Each additional mirror counter integrity tree has space allocated to it in memory when any node first needs its nodes to fill up (e.g., mirror trees 2 and 3 in Figure 12 are the main tree) Was allocated when the sub counter size for node N0_127 of the server increased to 12 bits).

도 13에 도시된 것과 같이, 메모리 보안 유닛(20)은 메모리 내부에 주 트리(26)와 한 개 이상의 미러 트리들(400)에 대한 공간을 할당한다. 주 트리(26)에 대해, 트리의 각각의 노드(88)에는 주 트리 기준 어드레스(410)에 대한 대응하는 오프셋이 할당된다. 각각의 미러 트리(400)에 대해, 메모리 보안 유닛(20)은 주 트리(26)에 대해 할당된 것과 동일한 양의 공간을 할당하고, 미러 트리의 각각의 미러 노드(404)는 미러 트리 기준 어드레스(412)에 대해 주 트리(26)의 대응하는 주 노드(88)에 대해 사용된 오프셋과 동일한 오프셋에 배치된다. 예를 들어, 도 13에 나타낸 것과 같이, 주 트리 기준 어드레스(410)와 주 노드 N0_127의 어드레스 사이의 주 오프셋(414)은 미러 트리 기준 어드레스(412)와 대응하는 미러 노드 N0_127'의 어드레스 사이의 미러 트리 오프셋(416)과 같다. 미러 트리 오프셋(416)에 의해 지정된 오프셋에 위치한 실제 메모리 위치는 실제로는, 주 노드 N0_127의 카운터 사이즈를 확장시킬 필요성이 이미 식별되었는지 여부에 따라, 임의의 카운터들로 채워지지 않을 수도 있다. 이 때문에, 메모리 내부의 미러 트리(400)에 대해 할당된 공간은 성기게 채워지고, 이 공간의 일부 부분은 주어진 시간에 사용되지 않을 수 있다. As shown in FIG. 13, the memory security unit 20 allocates space for the main tree 26 and one or more mirror trees 400 inside the memory. For the main tree 26, each node 88 of the tree is assigned a corresponding offset to the main tree reference address 410. For each mirror tree 400, the memory security unit 20 allocates the same amount of space allocated for the main tree 26, and each mirror node 404 of the mirror tree has a mirror tree reference address For 412 is placed at the same offset used for the corresponding main node 88 of the main tree 26. For example, as shown in FIG. 13, the main offset 414 between the primary tree reference address 410 and the address of the primary node N0_127 is between the mirror tree reference address 412 and the address of the corresponding mirror node N0_127 '. Same as mirror tree offset 416. The actual memory location located at the offset specified by the mirror tree offset 416 may not actually be filled with any counters, depending on whether the need to extend the counter size of the main node N0_127 has already been identified. Because of this, the space allocated for the mirror tree 400 in the memory is sparsely filled, and some portion of this space may not be used at a given time.

예를 들어, 무결성 트리에 의해 보호되는 보안 메모리의 1GB의 보호 영역을 갖는 시스템을 고려하면, 각각의 주 트리 노드에 있는 128개의 3비트 미러 카운터들을 사용할 때 이 보호 영역을 커버하는 노드들을 기억하기 위해 필요한 전체 메모리는 (도 10의 실시예에 나타낸 주 카운터의 사이즈, 사이즈 및 M 필드를 사용할 때, 물론 다른 사이즈도 가능하다) 대략 8MB이다. 이 때문에, 기준 트리의 사이즈는 대략 8MB이다. 부 카운터 사이즈의 모든 점프마다 동일한 사이즈(8MB)를 갖는 성기게 채워진 미러 서브 트리들을 구축한다. 따라서, 도 12에 나타낸 거소가 같이 3개의 추가적인 미러 트리가 구축되더라도, 전체 공간은 여전히 약 32MB이다. 비교용으로, 고정 사이즈 카운터를 사용하는 도 3의 접근방법은 대략 15MB의 발자국을 갖는 정적 카운터 트리를 구축할 것이다. 따라서, 도 10의 접근방법에서 추가적인 미러 트리들을 구축하는 것과 관련된 오버헤드가 훨씬 낮다. 메모리가 균등한 기록 빈도 분포로 기록되지 않을 때, 일부 영역들의 보호는 더 작은 부 카운터들로 수용될 수 있으며, 미러 트리들을 이용하여 노드 당 애리티를 희생할 필요가 없이 선택된 노드들에 대해 부 카운터 사이즈를 신장시킬 수 있다. 또한, 미러 트리들을 이용하는 가변의 미러 카운터 사이즈 접근방법은, 지원된 특정한 최대 부 카운터 사이즈에 대해 각각의 트리 노드의 애리티가 더 커질 수 있어(예를 들어, 32 대신에 128), 특정한 사이즈의 메모리의 영역을 보호하는데 필요한 노드들의 총 수를 줄이므로, 모든 노드가 결국 그들의 부 카운터 사이즈가 최대 사이즈로 증가되더라고, MAC들이나 주 카운터들을 기억하는데 더 적은 공간이 필요하다는 것을 의미한다. 이것은, 도 10에 도시된 트리의 모든 노드가 12비트 부 카운터들로 증가되고 모든 3개의 미러 트리들이 완전히 채워지도록 요구하더라도, 전체 공간이 여전히 도 3보다 낮다는 것을 의미한다. For example, considering a system with a 1 GB protected area of secure memory protected by an integrity tree, remember the nodes that cover this protected area when using 128 3-bit mirror counters in each main tree node. The total memory required for this is approximately 8 MB (when using the size, size and M field of the main counter shown in the embodiment of FIG. 10, other sizes are possible, of course). For this reason, the size of the reference tree is approximately 8 MB. We build sparse filled mirror subtrees with the same size (8MB) for every jump of the sub counter size. Thus, even if three additional mirror trees are built together with the location shown in FIG. 12, the total space is still about 32 MB. For comparison, the approach of FIG. 3 using a fixed size counter will build a static counter tree with a footprint of approximately 15 MB. Therefore, the overhead associated with building additional mirror trees in the approach of FIG. 10 is much lower. When memory is not recorded with a uniform distribution of write frequencies, the protection of some areas can be accommodated with smaller sub-counters, and can be used for the selected nodes without the need to sacrifice per-node parity using mirror trees. The counter size can be increased. In addition, the variable mirror counter size approach using mirror trees can increase the variability of each tree node for a specific maximum sub-count size supported (eg, 128 instead of 32). Since it reduces the total number of nodes needed to protect a region of memory, it means that all nodes eventually increase their sub-counter size to the maximum size, and require less space to store MACs or main counters. This means that even if all nodes of the tree shown in FIG. 10 are incremented with 12-bit sub-counters and all three mirror trees are required to be completely filled, the total space is still lower than in FIG.

주 트리(26)와 각각의 미러 트리(400)의 기준 어드레스들 410, 412는, 메모리 보안 유닛(20) 내부의 그것의 캐시(42) 내부나 전용 기준 어드레스 레지스터들 내부에 유지된다. 기준 어드레스 레지스터가 설치되는 경우, 각각의 미러 트리 기준 어드레스 레지스터는 대응하는 미러 트리가 아직 할당되지 않았을 때 무효한 값으로 설정된다(예를 들어, 무효한 값은 예를 들어 모두 0들이거나 모두 1들인 실제 미러 트리에 대해 할당이 허용되지 않은 소정의 기준 어드레스이거나, 레지스터와 관련된 별개의 유효한 비트가 어드레스가 유효한 기준 어드레스인지 여부를 표시할 수도 있다). 이와 같은 경우, 메모리 보안 유닛(20)은 특정한 미러 트리 기준 어드레스가 유효한지 아닌지로부터 트리 구조 전체에 걸쳐 사용된 미러 카운터의 최대 사이즈를 추론할 수도 있다. 예를 들어, 도 12의 미러 트리(2)와 관련된 기준 어드레스 레지스터가 무효로 표시되는 경우, 이것은, 트리 구조의 모든 노드에서 사용된 최대 부 카운터 사이즈가 6비트 이하라는 것을 나타낸다. 이것은 트리에서 사용된 최대 부 카운터 사이즈의 별개의 표시를 기억할 필요성을 없앨 수 있다. The main tree 26 and the reference addresses 410 and 412 of each mirror tree 400 are maintained within its cache 42 inside the memory security unit 20 or within dedicated reference address registers. When the base address register is installed, each mirror tree base address register is set to an invalid value when a corresponding mirror tree has not yet been allocated (eg, the invalid value is, for example, all 0s or all 1s). It may be a given base address that is not allowed to be allocated for the actual mirror tree entered, or a separate valid bit associated with the register may indicate whether the address is a valid base address). In this case, the memory security unit 20 may infer the maximum size of the mirror counter used throughout the tree structure from whether or not a specific mirror tree reference address is valid. For example, when the reference address register associated with the mirror tree 2 in Fig. 12 is marked invalid, this indicates that the maximum sub-count size used in all nodes of the tree structure is 6 bits or less. This can obviate the need to remember a separate indication of the maximum sub-counter size used in the tree.

또한, 메모리 보안 유닛(20)은 일부 실시예에서 어떤 노드들 및/또는 얼마나 많은 노드들이 특정한 미러 트리 내에 채워졌는지를 표시하는 추적 정보를 유지한다. 이것은, 메모리 보안 유닛(20)이, 주 트리(26)의 대응하는 노드가 필요할 때 필요한 미러 트리 노드를 추론적으로 로드할 것인지 아닌지에 대한 판정을 행할 수 있도록 할 수 있다. 즉, 메모리 보안 유닛(20)은, 주 트리 노드를 액세스하는 로드 요구를 발행시에, (i) 주 트리 노드가 반환되는 것을 대기한 후, 주 트리 노드의 사이즈 필드(402)에 근거하여 해당 부 카운터를 얻기 위해 대응하는 미러 트리 노드를 로드하는 것이 필요한지 요부를 판정할 것인지, 또는 (ii) 미러 트리 노드가 실제로 필요한지 여부를 판정하기 위해 주 트리 노드의 사이즈 필드(402)가 검사되는 것을 대기하지 않고 주 트리 노드 이외에 한 개 이상의 미러 트리 노드들을 로드할 것인지 결정할 필요가 있다. 옵션 (i)에 따르면, 미러 트리 노드가 실제로 필요하지 않을 때 불필요한 로드를 기동하는 것을 피함으로써 메모리 대역폭을 줄일 수 있다. 옵션 (ii)에 따르면, 미러 트리 노드가 필요한 경우에 지연을 피함으로써 성능을 향상시킬 수 있다. 옵션 (i) 또는 옵션 (ii)가 바람직한지는, 특정한 미러 트리에 대해 얼마나 많은 수의 유효한 노드들이 확립되었는지에 의존하는데, 미러 트리 내부의 유효한 노드들의 수가 많을수록, 현재의 액세스가 대응하는 미러 노드를 필요로 할 가능성이 더 커지므로, 미러 노드를 추론적으로 로딩하는 것으로부터 성능 향상을 얻을 수 있는 가능성이 더 커진다. In addition, the memory security unit 20 maintains tracking information in some embodiments indicating which nodes and / or how many nodes have been filled in a particular mirror tree. This can allow the memory security unit 20 to make a determination as to whether or not to speculatively load the required mirror tree node when the corresponding node of the main tree 26 is needed. That is, the memory security unit 20, upon issuing a load request to access the main tree node, (i) waits for the main tree node to be returned, and then corresponds to it based on the size field 402 of the main tree node. Wait to check whether it is necessary to load the corresponding mirror tree node to obtain a sub-counter, or (ii) the size field 402 of the main tree node to be checked to determine whether the mirror tree node is actually needed. You need to decide whether to load one or more mirror tree nodes in addition to the main tree node. According to option (i), memory bandwidth can be reduced by avoiding initiating unnecessary load when the mirror tree node is not actually needed. According to option (ii), performance can be improved by avoiding delay when a mirror tree node is needed. Whether option (i) or option (ii) is preferred depends on how many valid nodes have been established for a particular mirror tree, the more valid nodes in the mirror tree are, the more current nodes are accessed by the corresponding mirror node. The greater the likelihood of need, the greater the likelihood of gaining performance gains from speculatively loading mirror nodes.

이 때문에, 일반적으로 주 카운터 무결성 트리의 특정한 노드를 액세스할 때, 메모리 보안 유닛(20)은, 주 트리의 특정한 노드가 실제로 메모리로부터 반환되기 전에 특정한 노드의 부 카운터 사이즈를 예측하고, 부 카운터 사이즈의 예측을 사용하여, 대응하는 주 트리 노드가 반환되기 전에 특정한 미러 트리 내부의 미러 트리 노드의 로드를 기동할 것인지 아닌지 판정할 수도 있다. 이와 같은 예측은, 특정한 미러 트리가 할당되었는지 여부 및/또는 얼마나 많은 유효 노드들이 특정한 미러 트리에 대해 확립되었는지를 나타내는 추적 정보에 근거할 수 있다. 추정 정보는 다양한 레벨의 정밀도로 유효 노드들의 수를 추적할 수도 있다. 예를 들어, 메모리 보안 유닛(20)은, 추적 정보 내에 어떤 특정한 노드들이 유효한지 지정하지 않고, 특정한 미러 트리의 얼마나 많은 수의 노드들이 유효한지 계수하는 유효 노드 카운터들을 유지할 수도 있다(예를 들어, 이와 같은 경우 이 트리에 대한 유효한 노드 카운터가 특정한 임계값보다 클 때 미러 트리 노드가 추론적으로 로드될 수도 있다). 이와 달리, 메모리 보안 유닛(20)은, 미러 트리의 어떤 특정한 노드들이 유효한지 아닌지는 비트맵을 유지할 수도 있으며, 이것은 특정한 미러 트리 노드가 필요한지 여부에 대한 정확한 판정을 허용할 수 있다. 어느 쪽이든, 미러 트리의 채워짐 레벨을 추적하는 것은 성능을 향상시키기 위한 로드 스케줄링에 대한 결정을 향상시키는데 도움이 될 수 있다. For this reason, generally when accessing a particular node of the main counter integrity tree, the memory security unit 20 predicts the minor counter size of the particular node before the particular node of the main tree is actually returned from memory, and the minor counter size Using the prediction of, it is also possible to determine whether or not to initiate a load of a mirror tree node within a particular mirror tree before the corresponding main tree node is returned. Such prediction may be based on tracking information indicating whether a particular mirror tree has been allocated and / or how many effective nodes have been established for a particular mirror tree. The estimation information may track the number of valid nodes with various levels of precision. For example, the memory security unit 20 may maintain valid node counters that count how many nodes in a particular mirror tree are valid, without specifying which particular nodes are valid in the tracking information (eg In this case, the mirror tree node may be speculatively loaded when the valid node counter for this tree is greater than a certain threshold). Alternatively, the memory security unit 20 may maintain a bitmap of which particular nodes in the mirror tree are valid or not, which may allow accurate determination of whether a particular mirror tree node is needed. Either way, tracking the fill level of the mirror tree can help improve the decision on load scheduling to improve performance.

도 9의 방법은 전술한 가변 부 카운터 사이즈 예를 구현하는 것으로 확장될 수 있다. 이와 같은 실시예에서는, 스텝 276에서 부 카운터가 오버플로우하면, 스텝 280으로 곧바로 진행하는 것 대신에, 추가적인 스텝을 행하여 부 카운터 사이즈가 이미 최대 부 카운터 사이즈인지 여부를 검사한다. 부 카운터 사이즈가 이미 메모리 보안 유닛(20)에 의해 지원된 최대 사이즈인 경우에, 스텝 280으로 방법이 진행하여, 타겟 블록과 관련된 주 카운터를 증분하고, 전술한 것과 같이 방법이 스텝 280을 벗어나 진행한다. 그러나, 미러 카운터 사이즈가 아직 지원된 최대 사이즈에 도달하지 않은 경우, 메모리 보안 유닛(20)은 오버플로우한 미러 카운터를 포함한 주 트리의 노드와 관련된 부 카운터들의 사이즈를 증가시킨다. 이 때문에, 주 노드와 미러 트리(400) 내부의 적어도 한 개의 대응하는 노드(404)가 재기록되어, (전술한 것과 같이, 주 카운터로부터 각각의 부 카운터로 한 개 이상의 비트들을 시프트하고 선두 제로값들로 주 카운터를 덧붙임으로써) 각각의 카운터의 비트 수가 확장되고, 확장된 부 카운터 값들을 주 노드 그 자체와 미러 트리들(400)의 한 개 이상의 대응하는 노드들(40) 내부의 부 카운터들을 위해 예약된 공간 중에 분배한다. 부 카운터들의 적절한 사이즈를 수용하는데 필요한 미러 트리(400)에 대해 공간이 아직 할당되지 않은 경우, 이때 메모리 보안 유닛(20)에 의해 공간이 할당될 수 있다. 그후, 도 9의 스텝 278로 방법이 진행하고, 도 9의 나머지 스텝들은 전술한 것과 같다. The method of FIG. 9 can be extended to implement the variable sub-count size example described above. In this embodiment, if the sub-counter overflows in step 276, instead of proceeding directly to step 280, an additional step is performed to check whether the sub-counter size is already the maximum sub-counter size. If the sub-counter size is already the maximum size supported by the memory security unit 20, the method proceeds to step 280, increments the main counter associated with the target block, and the method proceeds beyond step 280 as described above. do. However, if the mirror counter size has not yet reached the maximum supported size, the memory security unit 20 increases the size of sub-counters associated with the node of the main tree including the overflowed mirror counter. For this reason, the main node and at least one corresponding node 404 inside the mirror tree 400 are rewritten, shifting one or more bits from the main counter to each sub counter, as described above, and leading zero value. The number of bits in each counter is extended, and the extended sub-counter values are added to the main node itself and sub-counters inside one or more corresponding nodes 40 of the mirror trees 400. Distribute among the reserved space. If space is not yet allocated for the mirror tree 400 necessary to accommodate the appropriate size of the sub-counters, space may be allocated by the memory security unit 20 at this time. Thereafter, the method proceeds to step 278 of FIG. 9, and the remaining steps of FIG. 9 are as described above.

도 10 내지 도 13의 실시예는, 트리의 각각의 레벨이 동일한 애리티(128)를 갖는 경우를 나타내지만, 이전의 실시예에서와 마찬가지로, 부모 노드가 32진이고 그것의 자식 노드가 64진인 예를 나타낸 도 14에 나타낸 것과 같이, 트리의 레벨들 사이에서 변동하는 애리티를 갖는 트리를 제공하는 것도 가능하다. 처음에는, 부모 노드가 32개의 12비트 부 카운터를 가지고 자식 노드가 64개의 6비트 부 카운터를 가졌을 것이지만, 사이즈 증가 트리거 이벤트에 따라, 64진 자식 노드의 부 카운터들의 사이즈가 12로 증가되었고, 추가적인 미러 노드가 할당되어 64진 자식 노드의 12비트 카운터들의 절반을 수용하였다. (64진 자식 노드의 카운터를 사용하여 계산된 MAC을 갖는) 암호화 카운터들의 후속 노드는 128진이다. eg 14는 각 노드에 대해 2의 거듭제곱 애리티를 나타내지만, 전술한 것과 같이 2의 정확한 거듭제곱이 아닌 애리티를 제공하는 것도 가능하다. The embodiments of Figs. 10 to 13 show the case where each level of the tree has the same parity 128, but as in the previous embodiment, the parent node is 32 digits and its child node is 64 digits. As shown in FIG. 14 showing an example, it is also possible to provide a tree having an variability that varies between levels of the tree. Initially, the parent node would have 32 12-bit sub-counts and the child node would have 64 6-bit sub-counts, but according to the size increase trigger event, the size of the sub-counts of the 64-bit child node was increased to 12, and additional The mirror node was allocated to accommodate half of the 12-bit counters of the 64 child node. The subsequent node of the encryption counters (with the MAC calculated using the counter of the 64 digit child node) is 128 binary. eg 14 represents a power of 2 for each node, but it is also possible to provide a power that is not an exact power of 2 as described above.

요약하면, 위에서 분할 카운터 설계를 사용하는 적어도 일부 레벨을 갖는, 분할 카운터를 사용하는 카운터 트리를 설명하였다. 이것은, 도 2 및 도 3의 비교예에서의 8진 트리(카운터 트리 또는 MAC-트리)와 달리, (선택된 분할-카운터 설계(16, 32, 64, 128 등)의 부:주 카운터 비율에 근거한) 16, 32, 64 또는 128진인 무결성 트리를 구성할 수 있게 한다. 이것은 메모리의 동일한 영역을 보호하기 위한 카운터-트리 내부의 레벨들의 수의 저감을 허용하여, 트리 횡단 중에 더 적은 메모리 트래픽과 그후의 성능 향상을 제공한다. 더구나, 카운터-캐시라인 당 더 큰 수의 부 카운터들은 더 양호한 캐시가능성을 제공하고, (캐시에서의 적중까지만 횡단이 계속되기 때문에) 트리 횡단 중에 메모리 액세스의 횟수를 줄인다. In summary, the above describes a counter tree using a split counter, with at least some level using the split counter design. This is based on the sub: major counter ratio of the (selected split-counter design (16, 32, 64, 128, etc.), unlike the octal tree (counter tree or MAC-tree) in the comparative examples of FIGS. 2 and 3. ) Allows you to construct an integrity tree of 16, 32, 64 or 128 bases. This allows reduction of the number of levels inside the counter-tree to protect the same area of memory, providing less memory traffic during tree traversal and subsequent performance improvements. Moreover, a larger number of sub-counts per counter-cacheline provides better cacheability and reduces the number of memory accesses during tree traversal (since traversal continues only until hits in the cache).

본 발명은 각각의 레벨에서 다른 분할-카운터 설계를 갖는 가변-애리티 카운터 트리를 설명한다. 부모 노드 부 카운터 자식 노드 내부의 부 카운터들이 어느 것에 대한 기록시에 증분된다. 따라서, 트리에서 상승함에 따라, (캐싱의 효과를 무시하면) 기록-트래픽이 지수적으로 증가한다. 따라서, 본 발명은 각각의 레벨에서 덜 공격적인 분할-카운터 설계를 사용하여 트리에서 더 높이 상승함에 따라 트리의 애리티를 줄이는 것을 제안한다. 본 발명의 평가는, 분할-62 설계가 리프 레벨에서 상당한 오버플로우를 나타내는 반면에(MAC 재계산의 걸림>50%의 실행시간), 분할-32 설계는 무시할만한 오버플로우를 나타낸다(MAC-계산에 <1% 시간 소비). 따라서, 본 발명은 (주 카운터 당 48 부카운터를 갖는) 리프 레벨에서 분할-48을 갖는 설계를 제안하며, 트리의 다음 레벨에서 비율을 줄인다(주 카운터 당 36 부 카운터를 갖는 분할-36). 이것은 2의 거듭제곱이 아닌 애리티를 발생하며 어드레스 산술 계산을 복잡하게 하지만, MAC 오버헤드의 재계산이 없이, 추가적인 성능 이득을 이용하기 위해 지불해야 하는 비용이 합당하다. The present invention describes a variable-arity counter tree with a different split-counter design at each level. Parent Node Minor Counter Minor counters inside the child node are incremented when writing to which one. Thus, as it rises in the tree, the record-traffic increases exponentially (ignoring the effect of caching). Thus, the present invention proposes to reduce the tree's ity as it rises higher in the tree using a less aggressive split-counter design at each level. Evaluation of the present invention, while the split-62 design exhibited significant overflow at the leaf level (run time of MAC recalculation> 50% run time), the split-32 design exhibited negligible overflow (MAC-calculation) At <1% time consumption). Thus, the present invention proposes a design with split-48 at the leaf level (with 48 sub-counts per main counter) and reduces the ratio at the next level of the tree (split-36 with 36 sub-counts per main counter). This results in an arithmetic non-power of 2 and complicates address arithmetic calculations, but without the recalculation of the MAC overhead, the cost to pay for the additional performance gains is reasonable.

본 발명은, 특정한 노드들에 대해 확대된 카운터들을 수용하기 위해 미러 트리를 이용하는 가변 부 카운터 사이즈를 갖는 트리를 제안하는데, 이것은 (증가된 애리티와 트리 횡단을 가능하게 하기 위해) 부 카운터 사이즈의 감소와, (부 카운터가 오버플로우할 때 필요한 재암호화 또는 MAC 재계산의 가능성을 줄이기 위해) 부 카운터 사이즈의 증가의 경쟁하는 요구를 조화시키는데 도움이 된다. 미러 트리 접근방법에 따르면, 더 큰 카운터들을 필요로 하는 노드들이 더 큰 카운터를 사용할 수 있지만, 덜 빈번하게 필요한 다른 노드들이 더 적은 부 카운터들을 여전히 사용할 수 있다. 필요한 경우에는, 가변 부 카운터 접근방법을 전술한 가변 애리티 트리와 조합하거나, 트리 전체에 걸쳐 애리티가 동일한 경우에는 고정 애리티 버전을 사용할 수 있다. The present invention proposes a tree with a variable sub-counter size that uses a mirror tree to accommodate enlarged counters for specific nodes, which is of a sub-counter size (to enable increased parity and tree traversal). It helps to match the competing demands of the decrease and increase of the sub counter size (to reduce the likelihood of re-encryption or MAC recalculation required when the sub counter overflows). According to the mirror tree approach, nodes that need larger counters can use larger counters, but other nodes that need less frequently can still use fewer sub-counters. If necessary, the variable sub-counter approach may be combined with the above-described variable parity tree, or when the parity is the same throughout the tree, a fixed parity version may be used.

도 15는 다양한 분할-카운터 기반의 카운터 트리들의 성능 평가를 나타낸 것이다: 15 shows the performance evaluation of various split-counter based counter trees:

· 4개의 바의 각 세트 중 좌측 바: 모노리식 56비트 카운터를 갖는 비교 접근방법(Mono-8) Left bar of each set of 4 bars: a comparative approach with a monolithic 56-bit counter (Mono-8)

· 4개의 바의 각 세트의 좌측에서 두 번째 바: Split-16(16진) · The second bar from the left of each set of 4 bars: Split-16 (hexadecimal)

· 4개의 바의 각 세트의 좌측에서 세 번째 바: Split-32(32진) · The third bar from the left of each set of 4 bars: Split-32 (32 digits)

· 4개의 바의 각 세트 중 우측 바: Split-64(64진). Right bar of each set of 4 bars: Split-64 (64 hexadecimal).

성능 가속(speedup)을 각각의 벤치마크용의 Mono-8에 대한 비율로 나타내었는데, 즉 Mono-8에 대한 가속 비율은 항상 1이다. 온칩에서 암호화 및 무결성 트리 카운터를 캐시하는 32KB 전용 카운터 캐시를 가정한다. 본 발명은 SPEC2006(1000 명령 당 >1 메모리 액세스)에서의 메모리 집중 워크로드에서 이들 구성의 성능을 평가한다. 도 10에 나타낸 것과 같이, Split-32(32진) 트리는 평균적으로 모노리식 카운터(56비트) 트리(8진)에 비해 42%의 가속을 나타낸다. Split-16 카운터 트리는 평균적으로 더 작은 26%의 가속을 나타낸다. 이것은 메모리 트래픽의 감소를 발생하는 분할-카운터 트리 노드들의 향상된 캐시가능성에 주로 기인한 것이다. Split-64는 Split-32(평균적으로 42%)에 비해 상당한 가속(평균적으로 57%)을 나타낸다. 그러나, Split-64는, 성능 모델에서는 설명하지 않는, 오버플로우로 인한 상당한 비용을 발생한다(MAC-재계산을 처리시 시간의 >50%를 소비). 그 결과, Split-32가 정적인 애리티, 즉 레벨들을 가로질러 카운터들에 대한 동일한 설계를 갖는 카운터-트리에 대한 더 바람직한 보수적인 설계이다. 그러나, Split-32와 Split-64 사이의 성능 차이와, Split-64에서는 상당한 오버플로우가 존재하지만 Split-32에서는 무시할 수 있다는 사실을 고려하면, 도 5에 도시된 것과 같이 절충적인 가변의 2의 거듭제곱이 아닌 애리티의 분할-카운터 트리를 찾을 수 있다. Performance speed is expressed as a ratio for Mono-8 for each benchmark, ie the acceleration ratio for Mono-8 is always 1. Assume a 32KB dedicated counter cache that caches encryption and integrity tree counters on-chip. The present invention evaluates the performance of these configurations in memory intensive workloads at SPEC2006 (> 1 memory access per 1000 instructions). As shown in FIG. 10, the Split-32 (32-decimal) tree shows an average of 42% acceleration compared to the monolithic counter (56-bit) tree (octal). The Split-16 counter tree, on average, shows a smaller 26% acceleration. This is mainly due to the improved cacheability of split-counter tree nodes, which results in a reduction in memory traffic. Split-64 shows significant acceleration (57% on average) compared to Split-32 (42% on average). However, Split-64 incurs a significant cost due to overflow, which is not described in the performance model (consuming> 50% of the time spent processing MAC-recalculation). As a result, Split-32 is a more desirable conservative design for a static ity, ie a counter-tree with the same design for counters across levels. However, considering the difference in performance between Split-32 and Split-64, and the fact that there is a significant overflow in Split-64, but can be ignored in Split-32, the tradeoff of a compromise variable 2 as shown in FIG. You can find Arita's split-counter tree rather than power.

도 16은 사용될 수 있는 시뮬레이터 구현예를 나타낸 것이다. 전술한 실시예는 해당 기술을 지원하는 특정한 처리 하드웨어를 작동하기 위한 장치 및 방법에 관해 본 발명을 구현하지만, 컴퓨터 프로그램의 사용을 통해 구현되는 본 발명에서 설명한 실시예에 따라 명령 실행 환경을 제공하는 것도 가능하다. 이와 같은 컴퓨터 프로그램은, 하드웨어 아키텍처의 소프트웨어 기반의 구현을 제공하는 한, 시뮬레이터로 부르는 경우가 많다. 다양한 시뮬레이터 컴퓨터 프로그램은 에뮬레이터, 가상머신, 모델, 및 동적 이진 변환기를 포함하는 이진 변환기를 포함한다. 보통, 시뮬레이터 구현은, 옵션으로 시뮬레이터 프로그램(310)을 지원하는 호스트 운영체계(320)를 실행하는 호스트 프로세서(330) 상에서 실행된다. 일부 구성에서는, 하드웨어와 제공된 명령 실행 환경 사이에 복수 층의 시뮬레이션이 존재하고, 및/또는 동일한 호스트 프로세서 상에서 복수의 별개의 명령 실행 환경이 제공된다. 역사적으로, 합당한 속도에서 실행되는 시뮬레이터 구현을 제공하기 위해 강력한 프로세서들이 요구되었지만, 이와 같은 접근방법은, 호환성이나 재사용 이유로 인해 다른 프로세서에 대해 네이티브한 코드를 실행하려는 요구가 있을 때 등과 같은, 특정한 상황에서 정당화된다. 예를 들어, 시뮬레이터 구현은, 호스트 프로세서 하드웨어에 의해 지원되지 않는 추가적인 기능을 갖는 명령 실행 환경을 제공하거나, 보통 다양한 하드웨어 아키텍처와 관련된 명령 실행 환경을 제공한다. 시뮬레이션s의 개관에 대해서는 "Some Efficient Architecture Simulation Techniques", Robert Bedichek, Winter 1990 USENIX Conference, Pages 53-63에 기재되어 있다. 16 shows a simulator implementation that can be used. The foregoing embodiments implement the present invention with respect to an apparatus and method for operating specific processing hardware supporting the corresponding technology, but provide an instruction execution environment according to embodiments described in the present invention implemented through the use of a computer program It is also possible. Such computer programs are often referred to as simulators, as long as they provide a software-based implementation of the hardware architecture. Various simulator computer programs include emulators, virtual machines, models, and binary converters, including dynamic binary converters. Usually, the simulator implementation is optionally run on the host processor 330 running the host operating system 320 that supports the simulator program 310. In some configurations, multiple layers of simulation exist between the hardware and the provided instruction execution environment, and / or multiple separate instruction execution environments are provided on the same host processor. Historically, powerful processors have been required to provide simulator implementations that run at reasonable speeds, but this approach may be used in certain situations, such as when there is a need to execute native code against another processor for compatibility or reuse reasons. Is justified in For example, a simulator implementation provides an instruction execution environment with additional functionality not supported by the host processor hardware, or an instruction execution environment, usually associated with various hardware architectures. An overview of simulations is described in "Some Efficient Architecture Simulation Techniques", Robert Bedichek, Winter 1990 USENIX Conference, Pages 53-63.

본 실시예를 특정한 하드웨어 구성 또는 특징을 참조하여 설명하였지만, 시뮬레이션된 실시예에서는, 적절한 소프트웨어 구성 또는 특징에 의해 동등한 기능이 제공된다. 예를 들어, 특정한 회로가 시뮬레이션된 실시예에서는 컴퓨터 프로그램 논리로 구현된다. 마찬가지로, 레지스터 또는 캐시 등의 메모리 하드웨어도 시뮬레이션된 실시예에서는 소프트웨어 데이터 구조로 구현된다. 전술한 실시예에서 참조한 한 개 이상의 하드웨어 구성요소들이 호스트 하드웨어(예를 들어, 호스트 프로세서(330) 상에 존재하는 구성에서는, 적절한 경우에, 일부 시뮬레이션된 실시예가 호스트 하드웨어를 이용한다. Although this embodiment has been described with reference to specific hardware configurations or features, in a simulated embodiment, equivalent functionality is provided by appropriate software configurations or features. For example, in embodiments where a particular circuit is simulated, it is implemented in computer program logic. Similarly, memory hardware, such as registers or caches, is also implemented in software data structures in a simulated embodiment. In configurations where one or more hardware components referenced in the above-described embodiments are present on host hardware (eg, host processor 330), where appropriate, some simulated embodiments utilize host hardware.

시뮬레이터 프로그램(310)은, 컴퓨터 판독가능한 기억매체(이것은 비일시적인 매체일 수도 있다)에 기억되고, 시뮬레이터 프로그램(310)에 의해 모델링되고 있는 하드웨어 아키텍처의 응용 프로그램 인터페이스와 동일한 타겟 코드(300)에 대한 프로그램 인터페이스(명령 실행 환경)를 제공한다. 따라서, 전술한 오프칩 메모리(14)에 데이터를 판독 또는 기록하는 명령을 포함하는 타겟 코드(300)의 프로그램 명령은 시뮬레이터 프로그램(310)을 사용하는 명령 실행 환경 내에서 실행됨으로써, 전술한 것과 같이 하드웨어로 제공된 메모리 보안 유닛(20)을 실제로 갖지 않는 호스트 컴퓨터(330)가 이들 특징을 에뮬리에션할 수 있다. The simulator program 310 is stored in a computer-readable storage medium (which may be a non-transitory medium), and the target code 300 is the same as the application program interface of the hardware architecture being modeled by the simulator program 310. It provides a program interface (command execution environment). Accordingly, the program instruction of the target code 300 including the instruction to read or write data to the off-chip memory 14 described above is executed within the instruction execution environment using the simulator program 310, as described above. A host computer 330 that does not actually have a memory security unit 20 provided in hardware can emulate these features.

또 다른 예시적인 구성은 다음과 같은 절(clause)에 주어진다: Another exemplary configuration is given in the following clause:

(1) 메모리에 기억된 데이터에 대한 액세스를 제어하는 메모리 액세스회로와,(One) A memory access circuit for controlling access to data stored in the memory,

메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안회로를 구비하고, And a memory security circuit for verifying the integrity of data stored in the protected memory area of the memory.

상기 메모리 보안회로는 복수의 노드들을 포함하는 카운터 무결성 트리를 유지하도록 구성되고, 각각의 노드는 상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 지정하고, 복수의 노드들은, 카운터들 중에서 적어도 한 개가 상기 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하고, The memory security circuit is configured to maintain a counter integrity tree including a plurality of nodes, each node designating a plurality of counters associated with respective data blocks of the protected memory area, and the plurality of nodes, counters At least one parent node associated with a data block that stores at least one child node that provides additional counters of the counter integrity tree, and a data block where at least one of the counters stores data other than the counter integrity tree; Includes at least one leaf node that is related,

상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 메모리 보안회로는, 타겟 데이터 블록과 관련된 기억된 인증 코드를, 타겟 데이터 블록과 이 타겟 데이터 블록과 관련되는 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 타겟 데이터 블록의 무결성을 검증하도록 구성되고, In response to access to the target data block in the protected memory area, the memory security circuit stores the stored authentication code associated with the target data block in the target counter of the target data block and the counter integrity tree associated with the target data block. It is configured to verify the integrity of the target data block by comparing with the calculated authentication code generated based on,

상기 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하는 장치. At least one of the nodes of the counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub-count value designated separately for each of the at least two counters. A device comprising a split-counter node designating two counters.

(2) 절 (1)에 따른 장치로서, 제2 메모리를 구비하고,(2) A device according to clause (1), comprising a second memory,

상기 메모리 보안회로는, The memory security circuit,

카운터 무결성 트리의 루트 노드, 또는 The root node of the counter integrity tree, or

보호 메모리 영역에 기억된 카운터 무결성 트리의 루트 노드의 무결성을 검증하는 정보를 Information that verifies the integrity of the root node of the counter integrity tree stored in the protected memory area.

지정하는 루트 검증 데이터를 제2 메모리에 기억하도록 구성된 장치. A device configured to store the designated route verification data in the second memory.

(3) 절 (2)에 따른 장치로서, 타겟 데이터 블록에 대한 액세스에 응답하여, 메모리 보안회로는, 1회 이상의 검증 검사들을 행하여 타겟 카운터와 루트 노드를 포함하는 카운터 무결성 트리의 분기 상에서 카운터들의 무결성을 검증하도록 구성되고, 검증 검사들 중에서 적어도 한 개는 제2 메모리에 기억된 루트 검증 데이터에 의존하는 장치.(3) The apparatus according to clause (2), in response to access to the target data block, the memory security circuit performs one or more verification checks to verify the integrity of the counters on the branch of the counter integrity tree including the target counter and the root node. And configured to rely on route verification data stored in the second memory.

(4) 절 (1)에 따른 장치로서, 보호 메모리 영역의 타겟 데이터 블록의 갱신에 응답하여, 메모리 보안회로는, 타겟 카운터를 갱신하고, 타겟 데이터 블록의 갱신된 데이터와 갱신된 타겟 카운터에 근거하여 타겟 데이터 블록과 관련된 기억된 인증 코드를 재계산하도록 구성된 장치.(4) The apparatus according to clause (1), in response to the update of the target data block of the protected memory area, the memory security circuit updates the target counter, and target data based on the updated data of the target data block and the updated target counter. A device configured to recalculate the stored authentication code associated with the block.

(5) 절 (4)에 따른 장치로서, 메모리 보안회로는 타겟 카운터를 증분함으로써 타겟 카운터를 갱신하도록 구성된 장치.(5) A device according to clause (4), wherein the memory security circuit is configured to update the target counter by incrementing the target counter.

(6) 절 (1)에 따른 장치로서, 타겟 데이터 블록에 대한 타겟 카운터가 카운터 무결성 트리의 분할-카운터 노드에 의해 지정될 때 보호 메모리 영역의 타겟 데이터 블록의 갱신에 응답하여, 메모리 보안회로는, 타겟 카운터에 대응하는 부 카운트 값을 갱신하고, 타겟 데이터 블록의 갱신된 데이터, 타겟 카운터에 대응하는 해당하는 주 카운트 값과, 타겟 카운터에 대응하는 갱신된 부 카운트 값에 근거하여 타겟 데이터 블록과 관련된 기억된 인증 코드를 재계산하도록 구성된 장치.(6) An apparatus according to clause (1), in response to an update of a target data block in the protected memory area when the target counter for the target data block is designated by the split-counter node of the counter integrity tree, the memory security circuitry, the target counter The sub count value corresponding to is updated, and the stored data associated with the target data block is based on the updated data of the target data block, the corresponding main count value corresponding to the target counter, and the updated sub count value corresponding to the target counter. Device configured to recalculate the authorization code.

(7) 절 (6)에 따른 장치로서, 부 카운트 값의 갱신이 오버플로우 상태를 일으킬 때, 메모리 보안회로는, 대응하는 주 카운트 값을 갱신하고, 대응하는 주 카운트 값을 공유하는 카운터들과 관련된 데이터 블록들 각각과 관련된 기억된 인증 코드를 재계산하도록 구성된 장치.(7) A device according to clause (6), wherein when the updating of the sub count value causes an overflow state, the memory security circuit updates the corresponding main count value, and blocks of data associated with counters sharing the corresponding main count value. A device configured to recalculate the stored authentication code associated with each of the two.

(8) 절 (1)에 따른 장치로서, 상기 적어도 한 개의 부모 노드 중에서 적어도 한 개는 분할-카운터 노드인 장치.(8) A device according to clause (1), wherein at least one of the at least one parent node is a split-counter node.

(9) 절 (1)에 따른 장치로서, 카운터 무결성 트리는 카운터 무결성 트리의 다양한 레벨들에 있는 적어도 2개의 분할-카운터 노드들을 포함하는 장치.(9) A device according to clause (1), wherein the counter integrity tree comprises at least two split-counter nodes at various levels of the counter integrity tree.

(10) 절 (1)에 따른 장치로서, 카운터 무결성 트리는 다양한 수의 데이터 블록들에 대한 카운터들을 지정하는 적어도 2개의 노드를 포함하는 장치.(10) A device according to clause (1), wherein the counter integrity tree comprises at least two nodes specifying counters for various numbers of data blocks.

(11) 절 (1)에 따른 장치로서, 카운터 무결성 트리는, 제1 수의 데이터 블록들에 대한 카운터들을 지정하는 제1 분할-카운터 노드와, 제1 수보다 큰 제2 수의 데이터 블록들에 대한 카운터들을 지정하는 제2 분할-카운터 노드를 포함하고, 상기 제1 분할-카운터 노드는 상기 제2 분할-카운터 노드의 부모 노드인 장치.(11) An apparatus according to clause (1), wherein the counter integrity tree comprises counters for a first split-counter node designating counters for a first number of data blocks and a second number of data blocks greater than the first number. And a second split-counter node to designate, wherein the first split-counter node is a parent node of the second split-counter node.

(12) 절 (11)에 따른 장치로서, 상기 제1 분할-카운터 노드에 의해 지정된 부 카운트 값들은 상기 제2 분할-카운터 노드에 의해 지정된 부 카운트 값들보다 더 큰 수의 비트를 갖는 장치.(12) Apparatus according to clause (11), wherein the sub-count values specified by the first split-counter node have a greater number of bits than the sub-count values specified by the second split-counter node.

(13) 절 (11)에 따른 장치로서, 성가 제1 분할-카운터 노드의 부모 노드는 제1 수보다 작은 제3 수의 데이터 블록들에 대한 카운터들을 지정하는 분할-카운터 노드이다.(13) As an apparatus according to clause (11), the parent node of the annoying first split-counter node is a split-counter node specifying counters for a third number of data blocks less than the first number.

(14) 절 (1)에 따른 장치로서, 카운터 무결성 트리의 적어도 한 개의 노드는 2의 정확한 거듭제곱 이외의 수의 데이터 블록들에 대한 카운터들을 지정하는 장치.(14) A device according to clause (1), wherein at least one node of the counter integrity tree specifies counters for a number of data blocks other than the exact power of two.

(15) 절 (1)에 따른 장치로서, 메모리 보안 회로는 타겟 데이터 블록과 동일한 캐시 라인으로부터 타겟 데이터 블록에 대한 기억된 인증 코드를 판독하도록 구성된 장치.(15) An apparatus according to clause (1), wherein the memory security circuit is configured to read the stored authentication code for the target data block from the same cache line as the target data block.

(16) 절 (1)에 따른 장치로서, 타겟 데이터 블록에 대한 액세스에 응답하여, 메모리 보안회로는, 기억된 인증 코드와 산출된 인증 코드 사이에 불일치가 검출될 때, 보안 위반 응답을 기동하도록 구성된 장치.(16) A device according to clause (1), in response to access to the target data block, the memory security circuit configured to trigger a security violation response when a mismatch between the stored authentication code and the calculated authentication code is detected.

(17) 절 (1)에 따른 장치로서, 메모리 보안회로는, 보호 메모리 영역의 데이터 블록에 기록된 데이터를 암호화하고 보호 메모리 영역의 데이터 블록으로부터 판독된 데이터를 복호화하는 암호화/복호화 회로를 구비한 장치.(17) An apparatus according to clause (1), wherein the memory security circuit is provided with an encryption / decryption circuit that encrypts data recorded in a data block in the protected memory area and decrypts data read from the data block in the protected memory area.

(18) 절 (1)에 따른 장치로서, 메모리 보안회로는 카운터 무결성 트리에 무관한 메모리의 비보호 메모리 영역에 대한 액세스를 제어하도록 구성된 장치.(18) A device according to clause (1), wherein the memory security circuit is configured to control access to the unprotected memory area of the memory independent of the counter integrity tree.

(19) 메모리의 보호 메모리 영역에 기억된 데이터에 대한 액세스를 제어하는 방법으로서,(19) A method of controlling access to data stored in a protected memory area of a memory,

상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 각각 지정하고, 카운터들 중에서 적어도 한 개가 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하는 복수의 노드들을 포함하는 상기 카운터 무결성 트리를 유지하는 단계와, At least one parent node associated with a data block specifying each of a plurality of counters associated with each data block of the protected memory area, and at least one of the counters providing a child node providing additional counters of the counter integrity tree. And, maintaining the counter integrity tree including a plurality of nodes, wherein at least one of the counters includes at least one leaf node associated with a data block storing data other than the counter integrity tree.

상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 타겟 데이터 블록과 관련된 기억된 인증 코드를, 타겟 데이터 블록과 이 타겟 데이터 블록과 관련되는 상기 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 타겟 데이터 블록의 무결성을 검증하는 단계를 포함하고, In response to access to the target data block of the protected memory area, the stored authentication code associated with the target data block is generated based on a target counter of the target data block and the counter integrity tree associated with the target data block Verifying the integrity of the target data block by comparing it with the authenticated authentication code,

상기 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하는 제어방법. At least one of the nodes of the counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub-count value designated separately for each of the at least two counters. A control method comprising a split-counter node designating two counters.

(20) 데이터 처리장치가 절 (19)에 기재된 방법을 행하도록 제어하는 컴퓨터 프로그램을 기억하는 비일시적인 기억매체.(20) A non-transitory storage medium storing a computer program that controls the data processing apparatus to perform the method described in section (19).

(21) 명령 실행 환경을 제공하도록 호스트 데이터 처리장치를 제어하는 컴퓨터 프로그램으로서,(21) A computer program that controls a host data processing device to provide a command execution environment,

메모리에 기억된 데이터에 대한 액세스를 제어하는 메모리 액세스 프로그램 로직과, Memory access program logic that controls access to data stored in memory;

메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안 프로그램 로직을 포함하고, Memory security program logic to verify the integrity of the data stored in the protected memory area of the memory,

상기 메모리 보안 프로그램 로직은 복수의 노드들을 포함하는 카운터 무결성 트리를 유지하도록 구성되고, 각각의 노드는 상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 지정하고, 복수의 노드들은, 카운터들 중에서 적어도 한 개가 상기 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하고, The memory security program logic is configured to maintain a counter integrity tree including a plurality of nodes, each node designating a plurality of counters associated with respective data blocks of the protected memory area, and the plurality of nodes, counters At least one parent node associated with a data block that stores at least one child node that provides additional counters of the counter integrity tree, and a data block where at least one of the counters stores data other than the counter integrity tree And at least one leaf node associated with,

상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 메모리 보안 프로그램 로직은, 타겟 데이터 블록과 관련된 기억된 인증 코드를, 타겟 데이터 블록과 이 타겟 데이터 블록과 관련되는 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 타겟 데이터 블록의 무결성을 검증하도록 구성되고, In response to access to the target data block of the protected memory area, the memory security program logic stores the stored authentication code associated with the target data block, the target counter of the target data block and the counter integrity tree associated with the target data block. It is configured to verify the integrity of the target data block by comparing with the calculated authentication code generated based on,

상기 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하는 프로그램. At least one of the nodes of the counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub-count value designated separately for each of the at least two counters. A program that includes a split-counter node that specifies two counters.

본 발명에서, 단어 "하도록 구성된"은 장치의 구성요소가 정의된 동작을 행할 수 있는 구성을 갖는다는 것을 의미하기 위해 사용된다. 이와 관련하여, "구성"은 하드웨어 또는 소프트웨어의 배치 또는 상호접속 방식을 의미한다. 예를 들어, 장치는 정의된 동작을 제공하는 전용 하드웨어를 갖거나, 프로세서 또는 기타의 처리장치가 기능을 행하도록 프로그래밍되어도 된다. "하도록 구성된"은 이 장치의 구성요소가 정의된 동작을 제공하기 위해 어떤 식으로 변경될 필요가 있는 것을 시사하는 것은 아니다. In the present invention, the word "configured to be used" is used to mean that a component of the device has a configuration capable of performing a defined action. In this context, "configuration" means the manner of deploying or interconnecting hardware or software. For example, the device may have dedicated hardware to provide defined operations, or a processor or other processing device may be programmed to function. "Configured to" does not imply that the components of this device need to be altered in any way to provide defined behavior.

첨부도면을 참조하여 본 발명의 예시적인 실시예들을 상세히 설명하였지만, 본 발명은 이들 실시예에 한정되지 않으며, 첨부된 청구범위의 보호범위 및 사상을 벗어나지 않으면서 본 발명이 속한 기술분야의 당업자에 의해 다양한 변경, 부가 및 변화가 행해질 수 있다는 것은 자명하다. 예를 들면, 종속항들의 특징들의 다양한 조합이 독립항들의 특징과 행해질 수도 있다. Exemplary embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to these embodiments, and to those skilled in the art to which the present invention pertains without departing from the scope and spirit of the appended claims. It is obvious that various changes, additions, and changes can be made by this. For example, various combinations of the features of the dependent terms may be done with the features of the independent terms.

Claims (20)

메모리에 기억된 데이터에 대한 액세스를 제어하는 메모리 액세스회로와,
메모리의 보호 메모리 영역에 기억된 데이터의 무결성을 검증하는 메모리 보안회로를 구비하고,
상기 메모리 보안회로는 복수의 노드들을 포함하는 주 카운터 무결성 트리를 유지하도록 구성되고, 각각의 노드는 상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 지정하고, 복수의 노드들은, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하고,
상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 메모리 보안회로는, 상기 타겟 데이터 블록과 관련된 기억된 인증 코드를, 상기 타겟 데이터 블록과 상기 타겟 데이터 블록과 관련되는 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 상기 타겟 데이터 블록의 무결성을 검증하도록 구성되고,
상기 주 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하고,
상기 주 카운터 무결성 트리의 특정한 분할-카운터 노드와 관련된 사이즈 증가 트리거 이벤트에 응답하여, 상기 메모리 보안회로는, 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키고, 상기 특정한 분할-카운터 노드의 부 카운터들의 서브셋을 적어도 한 개의 미러 카운터 무결성 트리의 대응하는 분할-카운터 노드에 할당하도록 구성된 장치.
A memory access circuit for controlling access to data stored in the memory,
And a memory security circuit for verifying the integrity of data stored in the protected memory area of the memory.
The memory security circuit is configured to maintain a main counter integrity tree including a plurality of nodes, each node designating a plurality of counters associated with respective data blocks of the protected memory area, and the plurality of nodes counter At least one parent node associated with a data block storing a child node at least one of which provides additional counters of the primary counter integrity tree, and at least one of the counters stores data other than the primary counter integrity tree Includes at least one leaf node associated with the data block,
In response to access to the target data block of the protected memory area, the memory security circuit may store the stored authentication code associated with the target data block, and the target of the counter integrity tree associated with the target data block and the target data block. It is configured to verify the integrity of the target data block by comparing with the calculated authentication code generated based on a counter,
At least one of the nodes of the main counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub count value designated separately for each of the at least two counters. Includes a split-counter node that specifies two counters,
In response to a size increase trigger event associated with a particular split-counter node of the primary counter integrity tree, the memory security circuit increases the size of the sub-counters of the particular split-counter node, and the portion of the specific split-counter node. And a device configured to allocate a subset of counters to a corresponding split-counter node of at least one mirror counter integrity tree.
제 1항에 있어서,
상기 특정한 분할-카운터 노드는 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 나타내는 사이즈 필드를 지정하는 장치.
According to claim 1,
And the specific division-counter node designates a size field indicating the size of sub-counters of the specific division-counter node.
제 1항에 있어서,
상기 특정한 분할-카운터 노드의 부 카운터들이 상기 메모리 보안회로에 의해 지원되는 최대 사이즈 이외의 사이즈를 가질 때 상기 사이즈 증가 트리거 이벤트에 응답하여, 상기 메모리 보안회로는 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 상기 메모리 보안회로에 의해 지원되는 복수의 부 카운터 사이즈들 중에서 다음으로 가장 큰 사이즈로 증가시키도록 구성된 장치.
According to claim 1,
In response to the size increase trigger event when the sub-counters of the particular split-counter node have a size other than the maximum size supported by the memory security circuit, the memory security circuitry displays the sub-counters of the specific split-counter node. And an apparatus configured to increase the size to the next largest size among a plurality of sub-counter sizes supported by the memory security circuit.
제 1항에 있어서,
부 카운터들의 사이즈가 상기 메모리 보안회로에 의해 지원되는 최소의 부 카운터 사이즈의 2배보다 크게 되는 분할 카운터 노드들에 대해, 상기 메모리 보안회로는 대응하는 분할-카운터 노드들을 적어도 2개의 미러 카운터 무결성 트리들에 할당하도록 구성된 장치.
According to claim 1,
For split counter nodes in which the size of the sub-counters is greater than twice the minimum sub-count size supported by the memory security circuit, the memory security circuit sets the corresponding split-counter nodes to at least two mirror counter integrity trees. Device configured to assign to a field.
제 1항에 있어서,
상기 적어도 한 개의 미러 카운터 무결성 트리에 대해 메모리 공간이 아직 할당되지 않았을 때 상기 사이즈 증가 트리거 이벤트에 응답하여, 상기 메모리 보안회로는 상기 적어도 한 개의 미러 카운터 무결성 트리에 대한 메모리 공간을 할당하도록 구성된 장치.
According to claim 1,
And in response to the size increase trigger event when memory space has not yet been allocated for the at least one mirror counter integrity tree, the memory security circuitry is configured to allocate memory space for the at least one mirror counter integrity tree.
제 1항에 있어서,
각각의 미러 카운터 무결성 트리에 대해, 상기 메모리 보안회로는 상기 주 카운터 무결성 트리에 대해 할당된 메모리 공간의 양과 동일한 양의 메모리 공간을 할당하도록 구성된 장치.
According to claim 1,
For each mirror counter integrity tree, the memory security circuit is configured to allocate an amount of memory space equal to the amount of memory space allocated for the main counter integrity tree.
제 1항에 있어서,
특정한 미러 카운터 무결성 트리의 대응하는 분할-카운터 노드의 어드레스와 상기 특정한 미러 카운터 무결성 트리의 기준 어드레스 사이의 제1 오프셋은 상기 주 카운터 무결성 트리의 상기 특정한 분할-카운터 노드의 어드레스와 상기 주 카운터 무결성 트리의 기준 어드레스 사이의 제2 오프셋과 같은 장치.
According to claim 1,
The first offset between the address of the corresponding split-counter node of a particular mirror counter integrity tree and the reference address of the particular mirror counter integrity tree is the address of the particular split-counter node of the primary counter integrity tree and the primary counter integrity tree. The second offset between the reference addresses of the device.
제 1항에 있어서,
상기 사이즈 증가 트리거 이벤트는,
상기 특정한 분할-카운터 노드의 부 카운터들 중에서 한 개의 부 카운터 오버플로우와,
소정의 조건을 만족하는 상기 특정한 분할-카운터 노드의 부 카운터들의 오버플로우들의 레이트(rate)와,
임계값을 초과하는 상기 특정한 분할-카운터 노드와 관련된 데이터 블록들에 대한 인증 코드 재계산 또는 데이터 재암호화 이벤트들의 레이트
중에서 적어도 한 개를 포함하는 장치.
According to claim 1,
The size increase trigger event,
One of the sub-counter overflows of the specific split-counter node, and
A rate of overflows of sub-counters of the specific split-counter node satisfying a predetermined condition,
The rate of authentication code recalculation or data re-encryption events for data blocks associated with the particular split-counter node above a threshold.
Device comprising at least one of.
제 1항에 있어서,
상기 사이즈 증가 트리거 이벤트는, 보호 영역의 관련된 서브셋과 관련된 메모리 트래픽의 레벨이 임계값보다 큰 것을 검출하는 것을 포함하고, 상기 보호 영역의 상기 관련된 서브셋은, 상기 관련된 서브셋 내부의 임의의 타겟 블록의 무결성 검증이 상기 특정한 분할-카운터 노드에 의존하는 상기 보호 영역의 일부를 포함하는 장치.
According to claim 1,
The size increase trigger event includes detecting that a level of memory traffic associated with an associated subset of the protected area is greater than a threshold, and the associated subset of the protected area includes integrity of any target block within the associated subset A device that includes a portion of the protected area whose verification depends on the particular split-counter node.
제 1항에 있어서,
제2 메모리를 구비하고,
상기 메모리 보안회로는,
상기 주 카운터 무결성 트리의 루트 노드, 또는
상기 보호 메모리 영역에 기억된 상기 주 카운터 무결성 트리의 상기 루트 노드의 무결성을 검증하기 위한 정보를
지정하는 루트 검증 데이터를 상기 제2 메모리에 기억하도록 구성된 장치.
According to claim 1,
A second memory,
The memory security circuit,
The root node of the main counter integrity tree, or
Information for verifying the integrity of the root node of the main counter integrity tree stored in the protected memory area
And a device configured to store the designated route verification data in the second memory.
제 10항에 있어서,
상기 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 메모리 보안회로는 1회 이상의 검증 검사들을 행하여 상기 타겟 카운터와 상기 루트 노드를 포함하는 상기 주 카운터 무결성 트리의 분기 상의 카운터들의 무결성을 검증하도록 구성되고, 상기 검증 검사들 중에서 적어도 한 개는 상기 제2 메모리에 기억된 상기 루트 검증 데이터에 의존하는 장치.
The method of claim 10,
In response to access to the target data block, the memory security circuit is configured to perform one or more verification checks to verify the integrity of the counters on the branch of the main counter integrity tree including the target counter and the root node, At least one of the verification checks depends on the route verification data stored in the second memory.
제 1항에 있어서,
상기 주 카운터 무결성 트리의 특정한 노드를 액세스할 때, 상기 메모리 보안회로는, 상기 주 카운터 무결성 트리의 상기 특정한 노드를 이용하기 전에, 상기 주 카운터 무결성 트리의 상기 특정한 노드와 관련된 부 카운터 사이즈를 예측하도록 구성된 장치.
According to claim 1,
When accessing a particular node of the primary counter integrity tree, the memory security circuitry predicts a sub counter size associated with the particular node of the primary counter integrity tree before using the particular node of the primary counter integrity tree. Configured device.
제 12항에 있어서,
상기 메모리 보안회로는, 예측된 상기 부 카운터 사이즈에 따라 미러 카운터 무결성 트리의 대응하는 노드를 액세스하는 요구를 기동할 것인지 여부를 판정하도록 구성된 장치.
The method of claim 12,
And the memory security circuit is configured to determine whether to initiate a request to access a corresponding node of the mirror counter integrity tree according to the predicted sub counter size.
제 1항에 있어서,
상기 타겟 데이터 블록에 대한 상기 타겟 카운터가 상기 주 카운터 무결성 트리의 분할-카운터 노드에 의해 지정될 때 상기 보호 메모리 영역의 상기 타겟 데이터 블록의 갱신에 응답하여, 상기 메모리 보안회로는, 상기 타겟 카운터에 대응하는 부 카운트 값을 갱신하고, 상기 타겟 데이터 블록의 갱신된 데이터, 상기 타겟 카운터에 대응하는 해당하는 주 카운트 값과, 상기 타겟 카운터에 대응하는 갱신된 부 카운트 값에 근거하여 상기 타겟 데이터 블록과 관련된 상기 기억된 인증 코드를 재계산하도록 구성된 장치.
According to claim 1,
In response to the update of the target data block in the protected memory area when the target counter for the target data block is designated by the split-counter node of the primary counter integrity tree, the memory security circuit may Update the corresponding sub count value, and the target data block based on the updated data of the target data block, the corresponding main count value corresponding to the target counter, and the updated sub count value corresponding to the target counter. And a device configured to recalculate the associated stored authentication code.
제 1항에 있어서,
상기 주 카운터 무결성 트리는 서로 다른 애리티를 갖는 적어도 2개의 노드를 포함하는 장치.
According to claim 1,
The main counter integrity tree comprises at least two nodes with different traits.
제 1항에 있어서,
상기 주 카운터 무결성 트리의 적어도 한 개의 노드는 2의 정확한 거듭제곱 이외의 데이터 블록들의 수에 대해 카운터들을 지정하는 장치.
According to claim 1,
And at least one node of the main counter integrity tree specifies counters for the number of data blocks other than the exact power of two.
제 1항에 있어서,
상기 메모리 보안회로는, 상기 타겟 데이터 블록과 동일한 캐시 라인으로부터 상기 타겟 데이터 블록에 대한 상기 기억된 인증 코드를 판독하도록 구성된 장치.
According to claim 1,
And the memory security circuit is configured to read the stored authentication code for the target data block from the same cache line as the target data block.
제 1항에 있어서,
상기 메모리 액세스회로는, 상기 주 카운터 무결성 트리에 무관한 메모리의 비보호 메모리 영역에 대한 액세스를 제어하도록 구성된 장치.
According to claim 1,
And the memory access circuit is configured to control access to an unprotected memory area of memory independent of the main counter integrity tree.
메모리의 보호 메모리 영역에 기억된 데이터에 대한 액세스를 제어하는 방법으로서,
상기 보호 메모리 영역의 각각의 데이터 블록들과 관련된 복수의 카운터들을 각각 지정하고, 카운터들 중에서 적어도 한 개가 주 카운터 무결성 트리의 추가적인 카운터들을 제공하는 자식 노드를 기억하는 데이터 블록과 관련되는 적어도 한 개의 부모 노드와, 카운터들 중에서 적어도 한 개가 상기 주 카운터 무결성 트리 이외의 데이터를 기억하는 데이터 블록과 관련되는 적어도 한 개의 리프 노드를 포함하는 복수의 노드들을 포함하는 상기 주 카운터 무결성 트리를 유지하는 단계와,
상기 보호 메모리 영역의 타겟 데이터 블록에 대한 액세스에 응답하여, 상기 타겟 데이터 블록과 관련된 기억된 인증 코드를, 상기 타겟 데이터 블록과 상기 타겟 데이터 블록과 관련되는 상기 주 카운터 무결성 트리의 타겟 카운터에 근거하여 발생된 산출된 인증 코드와 비교함으로써 상기 타겟 데이터 블록의 무결성을 검증하는 단계를 포함하고,
상기 주 카운터 무결성 트리의 노드들 중에서 적어도 한 개는, 적어도 2개의 카운터들 사이에서 공유되는 주 카운트 값과 적어도 2개의 카운터들 각각에 대해 별개로 지정된 각각의 부 카운트 값의 조합으로서 각각 정의되는 적어도 2개의 카운터들을 지정하는 분할-카운터 노드를 포함하고,
상기 제어방법은,
상기 주 카운터 무결성 트리의 특정한 분할-카운터 노드와 관련된 사이즈 증가 트리거 이벤트에 응답하여, 상기 특정한 분할-카운터 노드의 부 카운터들의 사이즈를 증가시키고, 상기 특정한 분할-카운터 노드의 부 카운터들의 서브셋을 적어도 한 개의 미러 카운터 무결성 트리의 대응하는 분할-카운터 노드에 할당하는 단계를 더 포함하는 제어방법.
A method of controlling access to data stored in a protected memory area of a memory,
At least one parent associated with a data block that respectively specifies a plurality of counters associated with each data block in the protected memory area, and at least one of the counters stores a child node that provides additional counters in the main counter integrity tree. Maintaining the main counter integrity tree comprising a node and a plurality of nodes including at least one leaf node associated with a data block in which at least one of the counters stores data other than the main counter integrity tree,
In response to access to the target data block of the protected memory area, the stored authentication code associated with the target data block is based on the target counter of the target data block and the primary counter integrity tree associated with the target data block. And verifying the integrity of the target data block by comparing it with the generated authentication code,
At least one of the nodes of the main counter integrity tree is defined as a combination of a main count value shared between at least two counters and a respective sub count value designated separately for each of the at least two counters. Includes a split-counter node that specifies two counters,
The control method,
In response to a size increase trigger event associated with a particular split-counter node of the primary counter integrity tree, increase the size of the sub-counters of the particular split-counter node, and at least a subset of the sub-counters of the specific split-counter node. And assigning to the corresponding split-counter nodes of the two mirror counter integrity trees.
청구항 19에 기재된 방법을 행하도록 데이터 처리장치를 제어하는 컴퓨터 프로그램을 기억하는 비일시적인 기억매체.A non-transitory storage medium storing a computer program that controls the data processing apparatus to perform the method according to claim 19.
KR1020207004945A 2017-08-03 2018-07-25 Counter Integrity Tree for Memory Security KR102532395B1 (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
US15/668,322 2017-08-03
US15/668,322 US10540297B2 (en) 2017-08-03 2017-08-03 Memory organization for security and reliability
US15/892,770 2018-02-09
US15/892,770 US10733313B2 (en) 2018-02-09 2018-02-09 Counter integrity tree for memory security
PCT/GB2018/052094 WO2019025762A1 (en) 2017-08-03 2018-07-25 Counter integrity tree for memory security

Publications (2)

Publication Number Publication Date
KR20200031671A true KR20200031671A (en) 2020-03-24
KR102532395B1 KR102532395B1 (en) 2023-05-15

Family

ID=63143270

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020207004945A KR102532395B1 (en) 2017-08-03 2018-07-25 Counter Integrity Tree for Memory Security

Country Status (6)

Country Link
EP (1) EP3662404B1 (en)
JP (1) JP7096323B2 (en)
KR (1) KR102532395B1 (en)
CN (1) CN110945509B (en)
IL (1) IL271729B2 (en)
WO (1) WO2019025762A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321715A (en) * 2019-07-08 2019-10-11 北京可信华泰信息技术有限公司 Credible measurement method, apparatus and processor
GB2596585B (en) * 2020-07-03 2022-09-07 Advanced Risc Mach Ltd Integrity tree for memory security
WO2022006880A1 (en) * 2020-07-10 2022-01-13 华为技术有限公司 Data processing method and device, and storage medium
CN116171443A (en) * 2020-09-30 2023-05-26 华为技术有限公司 Resource allocation device, device and storage medium
US20220198283A1 (en) * 2020-12-22 2022-06-23 Paypal, Inc. Dynamic reconstruction of decision tree structures
CN112651054B (en) * 2020-12-30 2022-10-14 海光信息技术股份有限公司 Memory data integrity protection method and device and electronic equipment
CN112597488B (en) * 2020-12-30 2022-12-06 海光信息技术股份有限公司 Page table integrity protection method, device and equipment
CN113553126B (en) * 2021-07-06 2024-03-22 网易(杭州)网络有限公司 Data processing method and device
CN113486399B (en) * 2021-07-14 2023-03-24 上海瓶钵信息科技有限公司 Data storage method and system based on RISC-V architecture
GB2622066A (en) * 2022-09-01 2024-03-06 Advanced Risc Mach Ltd Counter tree
GB2622065A (en) * 2022-09-01 2024-03-06 Advanced Risc Mach Ltd Counter integrity tree

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019551A1 (en) * 2007-06-25 2009-01-15 Tomoyuki Haga Information security device and counter control method
US20100212017A1 (en) * 2009-02-18 2010-08-19 International Business Machines Corporation System and method for efficient trust preservation in data stores
US20150317256A1 (en) * 2009-06-26 2015-11-05 International Business Machines Corporation Secure object having protected region, integrity tree, and unprotected region
WO2017058408A2 (en) * 2015-09-25 2017-04-06 Intel Corporation Protect non-memory encryption engine (non-mee) metadata in trusted execution environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2543215A2 (en) * 2010-03-05 2013-01-09 InterDigital Patent Holdings, Inc. Method and apparatus for providing security to devices
CN105515776A (en) * 2010-03-05 2016-04-20 交互数字专利控股公司 Method and apparatus for providing security to devices
JP5159849B2 (en) 2010-09-24 2013-03-13 株式会社東芝 Memory management device and memory management method
ES2647115T3 (en) 2014-06-12 2017-12-19 Nagravision S.A. System and method for secure data loading in a cache
CN105069379B (en) * 2015-07-29 2017-11-21 哈尔滨工程大学 It is a kind of based on the memory integrity protection method for writing counter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019551A1 (en) * 2007-06-25 2009-01-15 Tomoyuki Haga Information security device and counter control method
US20100212017A1 (en) * 2009-02-18 2010-08-19 International Business Machines Corporation System and method for efficient trust preservation in data stores
US20150317256A1 (en) * 2009-06-26 2015-11-05 International Business Machines Corporation Secure object having protected region, integrity tree, and unprotected region
WO2017058408A2 (en) * 2015-09-25 2017-04-06 Intel Corporation Protect non-memory encryption engine (non-mee) metadata in trusted execution environment

Also Published As

Publication number Publication date
JP2020529657A (en) 2020-10-08
IL271729B1 (en) 2023-04-01
EP3662404B1 (en) 2021-09-01
IL271729A (en) 2020-02-27
CN110945509B (en) 2023-08-11
KR102532395B1 (en) 2023-05-15
JP7096323B2 (en) 2022-07-05
CN110945509A (en) 2020-03-31
IL271729B2 (en) 2023-08-01
WO2019025762A1 (en) 2019-02-07
EP3662404A1 (en) 2020-06-10

Similar Documents

Publication Publication Date Title
KR102532395B1 (en) Counter Integrity Tree for Memory Security
US10733313B2 (en) Counter integrity tree for memory security
US11163911B2 (en) Secure public cloud with protected guest-verified host control
US11520611B2 (en) Secure public cloud using extended paging and memory integrity
US11989332B2 (en) Secure public cloud with protected guest-verified host control
US20210004483A1 (en) Secure Public Cloud
KR20200051694A (en) Call path dependent authentication
JP4876053B2 (en) Trusted device integrated circuit
US11775177B2 (en) Integrity tree for memory integrity checking
CN110825672A (en) High performance autonomous hardware engine for online cryptographic processing
US20230259660A1 (en) Integrity tree for memory security
KR102365263B1 (en) Efficient Encryption Method and Apparatus for Hardware-based Secure GPU Memory
US11281434B2 (en) Apparatus and method for maintaining a counter value
WO2016053407A2 (en) Speculative cryptographic processing for out of order data
US20240080193A1 (en) Counter integrity tree

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant