Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBKDF2 해시 생성시 솔트의 엔트로피 개선 #1380

Merged
1 commit merged into from
Apr 13, 2015
Merged

PBKDF2 해시 생성시 솔트의 엔트로피 개선 #1380

1 commit merged into from
Apr 13, 2015

Conversation

kijin
Copy link
Contributor

@kijin kijin commented Apr 8, 2015

PBKDF2 해시 생성에 사용되는 솔트가 16진수(0-9, a-f)로 인코딩되어 있어서 엔트로피가 글자당 4비트밖에 되지 않습니다. 안 그래도 DB의 비번 컬럼 길이 제한 때문에 솔트를 12글자로 줄여 쓰고 있는데... 총 48비트는 좀 그렇네요 ㅡ.ㅡ;; (bcrypt의 솔트는 무려 128비트입니다.)

그래서 솔트 생성 포맷을 alnum으로 바꾸어 글자당 6비트, 총 72비트의 엔트로피를 가지도록 수정합니다. 원래 이렇게 쓰는 게 정상인데 어딘가에서 실수가 있었던 것 같네요. (createSecureSalt() 메소드의 기본값을 바꿔놓고 잊어버린 듯...)

@ghost ghost added the type/enhancement label Apr 13, 2015
@ghost ghost added this to the 1.8.1 milestone Apr 13, 2015
@ghost ghost self-assigned this Apr 13, 2015
ghost pushed a commit that referenced this pull request Apr 13, 2015
PBKDF2 해시 생성시 솔트의 엔트로피 개선
@ghost ghost merged commit c5c890b into xpressengine:develop Apr 13, 2015
@kijin kijin deleted the fix/pbkdf2-hexsalt branch April 13, 2015 05:32
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant