알기 쉽게 설명한 패스워드 암호화

http://ppss.kr/archives/16823 

 

패스워드는 bcrypt 나 PBKDF2 가 그래도 안전한것인지요?

 

https://www.dailycred.com/article/bcrypt-calculator 

 

Bcrypt를 통해서 만든 해시가 여러개 나오네요..

 

그런데 비교를 해보면 모두 맞다고 나오네요..

 

https://asecuritysite.com/encryption/bcrypt 

|

댓글 6개

그누보드는 mysql의 sql password를 사용합니다. http://lampload.com/static/create-password-password.php

사이트가 해킹당하면, 패스워드를 맞을때까지 대입해 보는 방법으로(brute force) 찾아 낼수가 있네요..
http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php

PHP5.5버전이상을 쓰시는 분은 password_hash()를 사용하면 되겠네요.
http://php.net/manual/en/function.password-hash.php

에서
[code]
<?php
/**
* Note that the salt here is randomly generated.
* Never use a static salt or one that is not randomly generated.
*
* For the VAST majority of use-cases, let password_hash generate the salt randomly for you
*/
$options = [
'cost' => 11,
'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),
];
echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n";
?>
[/code]

와 같은 방식을 사용하면 되겠네요..
PHP5.5 이전 버전이라고 하면.. 여기 참조하세요..

http://stackoverflow.com/questions/19103340/what-is-an-alternative-to-password-hash-for-php-5-5-5-0
5.5 이전 버전의 사이트에서 사용할때는 PBKDF2 를 이용합니다.
현재도 그렇게 구성한 사이트가 여럿 있구요.
아무래도 brute forcing 에는 key 스트레칭이 들어가는게 여러모로 마음이 편하겠죠.

https://defuse.ca/php-pbkdf2.htm
소스코드는 그렇게 길지 않으니 적용하기는 쉽겠네요.. PHP버전업을 하는 것이 제일 좋을 것 같은데.. 국내 호스팅 업체 사정이...
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
10년 전 조회 1,683
10년 전 조회 1,141
10년 전 조회 1,223
10년 전 조회 1,147
10년 전 조회 1,188
10년 전 조회 1,683
10년 전 조회 2,710
10년 전 조회 1,966
10년 전 조회 1,199
10년 전 조회 1,444
10년 전 조회 1,269
10년 전 조회 1,394
10년 전 조회 3,525
10년 전 조회 940
10년 전 조회 1,426
10년 전 조회 1,390
10년 전 조회 1,230
10년 전 조회 1,190
10년 전 조회 1,183
10년 전 조회 1,736
10년 전 조회 1,120
10년 전 조회 1,291
10년 전 조회 1,236
10년 전 조회 1,404
10년 전 조회 1,820
10년 전 조회 1,377
10년 전 조회 1,525
10년 전 조회 1,521
10년 전 조회 2,042
10년 전 조회 1,827