1# 2# Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the Apache License 2.0 (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 9# Tests start with one of these keywords 10# Cipher Decrypt Derive Digest Encoding KDF MAC PBE 11# PrivPubKeyPair Sign Verify VerifyRecover 12# and continue until a blank line. Lines starting with a pound sign are ignored. 13 14Title = PBKDF2 tests 15 16KDF = PBKDF2 17Ctrl.pkcs5 = pkcs5:1 18Ctrl.pass = pass:password 19Ctrl.salt = salt:salt 20Ctrl.iter = iter:1 21Ctrl.digest = digest:sha1 22Output = 0c60c80f961f0e71f3a9b524af6012062fe037a6 23 24KDF = PBKDF2 25Ctrl.pkcs5 = pkcs5:1 26Ctrl.pass = pass:password 27Ctrl.salt = salt:salt 28Ctrl.iter = iter:1 29Ctrl.digest = digest:sha256 30Output = 120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b 31 32KDF = PBKDF2 33Ctrl.pkcs5 = pkcs5:1 34Ctrl.pass = pass:password 35Ctrl.salt = salt:salt 36Ctrl.iter = iter:1 37Ctrl.digest = digest:sha512 38Output = 867f70cf1ade02cff3752599a3a53dc4af34c7a669815ae5d513554e1c8cf252c02d470a285a0501bad999bfe943c08f050235d7d68b1da55e63f73b60a57fce 39 40KDF = PBKDF2 41Ctrl.pkcs5 = pkcs5:1 42Ctrl.pass = pass:password 43Ctrl.salt = salt:salt 44Ctrl.iter = iter:2 45Ctrl.digest = digest:sha1 46Output = ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957 47 48KDF = PBKDF2 49Ctrl.pkcs5 = pkcs5:1 50Ctrl.pass = pass:password 51Ctrl.salt = salt:salt 52Ctrl.iter = iter:2 53Ctrl.digest = digest:sha256 54Output = ae4d0c95af6b46d32d0adff928f06dd02a303f8ef3c251dfd6e2d85a95474c43 55 56KDF = PBKDF2 57Ctrl.pkcs5 = pkcs5:1 58Ctrl.pass = pass:password 59Ctrl.salt = salt:salt 60Ctrl.iter = iter:2 61Ctrl.digest = digest:sha512 62Output = e1d9c16aa681708a45f5c7c4e215ceb66e011a2e9f0040713f18aefdb866d53cf76cab2868a39b9f7840edce4fef5a82be67335c77a6068e04112754f27ccf4e 63 64KDF = PBKDF2 65Ctrl.pkcs5 = pkcs5:1 66Ctrl.pass = pass:password 67Ctrl.salt = salt:salt 68Ctrl.iter = iter:4096 69Ctrl.digest = digest:sha1 70Output = 4b007901b765489abead49d926f721d065a429c1 71 72KDF = PBKDF2 73Ctrl.pkcs5 = pkcs5:1 74Ctrl.pass = pass:password 75Ctrl.salt = salt:salt 76Ctrl.iter = iter:4096 77Ctrl.digest = digest:sha256 78Output = c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a 79 80KDF = PBKDF2 81Ctrl.pkcs5 = pkcs5:1 82Ctrl.pass = pass:password 83Ctrl.salt = salt:salt 84Ctrl.iter = iter:4096 85Ctrl.digest = digest:sha512 86Output = d197b1b33db0143e018b12f3d1d1479e6cdebdcc97c5c0f87f6902e072f457b5143f30602641b3d55cd335988cb36b84376060ecd532e039b742a239434af2d5 87 88KDF = PBKDF2 89Ctrl.pass = pass:passwordPASSWORDpassword 90Ctrl.salt = salt:saltSALTsaltSALTsaltSALTsaltSALTsalt 91Ctrl.iter = iter:4096 92Ctrl.digest = digest:sha1 93Output = 3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038 94 95KDF = PBKDF2 96Ctrl.pass = pass:passwordPASSWORDpassword 97Ctrl.salt = salt:saltSALTsaltSALTsaltSALTsaltSALTsalt 98Ctrl.iter = iter:4096 99Ctrl.digest = digest:sha256 100Output = 348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c4e2a1fb8dd53e1c635518c7dac47e9 101 102KDF = PBKDF2 103Ctrl.pass = pass:passwordPASSWORDpassword 104Ctrl.salt = salt:saltSALTsaltSALTsaltSALTsaltSALTsalt 105Ctrl.iter = iter:4096 106Ctrl.digest = digest:sha512 107Output = 8c0511f4c6e597c6ac6315d8f0362e225f3c501495ba23b868c005174dc4ee71115b59f9e60cd9532fa33e0f75aefe30225c583a186cd82bd4daea9724a3d3b8 108 109KDF = PBKDF2 110Ctrl.pkcs5 = pkcs5:1 111Ctrl.hexpass = hexpass:7061737300776f7264 112Ctrl.hexsalt = hexsalt:7361006c74 113Ctrl.iter = iter:4096 114Ctrl.digest = digest:sha1 115Output = 56fa6aa75548099dcc37d7f03425e0c3 116 117KDF = PBKDF2 118Ctrl.pkcs5 = pkcs5:1 119Ctrl.hexpass = hexpass:7061737300776f7264 120Ctrl.hexsalt = hexsalt:7361006c74 121Ctrl.iter = iter:4096 122Ctrl.digest = digest:sha256 123Output = 89b69d0516f829893c696226650a8687 124 125KDF = PBKDF2 126Ctrl.pkcs5 = pkcs5:1 127Ctrl.hexpass = hexpass:7061737300776f7264 128Ctrl.hexsalt = hexsalt:7361006c74 129Ctrl.iter = iter:4096 130Ctrl.digest = digest:sha512 131Output = 9d9e9c4cd21fe4be24d5b8244c759665 132 133Title = PBKDF2 tests for empty inputs 134 135KDF = PBKDF2 136Ctrl.pkcs5 = pkcs5:1 137Ctrl.pass = pass: 138Ctrl.salt = salt:salt 139Ctrl.iter = iter:1 140Ctrl.digest = digest:sha1 141Output = a33dddc30478185515311f8752895d36ea4363a2 142 143KDF = PBKDF2 144Ctrl.pkcs5 = pkcs5:1 145Ctrl.pass = pass: 146Ctrl.salt = salt:salt 147Ctrl.iter = iter:1 148Ctrl.digest = digest:sha256 149Output = f135c27993baf98773c5cdb40a5706ce6a345cde 150 151KDF = PBKDF2 152Ctrl.pkcs5 = pkcs5:1 153Ctrl.pass = pass: 154Ctrl.salt = salt:salt 155Ctrl.iter = iter:1 156Ctrl.digest = digest:sha512 157Output = 00ef42cdbfc98d29db20976608e455567fdddf14 158