• Antonio Quartulli's avatar
    tests/pkcs5/pbkdf2_hmac: add unit tests for additional SHA algorithms · e87e8857
    Antonio Quartulli authored
    
    
    Test vectors for SHA224,256,384 and 512 have been
    generated using Python's hashlib module by the
    following oneliner:
    
    import binascii, hashlib
    binascii.hexlify(hashlib.pbkdf2_hmac(ALGO, binascii.unhexlify('PASSWORD'), binascii.unhexlify('SALT'), ITER, KEYLEN)))
    
    where ALGO was 'sha224', 'sha256', 'sha384' and 'sha512'
    respectively.
    
    Values for PASSWORD, SALT, ITER and KEYLEN were copied from the
    existent test vectors for SHA1.
    
    For SHA256 we also have two test vectors coming from RFC7914 Sec 11.
    
    Signed-off-by: default avatarAntonio Quartulli <antonio@openvpn.net>
    e87e8857