Title = Argon2 tests (from rfc 9106 and others)

KDF = ARGON2D
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.secret = hexsecret:0303030303030303
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Ctrl.ad = hexad:040404040404040404040404
Output = 512B391B6F1162975371D30919734294F868E3BE3984F3C1A13A4DB9FABE4ACB

KDF = ARGON2D
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.secret = hexsecret:0303030303030303
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Ctrl.ad = hexad:040404040404040404040404
Ctrl.early_clean = early_clean:1
Output = 512B391B6F1162975371D30919734294F868E3BE3984F3C1A13A4DB9FABE4ACB

KDF = ARGON2I
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.secret = hexsecret:0303030303030303
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Ctrl.ad = hexad:040404040404040404040404
Output = C814D9D1DC7F37AA13F0D77F2494BDA1C8DE6B016DD388D29952A4C4672B6CE8

KDF = ARGON2ID
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.secret = hexsecret:0303030303030303
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Ctrl.ad = hexad:040404040404040404040404
Output = 0D640DF58D78766C08C037A34A8B53C9D01EF0452D75B65EB52520E96B01E659

KDF = ARGON2D
Ctrl.pass = hexpass:31323334353637383930
Ctrl.salt = hexsalt:73616C7473616C74
Output = D16AD773B1C6400D3193BC3E66271603E9DE72BACE20AF3F89C236F5434CDEC99072DDFC6B9C77EA9F386C0E8D7CB0C37CEC6EC3277A22C92D5BE58EF67C7EAA

KDF = ARGON2ID
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.salt = hexsalt:02020202020202020202020202020202
Output = 0A34F1ABDE67086C82E785EAF17C68382259A264F4E61B91CD2763CB75AC189A

KDF = ARGON2D
Ctrl.pass = hexpass:31323334353637383930
Ctrl.salt = hexsalt:73616C7473616C74
Output = D16AD773B1C6400D3193BC3E66271603E9DE72BACE20AF3F89C236F5434CDEC99072DDFC6B9C77EA9F386C0E8D7CB0C37CEC6EC3277A22C92D5BE58EF67C7EAA

KDF = ARGON2D
Ctrl.lanes = lanes:2
Ctrl.memcost = memcost:65536
Ctrl.pass = hexpass:31323334353637383930
Ctrl.salt = hexsalt:73616C7473616C74
Output = 5CA0AB135DE1241454840172696C301C7B8FD99A788CD11CF9699044CADF7FCA0A6E3762CB3043A71ADF6553DB3FD7925101B0CCF8868B098492A4ADDB2486BC

KDF = ARGON2I
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Output = A9A7510E6DB4D588BA3414CD0E094D480D683F97B9CCB612A544FE8EF65BA8E0

KDF = ARGON2ID
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Output = 03AAB965C12001C9D7D0D2DE33192C0494B684BB148196D73C1DF1ACAF6D0C2E

KDF = ARGON2D
Threads = 2
Ctrl.threads = threads:2
Ctrl.lanes = lanes:2
Ctrl.memcost = memcost:65536
Ctrl.pass = pass:1234567890
Ctrl.salt = hexsalt:73616C7473616C74
Output = A86C83A19F0B234ECBA8C275D16D059153F961E4C39EC9B1BE98B3E73D791789363682443AD594334048634E91C493AFFED0BC29FD329A0E553C00149D6DB19AF4E4A354AEC14DBD575D78BA87D4A4BC4746666E7A4E6EE1572BBFFC2EBA308A2D825CB7B41FDE3A95D5CFF0DFA2D0FDD636B32AEA8B4A3C532742D330BD1B90

KDF = ARGON2ID
Threads = 2
Ctrl.threads = threads:2
Ctrl.lanes = lanes:4
Ctrl.iter = iter:3
Ctrl.memcost = memcost:32
Ctrl.pass = hexpass:0101010101010101010101010101010101010101010101010101010101010101
Ctrl.salt = hexsalt:02020202020202020202020202020202
Output = 03AAB965C12001C9D7D0D2DE33192C0494B684BB148196D73C1DF1ACAF6D0C2E

# Expected fail on condition violation: m_cost < 8 * lanes

KDF = ARGON2D
Ctrl.lanes = lanes:100
Ctrl.memcost = memcost:799
Ctrl.salt = hexsalt:02020202020202020202020202020202
Output = 03AAB965C12001C9D7D0D2DE33192C0494B684BB148196D73C1DF1ACAF6D0C2E
Result = KDF_DERIVE_ERROR

# Expected fail on condition violation: m_cost < 2 * syncpoints = 8

KDF = ARGON2D
Ctrl.memcost = memcost:7
Ctrl.pass = hexpass:31323334353637383930
Ctrl.salt = hexsalt:73616C7473616C74
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: threads > avail threads

KDF = ARGON2D
Ctrl.threads = threads:2
Ctrl.lanes = lanes:2
Ctrl.memcost = memcost:65536
Ctrl.pass = hexpass:31323334353637383930
Ctrl.salt = hexsalt:73616C7473616C74
Result = KDF_DERIVE_ERROR

# Expected fail on condition violation: lanes >= 1
KDF = ARGON2D
Ctrl.lanes = lanes:0
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: lanes <= 0xFFFFFF
KDF = ARGON2D
Ctrl.lanes = lanes:0x1000000
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: threads >= 1
KDF = ARGON2D
Ctrl.lanes = threads:0
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: threads <= 0xFFFFFF
KDF = ARGON2D
Ctrl.lanes = threads:0x1000000
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: outlen >= 4
KDF = ARGON2D
Ctrl.size = size:3
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: iter >= 1
KDF = ARGON2D
Ctrl.iter = iter:0
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: saltlen > 8
KDF = ARGON2D
Ctrl.salt = hexsalt:0202
Result = KDF_CTRL_ERROR

# Expected fail on condition violation: invalid version
KDF = ARGON2D
Ctrl.version = version:1
Result = KDF_CTRL_ERROR
