KR102766152B1 - Apparatus and Method for Disk Encryption - Google Patents
Apparatus and Method for Disk Encryption Download PDFInfo
- Publication number
- KR102766152B1 KR102766152B1 KR1020230150661A KR20230150661A KR102766152B1 KR 102766152 B1 KR102766152 B1 KR 102766152B1 KR 1020230150661 A KR1020230150661 A KR 1020230150661A KR 20230150661 A KR20230150661 A KR 20230150661A KR 102766152 B1 KR102766152 B1 KR 102766152B1
- Authority
- KR
- South Korea
- Prior art keywords
- encryption
- metadata
- value
- data
- disk
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
Abstract
디스크 암호화 장치 및 방법이 개시된다. 본 발명의 실시예에 따른 디스크 암호화 장치는, 적어도 하나의 프로그램이 기록된 메모리, 및 프로그램을 실행하는 프로세서를 포함하며, 프로그램은, 키 관리 장치와 통신하여 적어도 하나의 암호화 대상 각각의 암호화에 필요한 암호화 키를 수신하고, 수신된 암호화 키를 이용하여 암호화 대상의 데이터를 암호화하되, 사용자로부터의 요청에 따라 암호화 대상으로 입력되는 데이터를 암호화하여 쓰기하거나, 암호화 대상으로부터 데이터를 읽어들여 복호화한 후 사용자에게 출력하는, 암호화 대상은, 암호화된 데이터가 기록되는 데이터 섹터 및 암호화 키 관련 정보인 메타데이터를 기록하는 메타데이터 섹터를 포함하되, 메타데이터는, 최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과, 직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함할 수 있다. A disk encryption device and method are disclosed. A disk encryption device according to an embodiment of the present invention includes a memory having at least one program recorded therein, and a processor executing the program, wherein the program communicates with a key management device to receive an encryption key necessary for encryption of each of at least one encryption target, and encrypts data of the encryption target using the received encryption key, and encrypts and writes data input to the encryption target according to a request from a user, or reads data from the encryption target, decrypts it, and outputs it to the user, wherein the encryption target includes a data sector in which encrypted data is recorded and a metadata sector in which metadata, which is information related to an encryption key, is recorded, and the metadata may include a first value, which is information related to an encryption key used when the most recent write is performed, and a second value, which is information related to an encryption key used when the immediately preceding write is performed.
Description
기재된 실시예는 전체 디스크 암호화(Full Disk Encryption, FDE) 서비스를 중단하지 않고 디스크 암호화 키를 효율적으로 변경할 수 있는 기술에 대한 것이다.The described embodiments relate to techniques for efficiently changing disk encryption keys without interrupting a full disk encryption (FDE) service.
전체 디스크 암호화(Full Disk Encryption)는 흔히 디스크 암호화로 줄여 말하는 기술이며, 파일이나 객체 단위가 아닌 디스크 전체를 암호화하는 기술이다.Full Disk Encryption is a technology often abbreviated as disk encryption, and is a technology that encrypts the entire disk, not individual files or objects.
이 암호화는 일반적으로 디스크 내의 파일 시스템과 파티션(또는 물리 디스크) 사이에 위치하며, 물리 장치에는 데이터를 암호화된 상태로 보관하지만, 사용자는 마치 암호화되지 않은 평문에 직접 접근하는 것처럼 활용할 수 있도록 해준다.This encryption typically sits between the file system and the partition (or physical disk) within the disk, allowing data to be stored encrypted on the physical device but accessed by the user as if it were in plaintext.
일반적으로 디스크 암호화는 하나의 키로 파티션을 섹터 단위(일반적으로 512Byte 또는 4KB)로 암호화 및 복호화한다. Typically, disk encryption encrypts and decrypts a partition sector by sector (typically 512 bytes or 4 KB) with a single key.
이때, 이 암호화에 사용되는 키는 일반적으로 대칭 키 암호화 키이며, 이것이 공격자에게 노출되면 공격자가 디스크 내부의 모든 데이터를 복호화 할 수 있어 안전하게 보관하는 것이 중요하다. 현재 대부분의 디스크 암호화는 암호화 키를 키 관리 서버(Key Management Server, KMS), 신뢰할 수 있는 플랫폼 모듈(Trusted Platform Module, TPM) 등에 보관하거나 비밀번호로부터 유도하여 사용한다.At this time, the key used for this encryption is usually a symmetric key encryption key, and if this is exposed to an attacker, the attacker can decrypt all data inside the disk, so it is important to store it safely. Currently, most disk encryptions store the encryption key in a key management server (KMS), a trusted platform module (TPM), etc., or use it by deriving it from a password.
디스크 암호화는 개인이 소유한 장치에 저장된 데이터를 보호하는 용도로 주로 사용됐다. 그러나 최근에는 원격 클라우드 저장소에 데이터를 저장하려 할 때 제삼자에게 평문이 노출되지 않도록 원격 디스크에 데이터를 암호화하여 저장하는 용도로 사용하는 경우도 늘어나고 있다. 파일 단위로 암호화하는 방식이 효율적일 때도 있지만, 접근 관련 메타데이터나 파일 단위로 처리하기 어려운 로그/DBMS 등을 암호화할 때는 전체 디스크 암호화를 사용하는 것이 효율적일 수 있다.Disk encryption was mainly used to protect data stored on devices owned by individuals. However, recently, it is also increasingly used to encrypt and store data on remote disks to prevent plaintext from being exposed to third parties when storing data in remote cloud storage. Encrypting on a file-by-file basis can be efficient, but when encrypting access-related metadata or logs/DBMS that are difficult to process on a file-by-file basis, it may be more efficient to use full disk encryption.
일반적으로 클라우드 환경에서는 클라우드 서비스 제공자(Cloud Service Provider, CSP)를 전적으로 신뢰할 수 있다고 가정한다. 하지만 현실적으로는 클라우드 서비스 제공자가 사용자에게 서비스를 제공하여 얻을 수 있는 것보다 사용자의 데이터를 탈취하여 얻을 수 있는 이익이 더 클 수 있으므로, 사용자는 클라우드 서비스 제공자가 부분적인 신뢰만을 제공한다고 가정하여야 한다. 부분적인 신뢰만 주어지는 환경에서는 성능 저하, 전원 차단 등 가상화 환경 내에서 변화를 인식할 수 있는 동작 제어(CPU/메모리 등)를 통한 공격을 수행하지 않고, 저장 장치와 네트워크 등과 같이 일반적인 환경에서도 성능의 편차가 발생하는 대상에만 공격을 수행한다고 가정한다.In general, in a cloud environment, it is assumed that the Cloud Service Provider (CSP) can be completely trusted. However, in reality, since the cloud service provider can gain more profit by stealing the user's data than by providing the service to the user, the user should assume that the cloud service provider provides only partial trust. In an environment where only partial trust is given, it is assumed that attacks are not performed through behavior control (CPU/memory, etc.) that can recognize changes in the virtualized environment, such as performance degradation or power cuts, and that attacks are only performed on targets where performance deviations occur even in general environments, such as storage devices and networks.
이처럼 클라우드 컴퓨팅 노드의 가상 CPU/메모리는 안전하지만(단, 부 채널 공격 제외) 저장 장치는 안전하지 않을 수 있다고 가정하는 부분 신뢰 환경에서는 저장 장치의 데이터를 보호하기 위해서 디스크 암호화를 적용하고, 디스크 암호화에 사용한 키를 신뢰할 수 있는 별도의 장치에 저장하여 사용하는 모델을 구상할 수 있다. 이 모델에서는 클라우드 서비스 제공자 또는 외부의 공격자가 클라우드에 저장된 암호화된 섹터들을 모두 탈취하더라도 평문 데이터를 얻을 수 없다.In a partially trusted environment where it is assumed that the virtual CPU/memory of a cloud computing node is secure (except for side-channel attacks) but the storage device may not be secure, a model can be designed in which disk encryption is applied to protect the data in the storage device and the key used for disk encryption is stored and used in a separate, trusted device. In this model, even if the cloud service provider or an external attacker steals all the encrypted sectors stored in the cloud, they cannot obtain the plaintext data.
한편, 디스크 암호화에 주로 사용하는 대칭 키 암호 운영 모드인 XTS 모드는 IV를 재사용하면 안전성이 저하되므로, 하나의 키로 암호화할 수 있는 데이터의 양에 제한을 두고 있다. 또한, 하나의 키를 오랜 기간 사용하면, 공격자에게 키가 노출될 가능성이 늘어난다. 따라서 대용량의 디스크를 오랫동안 사용하여야 하는 서버 및 클라우드 운용 환경 등에서 디스크 암호화 서비스를 적용한다면 디스크 암호화 키를 변경할 수 있는 기능은 필수적이다.Meanwhile, XTS mode, a symmetric key encryption operation mode mainly used for disk encryption, places a limit on the amount of data that can be encrypted with a single key because security is reduced when IVs are reused. In addition, if a single key is used for a long period of time, the possibility of the key being exposed to an attacker increases. Therefore, if a disk encryption service is applied in a server or cloud operating environment that requires the use of a large disk for a long period of time, the ability to change the disk encryption key is essential.
일반적인 디스크 암호화 서비스는 암호화에 사용된 키를 변경하려고 할 때, 일시적으로 디스크 암호화 서비스를 중단하고, 디스크 전체를 기존 키로 복호화한 후에 신규 키로 재 암호화한다. When a typical disk encryption service attempts to change the key used for encryption, it temporarily suspends the disk encryption service, decrypts the entire disk with the old key, and then re-encrypts it with the new key.
이 과정에서 키를 변경하는 동안 사용자가 디스크에 접근할 수 없다는 문제가 발생한다. 그리고 디스크 암호화 서비스는 키 변경과정에서 아래 두 가지 중 하나의 방법으로 재 암호화를 수행한다. During this process, the problem arises that the user cannot access the disk while the key is being changed. And the disk encryption service performs re-encryption in one of the two ways below during the key change process.
첫째는 전체 디스크를 기존 키로 모두 복호화한 후 신규 키로 재 암호화하는 방법이다. 이 경우, 디스크의 용량이 크면, 메모리상에 평문을 모두 저장할 수 없으므로 평문을 탈취 위협이 있는 디스크에 기록할 수밖에 없으므로, 외부에서 평문에 접근할 기회를 얻게 되는 문제가 있다. The first method is to decrypt the entire disk with the existing key and then re-encrypt it with the new key. In this case, if the disk capacity is large, the plaintext cannot be stored in memory, so the plaintext must be written to the disk, which is vulnerable to theft, and there is a problem that an opportunity to access the plaintext is created from the outside.
둘째는 재 암호화한 데이터를 저장할 추가 저장 공간을 준비하고, 섹터별로 복호화한 후 재 암호화하여 추가 저장 공간에 저장하는 방법이다. 이 방법을 이용하면 평문을 디스크에 기록하지 않아 탈취 위협이 감소하지만, 암호화 대상 디스크의 용량만큼 추가 저장 공간이 필요하여, 재 암호화에 저장장치 증설에 따른 추가 비용이 발생하는 문제가 있다. The second is to prepare additional storage space to store the re-encrypted data, decrypt it sector by sector, re-encrypt it, and store it in the additional storage space. This method reduces the threat of theft because the plaintext is not written to the disk, but requires additional storage space equivalent to the capacity of the disk to be encrypted, so there is a problem that additional costs arise due to the increase in storage devices for re-encryption.
또한, 이들 디스크 암호화 서비스를 이용한 최종 서비스를 운영하고자 하는 서버 사용자는 디스크 암호화 서비스 중단 시에 자신의 서비스를 같이 중단하거나, 디스크 암호화 서비스가 중단되더라도 자신의 서비스가 중단되지 않도록 이중화와 같은 구조 보강이 필요하게 되는 문제가 더불어 발생한다.In addition, server users who wish to operate final services using these disk encryption services will face the problem of needing to either suspend their services when the disk encryption services are suspended, or reinforcing the structure, such as through duplication, to ensure that their services are not suspended even when the disk encryption services are suspended.
따라서, 이 문제를 효과적으로 해결하기 위해 디스크 암호화 서비스의 중단 없이 디스크 암호화 키를 즉시 변경할 수 있으면서, 평문을 디스크에 저장하지 않고, 대량의 추가적인 저장 공간을 요구하지 않는 방식이 필요하다.Therefore, to effectively solve this problem, a method is needed that can change disk encryption keys immediately without interrupting the disk encryption service, without storing plaintext on disk, and without requiring a large amount of additional storage space.
기재된 실시예는 부분 신뢰 환경에서 디스크 암호화 키의 동적 변경을 제공하는 안전하고 효율적인 디스크 암호화 방법을 제공하는 데 그 목적이 있다. The disclosed embodiments aim to provide a secure and efficient disk encryption method that provides dynamic changing of disk encryption keys in a partially trusted environment.
실시예에 따른 디스크 암호화 쓰기 방법은, 암호화 대상은 암호화된 데이터가 기록되는 데이터 섹터 및 암호화 키 관련 정보인 메타데이터를 기록하는 메타데이터 섹터를 포함하고, 메타데이터는, 최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과, 직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함하되, 암호화 대상의 메타데이터 섹터를 읽어들이는 단계, 읽어들인 메타데이터의 제1 값으로 제2 값을 대체하는 단계, 데이터를 암호화함에 따라 암호화 키 관련 정보를 메타데이터의 제1 값으로 기록하는 단계, 생성된 메타데이터를 암호화 대상에 쓰기하는 단계, 암호화된 데이터를 암호화 대상에 쓰기하는 단계, 및 암호화 쓰기 완료 통지를 출력하는 단계를 포함할 수 있다. A disk encryption write method according to an embodiment comprises: an encryption target including a data sector in which encrypted data is recorded; and a metadata sector in which metadata which is encryption key related information is recorded, wherein the metadata includes a first value which is encryption key related information used in the most recent write operation; and a second value which is encryption key related information used in the immediately preceding write operation; wherein the method may include: a step of reading a metadata sector of an encryption target; a step of replacing the second value with the first value of the read metadata; a step of recording encryption key related information as the first value of the metadata as data is encrypted; a step of writing the generated metadata to the encryption target; a step of writing encrypted data to the encryption target; and a step of outputting an encryption write completion notification.
이때, 실시예에 따른 디스크 암호화 쓰기 방법은, 암호화 대상의 메타데이터에서 제2 값을 삭제하는 단계, 및 제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기하는 단계를 더 포함할 수 있다. At this time, the disk encryption writing method according to the embodiment may further include a step of deleting a second value from metadata of an encryption target, and a step of writing metadata including the first value to the encryption target.
이때, 생성된 메타데이터를 암호화 대상에 쓰기하는 단계는, 캐시 관리자에게 생성된 메타데이터를 출력함과 동시에 수행될 수 있다. At this time, the step of writing the generated metadata to the encryption target can be performed simultaneously with outputting the generated metadata to the cache manager.
이때, 제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기하는 단계는, 그 이전에 캐시 관리자에게 제1 값을 포함하는 메타데이터를 출력하는 단계를 더 수행할 수 있다. At this time, the step of writing metadata including the first value to the encryption target may further include a step of outputting metadata including the first value to the cache manager prior to that.
실시예에 따른 디스크 암호화 읽기 방법은, 암호화 대상은 암호화된 데이터가 기록되는 데이터 섹터 및 암호화 키 관련 정보인 메타데이터를 기록하는 메타데이터 섹터를 포함하고, 메타데이터는, 최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과, 직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함하되, 암호화 대상에서 메타데이터 섹터 및 데이터 섹터를 읽기하는 단계, 읽어들인 데이터를 메타데이터의 제1 값으로 복호화하는 단계, 및 복호화에 성공할 경우, 복호화된 평문 데이터를 반환하는 단계를 포함할 수 있다. A disk encryption reading method according to an embodiment comprises: an encryption target includes a data sector in which encrypted data is recorded; and a metadata sector in which metadata, which is information related to an encryption key, is recorded; and the metadata includes a first value, which is information related to an encryption key used in a recent write operation; and a second value, which is information related to an encryption key used in a previous write operation; and the method may include a step of reading a metadata sector and a data sector from the encryption target; a step of decrypting the read data with the first value of the metadata; and a step of returning decrypted plaintext data if the decryption is successful.
이때, 실시예에 따른 디스크 암호화 읽기 방법은, 메타데이터의 제2 값이 존재할 경우, 암호화 대상에서 메타데이터의 제2 값을 삭제하는 단계를 더 포함할 수 있다.At this time, the disk encryption reading method according to the embodiment may further include a step of deleting the second value of the metadata from the encryption target if the second value of the metadata exists.
이때, 실시예에 따른 디스크 암호화 읽기 방법은, 복호화에 성공하지 못할 경우, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 단계, 복호화에 성공할 경우, 복호화된 평문 데이터를 반환하는 단계, 및 암호화 대상에서 메타데이터의 제1 값을 제2 값으로 대체하고, 제2 값은 삭제하는 단계를 더 포함할 수 있다.At this time, the disk encryption reading method according to the embodiment may further include a step of decrypting the read data with the second value of the metadata if decryption is not successful, a step of returning the decrypted plaintext data if decryption is successful, and a step of replacing the first value of the metadata with the second value in the encryption target and deleting the second value.
이때, 실시예에 따른 디스크 암호화 읽기 방법은, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 데 성공하지 못할 경우, 복호화 불가 통지를 출력하는 단계를 더 포함할 수 있다. At this time, the disk encryption reading method according to the embodiment may further include a step of outputting a decryption failure notification if the read data is not successfully decrypted with the second value of the metadata.
이때, 실시예에 따른 디스크 암호화 읽기 방법은, 메타데이터의 제1 값의 갱신이 필요할 경우, 데이터 섹터에 기록된 데이터들 중 암호화 키의 유효 기간을 기반으로 식별된 데이터를 최신 또는 신규 암호화 키로 재 암호화하여 암호화 대상에 기록하는 단계를 더 포함할 수 있다. At this time, the disk encryption reading method according to the embodiment may further include a step of re-encrypting data identified based on the validity period of an encryption key among data recorded in a data sector with a latest or new encryption key and recording the data in an encryption target when an update of a first value of metadata is required.
실시예에 따른 디스크 암호화 장치는, 적어도 하나의 프로그램이 기록된 메모리, 및 프로그램을 실행하는 프로세서를 포함하며, 프로그램은, 키 관리 장치와 통신하여 적어도 하나의 암호화 대상 각각의 암호화에 필요한 암호화 키를 수신하고, 수신된 암호화 키를 이용하여 암호화 대상의 데이터를 암호화하되, 사용자로부터의 요청에 따라 암호화 대상으로 입력되는 데이터를 암호화하여 쓰기하거나, 암호화 대상으로부터 데이터를 읽어들여 복호화한 후 사용자에게 출력하는, 암호화 대상은, 암호화된 데이터가 기록되는 데이터 섹터 및 암호화 키 관련 정보인 메타데이터를 기록하는 메타데이터 섹터를 포함하되, 메타데이터는, 최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과, 직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함할 수 있다. A disk encryption device according to an embodiment includes a memory having at least one program recorded therein, and a processor executing the program, wherein the program communicates with a key management device to receive an encryption key necessary for encryption of each of at least one encryption target, and encrypts data of the encryption target using the received encryption key, and encrypts and writes data input to the encryption target according to a request from a user, or reads data from the encryption target, decrypts it, and outputs it to the user, wherein the encryption target includes a data sector in which encrypted data is recorded and a metadata sector in which metadata that is information related to an encryption key is recorded, wherein the metadata may include a first value that is information related to an encryption key used when the most recent write is performed, and a second value that is information related to an encryption key used when the immediately preceding write is performed.
이때, 프로그램은, 키 관리 장치에 신규 암호화 대상에 대한 식별자를 전달하여 암호화 키를 요청하고, 키 관리 장치로부터 신규 암호화 대상의 고유 ID, 디스크 암호화 키 및 키 번호를 수신함에 따라 해당 신규 암호화 대상에 대한 초기화를 수행할 수 있다. At this time, the program can request an encryption key by transmitting an identifier for the new encryption target to the key management device, and perform initialization for the new encryption target by receiving a unique ID, disk encryption key, and key number of the new encryption target from the key management device.
이때, 프로그램은, 키 관리 장치와 연동하여 암호화 대상 추가 서비스, 디스크 암호화 키의 폐기 서비스, 파티션 제거 서비스, 디스크 암호화 서비스 기동 서비스, 디스크 암호화 키 요청 서비스 및 파티션의 암호화 정보 구성 서비스 중 적어도 하나를 수행할 수 있다. At this time, the program can perform at least one of an encryption target addition service, a disk encryption key disposal service, a partition removal service, a disk encryption service startup service, a disk encryption key request service, and a partition encryption information configuration service in conjunction with a key management device.
이때, 프로그램은, 암호화 대상의 메타데이터 섹터를 읽어들이고, 읽어들인 메타데이터의 제1 값으로 제2 값을 대체하고, 데이터를 암호화함에 따라 암호화 키 관련 정보를 메타데이터의 제1 값으로 기록하고, 생성된 메타데이터를 암호화 대상에 쓰기하고, 암호화된 데이터를 암호화 대상에 쓰기하고, 암호화 쓰기 완료 통지를 출력하고, 암호화 대상의 메타데이터에서 제2 값을 삭제하고, 제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기할 수 있다. At this time, the program can read a metadata sector of an encryption target, replace a second value with a first value of the read metadata, record encryption key-related information as the first value of the metadata as data is encrypted, write the generated metadata to the encryption target, write the encrypted data to the encryption target, output an encryption write completion notification, delete the second value from the metadata of the encryption target, and write metadata including the first value to the encryption target.
이때, 프로그램은, 생성된 메타데이터를 암호화 대상에 쓰기함에 있어, 캐시 관리자에게 생성된 메타데이터를 출력함과 동시에 수행되고, 제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기함에 있어, 그 이전에 캐시 관리자에게 제1 값을 포함하는 메타데이터를 출력할 수 있다. At this time, the program may be executed simultaneously with outputting the generated metadata to the cache manager when writing the generated metadata to the encryption target, and may output the metadata including the first value to the cache manager before writing the metadata including the first value to the encryption target.
이때, 프로그램은, 암호화 대상에서 메타데이터 섹터 및 데이터 섹터를 읽기하고, 읽어들인 데이터를 메타데이터의 제1 값으로 복호화하고, 복호화에 성공할 경우, 복호화된 평문 데이터를 반환할 수 있다. At this time, the program can read the metadata sector and data sector from the encryption target, decrypt the read data into the first value of the metadata, and, if the decryption is successful, return the decrypted plaintext data.
이때, 프로그램은, 메타데이터의 제2 값이 존재할 경우, 암호화 대상에서 메타데이터의 제2 값을 삭제할 수 있다. At this time, the program can delete the second value of the metadata from the encryption target if the second value of the metadata exists.
이때, 프로그램은, 복호화에 성공하지 못할 경우, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하고, 복호화에 성공할 경우, 복호화된 평문 데이터를 반환하고, 복호화 대상에서 메타데이터의 제1 값을 제2 값으로 대체하고, 제2 값은 삭제할 수 있다. At this time, the program can decrypt the read data with the second value of the metadata if the decryption is not successful, return the decrypted plaintext data if the decryption is successful, replace the first value of the metadata with the second value in the decryption target, and delete the second value.
이때, 프로그램은, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 데 성공하지 못할 경우, 복호화 불가 통지를 출력할 수 있다. At this time, the program may output a decryption failure notification if it fails to successfully decrypt the read data into the second value of the metadata.
이때, 프로그램은, 메타데이터의 제1 값의 갱신이 필요할 경우, 데이터 섹터에 기록된 데이터들 중 암호화 키의 유효 기간을 기반으로 식별된 데이터를 최신 또는 신규 암호화 키로 재 암호화하여 암호화 대상에 기록할 수 있다. At this time, if the first value of the metadata needs to be updated, the program can re-encrypt the data identified based on the validity period of the encryption key among the data recorded in the data sector with the latest or new encryption key and record it in the encryption target.
기재된 실시예에 따라, 디스크 암호화 서비스의 중단 없이 암호화에 사용한 키(디스크 암호화 키)를 변경할 수 있다.According to the described embodiment, the key used for encryption (disk encryption key) can be changed without interruption of the disk encryption service.
기재된 실시예에 따라, 암호화 키 변경과정에서 평문 데이터를 디스크에 저장하지 않을 수 있다. According to the described embodiment, plaintext data may not be stored on disk during the encryption key change process.
기재된 실시예에 따라, 암호화 키 변경과정에서 대량의 추가적인 저장 공간이 필요하지 않다. According to the described embodiment, the encryption key changing process does not require a large amount of additional storage space.
기재된 실시예에 따라, 암호화 키 변경과정을 포함하여 모든 쓰기 과정에서 오류가 발생하여도 정상적인 디스크 암호화 서비스를 제공할 수 있다.According to the described embodiment, a normal disk encryption service can be provided even if an error occurs in any writing process, including an encryption key change process.
도 1은 실시예에 따른 디스크 암호화 서비스 시스템의 개략적인 블록 구성도이다.
도 2는 실시예에 따른 파티션 추가 서비스를 설명하기 위한 신호 흐름도이다.
도 3은 실시예에 따른 디스크 암호화 키 갱신 서비스를 설명하기 위한 신호 흐름도이다.
도 4는 실시예에 따른 디스크 암호화 키 폐기 서비스를 설명하기 위한 신호 흐름도이다.
도 5는 실시예에 따른 파티션 제거 서비스를 설명하기 위한 신호 흐름도이다.
도 6은 실시예에 따른 디스크 암호화 서비스 기동 서비스를 설명하기 위한 신호 흐름도이다.
도 7은 실시예에 따른 디스크 암호화 키 요청 서비스를 설명하기 위한 신호 흐름도이다.
도 8은 실시예에 따른 키 관리 장치가 없는 대체 구성 서비스를 위한 디스크 암호화 키 뭉치의 예시도이다.
도 9는 실시예에 따른 디스크 암호화 데이터 구조의 예시도이다.
도 10은 실시예에 따라 두 개의 메타데이터들을 이용한 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다.
도 11은 실시예에 따라 두 개의 메타데이터를 이용한 디스크 암호화 읽기 방법을 설명하기 위한 순서도이다.
도 12 내지 15는 실시예에 따른 안전 모드에서의 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다.
도 16은 실시예에 따른 최적화 모드에서의 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다.
도 17은 실시예에 따른 안전 모드 및 최적화 모드에서의 Discard 작업 실행 과정을 설명하기 위한 순서도이다.
도 18은 실시예에 따른 메타데이터 캐시 반영 과정을 설명하기 위한 순서도이다.
도 19 및 도 20은 실시예에 따른 디스크 암호화 읽기 방법을 설명하기 위한 순서도이다.
도 21은 실시예에 따른 재 암호화 방법을 설명하기 위한 순서도이다.
도 22는 실시예에 따른 컴퓨터 시스템 구성을 나타낸 도면이다.Figure 1 is a schematic block diagram of a disk encryption service system according to an embodiment.
FIG. 2 is a signal flow diagram for explaining a partition addition service according to an embodiment.
FIG. 3 is a signal flow diagram for explaining a disk encryption key renewal service according to an embodiment.
FIG. 4 is a signal flow diagram for explaining a disk encryption key disposal service according to an embodiment.
FIG. 5 is a signal flow diagram for explaining a partition removal service according to an embodiment.
Figure 6 is a signal flow diagram for explaining a disk encryption service startup service according to an embodiment.
FIG. 7 is a signal flow diagram for explaining a disk encryption key request service according to an embodiment.
FIG. 8 is an example diagram of a disk encryption key bundle for an alternative configuration service without a key management device according to an embodiment.
Figure 9 is an example diagram of a disk encryption data structure according to an embodiment.
FIG. 10 is a flowchart illustrating a disk encryption writing method using two metadata according to an embodiment.
FIG. 11 is a flowchart illustrating a disk encryption reading method using two metadata according to an embodiment.
Figures 12 to 15 are flowcharts for explaining a disk encryption writing method in safe mode according to an embodiment.
Figure 16 is a flowchart for explaining a disk encryption writing method in an optimization mode according to an embodiment.
Figure 17 is a flowchart for explaining the process of executing the Discard operation in safe mode and optimized mode according to an embodiment.
Figure 18 is a flowchart for explaining a metadata cache reflection process according to an embodiment.
FIGS. 19 and 20 are flowcharts for explaining a disk encryption reading method according to an embodiment.
Figure 21 is a flowchart for explaining a re-encryption method according to an embodiment.
Figure 22 is a diagram showing a computer system configuration according to an embodiment.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.The advantages and features of the present invention, and the methods for achieving them, will become clearer with reference to the embodiments described in detail below together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms, and these embodiments are provided only to make the disclosure of the present invention complete and to fully inform those skilled in the art of the scope of the invention, and the present invention is defined only by the scope of the claims. Like reference numerals refer to like elements throughout the specification.
비록 "제1" 또는 "제2" 등이 다양한 구성요소를 서술하기 위해서 사용되나, 이러한 구성요소는 상기와 같은 용어에 의해 제한되지 않는다. 상기와 같은 용어는 단지 하나의 구성요소를 다른 구성요소와 구별하기 위하여 사용될 수 있다. 따라서, 이하에서 언급되는 제1 구성요소는 본 발명의 기술적 사상 내에서 제2 구성요소일 수도 있다.Although "first" or "second" and the like are used to describe various components, these components are not limited by such terms. Such terms may only be used to distinguish one component from another. Accordingly, a first component referred to below may also be a second component within the technical concept of the present invention.
본 명세서에서 사용된 용어는 실시예를 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 또는 "포함하는(comprising)"은 언급된 구성요소 또는 단계가 하나 이상의 다른 구성요소 또는 단계의 존재 또는 추가를 배제하지 않는다는 의미를 내포한다.The terminology used herein is for the purpose of describing embodiments only and is not intended to limit the invention. In this specification, the singular also includes the plural unless specifically stated otherwise. The terms "comprises" or "comprising" as used in the specification imply that the presence or addition of one or more other elements or steps is not excluded.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 해석될 수 있다. 또한, 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms used in this specification may be interpreted as having a meaning commonly understood by a person of ordinary skill in the art to which the present invention belongs. In addition, terms defined in commonly used dictionaries shall not be interpreted ideally or excessively unless explicitly specifically defined.
도 1은 실시예에 따른 디스크 암호화 서비스 시스템의 개략적인 블록 구성도이다. Figure 1 is a schematic block diagram of a disk encryption service system according to an embodiment.
도 1을 참조하면, 실시예에 따른 디스크 암호화 서비스 시스템은 키 관리 장치(10) 및 디스크 암호화 장치(이하 '서버'로 기재함)(100)가 연동하여, 암호화 대상(이하 '파티션'으로 기재함)(20-1, 20-2)에 대한 디스크 암호화 서비스를 제공할 수 있다. Referring to FIG. 1, a disk encryption service system according to an embodiment can provide a disk encryption service for an encryption target (hereinafter referred to as a 'partition') (20-1, 20-2) by interlocking a key management device (10) and a disk encryption device (hereinafter referred to as a 'server') (100).
키 관리 장치(10)는, 암호화 및 전자 서명 등의 암호 기능 수행에 필요한 키를 안전하게 관리하기 위한 별도의 장치일 수 있다. 이는 키 관리 서버로도 불리며, 일반적으로 하드웨어 보안 모듈(Hardware Security Module, HSM) 또는 신뢰할 수 있는 플랫폼 모듈(Trusted Platform Module, TPM) 등의 물리적인 장치를 사용하여 구성될 수 있다.The key management device (10) may be a separate device for safely managing keys required for performing cryptographic functions such as encryption and electronic signature. This is also called a key management server, and may generally be configured using a physical device such as a hardware security module (HSM) or a trusted platform module (TPM).
실시예에 따른 파티션(20-1, 20-2)은, 복수의 디스크 암호화 키를 가질 수 있게 설계되므로, 키 관리 장치(10) 또한 암호화 키 번호, 암호화 키, 암호화 키 발급 시점 및 암호화 키 폐기 여부 등의 상태 값을 저장할 수 있어야 한다.Since the partitions (20-1, 20-2) according to the embodiment are designed to have multiple disk encryption keys, the key management device (10) must also be able to store status values such as the encryption key number, the encryption key, the encryption key issuance time, and whether the encryption key is discarded.
키 관리 장치(10)는 서버(100)의 인증, 서버(100)별 파티션 추가 및 제거, 파티션별 키 발급 및 폐기, 파티션별 키 요청 시 송신, 및 파티션별 키 보유 상태 안내 중 적어도 하나의 기능을 수행할 수 있다. The key management device (10) can perform at least one of the following functions: authentication of the server (100), addition and removal of partitions for each server (100), issuance and disposal of keys for each partition, transmission upon request of keys for each partition, and guidance on key possession status for each partition.
서버(100)는, 키 관리 장치(10)와 통신하여 디스크 암호화에 필요한 디스크 암호화 키를 수신하고, 파티션(20-1, 20-2)에 대한 디스크 암호화를 수행한다. The server (100) communicates with the key management device (10) to receive a disk encryption key required for disk encryption, and performs disk encryption for partitions (20-1, 20-2).
서버(100)는, 사용자에게 파티션(20-1, 20-2)으로부터 데이터를 직접 읽고 쓸 수 있도록 하는 기능을 제공할 수 있다. 이를 통해, 디스크에는 데이터가 암호화되어 저장되지만, 사용자에게는 복호화된 평문 데이터를 직접 사용하는 것과 같은 환경을 제공할 수 있다.The server (100) can provide a function that allows the user to directly read and write data from the partitions (20-1, 20-2). Through this, data is encrypted and stored on the disk, but the user can be provided with an environment similar to directly using decrypted plaintext data.
서버(100)는, 파티션(20-1, 20-2) 또는 별도 저장 장치의 일부 공간을 활용하여 디스크 암호화에 필요한 각종 메타데이터를 관리할 수 있다.The server (100) can manage various metadata required for disk encryption by utilizing some space of a partition (20-1, 20-2) or a separate storage device.
파티션(20-1, 20-2)은, 디스크 암호화가 적용되는 대상으로, 물리 매체로는 하드디스크, 플로피 디스크, 광 매체 등 회전식 저장장치, 플래시 메모리 등 비 회전식 고정형 저장 장치가 될 수 있으며, 블록 디바이스라고 통칭할 수 있다. Partitions (20-1, 20-2) are targets to which disk encryption is applied. The physical media may be rotating storage devices such as hard disks, floppy disks, and optical media, or non-rotating fixed storage devices such as flash memory, and may be collectively referred to as block devices.
여기서, 블록 디바이스는 균일한 크기를 갖는 복수의 블록(또는 섹터)으로 구성되며, 임의의 블록(섹터)을 지정하여 읽고 쓰는 기능을 제공할 수 있다. Here, the block device is composed of multiple blocks (or sectors) of uniform size, and can provide a read/write function by specifying an arbitrary block (sector).
실시예에 따라, 파티션(20-1, 20-2)은 이러한 블록 디바이스 전체 뿐만 아니라 블록 디바이스 내의 파티션을 의미할 수 있다. Depending on the embodiment, partition (20-1, 20-2) may mean the entire block device as well as a partition within the block device.
또한, 파티션(20-1, 20-2)은 암호화 장치 내부에 내장형 하드디스크 등의 형태로 설치된 로컬 암호화 대상(20-1) 또는 장치 외부에서 케이블 또는 각종 네트워크를 통해 연결된 네트워크 블록 디바이스 등과 같은 네트워크 암호화 대상(20-2)을 포함할 수 있다. 하지만, 실시예는 두 종류의 파티션에 동일하게 적용할 수 있으므로, 파티션으로 통합하여 설명하기로 한다. In addition, the partitions (20-1, 20-2) may include a local encryption target (20-1) installed in the form of a built-in hard disk, etc., inside the encryption device, or a network encryption target (20-2), such as a network block device connected via a cable or various networks from outside the device. However, since the embodiment can be equally applied to both types of partitions, it will be explained by integrating them into a partition.
실시예에 따른 디스크 암호화 서비스로, 파티션 추가, 디스크 암호화 키 폐기, 파티션 제거, 디스크 암호화 서비스 기동, 디스크 암호화 키 요청, 파티션의 암호화 정보 구성 및 키 관리 장치가 없는 대체 구성 중 적어도 하나가 제공될 수 있다. A disk encryption service according to an embodiment may provide at least one of adding a partition, discarding a disk encryption key, removing a partition, starting a disk encryption service, requesting a disk encryption key, configuring encryption information of a partition, and an alternative configuration without a key management device.
이때, 디스크 암호화 서비스에서 송수신되는 모든 데이터는 기밀성(confidentiality)과 무결성(integrity) 등이 보장되는 안전한 통신 채널을 통해 전송되어야 한다. 또한, 데이터를 주고받는 개체는 메시지 인증 코드 및 전자 서명 등을 사용하여 데이터에 대한 출처 인증(source authentication), 무결성(integrity) 및 부인 방지(non-repudiation) 특성을 보장 및 검증해야 한다.At this time, all data transmitted and received by the disk encryption service must be transmitted through a secure communication channel that guarantees confidentiality and integrity. In addition, the entity sending and receiving data must guarantee and verify the source authentication, integrity, and non-repudiation characteristics of the data by using message authentication codes and electronic signatures.
도 2는 실시예에 따른 파티션 추가 서비스를 설명하기 위한 신호 흐름도이다. FIG. 2 is a signal flow diagram for explaining a partition addition service according to an embodiment.
도 2를 참조하면, 서버(100) 관리자가 키 관리 장치(10)에 신규 파티션 추가를 요청한다(S210). 이때, 해당 파티션에 대한 고유 ID와 디스크 암호화 키를 함께 요청한다.Referring to Fig. 2, the server (100) manager requests the key management device (10) to add a new partition (S210). At this time, a unique ID and disk encryption key for the partition are requested together.
그런 후, 키 관리 장치(10)는 요청된 신규 파티션을 등록한다(S220). 즉, 신규 파티션에 고유 ID를 부여하고, 디스크 암호화 키를 생성하고, 생성한 키에 키 번호를 부여한 뒤 이력을 기록한다.After that, the key management device (10) registers the requested new partition (S220). That is, it assigns a unique ID to the new partition, generates a disk encryption key, assigns a key number to the generated key, and then records the history.
그런 후, 키 관리 장치(10)는 서버(100)에 신규 파티션 등록 정보를 전달한다(S230). 즉, 생성한 파티션의 고유 ID, 디스크 암호화 키, 키 번호 및 키 생성 시각 등을 서버(100)로 전송한다.After that, the key management device (10) transmits new partition registration information to the server (100) (S230). That is, the unique ID of the created partition, disk encryption key, key number, key generation time, etc. are transmitted to the server (100).
서버(100)는 키 관리 장치(10)로부터 수신된 파티션의 고유 ID, 디스크 암호화 키 및 키 번호를 이용하여 디스크 암호화를 적용할 수 있도록 파티션을 초기화(포맷)한다(S240).The server (100) initializes (formats) the partition so that disk encryption can be applied using the partition's unique ID, disk encryption key, and key number received from the key management device (10) (S240).
도 3은 실시예에 따른 디스크 암호화 키 갱신 서비스를 설명하기 위한 신호 흐름도이다. FIG. 3 is a signal flow diagram for explaining a disk encryption key renewal service according to an embodiment.
도 3을 참조하면, 서버(100)의 관리자가 디스크 암호화 키를 갱신하려는 파티션의 고유 ID를 포함하는 디스크 암호화 키 갱신 요청 메시지를 키 관리 장치(10)에 전송한다(S310). 이때, 디스크 암호화 키 갱신 요청은, 디스크 암호화 키의 유효 기간 만료 등에 따른 자동 갱신 요청도 포함할 수 있다.Referring to FIG. 3, the administrator of the server (100) transmits a disk encryption key renewal request message including the unique ID of the partition for which the disk encryption key is to be renewed to the key management device (10) (S310). At this time, the disk encryption key renewal request may also include an automatic renewal request due to expiration of the validity period of the disk encryption key, etc.
그러면, 키 관리 장치(10)는 요청된 파티션의 고유 ID가 디스크 암호화 키의 갱신을 요청한 서버(100)의 소유인지 확인한다(S315).Then, the key management device (10) verifies whether the unique ID of the requested partition is owned by the server (100) that requested the renewal of the disk encryption key (S315).
키 관리 장치(10)는 신규 디스크 암호화 키를 생성(S320)하고, 생성한 키에 키 번호를 부여한 뒤 생성 이력을 기록한다.The key management device (10) generates a new disk encryption key (S320), assigns a key number to the generated key, and then records the generation history.
그런 후, 키 관리 장치(10)는 파티션의 고유 ID, 디스크 암호화 키, 키 번호 및 키 생성 시각 등을 서버(100)로 전송한다(S330).After that, the key management device (10) transmits the partition's unique ID, disk encryption key, key number, key generation time, etc. to the server (100) (S330).
서버(100)는 파티션(20-1, 20-2)의 암호화 정보를 갱신한다(S340). 그런 후, 서버(100)는 필요하다면 백그라운드 재 암호화 프로세스를 시작할 수 있다. The server (100) updates the encryption information of the partitions (20-1, 20-2) (S340). Then, the server (100) can start a background re-encryption process if necessary.
도 4는 실시예에 따른 디스크 암호화 키 폐기 서비스를 설명하기 위한 신호 흐름도이다. FIG. 4 is a signal flow diagram for explaining a disk encryption key disposal service according to an embodiment.
도 4를 참조하면, 서버(100)의 관리자가 키 관리 장치(10)에 기존 디스크 암호화 키의 폐기를 요청한다(S410).Referring to FIG. 4, the administrator of the server (100) requests the key management device (10) to discard the existing disk encryption key (S410).
이때, 서버(100)는 디스크 암호화 키의 폐기를 요청하기 전에 해당 키가 디스크 암호화에 사용되고 있는지 확인하여야 한다. 그리고, 필요하다면 디스크 암호화 키 갱신, 재 암호화 프로세스 등을 수행하고, 폐기 요청 시에는 폐기하려는 디스크 암호화 키가 적용되었던 파티션의 고유 ID와 키 번호를 제공하여야 한다. At this time, the server (100) must check whether the key is being used for disk encryption before requesting the disposal of the disk encryption key. Then, if necessary, it must perform disk encryption key renewal, re-encryption process, etc., and when requesting disposal, it must provide the unique ID and key number of the partition to which the disk encryption key to be disposed was applied.
또한, 디스크 암호화 키 폐기 요청은, 디스크 암호화 키의 유효 기간 만료에 따른 자동 폐기 요청도 포함할 수 있다.Additionally, a disk encryption key destruction request may also include an automatic destruction request due to expiration of the disk encryption key's validity period.
그러면, 키 관리 장치(10)는 요청된 파티션의 고유 ID가 디스크 암호화 키의 폐기를 요청한 서버(100)의 소유인지 확인한다(S415).Then, the key management device (10) verifies whether the unique ID of the requested partition belongs to the server (100) that requested the disposal of the disk encryption key (S415).
그런 후, 키 관리 장치(10)는 기존 디스크 암호화 키를 폐기한 뒤, 폐기 이력을 기록한다(S420). 이때, 키 관리 정책에 따라 디스크 암호화 키의 직접적인 폐기 대신 상태 값을 별도로 부여하여 폐기 상태로 변경할 수도 있다.After that, the key management device (10) discards the existing disk encryption key and records the discard history (S420). At this time, instead of directly discarding the disk encryption key, a status value may be separately assigned and changed to a discard status according to the key management policy.
그런 후, 키 관리 장치(10)는 서버(100)에 폐기를 요청한 디스크 암호화 키가 폐기되었음을 알린다(S430).After that, the key management device (10) notifies the server (100) that the disk encryption key requested for disposal has been disposed of (S430).
도 5는 실시예에 따른 파티션 제거 서비스를 설명하기 위한 신호 흐름도이다. FIG. 5 is a signal flow diagram for explaining a partition removal service according to an embodiment.
도 5를 참조하면, 서버(100)의 관리자가 키 관리 장치(10)에 제거하려는 파티션의 고유 ID를 포함하여 파티션의 제거를 요청한다(S510).Referring to FIG. 5, the administrator of the server (100) requests the removal of a partition including the unique ID of the partition to be removed to the key management device (10) (S510).
그러면, 키 관리 장치(10)는 요청된 파티션의 고유 ID가 파티션의 제거를 요청한 서버(100)의 소유인지 확인한다(S515).Then, the key management device (10) verifies whether the unique ID of the requested partition is owned by the server (100) that requested the removal of the partition (S515).
그런 후, 키 관리 장치(10)는 제거가 요청된 파티션을 관리 목록에서 제거한다(S520). 즉, 파티션에서 사용하는 디스크 암호화 키를 폐기한 뒤, 해당 이력을 기록한다. 이때, 정책에 따라 파티션의 직접적인 제거 대신, 상태 값을 별도로 부여하여 제거 상태로 변경할 수도 있다.After that, the key management device (10) removes the partition for which removal is requested from the management list (S520). That is, the disk encryption key used in the partition is discarded and the corresponding history is recorded. At this time, instead of directly removing the partition, depending on the policy, a status value may be separately assigned and changed to a removal status.
그런 후, 키 관리 장치(10)는 서버(100)에 폐기를 요청한 파티션이 관리 목록에서 제거되었음을 알린다(S530).After that, the key management device (10) notifies the server (100) that the partition requested for disposal has been removed from the management list (S530).
그러면, 서버(100)는 파티션을 제거하고 상응하는 데이터를 삭제한다(S540).Then, the server (100) removes the partition and deletes the corresponding data (S540).
도 6은 실시예에 따른 디스크 암호화 서비스 기동 서비스를 설명하기 위한 신호 흐름도이다. Figure 6 is a signal flow diagram for explaining a disk encryption service startup service according to an embodiment.
도 6을 참조하면, 서버(100)는 파티션의 고유 ID를 키 관리 장치(10)로 전송하면서, 해당 파티션의 최신 디스크 암호화 키를 요청한다(S610).Referring to FIG. 6, the server (100) transmits the unique ID of the partition to the key management device (10) and requests the latest disk encryption key of the corresponding partition (S610).
이때, 서버(100)는 디스크 암호화 키의 생성 시각 및 개수 등을 이용하여 최신 디스크 암호화 키를 포함한 하나 이상의 키를 요청할 수도 있다. 또한, 서버(100)는 필요하다면 다수의 파티션들 각각의 디스크 암호화 키를 동시에 요청할 수도 있다.At this time, the server (100) may request one or more keys including the latest disk encryption key by using the generation time and number of disk encryption keys, etc. In addition, the server (100) may request disk encryption keys for each of multiple partitions simultaneously if necessary.
그러면, 키 관리 장치(10)는 전송받은 파티션의 고유 ID가 디스크 암호화 키를 요청한 서버(100)의 소유인지 확인한다(S620).Then, the key management device (10) verifies whether the unique ID of the received partition is owned by the server (100) that requested the disk encryption key (S620).
S620에서 확인이 완료됨에 따라, 키 관리 장치(10)는 서버(100)가 요청한 파티션의 고유 ID, 최신 디스크 암호화 키, 최신 디스크 암호화 키의 번호, 및 키 생성 시각 등을 포함하는 파티션 최신 암호화 키 정보를 서버(100)에 전송한다(S630).As verification is completed at S620, the key management device (10) transmits partition latest encryption key information including the unique ID of the partition requested by the server (100), the latest disk encryption key, the number of the latest disk encryption key, and the key generation time to the server (100) (S630).
그러면, 서버(100)는 파티션의 암호화 정보와 전송받은 디스크 암호화 키를 이용하여 디스크 암호화 서비스를 시작한다(S640).Then, the server (100) starts the disk encryption service using the partition encryption information and the received disk encryption key (S640).
전술한 S610 내지 S640의 기동 절차는 서버(100)의 운영 체제(Operating System, OS) 부팅 이후에 이루어지는 것을 가정하고 있으나, 부트 로더 등에 본 기동 절차를 수행할 수 있는 모듈을 탑재하여 OS가 파티션에 암호화되어 저장되어 있어도 OS 부팅을 수행할 수도 있다.The above-described booting procedure of S610 to S640 is assumed to be performed after the operating system (OS) of the server (100) is booted. However, by mounting a module capable of performing this booting procedure in a boot loader or the like, the OS booting can be performed even if the OS is encrypted and stored in a partition.
도 7은 실시예에 따른 디스크 암호화 키 요청 서비스를 설명하기 위한 신호 흐름도이다. FIG. 7 is a signal flow diagram for explaining a disk encryption key request service according to an embodiment.
서버(100)는 디스크 암호화 서비스 운용 중(디스크 암호화 서비스 기동 후), 파티션의 복호화를 위해 추가 디스크 암호화 키가 필요할 수 있다. 여기서, 추가 디스크 암호화 키는, 디스크 암호화 서비스 기동 시에 키 관리 장치(10)로부터 전송받지 않은 이전 디스크 암호화 키 또는 키 관리 장치(10)로부터 전송 받았으나 메모리상에서 지워진 디스크 암호화 키 등일 수 있다. The server (100) may require an additional disk encryption key to decrypt a partition while the disk encryption service is in operation (after the disk encryption service is started). Here, the additional disk encryption key may be a previous disk encryption key that was not transmitted from the key management device (10) when the disk encryption service was started, or a disk encryption key that was transmitted from the key management device (10) but has been erased from memory.
도 7을 참조하면, 서버(100)는 키 관리 장치(10)에 파티션의 고유 ID, 디스크 암호화 키 번호를 이용하여 디스크 암호화 키를 요청한다(S710).Referring to FIG. 7, the server (100) requests a disk encryption key from the key management device (10) using the partition's unique ID and disk encryption key number (S710).
그러면, 키 관리 장치(10)는 전송받은 파티션의 고유 ID가 디스크 암호화 키를 요청한 서버(100)의 소유인지 확인한다(S720).Then, the key management device (10) verifies whether the unique ID of the received partition is owned by the server (100) that requested the disk encryption key (S720).
S720의 확인이 완료됨에 따라, 키 관리 장치(10)는 서버(100)가 요청한 파티션의 고유 ID, 디스크 암호화 키 번호에 해당하는 디스크 암호화 키 및 키 생성 시각 등을 포함하는 디스크 암호화 키 정보를 서버(100)에 전송한다(S730).As verification of S720 is completed, the key management device (10) transmits disk encryption key information including the unique ID of the partition requested by the server (100), the disk encryption key corresponding to the disk encryption key number, and the key generation time to the server (100) (S730).
그러면, 서버(100)는 디스크 암호화 키 정보를 수신한 후, 디스크 암호화 서비스를 재개한다(S740). Then, the server (100) resumes the disk encryption service after receiving the disk encryption key information (S740).
다음으로, 실시예에 따른 파티션의 암호화 정보 구성 서비스를 설명하기로 한다. Next, we will explain the encryption information configuration service of a partition according to an embodiment.
전술한 바와 같이, 디스크 암호화 서비스를 운용하기 위하여 파티션의 암호화 정보는, 파티션 고유 ID, 암호 알고리즘(암호, 암호 운영 모드, 무결성 검증 방식, 키 크기 등), 파티션 크기, 논리 섹터(디스크 암호화 단위) 크기 및 파티션 등록 정보(고유 ID, 암호 알고리즘, 크기 등)에 대한 키 관리 장치(10)의 서명 및 최신 디스크 암호화 키 번호 중 적어도 하나를 포함할 수 있다. As described above, in order to operate the disk encryption service, the encryption information of the partition may include at least one of the partition unique ID, encryption algorithm (password, encryption operation mode, integrity verification method, key size, etc.), partition size, logical sector (disk encryption unit) size, and partition registration information (unique ID, encryption algorithm, size, etc.), a signature of a key management device (10), and the latest disk encryption key number.
이때, 필요한 경우 항목을 추가하여 사용할 수 있으며, 암호화 정보는 파티션의 특정 공간에 기록될 수 있다. 예컨대, 파티션의 첫 번째 섹터에 기록될 수 있다. At this time, you can add items and use them if necessary, and the encryption information can be written to a specific space in the partition. For example, it can be written to the first sector of the partition.
다음으로, 실시예에 따라 키 관리 장치(10)가 없는 대체 구성 서비스에 대해 설명하기로 한다. Next, an alternative configuration service without a key management device (10) according to an embodiment will be described.
실시예에서는 키 관리 장치(10)가 없어도 디스크 암호화 기술을 활용할 수 있다. In an embodiment, disk encryption technology can be utilized even without a key management device (10).
즉, 서버(100)가 디스크 암호화 키들을 취합하여 디스크 암호화 키 뭉치를 생성하고, 이를 별도의 키(디스크 암호화 키 뭉치의 암호화 키)로 암호화하여 관리할 수 있다. That is, the server (100) can collect disk encryption keys to create a disk encryption key bundle, and manage it by encrypting it with a separate key (encryption key of the disk encryption key bundle).
도 8은 실시예에 따른 키 관리 장치가 없는 대체 구성 서비스를 위한 디스크 암호화 키 뭉치의 예시도이다. FIG. 8 is an example diagram of a disk encryption key bundle for an alternative configuration service without a key management device according to an embodiment.
도 8을 참조하면, 디스크 암호화 키 뭉치는, 디스크 암호화 키 번호, 디스크 암호화 키, 생성 시각(발급일), 만료 시각 및 상태 등을 포함하는 데이터들로 구성될 수 있다. 즉, 키 관리 장치(10)가 관리하는 값들을 모두 포함할 수 있다.Referring to FIG. 8, the disk encryption key bundle may be composed of data including a disk encryption key number, a disk encryption key, a creation time (issue date), an expiration time, and a status. In other words, it may include all values managed by the key management device (10).
또한, 디스크 암호화 키 뭉치 암호화 키는, 패스워드로부터 유도되거나, SE(secure element), TPM(trusted platform module) 및 TEE(trusted execution environment) 등에 저장하는 등의 방법을 이용하여 관리될 수 있다.Additionally, the disk encryption key bundle encryption key can be managed by using methods such as deriving it from a password or storing it in a secure element (SE), a trusted platform module (TPM), and a trusted execution environment (TEE).
그러면, 실시예에 따라 동적 디스크 암호화 키 변경을 제공하는 디스크 암호화 및 복호화 방법에 대해 살펴보기로 한다. 이에 앞서 우선 암호화 대상인 파티션 내부의 디스크 암호화 데이터 구조에 대해 살펴보기로 한다. Then, let's look at a disk encryption and decryption method that provides dynamic disk encryption key change according to an embodiment. Before that, let's first look at the disk encryption data structure inside the partition that is the encryption target.
도 9는 실시예에 따른 디스크 암호화 데이터 구조의 예시도이다. Figure 9 is an example diagram of a disk encryption data structure according to an embodiment.
도 9를 참조하면, 파티션(20)은 데이터 저장소 및 메타데이터 저장소로 구성될 수 있다. 서버(100)가 데이터를 암호화하여 파티션(20)에 기록할 때, 데이터 저장소의 데이터 섹터(21) 및 메타데이터 저장소의 메타데이터 섹터(22)의 두 곳에 모두 쓰기 명령을 내려야 한다. Referring to FIG. 9, a partition (20) may be composed of a data storage and a metadata storage. When the server (100) encrypts data and writes it to the partition (20), a write command must be issued to both the data sector (21) of the data storage and the metadata sector (22) of the metadata storage.
그런데, 일반적인 디스크 운용 환경에서는 데이터 섹터(21) 및 메타데이터 섹터(22)는 논리적으로 연접된 자료가 아니다, 따라서, 데이터 섹터(21)와 메타데이터 섹터(22)를 모두 동시에 변경하거나, 또는 모두 동시에 변경하지 않는다는 것을 보장할 수는 없다. 예컨대, 정전이 발생하여 디스크 쓰기가 중단되거나, 네트워크 디스크와 통신하는 과정에서 일부 데이터가 손실되는 등의 상황이 발생하면, 두 섹터들(21, 22) 중 하나에만 쓰기가 이루어질 수도 있다. 이럴 경우, 암호화된 섹터의 데이터를 모두 잃게 되는 문제로 이어질 수 있다.However, in a general disk operation environment, the data sector (21) and the metadata sector (22) are not logically connected data. Therefore, it is not possible to guarantee that both the data sector (21) and the metadata sector (22) are changed at the same time, or that neither of them is changed at the same time. For example, if a power outage occurs and disk writing is interrupted, or some data is lost during communication with a network disk, writing may occur to only one of the two sectors (21, 22). In this case, it may lead to a problem in which all data in the encrypted sector is lost.
특히, 실시예에서는 디스크 암호화에서 어떠한 키로 암호화하였는지를 필수적으로 저장해야 하므로, 메타데이터를 안전하게 보관하는 것이 매우 중요하다. 따라서, 실시예에서는 파티션의 메타데이터 섹터(22)를 확장하여, 하나의 데이터 섹터(21)에 대한 메타데이터(22)를 1번 메타데이터(22-1)와 2번 메타데이터(22-2)로 이중화하여 보관한다. In particular, in the embodiment, since it is essential to store which key was used for encryption in disk encryption, it is very important to safely store metadata. Therefore, in the embodiment, the metadata sector (22) of the partition is expanded, and metadata (22) for one data sector (21) is stored in duplicate as metadata 1 (22-1) and metadata 2 (22-2).
이때, 1번 메타데이터(22-1)에는 마지막(최신) 쓰기 기록에 사용된 디스크 암호화 키와 관련된 정보가 기록되며, 2번 메타데이터(22-2)에는 직전 쓰기 기록에 사용된 디스크 암호화 키와 관련된 정보가 기록될 수 있다. 이러한 이중화 방식을 사용하면 두 개의 섹터(21, 22)에 대한 쓰기 명령 중 일부가 실패하더라도 암호화된 데이터를 성공적으로 복호화할 수 있다.At this time, information related to the disk encryption key used for the last (latest) write record may be recorded in metadata 1 (22-1), and information related to the disk encryption key used for the previous write record may be recorded in metadata 2 (22-2). Using this duplication method, encrypted data can be successfully decrypted even if some of the write commands for the two sectors (21, 22) fail.
또한, 메타데이터들(22-1, 22-2) 각각은, 암호화된 섹터를 복호화하는 데 필요한 정보와 섹터에 대한 세부 정보(23)를 포함할 수 있다.Additionally, each of the metadata (22-1, 22-2) may include information necessary to decrypt the encrypted sector and detailed information (23) about the sector.
도 10은 실시예에 따라 두 개의 메타데이터들을 이용한 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다. FIG. 10 is a flowchart illustrating a disk encryption writing method using two metadata according to an embodiment.
도 10을 참조하면, 실시예에서 쓰기 작업은 파티션(20)에 암호화된 데이터 섹터(21)를 기록하는 것과 메타데이터(22)가 포함된 섹터를 기록하는 것, 두 종류의 쓰기 명령들이 수행되어야 한다. 이러한 두 종류의 쓰기 명령들 중 하나만 성공하고, 다른 하나가 실패하더라도, 이전에 기록한 암호화된 데이터 섹터를 복호화할 수 있으려면 이전 암호화 정보와 최신 암호화 정보를 각각 포함하는 두 개의 메타데이터를 파티션에 기록하는 작업을 먼저 수행하여야 한다.Referring to FIG. 10, in the embodiment, a write operation requires two types of write commands to be performed: one for writing an encrypted data sector (21) to a partition (20) and one for writing a sector containing metadata (22). Even if only one of these two types of write commands succeeds and the other fails, in order to be able to decrypt previously written encrypted data sectors, a task of writing two metadata, each containing previous encryption information and latest encryption information, to the partition must first be performed.
이를 위해 서버(100)는 이전에 암호화된 데이터가 있다면, 이전 데이터를 복호화할 수 있도록 메타데이터 1번 값을 읽어(S810)들여, 메타데이터 2번으로 이동시켜 보존한다(S820). To this end, if there is previously encrypted data, the server (100) reads metadata 1 value (S810) so that the previous data can be decrypted, moves it to metadata 2, and preserves it (S820).
그런 후, 서버(100)는 새로운 데이터를 암호화하는 데 사용한 암호화 정보를 1번 메타데이터에 기록한다(S830). After that, the server (100) records the encryption information used to encrypt new data in metadata 1 (S830).
이후, 두 개의 메타데이터를 이용하면 메타데이터 섹터는 기록되고, 암호화된 데이터 섹터가 기록되지 않았더라도 두 번째 메타데이터를 이용하여 이전에 기록한 암호화된 데이터 섹터를 복호화할 수 있다. Afterwards, using the two metadata, the metadata sector can be written and the previously written encrypted data sector can be decrypted using the second metadata even if the encrypted data sector was not written.
반면, 저장 매체 등이 입출력 순서를 존중하지 않아 메타데이터 섹터 쓰기는 실패하고 암호화된 데이터 섹터 쓰기에만 성공할 경우, 섹터를 암호화하는 데 사용한 디스크 암호화 키에 대한 정보가 메타데이터에 기록되지 않아 데이터 손실이 발생할 수는 있다. 그러나, 대부분의 디스크 장치는 요청받은 순서를 존중하여 입출력을 수행하므로 메타데이터 섹터 쓰기를 먼저 요청한다면, 일반적으로 쓰기 작업에 실패하더라도 이전에 기록한 암호화된 데이터 섹터의 데이터를 보존할 수 있다.On the other hand, if the storage media does not respect the I/O order and the metadata sector write fails while only the encrypted data sector write succeeds, data loss may occur because information about the disk encryption key used to encrypt the sector is not recorded in the metadata. However, most disk devices perform I/O while respecting the requested order, so if the metadata sector write is requested first, the data of the previously written encrypted data sector can usually be preserved even if the write operation fails.
서버(100)는 파티션에 메타데이터 섹터 쓰기(S840) 및 암호화 데이터 섹터 쓰기(S850)를 정상적으로 완료한 후, 사용자에게 암호화 쓰기 완료 통지를 출력할 수 있다(S860).After the server (100) normally completes writing metadata sectors (S840) and writing encrypted data sectors (S850) to a partition, it can output an encrypted write completion notification to the user (S860).
전술한 바와 같이 쓰기 동작(S840~S850)이 정상적으로 수행된 이후에는 더 이상 이전 메타데이터가 필요하지 않다. 따라서, 서버(100)는 더 이상 필요하지 않은 메타데이터 2번 값을 삭제(S870)하고, 메타데이터 1번 값만 남겨 파티션으로 쓰도록 한다(S880).As described above, after the write operation (S840 to S850) is performed normally, the previous metadata is no longer needed. Therefore, the server (100) deletes metadata value 2 that is no longer needed (S870) and leaves only metadata value 1 to be written as a partition (S880).
전술한 바와 같이 동작이 정상적으로 완료되면, 모든 섹터에 1번 메타데이터만 남아있게 된다. 즉, 2번 메타데이터가 남아있는 경우는 쓰기 작업을 진행하는 도중이거나, 또는 쓰기 작업 도중 중단된 경우일 수 있다.As mentioned above, if the operation is completed normally, only metadata 1 will remain in all sectors. That is, if metadata 2 remains, it may be during a write operation or may be interrupted during a write operation.
도 11은 실시예에 따라 두 개의 메타데이터를 이용한 디스크 암호화 읽기 방법을 설명하기 위한 순서도이다. FIG. 11 is a flowchart illustrating a disk encryption reading method using two metadata according to an embodiment.
도 11을 참조하면, 서버(100)는 파티션(20)에서 메타데이터 섹터(22)와 데이터 섹터(21)를 모두 읽어온다(S905~S910).Referring to FIG. 11, the server (100) reads both the metadata sector (22) and the data sector (21) from the partition (20) (S905 to S910).
그런 후, 서버(100)는 메타데이터 1번 값으로 복호화를 시도(S915)하여, 무결성 검증에 성공하였는지의 여부를 판단한다(S920). 일반적으로는 메타데이터 1번 값으로 복호화할 수 있다. After that, the server (100) attempts to decrypt using metadata value 1 (S915) and determines whether integrity verification is successful (S920). Generally, decryption is possible using metadata value 1.
S920의 판단 결과 무결성 검증에 성공한 경우, 서버(100)는 복호화된 평문 데이터를 사용자에게 반환한다(S925). If the integrity verification is successful as a result of the judgment of S920, the server (100) returns the decrypted plaintext data to the user (S925).
그런 후, 메타데이터 1번 값으로 복호화를 성공하였으므로, 서버(100)는 메타데이터 2번 값이 존재할 경우(S930), 이전 쓰기 절차에서 마무리가 덜 끝난 것이므로, 해당 메타데이터 2번 값을 삭제한다(S935). After that, since decryption was successful with metadata value 1, if metadata value 2 exists (S930), the server (100) deletes the metadata value 2 because the previous writing procedure was not fully completed (S935).
그런 후, 서버(100)는 필요에 따라 메타데이터 및 데이터 섹터를 갱신한다(S940). 즉, 필요에 따라 만약 읽어온 자료를 암호화한 키가 오래되었다면 새롭게 암호화를 하는 작업도 할 수 있다.After that, the server (100) updates metadata and data sectors as needed (S940). That is, if the key used to encrypt the read data is old, the server can also re-encrypt the data as needed.
한편, S920의 판단 결과 무결성 검증에 성공하지 않은 경우, 서버(100)는 이전 쓰기 작업이 제대로 이루어지지 않았다고 판단할 수 있으며, 메타데이터 2번 값을 이용해 복호화를 시도(S945)하여, 무결성 검증 성공 여부를 판단한다(S950). Meanwhile, if the integrity verification is not successful as a result of the judgment of S920, the server (100) can determine that the previous write operation was not performed properly, and attempts decryption using the metadata 2 value (S945) to determine whether the integrity verification is successful (S950).
S950의 판단 결과 정상적으로 복호화하여 무결성 검증에 성공한 경우, 서버(100)는 복호화된 평문 데이터를 사용자에게 반환한다(S955). If the result of S950 is determined to be normal and the integrity verification is successful, the server (100) returns the decrypted plaintext data to the user (S955).
그런 후, 서버(100)는 메타데이터 1번 값을 메타데이터 2번 값으로 대체하여 이전 쓰기 상태로 되돌릴 수 있다(S960). 그런 후, S965로 진행할 수 있다. After that, the server (100) can replace the metadata 1 value with the metadata 2 value to return to the previous write state (S960). Then, the process can proceed to S965.
반면, S950의 판단 결과 무결성 검증에 성공하지 않은 경우, 서버(100)는 사용자에게 복호화 불가 통지를 출력한다(S970).On the other hand, if the integrity verification result of S950 is not successful, the server (100) outputs a notification of decryption failure to the user (S970).
한편, 전술한 바와 같은 디스크 암호화 쓰기 및 읽기 방법을 더욱 안전하고 효율적으로 수행하도록 하기 위해 다음과 같은 사항들이 고려될 수 있다. Meanwhile, the following may be considered to make the disk encryption write and read methods described above more secure and efficient.
(1) 내용이 비어있는 섹터의 처리(1) Handling sectors with empty content
섹터를 기록하는 과정에서 섹터의 모든 값이 0으로 채워져(zero-fill) 있다면 섹터를 암호화하는 대신 다른 방법을 고려할 수 있다. 예컨대, 플래시 메모리 기반 저장 장치에서는 zero-fill된 섹터에 별도의 상태를 부여하여 내부 최적화를 수행하기도 하므로, 암호화를 하지 않고 OS에서 제공하는 명령어(discard)를 대신 실행할 수 있다. 메타데이터에 해당 섹터가 discard된 섹터임을 남기고, 읽기 쓰기 동작을 최적화하여 성능 또한 개선할 수 있다.If all values of the sector are filled with 0 (zero-fill) during the process of recording the sector, other methods can be considered instead of encrypting the sector. For example, flash memory-based storage devices sometimes perform internal optimization by giving a separate state to the zero-filled sector, so instead of encryption, the command provided by the OS (discard) can be executed. Performance can also be improved by leaving a metadata that the sector is a discarded sector and optimizing read/write operations.
(2) 에러 대응(2) Error response
디스크 암호화 과정에서 발생할 수 있는 다양한 에러가 있을 수 있으며, 다양한 상황에도 읽기 쓰기를 문제없이 수행하고, 어떠한 에러가 발생했는지 보고할 수 있어야 한다.There are a variety of errors that can occur during the disk encryption process, and it should be able to perform reads and writes without problems in various situations and report any errors that occurred.
(3) 캐시 관리 등 고속화 과정(3) High-speed process such as cache management
종래의 디스크 암호화 방식과 비교하여 메타데이터 섹터를 읽고 쓰는 작업이 최소 1회 이상 추가된다. 이를 줄이기 위하여 섹터 메타데이터에 대한 캐시 관리자를 도입하되, 여전히 쓰기 과정에서 실패하더라도 정상적으로 복호화할 수 있도록 설계하여야 한다.Compared to conventional disk encryption methods, at least one additional operation is required to read and write metadata sectors. To reduce this, a cache manager for sector metadata is introduced, but it must still be designed so that normal decryption can be performed even if the writing process fails.
(4) 재 암호화 과정(4) Re-encryption process
종래의 디스크 암호화 방식에서는 기존에 암호화된 데이터를 새로운 키로 다시 암호화하는 방법이 명확히 제시되어 있지 않으므로, 본 발명에서는 새로운 키로 다시 암호화하는 재 암호화 방안도 제시하여야 한다.Since conventional disk encryption methods do not clearly present a method for re-encrypting previously encrypted data with a new key, the present invention must also present a re-encryption method for re-encrypting data with a new key.
그러면, 전술한 바와 같은 사항들을 고려한 실시예에 따른 디스크 암호화 쓰기 및 읽기 방법에 대해 상세히 살펴보기로 한다. Then, let us examine in detail the disk encryption writing and reading method according to an embodiment considering the aforementioned matters.
우선, 도 12 내지 도 17을 참조하여 실시예에 따른 디스크 암호화 쓰기 방법에 대해 상세히 살펴보기로 한다. First, let's look in detail at the disk encryption writing method according to the embodiment with reference to FIGS. 12 to 17.
실시예에서는 동시에 여러 개의 디스크 암호화 키를 동적으로 변경하고, 이들 키를 이용하여 디스크 암호화를 수행할 수 있는 쓰기 방안을 제공한다. The embodiment provides a write scheme that can dynamically change multiple disk encryption keys simultaneously and perform disk encryption using these keys.
또한, 실시예에 따른 쓰기 작업을 이용하면 디스크 I/O 실패, 네트워크 단절 및 디스크 암호화 서비스 조기 종료 등 쓰기 작업이 정상적으로 완료되지 않은 경우에도 이전 디스크 암호화 키로 암호화된 데이터를 복호화할 수 있다.Additionally, by using a write operation according to an embodiment, data encrypted with a previous disk encryption key can be decrypted even if the write operation is not completed normally, such as due to a disk I/O failure, network disconnection, or early termination of the disk encryption service.
또한, 쓰기 작업은 동기식으로 수행할 수도 있지만, 효율성을 고려하여 비동기식으로 수행할 수도 있다. 즉, 실시예에서는 디스크 암호화 방법으로 이러한 동기식 또는 비동기식의 두 가지 방식이 가능한데, 동기식 방식으로 안전하게 기록하는 것을 목표로 하여 항상 암호화된 섹터를 복호화할 수 있는 키를 식별하는 안전 모드와 비동기식 방식으로 거의 일어나지 않을 예외 상황을 배제하여 효율성을 높이는 최적화 모드를 포함할 수 있다. In addition, the write operation can be performed synchronously, but can also be performed asynchronously for efficiency reasons. That is, in the embodiment, the disk encryption method can be performed in two ways, synchronously or asynchronously, and can include a safe mode that always identifies a key that can decrypt the encrypted sector, aiming to safely write in a synchronous manner, and an optimized mode that increases efficiency by excluding exceptional situations that rarely occur in an asynchronous manner.
(1) 캐시 관리자 동작(1) Cache manager operation
실시예에서는 캐시 관리자를 도입하여 쓰기 및 읽기를 동시에 수행하면서도 전역 락 사용을 최소화한다.In this embodiment, a cache manager is introduced to perform writes and reads concurrently while minimizing the use of global locks.
전술한 바와 같이, 디스크 암호화 쓰기 방법을 수행하기 위해서는 총 세 번의 파티션(20) 쓰기 명령이 필요하다. As mentioned above, performing the disk encryption write method requires a total of three partition (20) write commands.
여기서, 쓰기 명령은, 두 개의 메타데이터가 포함된 메타데이터 섹터 쓰기, 암호화된 데이터 섹터 쓰기 및 한 개의 메타데이터가 포함된 메타데이터 섹터 쓰기를 포함할 수 있다. Here, the write command may include writing a metadata sector containing two metadata, writing an encrypted data sector, and writing a metadata sector containing one metadata.
이러한 세 번의 쓰기 명령들 중 마지막 쓰기 명령을 앞의 두 쓰기 명령에 이어 즉시 수행할 필요는 없다. 마지막 쓰기 명령은 암호화된 데이터 섹터를 읽는 데 문제를 발생시키지 않으면서도 상황에 따라 일부 생략할 수 있고, 여러 개를 한꺼번에 처리할 수도 있으며, 유휴 시간을 활용하여 수행할 수도 있으므로 디스크의 부하를 줄일 수 있다.The last of these three write commands need not be performed immediately after the previous two write commands. The last write command can be omitted in some cases without causing problems in reading encrypted data sectors, or it can be processed in multiple cases at once, or it can be performed using idle time, thus reducing the load on the disk.
메타데이터를 즉시 파티션(20)에 기록하지 않고, write-back 정책을 적용하여 캐시 관리자로 해당 메타데이터를 출력한 뒤, 이후 적절한 시기에 파티션(20)에 기록할 수 있다. 여기서, 파티션(20)에 기록하는 시기는 디스크 암호화 서비스의 정책에 따라 결정될 수 있다.Instead of immediately writing the metadata to the partition (20), the write-back policy can be applied to output the metadata to the cache manager, and then the metadata can be written to the partition (20) at an appropriate time. Here, the time of writing to the partition (20) can be determined according to the policy of the disk encryption service.
메타데이터 쓰기를 캐시 관리자를 이용하여 적절하게 관리하면, 이후 동일 섹터 혹은 인접한 섹터의 메타데이터를 읽고 쓸 때 캐시 관리자로부터 메타데이터를 가져올 수 있어 읽기 명령 또한 절약할 수 있다.If metadata writes are properly managed using the cache manager, metadata can be retrieved from the cache manager when reading and writing metadata of the same sector or adjacent sectors, which can also save read commands.
반면, 쓰기 작업의 첫 번째 쓰기 명령은 즉시 수행하지 않으면, 쓰기 작업이 정상적으로 종료되지 않았을 때, 이전에 기록한 암호화된 데이터 섹터를 복호화할 수 없다. 따라서, 첫 번째 쓰기 명령에서는 캐시 관리자에 메타데이터를 출력함과 아울러 파티션(20)에 메타데이터를 쓰도록 하는 write-through 정책을 적용하여야 한다.On the other hand, if the first write command of a write operation is not performed immediately, previously written encrypted data sectors cannot be decrypted when the write operation is not completed normally. Therefore, a write-through policy that outputs metadata to the cache manager and writes metadata to the partition (20) must be applied in the first write command.
(2) 안전 모드(2) Safe Mode
도 12 내지 15는 실시예에 따른 안전 모드에서의 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다. Figures 12 to 15 are flowcharts for explaining a disk encryption writing method in safe mode according to an embodiment.
도 12에 도시된 바와 같이 디스크 암호화 쓰기 방법과 캐시 관리자 동작을 고려하여, 쓰기 작업에 실패해도 이전에 기록한 데이터 섹터를 읽는 작업, 즉 이전 데이터의 복호화를 수행하는 데에는 문제가 없다.Considering the disk encryption write method and cache manager operation as illustrated in Figure 12, even if a write operation fails, there is no problem in reading previously written data sectors, i.e., performing decryption of previous data.
쓰기 작업이 정상적으로 수행되고 있다면, 파티션(20)의 암호화된 데이터 섹터에 관한 메타데이터는 비어있거나(discard 상태) 하나의 디스크 암호화 키에 관한 정보만 포함하고 있다. 섹터에 관한 메타데이터가 두 개의 디스크 암호화 키에 관한 정보를 포함하고 있다면 쓰기 오류 또는 비정상 종료가 발생했다는 것을 의미한다.If the write operation is performed normally, the metadata about the encrypted data sector of the partition (20) is empty (discard state) or contains information about only one disk encryption key. If the metadata about the sector contains information about two disk encryption keys, it means that a write error or abnormal termination has occurred.
안전 모드는 쓰기 작업에 문제가 발생한 섹터에 새로운 값을 다시 기록하는 과정에서도 이전에 기록한 암호화된 데이터를 복호화하기 위해서 두 메타데이터 중 어떠한 값을 이용하여 암호화된 데이터 섹터를 복호화할 수 있는지 식별하는 절차를 포함한다. 이 절차는 읽기 작업에서 수행하는 것과 거의 동일하므로, 후술되는 읽기 작업을 참고할 수 있다.Safe mode includes a procedure to identify which of the two metadata values can be used to decrypt the encrypted data sectors, even while rewriting new values to sectors that have had problems with write operations, in order to decrypt previously written encrypted data. This procedure is almost identical to that performed in a read operation, so the read operation described below can be referred to.
구체적으로, 도 12를 참조하면, 서버(100)는, 대상 섹터 메타데이터가 캐시 관리자에 존재할 경우(S1001), 캐시 관리자로부터 메타데이터를 로딩한다(S1002).Specifically, referring to FIG. 12, if target sector metadata exists in the cache manager (S1001), the server (100) loads metadata from the cache manager (S1002).
반면, 대상 섹터 메타데이터가 캐시 관리자에 존재하지 않을 경우(S1001), 서버(100)는, 파티션에서 메타데이터를 읽어 캐시 관리자에게 등록(S1003)한 후, S1002로 진행한다. On the other hand, if the target sector metadata does not exist in the cache manager (S1001), the server (100) reads the metadata from the partition and registers it with the cache manager (S1003), and then proceeds to S1002.
그런 후, 서버(100)는, 기록할 데이터가 zero-fill일 경우(S1004), discard 작업을 실행한다(S1005).After that, the server (100) executes a discard operation (S1005) if the data to be recorded is zero-fill (S1004).
반면, 기록할 데이터가 zero-fill이 아닐 경우(S1004), 서버(100)는, 새로 암호화하기 위해 필요한 IV/Nonce 등 암호화 요소를 생성(S1006)하고, 섹터 암호화 및 무결성 검증값 계산을 수행한다(S1007).On the other hand, if the data to be recorded is not zero-fill (S1004), the server (100) generates encryption elements such as IV/Nonce required for new encryption (S1006) and performs sector encryption and integrity verification value calculation (S1007).
서버(100)는, 메타데이터가 1개일 경우(S1008), 도 13의 S1017로 진행하고, 메타데이터가 1개가 아닐 경우(S1008), 이전에 기록한 메타데이터 상태가 discard 또는 초기화 상태인지를 판단한다(S1009).If there is one metadata (S1008), the server (100) proceeds to S1017 of Fig. 13, and if there is not one metadata (S1008), it determines whether the previously recorded metadata status is discard or initialized (S1009).
S1009의 판단 결과, 메타데이터 상태가 discard 또는 초기화 상태일 경우, 서버(100)는, 1번 메타데이터 상태를 discard로 변경(S1010)한 후, 도 13의 S1017로 진행한다. As a result of the judgment of S1009, if the metadata status is discard or initialized, the server (100) changes the metadata status 1 to discard (S1010) and then proceeds to S1017 of Fig. 13.
S1009의 판단 결과, 메타데이터 상태가 discard 또는 초기화 상태가 아닐 경우, 서버(100)는, 암호화 섹터를 읽어들인다(S1011). As a result of the judgment of S1009, if the metadata status is not in the discard or initialization state, the server (100) reads the encrypted sector (S1011).
그런 후, 서버(100)는, 메타데이터 1번 키를 보유하고 있을 경우(S1012), 도 14의 S1034로 진행한다. After that, if the server (100) has metadata key 1 (S1012), it proceeds to S1034 of Fig. 14.
반면, 서버(100)는, 메타데이터 1번 키를 보유하고 있지 않을 경우(S1012), 키 관리 장치(10)에 암호화키를 요청(S1013)하여 수신할 경우(S1014), 도 14의 S1034으로 진행한다.On the other hand, if the server (100) does not have the metadata key 1 (S1012), it requests (S1013) an encryption key from the key management device (10) and receives it (S1014), and then proceeds to S1034 of FIG. 14.
반면, 키 관리 장치(10)로부터 암호화 키를 수신하지 못할 경우(S1014), 서버(100)는, 이전 디스크 암호화 키 수신 불가 경고 메시지를 출력(S1015)한 후, 쓰기 재개 여부 판단 절차를 실행한다(S1016). On the other hand, if the encryption key is not received from the key management device (10) (S1014), the server (100) outputs a warning message indicating that the previous disk encryption key cannot be received (S1015) and then executes a procedure to determine whether to resume writing (S1016).
다음으로, 도 13을 참조하면, 서버(100)는, 디스크 암호화 키 번호, IN/NONCE 등 암호화 요소, 섹터 상태 정보, MAC/TAG 등 무결성 검증 정보 등을 포함한 세부 메타데이터를 1번 메타데이터로 작성하고, 이전 메타데이터를 2번 메타데이터로 작성한다(S1017).Next, referring to FIG. 13, the server (100) writes detailed metadata including a disk encryption key number, encryption elements such as IN/NONCE, sector status information, integrity verification information such as MAC/TAG, etc. as metadata 1, and writes the previous metadata as metadata 2 (S1017).
그런 후, 서버(100)는, 캐시 관리자로 메타데이터를 출력(S1018)함과 아울러 파티션으로 메타데이터 쓰기 요청한다(S1019). After that, the server (100) outputs metadata to the cache manager (S1018) and requests writing metadata to the partition (S1019).
그런 후, 서버(100)는, 파티션으로 암호화된 섹터 쓰기를 요청한다(S1020).After that, the server (100) requests writing of an encrypted sector to a partition (S1020).
서버(100)는, 쓰기 요청 완료까지 대기(S1021)한 후, 쓰기 성공이 확인(S1022)되면, 암호화 쓰기 완료 통지를 사용자에게 출력한다(S1023). The server (100) waits until the write request is completed (S1021), and when the write success is confirmed (S1022), it outputs an encrypted write completion notification to the user (S1023).
그런 후, 서버(100)는, 2번 메타데이터를 삭제(S1024)하고, 캐시 관리자로 메타데이터를 출력한다(S1025).After that, the server (100) deletes metadata No. 2 (S1024) and outputs the metadata to the cache manager (S1025).
반면, 쓰기 성공이 확인되지 않을 경우(S1022), 서버(100)는 소정 재시도 횟수의 초과 여부를 판단한다(S1026).On the other hand, if the writing success is not confirmed (S1022), the server (100) determines whether the specified number of retries has been exceeded (S1026).
소정 재시도 횟수를 초과하지 않은 것으로 판단되면, 서버(100)는 파티션으로 누락 부분 쓰기 재요청(S1027)한 후, S1021 단계로 진행한다. If it is determined that the number of retries has not been exceeded, the server (100) re-requests writing the missing part to the partition (S1027) and then proceeds to step S1021.
반면, 소정 재시도 횟수를 초과하게 되면(S1026), 암호화된 섹터 쓰기에 실패한 것으로 판단된 경우(S1029), 암호화 쓰기 실패 통지를 사용자에게 출력(S1032)한 후, 캐시 관리자로 내보낸 메타데이터를 되돌린다(S1033). On the other hand, if the number of retries exceeds a predetermined number (S1026), and if it is determined that the encrypted sector write has failed (S1029), an encrypted write failure notification is output to the user (S1032), and then the metadata exported to the cache manager is returned (S1033).
반면, 암호화된 섹터 쓰기에 성공한 것으로 판단된 경우(S1029), 서버(100)는, 데이터 손실을 통지(S1030)한 후, 캐시 관리자로 내보낸 메타데이터를 되돌린다(S1031). On the other hand, if it is determined that the encrypted sector write is successful (S1029), the server (100) notifies data loss (S1030) and then returns the metadata exported to the cache manager (S1031).
다음으로, 도 14를 참조하면, 서버(100)는, 1번 메타데이터로 복호화를 시도(S1034)하여 무결성 검증에 성공할 경우(S1035), 2번 메타데이터를 삭제(S1036)하고, 도 13의 S1017로 진행한다.Next, referring to FIG. 14, the server (100) attempts to decrypt metadata No. 1 (S1034) and, if integrity verification is successful (S1035), deletes metadata No. 2 (S1036) and proceeds to S1017 of FIG. 13.
반면, 1번 메타데이터로 복호화를 시도(S1034)하여 무결성 검증에 성공하지 못했을 경우(S1035), 서버(100)는 메타데이터 2번 값을 보유하고 있는지를 판단한다(S1037). On the other hand, if decryption is attempted with metadata 1 (S1034) and integrity verification is not successful (S1035), the server (100) determines whether it has metadata 2 value (S1037).
S1037의 판단 결과 메타데이터 2번 값을 보유하고 있을 경우, 서버(100)는, 메타데이터 2번 값으로 복호화를 시도(S1038)하여 무결성 검증에 성공할 경우(S1039), 메타데이터 1번 값을 2번 값으로 대체한 후, 2번 값을 삭제(S1040)한 후, 도 13의 S1017로 진행한다.If the judgment result of S1037 holds metadata value 2, the server (100) attempts to decrypt metadata value 2 (S1038), and if the integrity verification is successful (S1039), it replaces metadata value 1 with value 2, deletes value 2 (S1040), and then proceeds to S1017 of Fig. 13.
반면, 메타데이터 2번 값으로 복호화를 시도(S1038)하여 무결성 검증에 실패할 경우(S1039), 서버(100)는, 이전 데이터 복호화 불가 경고를 출력(S1041)한 후, 쓰기 재개 여부 판단 절차를 실행한다(S1042).On the other hand, if decryption is attempted with metadata value 2 (S1038) and integrity verification fails (S1039), the server (100) outputs a warning that previous data cannot be decrypted (S1041) and then executes a procedure to determine whether to resume writing (S1042).
한편, S1037에서 메타데이터 2번 키를 보유하고 있지 않을 경우, 서버(100)는, 키 관리 장치(10)에 암호화 키를 요청(S1043)하여 수신할 경우(S1044), S1038로 진행한다. Meanwhile, if the server (100) does not have metadata key 2 in S1037, it requests an encryption key from the key management device (10) (S1043) and if it receives it (S1044), it proceeds to S1038.
반면, 키 관리 장치(10)로부터 암호화 키를 수신하지 못할 경우(S1044), 서버(100)는, 디스크 암호화 키 수신 불가 경고를 출력(S1045)한 후, S1042로 진행한다. On the other hand, if the encryption key is not received from the key management device (10) (S1044), the server (100) outputs a warning that the disk encryption key cannot be received (S1045) and then proceeds to S1042.
한편, 도 12 및 도 14에서 쓰기 재개 여부 판단 절차(S1016, S1042)의 상세한 절차는 도 15에 도시되어 있다. Meanwhile, the detailed procedure of the procedure for determining whether to resume writing (S1016, S1042) in FIGS. 12 and 14 is illustrated in FIG. 15.
도 15를 참조하면, 서버(100)는, 정책에 따라 쓰기 재개가 가능할 경우(S1061), 메타데이터에 저장된 섹터 상태 정보를 discard로 표기(S1062)하고, 캐시 관리자로 메타데이터를 내보낸(S1063) 후, 암호화 쓰기 작업을 다시 실행한다(S1064).Referring to FIG. 15, if write resumption is possible according to the policy (S1061), the server (100) marks the sector status information stored in the metadata as discard (S1062), exports the metadata to the cache manager (S1063), and then re-executes the encryption write operation (S1064).
반면, 정책에 따라 쓰기 재개가 가능하지 않을 경우(S1061), 서버(100)는, 암호화 쓰기 실패를 통지한다(S1065).On the other hand, if write resumption is not possible according to the policy (S1061), the server (100) notifies an encryption write failure (S1065).
(3) 최적화 모드(3) Optimization mode
도 16은 실시예에 따른 최적화 모드에서의 디스크 암호화 쓰기 방법을 설명하기 위한 순서도이다. Figure 16 is a flowchart for explaining a disk encryption writing method in an optimization mode according to an embodiment.
안전 모드에서는 우연히 같은 섹터에 대한 쓰기 명령이 연속으로 실패하여도 이전에 기록한 암호화된 데이터를 복호화할 수 있다. 그러나 일반적으로 디스크 자체가 고장 나지 않는 이상 같은 섹터에 대해서 연속으로 데이터를 쓰는 데 실패하는 확률은 매우 낮다. 따라서 일부 응용에서는 쓰기 명령이 연속으로 실패하지 않는다고 가정하고, 도 16과 같이 물리 디스크 읽기 요청을 생략한 최적화 모드 쓰기를 도입할 수 있다. 구체적으로는 안전 모드의 '두 메타데이터 중 어떠한 값을 이용하여 암호화된 데이터 섹터를 복호화할 수 있는지 식별하는 절차'를 '두 메타데이터 중 첫 번째 메타데이터를 가져오는 절차'로 대체한다. 쓰기 명령이 연속으로 실패하지 않는다고 가정하였기 때문에, 쓰기 명령이 한 번 실패하거나 비정상 종료가 발생하여도 항상 이전에 기록한 암호화된 데이터 섹터를 복호화할 수 있다. In safe mode, even if consecutive write commands to the same sector accidentally fail, previously recorded encrypted data can be decrypted. However, the probability of consecutive data write failure to the same sector is generally very low unless the disk itself fails. Therefore, some applications can assume that the write command does not fail consecutively and introduce an optimized mode write that omits the physical disk read request, as shown in Fig. 16. Specifically, the 'procedure for identifying which of the two metadata can be used to decrypt the encrypted data sector' in safe mode is replaced with the 'procedure for obtaining the first of the two metadata.' Since it is assumed that the write command does not fail consecutively, even if the write command fails once or an abnormal termination occurs, the previously recorded encrypted data sector can always be decrypted.
구체적으로, 도 16을 참조하면, 서버(100)는, 대상 섹터 메타데이터가 캐시 관리자에 존재할 경우(S1101), 캐시 관리자로부터 메타데이터를 로딩한다(S1102).Specifically, referring to FIG. 16, if target sector metadata exists in the cache manager (S1101), the server (100) loads metadata from the cache manager (S1102).
반면, 대상 섹터 메타데이터가 캐시 관리자에 존재하지 않을 경우(S1101), 서버(100)는, 파티션에서 메타데이터를 읽어 캐시 관리자에게 등록(S1103)한 후, S1102로 진행한다. On the other hand, if the target sector metadata does not exist in the cache manager (S1101), the server (100) reads the metadata from the partition and registers it with the cache manager (S1103), and then proceeds to S1102.
그런 후, 서버(100)는, 기록할 데이터가 zero-fill일 경우(S1104), discard 작업을 실행한다(S1105).After that, the server (100) executes a discard operation (S1105) if the data to be recorded is zero-fill (S1104).
반면, 기록할 데이터가 zero-fill이 아닐 경우(S1104), 서버(100)는, 새로운 암호화 요소 생성(IV/Nonce)(S1106)하고, 섹터 암호화 및 무결성 검증값 계산을 수행한다(S1107).On the other hand, if the data to be recorded is not zero-fill (S1104), the server (100) generates a new encryption element (IV/Nonce) (S1106) and performs sector encryption and integrity verification value calculation (S1107).
서버(100)는, 메타데이터가 1개일 경우(S1108), 도 13의 S1017로 진행하고, 메타데이터가 1개가 아닐 경우(S1108), 이전에 기록한 메타데이터 상태가 discard 또는 초기화 상태인지를 판단한다(S1109).If there is one metadata (S1108), the server (100) proceeds to S1017 of Fig. 13, and if there is not one metadata (S1108), it determines whether the previously recorded metadata status is discard or initialized (S1109).
S1109의 판단 결과, 이전에 기록한 메타데이터 상태가 discard 또는 초기화 상태일 경우, 서버(100)는, 1번 메타데이터 상태를 discard로 변경(S1110)한 후, 도 13의 S1017로 진행한다. As a result of the judgment of S1109, if the previously recorded metadata state is discard or initialized, the server (100) changes the metadata state 1 to discard (S1110) and then proceeds to S1017 of FIG. 13.
S1109의 판단 결과, 이전에 기록한 메타데이터 상태가 discard 또는 초기화 상태가 아닐 경우, 서버(100)는, 2번 메타데이터를 삭제(S1111)한 후, 도 13의 S1017로 진행한다. As a result of the judgment of S1109, if the previously recorded metadata state is not a discard or initialization state, the server (100) deletes metadata No. 2 (S1111) and then proceeds to S1017 of Fig. 13.
(4) Discard 작업 절차(4) Discard operation procedure
도 17은 실시예에 따른 안전 모드 및 최적화 모드에서의 Discard 작업 실행 과정을 설명하기 위한 순서도이다. 즉, 도 17은 도 12의 S1005 및 도 16의 S1105인 Discard 작업 실행 단계를 상세히 설명한 도면이다. Fig. 17 is a flowchart for explaining the process of executing the Discard task in the safe mode and the optimized mode according to the embodiment. That is, Fig. 17 is a drawing explaining in detail the Discard task execution step S1005 of Fig. 12 and S1105 of Fig. 16.
섹터를 기록하는 과정에서 모든 데이터가 zero-fill 되어 있다면 SSD의 trim 작업 등의 편의를 위해 따로 discard 절차를 수행한다. SSD 컨트롤러와 같이 discard 명령어를 지원하는 저장 장치라면 zero-fill을 대신하는 별도 절차를 수행할 수 있으며, 메타데이터에서는 섹터가 비었음을 표기하고 빠르게 쓰기 작업을 마칠 수 있다.If all data is zero-filled during the process of recording a sector, a separate discard procedure is performed for the convenience of SSD trim operations. If the storage device supports the discard command, such as an SSD controller, a separate procedure can be performed instead of zero-fill, and the metadata can indicate that the sector is empty and quickly complete the write operation.
구체적으로, 도 17을 참조하면, 서버(100)는, 메타데이터 상태를 discard로 표기하고(S1201), 캐시 관리자로 메타데이터를 출력(S1202)하여 파티션으로 메타데이터 쓰기를 요청함(S1203)과 아울러 파티션에 섹터 discard를 요청한다(S1204).Specifically, referring to FIG. 17, the server (100) marks the metadata status as discard (S1201), outputs metadata to the cache manager (S1202), requests metadata writing to a partition (S1203), and requests sector discard to the partition (S1204).
그런 후, 서버(100)는, 쓰기 요청이 완료되기를 대기(S1205)하다 쓰기에 성공한 것으로 확인된 경우(S1206), 암호화 쓰기 완료를 통지한다(S1207).After that, the server (100) waits for the write request to be completed (S1205), and if it is confirmed that the write is successful (S1206), it notifies the completion of the encrypted write (S1207).
반면, 쓰기 성공이 확인되지 않을 경우(S1206), 서버(100)는 소정 재시도 횟수의 초과 여부를 판단한다(S1208).On the other hand, if the writing success is not confirmed (S1206), the server (100) determines whether the specified number of retries has been exceeded (S1208).
소정 재시도 횟수가 초과하지 않은 것으로 판단되면(S1208), 서버(100)는 파티션으로 누락 부분 쓰기를 재요청(S1209)한 후, S1205로 진행한다. If it is determined that the specified number of retries has not been exceeded (S1208), the server (100) re-requests writing of the missing part to the partition (S1209) and then proceeds to S1205.
반면, 소정 재시도 횟수를 초과하게 되면(S1208), 서버(100)는 메타데이터 섹터 쓰기나 암호화된 데이터 섹터 쓰기 중 하나가 성공할 경우(S1210), 암호화 쓰기 부분 완료를 통지한다(S1211).On the other hand, if the number of predetermined retries is exceeded (S1208), the server (100) notifies the completion of the encrypted write portion (S1211) if either the metadata sector write or the encrypted data sector write is successful (S1210).
반면, 메타데이터나 섹터 쓰기 중 하나도 성공하지 못할 경우(S1210), 서버(100)는 캐시 관리자로 내보낸 메타데이터를 되돌리고(S1212), 암호화 쓰기 실패 통지를 사용자에게 출력한다(S1213). On the other hand, if neither metadata nor sector writing is successful (S1210), the server (100) returns the metadata exported to the cache manager (S1212) and outputs an encryption write failure notification to the user (S1213).
(5) 메타데이터 캐시 반영 절차(5) Metadata cache reflection procedure
도 18은 실시예에 따른 메타데이터 캐시 반영 과정을 설명하기 위한 순서도이다. Figure 18 is a flowchart for explaining a metadata cache reflection process according to an embodiment.
서버(100)의 캐시 관리자가 설정한 캐시 용량이 가득 찬 경우, 캐시 기간이 만료된 경우, 및 디스크 암호화 프로세스가 종료된 경우를 포함하는 경우들 중 적어도 하나일 경우, 메타데이터를 파티션(20)에 반영한다. When at least one of the following occurs, including when the cache capacity set by the cache manager of the server (100) is full, when the cache period has expired, and when the disk encryption process has ended, metadata is reflected to the partition (20).
도 12에 도시된 S1002, 도 13의 S1018, S1025, 도 15의 S1063, 도 16의 S1102, 도 17의 S1202, 도 19의 S1401 및 도 20의 S1416, S1429에서 호출될 수 있다. 이때, 캐시 관리자가 설정한 캐시 용량이 가득 찬 경우에는 무조건 수행되고, 용량이 가득 차지 않았다면 정책에 따라 수행 여부 결정 가능할 수 있다. 이 절차는 실제 읽기/쓰기 작업과 동기되어 실행될 필요는 없으므로, 백그라운드 실행을 원칙으로 한다.It can be called in S1002 illustrated in Fig. 12, S1018, S1025 of Fig. 13, S1063 of Fig. 15, S1102 of Fig. 16, S1202 of Fig. 17, S1401 of Fig. 19, and S1416, S1429 of Fig. 20. At this time, if the cache capacity set by the cache manager is full, it is performed unconditionally, and if the capacity is not full, it can be determined whether to perform it or not according to the policy. Since this procedure does not need to be executed in synchronization with the actual read/write operation, background execution is the principle.
구체적으로 도 18을 참조하면, 서버(100)는, 캐시 용량이 가득 찬 경우, 캐시 기간이 만료된 경우, 및 디스크 암호화 프로세스가 종료된 경우를 포함하는 경우들 중 적어도 하나일 경우, 캐시 관리자에서 삭제할 메타데이터 캐시를 선택한다(S1301). 캐시 관리자의 캐시 용량, 캐시 만료 기간, flush 정책 등은 필요에 따라 적절히 설정하여 사용할 수 있다.Specifically, referring to FIG. 18, the server (100) selects a metadata cache to be deleted from the cache manager (S1301) when at least one of the following cases occurs: the cache capacity is full, the cache period has expired, and the disk encryption process has ended. The cache capacity, cache expiration period, flush policy, etc. of the cache manager can be appropriately set and used as needed.
그런 후, 서버(100)는, 삭제할 메타데이터에 변경된 부분이 있을 경우(S1302), 파티션으로 메타데이터 쓰기를 요청한(S1303) 후, 쓰기 요청 완료를 대기(S1304)한다. 그런 후, 캐시 관리자에서 메타데이터를 제거한다(S1305).Then, if there is a changed part in the metadata to be deleted (S1302), the server (100) requests writing of metadata to a partition (S1303) and then waits for completion of the write request (S1304). Then, the metadata is removed from the cache manager (S1305).
이때, 쓰기에 실패할 경우, S1301 또는 S1303을 재시도 횟수만큼 반복하면서 성공 여부를 확인할 수 있다. 즉, 캐시 관리자에 남아있는 내용은 쓰기 실패하더라도 괜찮기 때문에, 쓰기에 실패한 메타데이터 캐시가 있다면 일단 남겨두고, 성공할 만한 다른 후보를 찾아 시도한다. At this time, if the write fails, you can check whether it was successful by repeating S1301 or S1303 as many times as the number of retries. That is, since the contents remaining in the cache manager are okay even if the write fails, if there is a metadata cache that failed to be written, leave it for now and try another candidate that is likely to succeed.
그런데, 메타데이터 2개가 기록되어 있는 안전한 상태로 남아있는 상태에서 실패하는 것이므로, 데이터는 복호화할 수는 있지만, 전체 디스크 암호화 서비스에서는 문제가 될 수도 있다. However, since it fails while the two metadata are still in a safe state, the data can be decrypted, but it may be a problem for full disk encryption services.
따라서, S1301의 재시도 횟수를 초과한 경우에는 '캐시 내보내기 실패 통지'를 서비스로 내보낸 다음, 캐시 관리자에서 메타데이터를 제거하는 것이 적절할 수 있다. Therefore, if the number of retries for S1301 is exceeded, it may be appropriate to send a 'Cache Export Failure Notification' to the service and then remove the metadata from the cache manager.
이때, 메타데이터를 제거하지 않는다는 선택을 한다면 정책상 서비스가 중지되는 문제가 발생될 수 있고, 제거하더라도 본 발명에서는 캐시 내보내기가 이루어지지 않아 2개의 메타데이터가 남는 경우를 대비해 읽기, 쓰기 과정을 설계하였으므로 안전하게 처리해 줄 수 있다.At this time, if you choose not to remove the metadata, a problem may arise where the service is stopped due to policy, and even if it is removed, the present invention does not export the cache, so the read/write process is designed to handle it safely in case two metadata remain.
반면, 삭제할 메타데이터에 변경된 부분이 없을 경우(S1302), 서버(100)는 바로 캐시 관리자에서 메타데이터를 제거한다(S1305).On the other hand, if there is no change in the metadata to be deleted (S1302), the server (100) immediately removes the metadata from the cache manager (S1305).
도 19 및 도 20은 실시예에 따른 디스크 암호화 읽기 방법을 설명하기 위한 순서도이다. FIGS. 19 and 20 are flowcharts for explaining a disk encryption reading method according to an embodiment.
본 발명의 디스크 암호화 기술은 디스크 암호화 키의 동적 변경을 지원하기 위해 여러 개의 디스크 암호화 키를 동시에 사용하고, 안전성을 위해 암호화된 데이터를 복호화할 때 두 개의 메타데이터를 사용하므로, 일반적인 디스크 암호화 기술과는 다른 섹터 읽기 작업이 필요하다.The disk encryption technology of the present invention uses multiple disk encryption keys simultaneously to support dynamic change of disk encryption keys, and uses two metadata when decrypting encrypted data for security, so that a sector read operation different from that of general disk encryption technologies is required.
도 19 및 도 20을 참조하면, 정상적으로 읽기 작업이 완료되는 경우는 세 가지로 Discard 섹터이므로 zero-fill 데이터를 반환하는 경우, 1번 메타데이터로 복호화하는 데 성공하는 경우 및 2번 메타데이터로 복호화하는 데 성공하는 경우를 포함할 수 있다. 정상적으로 데이터를 읽었다면 암호화에 사용한 디스크 암호화 키의 갱신이 필요한지 확인하고, 필요하다면 최신 또는 신규 키로 재 암호화를 수행할 수 있다.Referring to FIGS. 19 and 20, there are three cases in which a read operation is completed normally: a case in which zero-fill data is returned because it is a Discard sector, a case in which decryption with metadata 1 is successful, and a case in which decryption with metadata 2 is successful. If data is read normally, it is checked whether the disk encryption key used for encryption needs to be updated, and if necessary, re-encryption can be performed with the latest or new key.
오류가 발생하는 경우로는 복호화에 필요한 디스크 암호화 키를 서버(100) 및 키 관리 장치(10) 모두에게서 받을 수 없는 경우, 제공된 메타데이터로 복호화를 시도하였으나 무결성 검증을 통과하지 못한 경우가 있다. 두 경우 모두 암호학적인 안전성을 위해 zero-fill 데이터를 반환하고 디스크 암호화 서비스를 통해 문제가 발생하였음을 알리는 것을 원칙으로 한다.In the event of an error, there are cases where the disk encryption key required for decryption cannot be received from both the server (100) and the key management device (10), and where decryption is attempted using the provided metadata but does not pass the integrity verification. In both cases, the principle is to return zero-fill data for cryptographic security and to notify the disk encryption service that a problem has occurred.
구체적으로, 도 19를 참조하면, 서버(100)는, 대상 섹터 메타데이터가 캐시 관리자에 존재할 경우(S1400), 캐시 관리자로부터 메타데이터를 로딩한다(S1401).Specifically, referring to FIG. 19, if target sector metadata exists in the cache manager (S1400), the server (100) loads metadata from the cache manager (S1401).
반면, 대상 섹터 메타데이터가 캐시 관리자에 존재하지 않을 경우(S1400), 서버(100)는, 파티션에서 메타데이터를 읽어 캐시 관리자에게 등록(S1402)한 후, S1401로 진행한다. On the other hand, if the target sector metadata does not exist in the cache manager (S1400), the server (100) reads the metadata from the partition and registers it with the cache manager (S1402), and then proceeds to S1401.
그런 후, 서버(100)는, 도 9의 세부 메타데이터(23)에 따라 메타데이터의 섹터 상태 정보가 discard로 표기된 경우(S1403), zero-fill 데이터를 반환한다(S1404).After that, the server (100) returns zero-fill data (S1404) if the sector status information of the metadata is marked as discard (S1403) according to the detailed metadata (23) of Fig. 9.
반면, 메타데이터에 discard 섹터로 저장되어 있지 않을 경우(S1403), 서버(100)는 데이터 섹터 읽기(S1405)를 수행한다. On the other hand, if it is not stored as a discard sector in the metadata (S1403), the server (100) performs data sector reading (S1405).
그런 후, 메타데이터 1번 키를 보유한 경우(S1406), 서버(100)는, 도 20의 S1410으로 진행한다. Then, if the server (100) has metadata key 1 (S1406), the server (100) proceeds to S1410 of Fig. 20.
반면, 메타데이터 1번 키를 보유하지 못한 경우(S1406), 서버(100)는, 키 관리 장치(10)에 암호화키를 요청(S1407)하여 수신할 경우(S1408), 도 20의 S1410으로 진행한다. On the other hand, if the server (100) does not have the metadata key 1 (S1406), the server (100) requests an encryption key from the key management device (10) (S1407) and if it receives it (S1408), it proceeds to S1410 of FIG. 20.
반면, 키 관리 장치(10)로부터 암호화 키를 수신하지 못할 경우(S1408), 서버(100)는, 디스크 암호화 키 수신 불가 통지를 출력(S1409)한 후, S1404로 진행한다. On the other hand, if the encryption key is not received from the key management device (10) (S1408), the server (100) outputs a notification that the disk encryption key cannot be received (S1409) and then proceeds to S1404.
다음으로, 도 20을 참조하면, 서버(100)는, 1번 메타데이터로 복호화를 시도(S1410)하여 무결성 검증에 성공할 경우(S1411), 평문 데이터를 반환한다(S1412). 이후, 2번 메타데이터가 존재할 경우(S1413), 서버(100)는 2번 메타데이터를 삭제(S1415)하고 캐시 관리자에게 메타데이터를 출력한다(S1416). 이때, 필요할 경우 재 암호화 작업이 추가적으로 실행(S1414)될 수 있다. Next, referring to FIG. 20, the server (100) attempts to decrypt with metadata No. 1 (S1410), and if the integrity verification is successful (S1411), it returns plaintext data (S1412). Afterwards, if metadata No. 2 exists (S1413), the server (100) deletes metadata No. 2 (S1415) and outputs the metadata to the cache manager (S1416). At this time, if necessary, a re-encryption task may be additionally executed (S1414).
반면, 1번 메타데이터로 복호화를 시도(S1410)하여 무결성 검증에 성공하지 못했을 경우(S1411), 서버(100)는 메타데이터 2번 값이 존재하는지 판단한다(S1417). On the other hand, if decryption is attempted with metadata 1 (S1410) and integrity verification is not successful (S1411), the server (100) determines whether metadata 2 value exists (S1417).
서버(100)는, 메타데이터 2번 값이 존재하지 않을 경우(S1417), 복호화 불가를 통지함(S1418)과 아울러 zero-fill 데이터를 반환한다(S1419).If metadata value 2 does not exist (S1417), the server (100) notifies that decryption is impossible (S1418) and returns zero-fill data (S1419).
반면, 메타데이터 2번 값이 존재할 경우(S1417), 서버(100)는, 메타데이터 2번에 기록된 디스크 암호화 키를 보유하고 있는지를 판단한다(S1420). On the other hand, if metadata 2 value exists (S1417), the server (100) determines whether it has the disk encryption key recorded in metadata 2 (S1420).
S1420의 판단 결과 메타데이터 2번 값을 보유하고 있을 경우, 서버(100)는, 메타데이터 2번 값으로 복호화를 시도(S1424)하여 무결성 검증에 성공할 경우(S1425), 평문 데이터를 반환(S1427)한 후, 메타데이터 1번 값을 2번 값으로 대체한 후, 2번 값을 삭제한다(S1428). 그런 후, 캐시 관리자로 메타데이터를 내보낸 후(S1429), 필요하다면 재암호화 작업이 추가적으로 실행될 수 있다 (S1430).If the judgment result of S1420 holds metadata value 2, the server (100) attempts to decrypt metadata value 2 (S1424), and if the integrity verification succeeds (S1425), returns plaintext data (S1427), replaces metadata value 1 with value 2, and then deletes value 2 (S1428). After that, the metadata is exported to the cache manager (S1429), and if necessary, a re-encryption task can be additionally executed (S1430).
반면, 메타데이터 2번 값으로 복호화를 시도(S1424)하여 무결성 검증에 실패할 경우(S1425), 서버(100)는, 이전 데이터 복호화 불가 통지를 출력(S1426)한 후, S1419로 진행한다. On the other hand, if decryption is attempted with metadata value 2 (S1424) and integrity verification fails (S1425), the server (100) outputs a notification that previous data cannot be decrypted (S1426) and then proceeds to S1419.
한편, S1420에서 메타데이터 2번 키를 보유하고 있지 않을 경우, 서버(100)는, 키 관리 장치(10)에 암호화 키를 요청(S1421)하여 수신할 경우(S1422), S1424로 진행한다. Meanwhile, if the server (100) does not have metadata key 2 in S1420, it requests an encryption key from the key management device (10) (S1421) and if it receives it (S1422), it proceeds to S1424.
반면, 키 관리 장치(10)로부터 암호화 키를 수신하지 못할 경우(S1422), 서버(100)는, 디스크 암호화 키 수신 불가 통지를 출력(S1423)한 후, S1419로 진행한다. On the other hand, if the encryption key is not received from the key management device (10) (S1422), the server (100) outputs a notification that the disk encryption key cannot be received (S1423) and then proceeds to S1419.
도 21은 실시예에 따른 재 암호화 방법을 설명하기 위한 순서도이다. 즉, 도 20의 S1414 및 S1430과정을 설명하기 위한 것이다. Fig. 21 is a flowchart for explaining a re-encryption method according to an embodiment. That is, it is for explaining processes S1414 and S1430 of Fig. 20.
도 21을 참조하면, 읽기 작업 도중에 최신 디스크 암호화 키로 암호화되지 않은 섹터를 발견할 수도 있다. 또한, 유효기간 만료, 키 정보 유출, 각종 정책 등의 이유로 유효하지 않은 디스크 암호화 키로 암호화된 섹터를 발견할 수도 있다. 이 경우 최신 또는 신규 디스크 암호화 키로 섹터를 재 암호화하는 작업이 필요하다. Referring to Figure 21, during a read operation, sectors that are not encrypted with the latest disk encryption key may be found. In addition, sectors encrypted with an invalid disk encryption key may be found due to expiration of the validity period, key information leakage, various policies, etc. In this case, it is necessary to re-encrypt the sectors with the latest or new disk encryption key.
즉, 서버(100)는, 메타데이터 1번 값에 기록된 키 번호의 디스크 암호화 키가 갱신 대상으로 판단될 경우(S1501), 최신 키로 쓰기 작업을 실행한다(S1502).That is, if the server (100) determines that the disk encryption key of the key number recorded in the metadata 1 value is a target for renewal (S1501), it executes a write operation with the latest key (S1502).
디스크 I/O에서는 이미 평문을 요청자에게 반환한 상태이기 때문에, 필요하다면 재 암호화 프로세스는 이용자를 방해하지 않고 백그라운드에서 수행할 수도 있다.Since the plaintext has already been returned to the requester in disk I/O, the re-encryption process can be performed in the background without disturbing the user if necessary.
다음으로, 실시예에 따른 백그라운드 재 암호화 방법에 대해 상세히 살펴보기로 한다. Next, we will look in detail at the background re-encryption method according to the embodiment.
전술한 읽기/쓰기 작업 및 재 암호화 절차를 활용하여, 디스크 암호화 서비스의 중단 없이 저장된 데이터들을 항상 최신 디스크 암호화 키로 암호화하여 저장하는 백그라운드 재 암호화 서비스를 구성할 수 있다.By utilizing the read/write operations and re-encryption procedures described above, a background re-encryption service can be configured to always encrypt and store stored data with the latest disk encryption key without interruption of the disk encryption service.
이 서비스는 재 암호화가 필요한 섹터를 결정하고, 어떠한 주기로 재 암호화 서비스를 수행할 것인지 설정할 수 있다. 예를 들어, 디스크 암호화 키의 유효기간을 설정하여 운영하는 경우 만료가 얼마 남지 않은 키로 암호화된 데이터를 신규 키로 재 암호화하도록 설정할 수 있다. 백그라운드 재 암호화 서비스는 서버(100)가 파티션(20)의 유휴 시간을 활용하여 파티션(20)의 첫 번째 섹터부터 마지막 섹터까지 차례대로 읽으면서 재 암호화가 필요한 섹터를 식별하고 필요시 앞서 언급한 읽기 작업 내 재 암호화 프로세스를 수행한다. 필요하다면 재 암호화 작업을 일시 중단하고, 마지막으로 재 암호화를 수행한 섹터 번호를 저장한 뒤, 이후에 재개할 수도 있다.This service can determine the sectors that require re-encryption and set the cycle at which the re-encryption service will be performed. For example, if the disk encryption key is operated by setting the expiration period, data encrypted with a key that is about to expire can be set to be re-encrypted with a new key. The background re-encryption service identifies the sectors that require re-encryption by sequentially reading the first sector of the partition (20) from the last sector by utilizing the idle time of the partition (20) by the server (100) and, if necessary, performs the re-encryption process within the read operation mentioned above. If necessary, the re-encryption operation can be temporarily suspended, the number of the sector where re-encryption was last performed can be stored, and then resumed later.
첫 번째 섹터부터 마지막 섹터까지 모두 읽는 작업을 마치고 나면 더 이상 사용하지 않는 디스크 암호화 키를 식별할 수 있고, 이를 키 관리 장치(10)에 통보하여 사용하지 않는 키를 삭제할 수 있다.After completing the task of reading all sectors from the first sector to the last sector, the disk encryption keys that are no longer in use can be identified and notified to the key management device (10) so that the unused keys can be deleted.
전술한 바와 같은 실시예에 따른 디스크 암호화 장치 및 방법에 따른 효과에 대해 좀 더 상세히 설명하면 다음과 같을 수 있다. The effects of the disk encryption device and method according to the above-described embodiment can be described in more detail as follows.
(1) 디스크 암호화 키의 동적 변경(1) Dynamic change of disk encryption key
일반적인 디스크 암호화 서비스는 일종의 마스터키를 이용하여 디스크 암호화의 전 수명주기에서 하나의 키를 활용하며, 마스터키를 변경하는 방법을 제공하지 않는다. 일부 마스터키 변경 기능을 제공하는 디스크 암호화 서비스는 디스크의 모든 데이터를 한 번에 재 암호화하는 방식을 사용하기 때문에, 재 암호화 과정이 완료되기 전까지 전체 데이터에 대한 접근이 제한될 수밖에 없다. 본 발명의 디스크 암호화 기술을 사용하면 동시에 여러 개의 디스크 암호화 키를 관리할 수 있어 서비스 중단 없이 디스크 암호화 키를 동적으로 변경할 수 있다.A typical disk encryption service uses a master key, which is one key used throughout the entire life cycle of disk encryption, and does not provide a method for changing the master key. Some disk encryption services that provide a master key change function use a method of re-encrypting all data on the disk at once, so access to all data is inevitably restricted until the re-encryption process is completed. The disk encryption technology of the present invention allows multiple disk encryption keys to be managed simultaneously, allowing the disk encryption key to be dynamically changed without service interruption.
단일 마스터키 사용의 위험을 완화하기 위해 마스터키를 이용하여 섹터별로 다른 키를 유도하여 암호화하는 방법이 제안된 바 있다. 하지만 섹터별로 유도된 키의 안전성은 하나의 마스터키의 안전성에 의존할 수밖에 없으므로, 이 방법을 사용하더라도 오랜 사용 또는 유출 등으로 인해 마스터키의 안전성에 문제가 발생하면, 마스터키를 변경해야 한다. 이 방법 역시 마스터키를 변경하기 위해서는 디스크 암호화 서비스의 중단이 불가피하다.In order to mitigate the risk of using a single master key, a method of deriving a different key for each sector using the master key and encrypting it has been proposed. However, since the security of the key derived for each sector cannot but depend on the security of a single master key, even if this method is used, if there is a problem with the security of the master key due to long-term use or leakage, the master key must be changed. This method also inevitably requires the suspension of the disk encryption service in order to change the master key.
(2) 부분 신뢰 환경을 위한 원격 키 관리 서버 도입(2) Introduction of a remote key management server for a partial trust environment
클라우드 서비스 등에서는 암호화된 디스크 섹터를 읽을 수 있는 다양한 주체가 있어 본인의 장비를 직접 활용하는 환경에 비하면 비교적 낮은 신뢰성밖에 제공하지 못한다. 따라서 이러한 환경에서는 신뢰성 높은 디스크 암호화 키 관리 방안이 필수적이다. 본 발명은 이를 위해 신뢰할 수 있는 원격 키 관리 서버를 활용하는 방법을 제시한다. (안전한 장소에서 운용되는) 원격 키 관리 서버를 도입함으로써 클라우드 서비스 환경이 가질 수밖에 없는 키 관리 신뢰성의 한계를 극복하고, 효율적이고 안전하게 디스크 암호화 키를 변경할 수 있다. 더욱이 클라우드 서비스상의 서버(100)가 운영 중이지 않을 때는 디스크 암호화 키를 보관하지 않고, 운영 중에도 최소한의 디스크 암호화 키만 관리하게 함으로써 키의 노출 가능성을 최소화할 수도 있다. 한편, 본 발명은 키 관리 서버가 없는 경우의 대체 방안도 제시하고 있다.In cloud services, etc., there are various entities that can read encrypted disk sectors, and thus, they provide relatively low reliability compared to environments where one directly utilizes one's own equipment. Therefore, in such environments, a highly reliable disk encryption key management method is essential. For this purpose, the present invention proposes a method of utilizing a reliable remote key management server. By introducing a remote key management server (operated in a secure location), the limitations of key management reliability that a cloud service environment inevitably has can be overcome, and the disk encryption key can be changed efficiently and safely. Furthermore, when the server (100) on the cloud service is not in operation, the disk encryption key is not stored, and even when in operation, only the minimum disk encryption key is managed, thereby minimizing the possibility of key exposure. Meanwhile, the present invention also proposes an alternative method in cases where there is no key management server.
(3) 디스크 암호화 과정 중 데이터 손실 최소화(3) Minimizing data loss during disk encryption process
일반적인 디스크 암호화는 하나의 섹터 쓰기 명령을 위해 데이터 섹터 쓰기 명령과 메타데이터 섹터 쓰기 명령을 수행하여야 한다. 메타데이터 섹터 쓰기를 생략한 디스크 암호화 서비스를 구축할 수는 있지만, 안전성과 효율성에 한계가 있을 뿐더러 디스크 암호화 키의 동적 변경을 제공할 수도 없다.General disk encryption requires a data sector write command and a metadata sector write command for one sector write command. It is possible to build a disk encryption service that omits metadata sector writes, but this has limitations in security and efficiency, and cannot provide dynamic changes to disk encryption keys.
이 과정에서 전원 차단, 네트워크 디스크의 연결 중단 등의 문제로 일부 쓰기 명령만 수행되면 데이터가 손실된다.During this process, if only some write commands are performed due to problems such as power outage, network disk disconnection, etc., data will be lost.
본 발명의 디스크 암호화 기술은 이러한 문제점을 보완하고 여러 개의 디스크 암호화 키를 운용하면서 발생할 수 있는 불일치 시점을 보완하기 위해 메타데이터 이중화 방식을 도입하였다. 본 발명의 쓰기 작업을 이용하면, 디스크 쓰기 절차 중 어느 단계에서 실패하더라도, 데이터가 손실되지 않고 보존될 수 있다.The disk encryption technology of the present invention introduces a metadata duplication method to complement these problems and to compensate for inconsistencies that may occur when operating multiple disk encryption keys. By utilizing the write operation of the present invention, data can be preserved without being lost even if there is a failure at any stage during the disk write procedure.
이는 항상 안정적인 읽기/쓰기를 보장하는 로컬 파티션(20-1)뿐만 아니라 다른 전산망에 연결된 네트워크 파티션(20-2) 등 다양한 환경에서도 디스크 암호화를 운용할 수 있게 해준다.This allows disk encryption to operate in a variety of environments, such as a local partition (20-1) that always guarantees stable read/write, as well as a network partition (20-2) connected to another computing network.
(4) 디스크 암호화 과정 중 디스크 I/O 최적화(4) Optimizing disk I/O during disk encryption process
본 발명의 디스크 암호화 기술은 적극적인 캐시 관리자 운용과 비동기 제어 방식을 활용하여 메타데이터 이중화 방식을 채택하였을 때 발생할 수 있는 성능 저하를 최소화하였다. 메타데이터를 이중으로 구성하였을 때 단순하게 처리하면 파티션(20)에 대한 논리 읽기 작업은 2회의 디스크 읽기 수행이 필요하며, 논리 쓰기 작업은 2회의 디스크 읽기와 3회의 디스크 쓰기 수행이 필요하다. 캐시 관리자를 적극적으로 도입하는 본 발명의 최적화 기술을 이용하면 메타데이터가 캐시에 저장되어 있다는 가정에 따라 논리 읽기 작업은 디스크 읽기 1회, 논리 쓰기 작업은 디스크 쓰기 2회로 완료할 수 있다.The disk encryption technology of the present invention minimizes the performance degradation that may occur when adopting a metadata duplication method by utilizing an active cache manager operation and an asynchronous control method. When metadata is configured in duplicate, if processed simply, a logical read operation for a partition (20) requires two disk reads, and a logical write operation requires two disk reads and three disk writes. By utilizing the optimization technology of the present invention that actively introduces a cache manager, a logical read operation can be completed with one disk read, and a logical write operation can be completed with two disk writes, assuming that metadata is stored in the cache.
도 22는 실시예에 따른 컴퓨터 시스템 구성을 나타낸 도면이다.Figure 22 is a diagram showing a computer system configuration according to an embodiment.
실시예에 따른 디스크 암호화 장치는 컴퓨터로 읽을 수 있는 기록매체와 같은 컴퓨터 시스템(1000)에서 구현될 수 있다.A disk encryption device according to an embodiment may be implemented in a computer system (1000) such as a computer-readable recording medium.
컴퓨터 시스템(1000)은 버스(1020)를 통하여 서로 통신하는 하나 이상의 프로세서(1010), 메모리(1030), 사용자 인터페이스 입력 장치(1040), 사용자 인터페이스 출력 장치(1050) 및 스토리지(1060)를 포함할 수 있다. 또한, 컴퓨터 시스템(1000)은 네트워크(1080)에 연결되는 네트워크 인터페이스(1070)를 더 포함할 수 있다. 프로세서(1010)는 중앙 처리 장치 또는 메모리(1030)나 스토리지(1060)에 저장된 프로그램 또는 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(1030) 및 스토리지(1060)는 휘발성 매체, 비휘발성 매체, 분리형 매체, 비분리형 매체, 통신 매체, 또는 정보 전달 매체 중에서 적어도 하나 이상을 포함하는 저장 매체일 수 있다. 예를 들어, 메모리(1030)는 ROM(1031)이나 RAM(1032)을 포함할 수 있다.The computer system (1000) may include one or more processors (1010), memory (1030), user interface input devices (1040), user interface output devices (1050), and storage (1060) that communicate with each other via a bus (1020). In addition, the computer system (1000) may further include a network interface (1070) that is connected to a network (1080). The processor (1010) may be a central processing unit or a semiconductor device that executes programs or processing instructions stored in the memory (1030) or the storage (1060). The memory (1030) and the storage (1060) may be storage media that include at least one of a volatile medium, a nonvolatile medium, a removable medium, a non-removable medium, a communication medium, or an information transmission medium. For example, the memory (1030) may include a ROM (1031) or a RAM (1032).
이상에서 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.Although the embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art to which the present invention pertains will understand that the present invention can be implemented in other specific forms without changing the technical idea or essential features thereof. Therefore, it should be understood that the embodiments described above are exemplary in all respects and not restrictive.
Claims (19)
메타데이터는,
최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과,
직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함하되,
암호화 대상의 메타데이터 섹터를 읽어들이는 단계;
읽어들인 메타데이터의 제1 값으로 제2 값을 대체하는 단계;
데이터를 암호화함에 따라 암호화 키 관련 정보를 메타데이터의 제1 값으로 기록하는 단계;
생성된 메타데이터를 암호화 대상에 쓰기하는 단계; 및
암호화된 데이터를 암호화 대상에 쓰기하는 단계; 및
암호화 쓰기 완료 통지를 출력하는 단계를 포함하되,
암호화 대상의 메타데이터에서 제2 값을 삭제하는 단계; 및
제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기하는 단계를 더 포함하는, 디스크 암호화 쓰기 방법. The encryption target includes a data sector where encrypted data is recorded and a metadata sector where metadata, which is information related to the encryption key, is recorded.
Metadata is,
The first value is information related to the encryption key used when performing the latest write, and
Including the second value, which is information related to the encryption key used in the previous write,
Step of reading the metadata sector of the encryption target;
A step of replacing a second value with a first value of the read metadata;
A step of recording information related to an encryption key as the first value of metadata while encrypting data;
A step of writing the generated metadata to the encryption target; and
A step of writing encrypted data to an encryption target; and
Including a step of outputting a notification of completion of encryption write,
A step of deleting a second value from the metadata of the encryption target; and
A disk encryption write method further comprising the step of writing metadata including a first value to an encryption target.
캐시 관리자에게 생성된 메타데이터를 출력함과 동시에 수행되는, 디스크 암호화 쓰기 방법.In the first paragraph, the step of writing the generated metadata to the encryption target is:
A method of writing disk encryption that is performed simultaneously with outputting the generated metadata to the cache manager.
그 이전에 캐시 관리자에게 제1 값을 포함하는 메타데이터를 출력하는 단계를 더 수행하는, 디스크 암호화 쓰기 방법.In the first paragraph, the step of writing metadata including the first value to the encryption target is:
A method of writing disk encryption, further comprising the step of outputting metadata including the first value to the cache manager prior to that.
메타데이터는,
최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과,
직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함하되,
암호화 대상에서 메타데이터 섹터 및 데이터 섹터를 읽기하는 단계;
읽어들인 데이터를 메타데이터의 제1 값으로 복호화하는 단계; 및
복호화에 성공할 경우, 복호화된 평문 데이터를 반환하는 단계를 포함하되,
메타데이터의 제2 값이 존재할 경우, 암호화 대상에서 메타데이터의 제2 값을 삭제하는 단계를 더 포함하는, 디스크 암호화 읽기 방법.The encryption target includes a data sector where encrypted data is recorded and a metadata sector where metadata, which is information related to the encryption key, is recorded.
Metadata is,
The first value is information related to the encryption key used when performing the latest write, and
Including the second value, which is information related to the encryption key used in the previous write,
Step of reading metadata sectors and data sectors from the encryption target;
A step of decrypting the read data into the first value of metadata; and
Including a step of returning the decrypted plaintext data if the decryption is successful,
A disk encryption read method further comprising the step of deleting the second value of the metadata from the encryption target if the second value of the metadata exists.
복호화에 성공하지 못할 경우, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 단계;
복호화에 성공할 경우, 복호화된 평문 데이터를 반환하는 단계; 및
암호화 대상에서 메타데이터의 제1 값을 제2 값으로 대체하고, 제2 값은 삭제하는 단계를 더 포함하는, 디스크 암호화 읽기 방법.In clause 5,
If decryption is not successful, a step of decrypting the read data into the second value of the metadata;
If decryption is successful, a step of returning the decrypted plaintext data; and
A disk encryption reading method further comprising the step of replacing a first value of metadata in an encryption target with a second value and deleting the second value.
읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 데 성공하지 못할 경우, 복호화 불가 통지를 출력하는 단계를 더 포함하는, 디스크 암호화 읽기 방법.In Article 7,
A disk encryption reading method further comprising the step of outputting a decryption failure notification if the read data is not successfully decrypted into the second value of the metadata.
메타데이터의 제1 값의 갱신이 필요할 경우, 데이터 섹터에 기록된 데이터들 중 갱신이 필요한 디스크 암호화 키로 암호화된 데이터를 복호화하여 최신 또는 신규 암호화 키로 재 암호화하여 암호화 대상에 기록하는 단계를 더 포함하는, 디스크 암호화 읽기 방법.In Article 7,
A disk encryption reading method further comprising the step of decrypting data encrypted with a disk encryption key requiring renewal among data recorded in a data sector, re-encrypting it with a latest or new encryption key, and recording it in an encryption target when an update of a first value of metadata is required.
프로그램을 실행하는 프로세서를 포함하며,
프로그램은,
키 관리 장치와 통신하여 적어도 하나의 암호화 대상 각각의 암호화에 필요한 암호화 키를 수신하고, 수신된 암호화 키를 이용하여 암호화 대상의 데이터를 암호화하되,
사용자로부터의 요청에 따라 암호화 대상으로 입력되는 데이터를 암호화하여 쓰기하거나, 암호화 대상으로부터 데이터를 읽어들여 복호화한 후 사용자에게 출력하고,
암호화 대상은,
암호화된 데이터가 기록되는 데이터 섹터 및 암호화 키 관련 정보인 메타데이터를 기록하는 메타데이터 섹터를 포함하되,
메타데이터는,
최신 쓰기 수행시 사용된 암호화 키 관련 정보인 제1 값과,
직전 쓰기 수행시 사용된 암호화 키 관련 정보인 제2 값을 포함하고,
프로그램은,
키 관리 장치에 신규 암호화 대상에 대한 식별자를 전달하여 암호화 키를 요청하고, 키 관리 장치로부터 신규 암호화 대상의 고유 ID, 디스크 암호화 키, 키 번호 및 키 생성 시각 중 적어도 하나를 포함하는 정보를 수신함에 따라 해당 신규 암호화 대상에 대한 초기화를 수행하는, 디스크 암호화 장치. memory in which at least one program is recorded; and
Contains a processor for executing a program;
The program is,
Communicate with a key management device to receive an encryption key required for encryption of at least one encryption target, and encrypt data of the encryption target using the received encryption key.
Encrypts and writes data input as an encryption target upon request from the user, or reads data from the encryption target, decrypts it, and then outputs it to the user.
The target of encryption is,
Including a data sector where encrypted data is recorded and a metadata sector where metadata, which is information related to the encryption key, is recorded.
Metadata is,
The first value is information related to the encryption key used when performing the latest write, and
Contains a second value, which is information related to the encryption key used in the previous write,
The program is,
A disk encryption device that requests an encryption key by transmitting an identifier for a new encryption target to a key management device, and performs initialization for the new encryption target upon receiving information including at least one of a unique ID of the new encryption target, a disk encryption key, a key number, and a key generation time from the key management device.
키 관리 장치와 연동하여 암호화 대상 추가 서비스, 디스크 암호화 키의 폐기 서비스, 파티션 제거 서비스, 디스크 암호화 서비스 기동 서비스, 디스크 암호화 키 요청 서비스 및 파티션의 암호화 정보 구성 서비스 중 적어도 하나를 수행하는, 디스크 암호화 장치. In Article 10, the program,
A disk encryption device that performs at least one of the following services: adding an encryption target service, discarding a disk encryption key service, deleting a partition service, starting a disk encryption service, requesting a disk encryption key service, and configuring encryption information for a partition, in conjunction with a key management device.
암호화 대상의 메타데이터 섹터를 읽어들이고, 읽어들인 메타데이터의 제1 값으로 제2 값을 대체하고, 데이터를 암호화함에 따라 암호화 키 관련 정보를 메타데이터의 제1 값으로 기록하고, 생성된 메타데이터를 암호화 대상에 쓰기하고, 암호화된 데이터를 암호화 대상에 쓰기하고, 암호화 쓰기 완료 통지를 출력하고, 암호화 대상의 메타데이터에서 제2 값을 삭제하고, 제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기하는, 디스크 암호화 장치. In Article 10, the program,
A disk encryption device that reads a metadata sector of an encryption target, replaces a second value with a first value of the read metadata, records encryption key-related information as the first value of the metadata as data is encrypted, writes the generated metadata to the encryption target, writes the encrypted data to the encryption target, outputs an encryption write completion notification, deletes the second value from the metadata of the encryption target, and writes metadata including the first value to the encryption target.
생성된 메타데이터를 암호화 대상에 쓰기함에 있어, 캐시 관리자에게 생성된 메타데이터를 출력함과 동시에 수행되고,
제1 값을 포함하는 메타데이터를 암호화 대상에 쓰기함에 있어, 그 이전에 캐시 관리자에게 제1 값을 포함하는 메타데이터를 출력하는, 디스크 암호화 장치.In Article 13, the program,
When writing the generated metadata to the encryption target, it is performed at the same time as outputting the generated metadata to the cache manager.
A disk encryption device, which outputs metadata including a first value to a cache manager prior to writing metadata including a first value to an encryption target.
암호화 대상에서 메타데이터 섹터 및 데이터 섹터를 읽기하고, 읽어들인 데이터를 메타데이터의 제1 값으로 복호화하고, 복호화에 성공할 경우, 복호화된 평문 데이터를 반환하고 필요에 따라 재암호화 하는, 디스크 암호화 장치.In Article 10, the program,
A disk encryption device that reads metadata sectors and data sectors from an encryption target, decrypts the read data into a first value of the metadata, and if the decryption is successful, returns the decrypted plaintext data and re-encrypts it as necessary.
메타데이터의 제2 값이 존재할 경우, 암호화 대상에서 메타데이터의 제2 값을 삭제하는, 디스크 암호화 장치.In Article 15, the program,
A disk encryption device that deletes a second value of metadata from an encryption target if a second value of metadata exists.
복호화에 성공하지 못할 경우, 읽어들인 데이터를 메타데이터의 제2 값으로 복호화하고, 복호화에 성공할 경우, 복호화된 평문 데이터를 반환하고, 복호화 대상에서 메타데이터의 제1 값을 제2 값으로 대체하고, 제2 값은 삭제하는, 디스크 암호화 장치.In Article 15, the program,
A disk encryption device that, if decryption is not successful, decrypts the read data into the second value of the metadata, and, if decryption is successful, returns the decrypted plaintext data, replaces the first value of the metadata with the second value in the decryption target, and deletes the second value.
읽어들인 데이터를 메타데이터의 제2 값으로 복호화하는 데 성공하지 못할 경우, 복호화 불가 통지를 출력하는, 디스크 암호화 장치.In Article 17, the program,
A disk encryption device that outputs a decryption failure notification when it fails to successfully decrypt the read data into the second value of the metadata.
메타데이터의 제1 값의 갱신이 필요할 경우, 데이터 섹터에 기록된 데이터들 중 갱신이 필요한 디스크 암호화 키로 암호화된 데이터를 복호화하여 최신 또는 신규 암호화 키로 재 암호화하여 암호화 대상에 기록하는, 디스크 암호화 장치.In Article 17, the program,
A disk encryption device that, when the first value of metadata needs to be updated, decrypts data encrypted with a disk encryption key that needs to be updated among the data recorded in the data sector, re-encrypts it with the latest or new encryption key, and records it on the encryption target.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230150661A KR102766152B1 (en) | 2023-11-03 | 2023-11-03 | Apparatus and Method for Disk Encryption |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230150661A KR102766152B1 (en) | 2023-11-03 | 2023-11-03 | Apparatus and Method for Disk Encryption |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| KR102766152B1 true KR102766152B1 (en) | 2025-02-14 |
Family
ID=94629998
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020230150661A Active KR102766152B1 (en) | 2023-11-03 | 2023-11-03 | Apparatus and Method for Disk Encryption |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102766152B1 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20050073748A (en) * | 2004-01-10 | 2005-07-18 | 삼성전자주식회사 | Method for copying and reproducing the data of storage medium |
| KR20190018869A (en) * | 2017-08-16 | 2019-02-26 | 주식회사 케이티 | System and method for providing storage service based on block chain |
| JP2023530581A (en) * | 2020-07-01 | 2023-07-19 | インターナショナル・ビジネス・マシーンズ・コーポレーション | system-generated dataset encryption key |
-
2023
- 2023-11-03 KR KR1020230150661A patent/KR102766152B1/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20050073748A (en) * | 2004-01-10 | 2005-07-18 | 삼성전자주식회사 | Method for copying and reproducing the data of storage medium |
| KR20190018869A (en) * | 2017-08-16 | 2019-02-26 | 주식회사 케이티 | System and method for providing storage service based on block chain |
| JP2023530581A (en) * | 2020-07-01 | 2023-07-19 | インターナショナル・ビジネス・マシーンズ・コーポレーション | system-generated dataset encryption key |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4643427B2 (en) | Storage system with built-in encryption function | |
| US9830278B1 (en) | Tracking replica data using key management | |
| US9792450B2 (en) | Preserving redundancy in data deduplication systems by encryption | |
| US8892905B2 (en) | Method and apparatus for performing selective encryption/decryption in a data storage system | |
| US6249866B1 (en) | Encrypting file system and method | |
| US9571278B1 (en) | Encryption key recovery in the event of storage management failure | |
| US7818586B2 (en) | System and method for data encryption keys and indicators | |
| US8099605B1 (en) | Intelligent storage device for backup system | |
| CN102171704B (en) | External encryption and recovery management with hardware encrypted storage devices | |
| EP1766492B1 (en) | Method, system and securing means for data archiving with automatic encryption and decryption by fragmentation of keys | |
| US8799681B1 (en) | Redundant array of encrypting disks | |
| KR101405720B1 (en) | Accelerated cryptography with an encryption attribute | |
| US7793041B2 (en) | Method for controlling access to data of a tape data storage medium | |
| US8977865B2 (en) | Data encryption conversion for independent agents | |
| KR20130101147A (en) | System and method for in-place encryption | |
| JP2007028502A (en) | Storage device | |
| US10089245B2 (en) | Management of encryption keys for multi-mode network storage device | |
| US20250317275A1 (en) | Log-structured secure data storage method and apparatus | |
| US20090177895A1 (en) | Controller for controlling logical volume-related settings | |
| KR101983120B1 (en) | Method for replication of database | |
| JP4551172B2 (en) | Electronic document storage device, program, and electronic document reference device | |
| US20080065909A1 (en) | Virtual disk management methods | |
| US12309258B2 (en) | Encryption in a distributed storage system utilizing cluster-wide encryption keys | |
| US20240045811A1 (en) | Method and system for secure backup management of remote computing machines using quantum key distribution and encrypted ram | |
| KR102766152B1 (en) | Apparatus and Method for Disk Encryption |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20231103 |
|
| PA0201 | Request for examination |
Patent event code: PA02011R01I Patent event date: 20231103 Comment text: Patent Application |
|
| PA0302 | Request for accelerated examination |
Patent event date: 20231214 Patent event code: PA03022R01D Comment text: Request for Accelerated Examination |
|
| PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20240812 Patent event code: PE09021S01D |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20250203 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20250206 Patent event code: PR07011E01D |
|
| PR1002 | Payment of registration fee |
Payment date: 20250207 End annual number: 3 Start annual number: 1 |
|
| PG1601 | Publication of registration |