Replace pinstretcher with Argon2 and new PIN encryption.

This commit is contained in:
Alan Evans
2020-01-22 15:02:06 -05:00
committed by Greyson Parrelli
parent f7a3bb2ae8
commit e37c4b1f87
32 changed files with 635 additions and 578 deletions

View File

@@ -0,0 +1,66 @@
[
{
"name": "Empty",
"pin": "",
"bytes": ""
},
{
"pin": "password",
"bytes": "70617373776f7264"
},
{
"name": "Trailing space",
"pin": "password ",
"bytes": "70617373776f7264"
},
{
"name": "Leading and trailing spaces",
"pin": " password ",
"bytes": "70617373776f7264"
},
{
"name": "Space in word",
"pin": "pass word",
"bytes": "7061737320776f7264"
},
{
"name": "Leading and trailing spaces and space in word",
"pin": " pass word ",
"bytes": "7061737320776f7264"
},
{
"name": "Arabic digits",
"pin": "12345",
"bytes": "3132333435"
},
{
"name": "Leading and trailing spaces around digits",
"pin": " 12345 ",
"bytes": "3132333435"
},
{
"name": "Non-arabic digits",
"pin": "١٢٣٤٥",
"bytes": "3132333435"
},
{
"name": "Mixed digits",
"pin": "١٢٣4٥",
"bytes": "3132333435"
},
{
"name": "Non-arabic digits with non-digit",
"pin": "١٢٣٤٥A",
"bytes": "d9a1d9a2d9a3d9a4d9a541"
},
{
"name": "NFKD Test, Double Char",
"pin": "Ä",
"bytes": "41cc88"
},
{
"name": "NFKD Test, Single Char",
"pin": "Ä",
"bytes": "41cc88"
}
]

View File

@@ -1,13 +1,20 @@
{
"vectors": [
{
"pin": "password",
"backup_id": "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
"argon2_hash": "65AADD2441A6C1979A2EA515DBB7092112703378D6BD83E8C4FF7771F6A7733F88A787415A2ECD79DA0D1016A82A27C5C695C9A19B88B0AA1D35683280AA9A67",
"master_key": "202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F",
"kbs_access_key": "88A787415A2ECD79DA0D1016A82A27C5C695C9A19B88B0AA1D35683280AA9A67",
"iv_and_cipher": "B18815B9B6C159CA9BB7E4F0486BD977AE84BF807F03157091DD04425C921D7D4CA7D5C4E27E31FD75DEF120135434D7",
"registration_lock": "2bf7988224ba35d3554966c65e8dc8c54974b034bdd44cabfd3f15fdb185e3c6"
}
]
}
[
{
"pin":"password",
"backup_id":"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
"argon2_hash":"44652df80490fc66bb864a9e638b2f7dc9e20649671dd66bbb9c37bee2bfecf1ab7e8499d21f80a6600b3b9ee349ac6d72c07e3359fe885a934ba7aa844429f8",
"master_key":"202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
"kbs_access_key":"ab7e8499d21f80a6600b3b9ee349ac6d72c07e3359fe885a934ba7aa844429f8",
"iv_and_cipher":"3f33ce58eb25b40436592a30eae2a8fabab1899095f4e2fba6e2d0dc43b4a2d9cac5a3931748522393951e0e54dec769",
"registration_lock":"2bf7988224ba35d3554966c65e8dc8c54974b034bdd44cabfd3f15fdb185e3c6"
},
{
"pin":"anotherpassword",
"backup_id":"202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
"argon2_hash":"b6f16aa0591732e339b7e99cdd5fd6586a1c285c9d66876947fd82f66ed99757301d9dd1e96f20ce51083f67d3298fd37b97525de8324d5e12ed2d407d3d927b",
"master_key":"88a787415a2ecd79da0d1016a82a27c5c695c9a19b88b0aa1d35683280aa9a67",
"kbs_access_key":"301d9dd1e96f20ce51083f67d3298fd37b97525de8324d5e12ed2d407d3d927b",
"iv_and_cipher":"9d9b05402ea39c17ff1c9298c8a0e86784a352aa02a74943bf8bcf07ec0f4b574a5b786ad0182c8d308d9eb06538b8c9",
"registration_lock":"4a458afa1b07493b23ee9b3f287b70416b2388ca39b5b8c27b4b7585bf73f413"
}
]