DRAM, used as a main memory in various modern systems such as mobile, server, IOT, personal computer, systems, consumes a large amount of energy. DRAM is built with a unique cell process to lower the cost per unit capacity and thus is made of a separate chip from the processor. The off-chip interface consumes a lot of energy and power during data transfer because of its large capacitance and its termination to prevent data distortion. As DRAM data rates increase and the use of data-centric applications (i.e., graphics, neural networks) grows, DRAM interfaces are expected to consume more energy in the future.
Therefore, to meet the trend of modern computing systems requiring low energy consumption, there needs a way to reduce the energy consumed in the DRAM interface.
This thesis deals with two topics related to DRAM interface energy reduction. The first theme is to reduce the energy at the DRAM interface by utilizing the characteristics of the data transferred between the processor and the DRAM. The second theme is a defense mechanism that protects the DRAM from physical attacks with negligible energy consumption at the DRAM interface. A more detailed description of each topic follows.
1. Coding Method Exploiting a Characteristic of Data:
To reduce the energy consumed by the off-chip interface, the industry is striving to lower the interface voltage. However, since the interface voltage is already quite small (LPDDR4: 1.1 V), it is difficult to reduce energy by lowering the interface voltage further. Therefore, this paper discusses ways to reduce the energy consumed by DRAM interfaces in different directions from the industry. A key observation of this paper is that the energy consumption of modern DRAM interfaces is not always constant and depends on the data being transmitted. Based on this observation, this paper proposes to transmit optimized data patterns through the DRAM interface regarding energy consumption.
Modern DRAM interfaces introduce asymmetric termination to reduce power consumption. In the conventional termination, a termination resistor is connected between the data bus and VDD, and between the data bus and VSS, so that a current path is formed between VDD and VSS to consume energy regardless of data.
In the asymmetric termination, however, energy consumption is determined by whether the transmitted data is 0 or 1. Specifically, a termination scheme called 'Pseudo Open Drain' applied to DDR4 and GDDR 4/5 has a termination resistor only between a data bus and VDD, so that a current path is formed (consuming energy) only when 0 is transmitted. The termination scheme called 'Low Voltage Swing Terminated Logic' applied to LPDDR4 has a termination resistor only between a data bus and VSS, and a current path is formed (consuming energy) only when 1 is transmitted. Under this asymmetric termination environment, energy consumption is minimized when the distribution of data is biased to one of zero or one. Based on this observation, this paper discusses ways to reduce interface energy in two ways as follow.
As a result of observing the data transmitted through the DRAM data bus, it was confirmed that similar data patterns are repeatedly transmitted. This paper proposes a method to reduce the energy consumed in the DRAM interface by biasing the distribution of data to zero by utilizing the similarity of these data.
Specifically, the encoding scheme called Bitwise Difference Encoding (BD-encoding) proposed in this paper transmits the bitwise difference (XOR operation result) between the data to be transmitted and the recently transmitted data (most similar to the data to be transmitted). The more similar the data that is currently transmitted and the data that is recently transmitted, the more biased the distribution of the data, so that a small amount of energy is consumed at the interface.
In this paper, we propose to insert encoder and decoder on both sides of memory controller and DRAM.
The proposed encoder/decoder module includes a data table and stores data recently transmitted through an interface. At the time of data transmission, the transmitter first finds the data most similar to the data to be transmitted in the table, and then simultaneously transmits the encoded data and the index of the table. The receiver reads the data stored in the data table indicated by the received table index and decodes the data through the bitwise XOR operation.
2. DRAM Physical Defense Mechanism with Negligible Interface Energy: Cold Boot Attack is an attack method that utilizes DRAM remanence feature that data stored in DRAM does not disappear even after power is turned off at low temperature. In detail, during the cold boot attack, the attacker freezes the DRAM module, 2) detaches the module from the system, 3) moves the DRAM module to its own system, and 4) reads the information stored in the DRAM. In this way, the attacker steals the security keys stored in the DRAM, recent e-mails, photos, and visited web sites.
Memory data encryption is a typical method for completely protecting information stored in the DRAM from a cold boot attack. In this method, the memory controller stores the encrypted information in the DRAM and decrypts it when reading the data. Therefore, even though an attacker steals data stored in DRAM through a cold boot attack, he cannot get the meaningful information because he cannot decrypt it. However, this method must generate a security key through the cipher engine whenever data is written to or read from the DRAM. Complicated security key generation process (cipher engines) consumes a lot of energy. Therefore, the memory data encryption method greatly increases the DRAM data transmission energy.
In this paper, we propose a method to protect the data stored in DRAM itself from a cold boot attack without using data encryption, and thus, which protects the DRAM without consuming large interface energy. The Amnesiac DRAM proposed in this paper is a DRAM architecture which embeds a security function to prevent a cold boot attack. Amnesiac DRAM provides a countermeasure based on the observation that Cold Boot Attack requires the process of discharging the power in the DRAM module (at the time of module detachment) and re-supplying it (when connecting to another computer). Specifically, the Amnesiac DRAM blocks external access to the DRAM when power is supplied and erases all data stored in the DRAM.
Amnesiac DRAM does not leak information stored in DRAM to the attacker because it allows user access after deleting all the data. Amnesiac DRAM is much more economical than the prior approaches because it has no penalty beyond the data initialization time and can easily be implemented in existing DRAMs.
현대의 모바일, 서버, IOT, 개인용 컴퓨터 등의 시스템에서 메인 메모리로 사용되고 있는 DRAM은 시스템 내에서 큰 비중의 에너지를 소모하고 있다. DRAM은 단위 용량 당 가격을 낮추기 위해서 독특한 셀 공정을 통해 제작되고, 따라서 시스템의 두뇌 역할을 하는 프로세서와 별개의 칩으로 제작된다. DRAM과 프로세서 사이의 데이터를 전달을 담당하는 오프 칩 인터페이스는 정전용량이 크고, 데이터 왜곡을 방지할 목적으로 터미네이션이 부착되어 있기 때문에, 많은 에너지 및 파워를 소비한다. DRAM의 데이터 전송 속도가 높아지고, 데이터 중심의 어플리케이션 (i.e., 그래픽 어플리케이션, 뉴럴 네트워크)들이 늘어남에 따라 DRAM 인터페이스는 앞으로 더욱 많은 에너지를 소모할 것으로 예상된다. 따라서, 낮은 에너지 소모를 요구하는 최신 컴퓨팅 시스템의 경향을 만족시키기 위해서, DRAM 인터페이스에서 소모되는 에너지를 줄일 방법이 필요하다.
본 학위논문에서는 DRAM 인터페이스 에너지 감소와 관련된 두 가지 주제를 다룬다. 첫 번째 주제는 프로세서와 DRAM 사이에 전송되는 데이터의 특징을 활용하여 DRAM 인터페이스에서의 에너지를 감소시키는 것이다. 두 번째 주제는 DRAM 인터페이스에서의 추가적인 에너지를 거의 소모하지 않고 DRAM을 물리적인 공격으로부터 지켜내는 방어 메카니즘이다.
각각의 주제에 대한 보다 자세한 설명은 아래와 같다.
1. 데이터의 특징을 활용한 인터페이스 에너지 감소: DRAM 인터페이스에서 소모하는 에너지를 줄이기 위해 산업계는 인터페이스 전압을 낮추는 노력을 꾸준히 하고 있다. 하지만 인터페이스 전압은 이미 많이 낮아져 있기 때문에 (LPDDR4: 1.1 V) 이를 더 낮추어 에너지를 감소시키는 일은 쉽지 않다. 그러므로, 본 논문은 산업계와 다른 방향으로 DRAM 인터페이스에서 소모되는 에너지를 줄이는 방법에 대해 논의한다. 본 논문 전반에 걸친 핵심적인 관찰은 최신 DRAM 인터페이스에서의 에너지 소모는 항상 일정한 것이 아니고, 전송되는 데이터에 따라 달라진다는 것이다. 이 관찰을 바탕으로 본 논문은 에너지 소모의 관점에서 최적화된 데이터 패턴을 DRAM 인터페이스를 통해 전송하는 것을 제안한다.
최신 DRAM 인터페이스는 터미네이션에서 소모되는 에너지를 줄이기 위해서 비대칭 터미네이션을 도입하였다. 기존의 터미네이션은 데이터 버스와 VDD, 그리고 데이터 버스와 VSS 사이에 터미네이션 저항이 연결되어 있어, 데이터의 종류에 관계 없이 VDD와 VSS 사이에 전류패스가 형성되어 에너지가 소모되었다. 하지만 비대칭 터미네이션은 전송되는 데이터가 0인지 1인지에 따라 에너지 소모가 결정된다. 구체적으로, DDR4 및 GDDR 4/5에 적용된 Pseudo Open Drain이라고 불리우는 터미네이션 방식은 데이터 버스와 VDD 사이만 터미네이션 저항이 존재하여, 0을 전송할 때만 전류패스가 형성되어 에너지가 소모된다. LPDDR4에 적용된 Low Voltage Swing Terminated Logic이라는 터미네이션 방식은 데이터 버스와 VSS 사이에만 터미네이션 저항이 존재하고, 1을 전송할 때만 전류패스가 형성되어 에너지가 소모된다. 이런 비대칭 터미네이션 환경 아래에서는 데이터의 분포가 0 또는 1 중 하나로 편중되어 있는 경우에 에너지 소모가 최소화된다.
우리는 DRAM 데이터 버스를 통해 전송되는 데이터들을 관찰한 결과, 유사한 데이터 패턴들이 반복적으로 전송됨을 확인할 수 있었다. 본 논문에서는 이런 데이터들의 유사성을 활용하여, 데이터의 분포를 0으로 편중시켜 인터페이스에서 소모되는 에너지를 줄이는 방법을 제안한다. 구체적으로, 본 논문에서 제안된 Bitwise Difference Encoding (BD-encoding)이라는 인코딩 방식은 원래 전송될 데이터 대신, 전송될 데이터와 최근 전송된 데이터 중 가장 유사한 데이터와의 bitwise 차이 (XOR 연산 결과)를 전송한다. 현재 전송될 데이터와 최근 전송된 데이터가 유사할수록 데이터의 분포가 0으로 편중되며, 따라서 작은 에너지가 인터페이스에서 소모된다. 이를 위해 본 논문에서는 메모리 컨트롤러와 DRAM 양 측에 부호기/복호기 모듈을 삽입할 것을 제안한다. 제안된 부호기/복호기 모듈은 데이터 테이블을 포함하고 있어, 최근에 인터페이스를 통해 전송된 데이터들을 저장한다. 데이터 전송 시, 전송기는 먼저 테이블에서 전송될 데이터와 가장 유사한 데이터를 찾은 후, 부호화된 데이터와 테이블의 인덱스를 동시에 전송한다. 수신기는 수신된 테이블 인덱스가 가리키는 데이터 테이블에 저장된 데이터를 읽은 후, bitwise XOR 연산을 통해 원래 전송되어야 할 데이터를 복호한다.
2. 인터페이스 에너지 소모가 적은 DRAM의 물리적인 방어수단: 콜드 부트 어택은 낮은 온도에서는 전원이 꺼진 이후에도 DRAM에 저장된 데이터가 사라지지 않는다는 DRAM remanence 특징을 활용한 공격 방법이다. 자세히 말하면, 콜드 부트 어택 동안 공격자는 1) DRAM 모듈을 얼리고, 2) 모듈을 system으로부터 분리한 후, 3) 자신의 시스템으로 DRAM 모듈을 옮기고, 4) DRAM에 저장되어 있는 정보를 열람한다. 이 방법을 통해 공격자는 DRAM에 저장되어 있는 보안 키, 최근에 송수신된 이메일, 사진들, 웹사이트 방문 기록 등을 훔쳐간다.
콜드부트 어택으로부터 DRAM에 저장된 정보를 완전히 보호할 수 있는 방법으로는 메모리 데이터 암호화가 대표적이다. 이 방법은 메모리 컨트롤러가 DRAM에 암호화된 정보를 저장하고, 정보를 읽을 때 복호화한다. 따라서 공격자가 콜드 부트 어택을 통해 DRAM에 저장된 데이터를 훔쳐가도 이를 해독하지 못하기 때문에 열람할 수 없다. 하지만 이 방법은 DRAM에 데이터를 쓰거나 읽을 때마다 암호화 엔진을 통해 보안 키를 생성하여야 한다. 복잡한 보안 키 생성과정은 많은 에너지가 소모된다. 따라서 메모리 데이터 암호화 방법은 DRAM 데이터 전송 에너지를 크게 증가시킨다.
본 논문에서는 데이터 암호화를 사용하지 않고 DRAM 스스로가 저장된 데이터를 보안 공격으로부터 지키는 방법을 제시함으로, 커다란 인터페이스 에너지 소모없이 DRAM을 보호할 수 있는 수단을 마련하려 한다. 본 논문에서 제안된 Amnesiac DRAM은 콜드 부트 어택을 막기 위해 DRAM 내부에 보안 기능을 삽입한 DRAM 아키텍처이다. Amnesiac DRAM은 콜드 부트 어택이 DRAM 모듈 내의 파워를 방전시켰다가 (모듈 분리 시) 다시 공급하는 과정 (다른 컴퓨터에 연결 시)을 반드시 필요로 한다는 관찰을 바탕으로 방어 수단을 마련한다. 구체적으로, Amnesiac DRAM은 파워가 공급될 때, DRAM에 대한 외부 접근을 차단시키고 DRAM 내부에 저장된 모든 데이터들을 삭제한다. 모든 데이터를 삭제한 후 사용자 접근을 허락하기 때문에 Amnesiac DRAM은 공격자에게 DRAM 내부에 저장된 정보를 누출시키지 않는다. Amnesiac DRAM은 데이터 초기화 시간 이외에는 어떤 패널티도 없고, 기존의 DRAM에 쉽게 구현할 수 있기 때문에, 이전에 제시된 콜드 부트 어택에 대한 해결책에 대비해 인터페이스 에너지를 크게 감소시킬 수 있다.