1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

test_check: Add MARK_SECRET_DATA to test_ed25519_keccak

This commit is contained in:
Saleem Rashid 2017-06-04 12:46:29 +01:00 committed by Pavol Rusnak
parent d1f97d07f8
commit d4b5e64ba2
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -2830,12 +2830,17 @@ START_TEST(test_ed25519_keccak)
for (size_t j = 0; j < 32; j++) {
private_key[j] = reversed_key[32 - j - 1];
}
MARK_SECRET_DATA(private_key, sizeof(private_key));
ed25519_publickey_keccak(private_key, public_key);
UNMARK_SECRET_DATA(public_key, sizeof(public_key));
ck_assert_mem_eq(public_key, fromhex(tests[i].public_key), 32);
ed25519_sign_keccak(fromhex(tests[i].data), tests[i].length, private_key, public_key, signature);
UNMARK_SECRET_DATA(signature, sizeof(signature));
ck_assert_mem_eq(signature, fromhex(tests[i].signature), 64);
UNMARK_SECRET_DATA(private_key, sizeof(private_key));
}
}
END_TEST