ec: Avoid exposing internal function

This commit is contained in:
Léo Lam
2018-05-15 21:24:45 +02:00
parent b9dd94b9b2
commit e83591f188
3 changed files with 12 additions and 4 deletions

View File

@ -250,8 +250,8 @@ ReturnCode IOSC::ComputeSharedKey(Handle dest_handle, Handle private_handle, Han
}
// Calculate the ECC shared secret.
std::array<u8, 0x3c> shared_secret;
point_mul(shared_secret.data(), private_entry->data.data(), public_entry->data.data());
const std::array<u8, 0x3c> shared_secret =
ComputeSharedSecret(private_entry->data.data(), public_entry->data.data());
std::array<u8, 20> sha1;
mbedtls_sha1(shared_secret.data(), shared_secret.size() / 2, sha1.data());