IOSC: Implement VerifyPublicKeySign for ECC

This commit is contained in:
Léo Lam
2018-05-15 18:01:28 +02:00
parent b86f1ea7b3
commit cec7fded60
4 changed files with 70 additions and 4 deletions

View File

@ -13,6 +13,13 @@ namespace Common::ec
/// Generate a signature using ECDSA.
std::array<u8, 60> Sign(const u8* key, const u8* hash);
/// Check a signature using ECDSA.
///
/// @param public_key 30 byte ECC public key
/// @param signature 60 byte signature
/// @param hash Message hash
bool VerifySignature(const u8* public_key, const u8* signature, const u8* hash);
/// Compute a shared secret from a private key (30 bytes) and public key (60 bytes).
std::array<u8, 60> ComputeSharedSecret(const u8* private_key, const u8* public_key);