1 / 15

Use of a One-Way Hash without a salt

Use of a One-Way Hash without a salt. System & Network Security Lab 석사 25 기 유창훈 2013.5.23. Table of Contents. 소개 단방향 해쉬함수 단방향 해쉬함수 문제점 단방향 해쉬함수 보완 Q&A. ‘ 보안 시스템의 안전성 ’ = ‘ 약한 부분의 안전성 ’. Introduction. Introduction. 패스워드 저장 방법 단순 텍스트 (Plain text) 단방향 해쉬함수의 다이제스트

leona
Télécharger la présentation

Use of a One-Way Hash without a salt

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Use of a One-Way Hash without a salt System & Network Security Lab 석사 25기 유창훈 2013.5.23

  2. Table of Contents • 소개 • 단방향해쉬함수 • 단방향해쉬함수 문제점 • 단방향해쉬함수 보완 • Q&A

  3. ‘보안 시스템의 안전성’= ‘약한 부분의 안전성’ Introduction

  4. Introduction

  5. 패스워드 저장 방법 단순 텍스트(Plain text) 단방향해쉬함수의 다이제스트 Plaintext : hunter2 Plaintext : hunter3 * 눈사태효과 단방향해쉬함수 f52fbd32b2b3b86ff88ef6c490628285f482af15ddcb29541f94bcf526a3f6c7 fb8c2e2b85ca81eb4350199faddd983cb26af3064614e737ea9f479621cfa57a

  6. 속도 해싱은 원래 패스워드를 저장하기 위한 목적이 아님 10만회 수행시( md5,sha1: 0.1초 , sha-256/384/512: 0.2초) 빠른 처리 속도의 역이용. 인식 가능성 전처리 이용. Rainbow table rainbow attack 모든 비번에 대한 해쉬 결과값 테이블을 공동으로 제작. 현재 숫자로된 패스워드 12자리, 소문자만 10자리, 숫자+소문자 8자리, 숫자+소문자+대문자 7자리에 대한 테이블완성 단방향해쉬함수 문제점

  7. GPU 프로그래밍 CUDA Programming Compute Unified Device Architecture 최초의 CUDA SDK는 2007년 2월에 공개 CUDA 지원 하드웨어 : GeForce 8 시리즈 이상 GPGPU의 통합 개발 환경 제공을 목적 범용적인 프로그램을 처리할 수 있도록 변경 단방향해쉬함수 문제점

  8. / Device code __global__ void test(int *result) { inttidx, bidx; tidx = threadIdx.x; // thread bidx = blockIdx.x; // block result[THREAD_SIZE * bidx + tidx] = (bidx + 2) * (tidx + 1); } // Host code int main() { host_Result= (int *)malloc( BLOCK_SIZE * THREAD_SIZE * sizeof(int) ); cudaMalloc( (void**) &device_Result, sizeof(int) * BLOCK_SIZE * THREAD_SIZE); test<<<BLOCK_SIZE, THREAD_SIZE>>>(device_Result); //Execute Device code cudaMemcpy( host_Result, device_Result, sizeof(int) * BLOCK_SIZE * THREAD_SIZE, cudaMemcpyDeviceToHost); printf("\n%d\n", host_Result[10]); free(host_Result); //Free host memory cudaFree(device_Result); //Free device memory } 단방향해쉬함수 문제점

  9. CUDA장점 높은 연산처리 능력 병렬프로그램의 확장성 저렴한 가격 고성능 서버보다 편리한 설치 및 유지 CUDA 단점 CUDA프로그래밍에서 PC와 그래픽 사이의 데이터 복사과정 단방향해쉬함수 문제점

  10. Salting Salt 와 salting 솔트와패스워드의 다이제스트를 데이터베이스에 저장. 모든 패스워드가 고유의 솔트를 갖고 있어야함. 32바이트 이상을 권고. Salt의 관리. Salt의 적용. 단방향해쉬함수 보완하기 - 1) 솔팅(salting)

  11. 솔팅 추가 전 솔팅 추가 후 단방향해쉬함수 보완하기 - 1) 솔팅(salting) public byte[] getHash(String password) throws NoSuchAlgorithmException { MessageDigestdigest = MessageDigest.getInstance("SHA-256"); digest.reset(); return digest.digest(password.getBytes("UTF-8")); } public byte[] getHash(String password) throws NoSuchAlgorithmException { MessageDigestdigest = MessageDigest.getInstance("SHA-256"); digest.reset(); digest.update(salt); return digest.digest(password.getBytes("UTF-8")); }

  12. 키스트레칭 패스워드의 다이제스트가 다시 해쉬함수의입력이됨. 1초에 수천번vs 1초에 5 번 단방향해쉬함수 보완하기 - 2) 키스트레칭 MessageDigest digest = MessageDigest.getInstance("SHA-256"); digest.reset(); digest.update(salt); byte[] input = digest.digest(password.getBytes("UTF-8")); for (inti = 0; i < iterationNb; i++) { digest.reset(); input = digest.digest(input); }

  13. PBKDF2 ( Password-Based Key Derivation Function) 가장 많이 사용됨. 솔트를 적용한 후 해쉬함수의 반복횟수를 임의로 선택 가능 가볍고 구현이 쉬움. NIST(미국표준연구소) 에서 승인된 알고리즘. 미국 정부 시스템에서도 사용됨. 단방향해쉬함수 보완하기 - 3) Adaptive key derivation function • DIGEST = PBKDF2( Password, Salt, C, Dlen) • Password: 패스워드 • Salt: 솔트 • C: 원하는 반복 수 • DLen: 원하는 다이제스트 길이

  14. 단방향해쉬함수 보완하기 - 3) Adaptive key derivation function • public class PBKDF2 { • //임의 salt를 생성 • SecureRandomrandom = SecureRandom.getInstance("SHA1PRNG"); • byte[] salt = new byte[32]; • random.nextBytes(salt); • …… • // 반복 횟수 : 10000 번 결과 길이 : 256bit • KeySpecks = new PBEKeySpec(password, salt, 10000, 256); • … • }

  15. Q&A 감사합니다.

More Related