secure data deletion for usb flash memory 성균관대학교 윤 재 성 시스템 컨설턴트
TRANSCRIPT
Secure Data Deletion
for USB Flash Memory
성균관대학교 윤 재 성
시스템 컨설턴트
Page 2
Contents
NOR vs NAND
Lee et al.’s method
비교 및 결론
Sun et al.'s method
Proposed method
YAFFES
StrictMode
Page 3
NOR vs NAND
Differences between NOR and NAND
NOR NAND
Write Unit Byte or Word Page
Erase Unit Block Block
Page Size - 4 KB(typically)
# of Page per Block - 32 KB(typically)
Block Size 64 KB(typically) 128 KB(typically)
Block Endurance 104 - 105 times 104 - 106 times
`NOR : byte or word 단위로 읽기 /쓰기를 하며 , random access 방식
`NAND : Page 단위로 읽기 /쓰기를 하며 , page 단위의 순차적인 접근방식을 사용
Page 4
Sun et al.'s method(Hybrid method)
Zero-overwrite process
Deleted page
Valid page
Deleted page
…
Empty page
Empty page
block
zero-overwrite
0x00
Valid page
0x00
…
Empty page
Empty page
block
Page 5
Sun et al.'s method(Hybrid method)
Block erase process
block
0xFF
0xFF
0xFF
0xFF
0xFF
0xFF
Valid page1
Valid page2
Valid page3
…
Empty page
Empty page
other blockblock
Deleted page
Valid page1
Deleted page
…
Valid page2
Valid page3
Page 6
Lee et al.’s method(Encryption method)
Data storing in encryption method
Data
Encrypted page
Encrypted page
Empty page
…
Header block
Other file’s key1
Other file’s key2
…
Encryption keyStore on header block
Data block
Encryption
Page 7
Lee et al.’s method(Encryption method)
Data deletion in encruption method
Encrypted page
Encrypted page
Empty page
…Data block
Encrypted page
Encrypted page
Empty page
…Data block
OxFF
OxFF
OxFF
OxFF
Other file’s key1
Other file’s key1
Empty page
…
Copy to another header block
Header blockHeader block
Other file’s key1
Other file’s key2
…Header block
Page 8
Proposed method
Key generation process
…
Step 1
CSPRNG()
Step 2
EMasterKey(FEKi)
MasterKey
User password
File EncryptionUsed to
encrypt files
N-times Hash Func
Header Block
FEKi
Page 9
Proposed method
Key generation process
Step 1
CSPRNG()FEKi
Cryptographically seucre pseudo-random number generator
ANSI 표준 (X9.82, NIST SP 800-90 and PKCS#14)
FEKi = CSPRNG()
Page 10
Proposed method
Key generation process
…
Step 2
EMasterKey(FEKi)
MasterKey
User password
Header Block
N-times Hash Func
SHA-1 과 같은 해쉬함수를 사용
Brute Force 를 방해하기 위해 적어도 1000 이상 수행
Masterkey = Hn(user password) =>EMaster key (FEKi)
Page 11
Proposed method
Data encryption process
Page 12
Proposed method
Data deletion(Overwrite process)
Encrypted page
Encrypted page
Empty page
…Data block
Other file’s key1
Other file’s key2
…Header block
Encrypted page
Encrypted page
Empty page
…
Other file’s key1
Other file’s key2
0xFF
Header blockData block
0x00
Overwritewith 0x00
Page 13
Proposed method
Data deletion(Eraseure process)
0x00
0x00
0x00
Header block
0x00
0x00
0x00
Header block
Overwritewith 0x00
0x00
0xFF
0xFF
0xFF
Header block
Erase
0xFF
Page 14
Proposed method
Data store
Data EncrypedData
Encrypted page
Encrypted page
Empty page
…
Data block
.....
…
.....
Header block
Stored on header blockFEKi
Page 15
비교 및 결론 (1/4)
Page 16
비교 및 결론 (2/4)
Page 17
비교 및 결론 (3/4)
3 가지 방법의 실행 시간
Page 18
비교 및 결론 (4/4)
3 가지 방법의 실행 시간
Page 19
YAFFES(1/7)
NAND 플래시 메모리 전용 파일 시스템
YAFFES(Yet Another Flash File System)
LFS(log-structured file system) 방식을 사용하므로 , 마운트 시에 플래시 메모리 전체를 스캔해야 하므로 메모리가 클수록 마운팅 시간이 길어짐
Chunk : YAFFES 의 페이지를 이르는 용어
- 파일의 내용 (Data) 과 파일 속성 정보 (Header) 가 저장되고 , 각 Chunk 는 file id 와Chunk number 로 구분 가능 .
Tag : YAFFES 의 스페어를 이르는 용어
- Tag 의 관리정보는 Chunk 에 저장된 내용이 어떤 파일의 것인지에 대한 식별자 , 파일 내부의 Chunk 의 위치 , 갱신 연산 시 증가되는 일련번호 , chunk 내에 유효한바이트 수 , 에러검출을 위한 ECC 등으로 구성됨 .
Page 20
YAFFES(2/7)
Chunk 구조
Page 21
YAFFES(3/7)
Chunk 구조
Page 22
YAFFES(4/7)
메타데이터와 데이터와의 관계
Page 23
YAFFES(5/7)
메인 메모리 구조
Page 24
YAFFES(6/7)
YAFFES Object Data Structure
Page 25
YAFFES(7/7)
YAFFES Object Data Structure
Page 26
StrictMode
진저브래드에서부터 추가된 일종의 개발툴로 개발자가 실수하는 것들을감지하고 해결할해결 할 수 있도록 돕는 모드( 실재로 수정하지는 않음 단지 알려줌 )
StrictMode 의 정의
StrictMode 의 주요기능 메인 스레드에서 디스크 접근 , 네트워크 접근등의 비효율적인 작업을 하려는 것을 감지하여 프로그램 이 부드럽게 작동하도록 돕고 , 빠른 응답을 가지도록 함
안드로이드의 파일 시스템인 YAFFS(Yet Another Flash File System) 파일 시스템은 I/O 작업을 할 때 Global 범위의 lock 이 사용됨 .
간단히 말하면 전체 디바이스 상에서 오직 한 번에 하나의 디스크작업만이 가능한 것
[ 사용 예 ]- 전체 어플리케이션에 StrictMode 설정 public void onCreate() { if (DEVELOPER_MODE) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() // or .detectAll() for all detectable problems .penaltyLog() .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects() .detectLeakedClosableObjects() .penaltyLog() .penaltyDeath() .build()); } super.onCreate(); }