Skip to content
Permalink
Browse files

Add key generation/verification to ECC sanity check

  • Loading branch information...
sipa committed Nov 8, 2014
1 parent d0c41a7 commit f321d6bfff4dbbb4c52d0f175a27d54b287e81ff
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/key.cpp
@@ -201,5 +201,13 @@ void CExtKey::Decode(const unsigned char code[74]) {
}

bool ECC_InitSanityCheck() {
return CECKey::SanityCheck();
#if !defined(USE_SECP256K1)
if (!CECKey::SanityCheck()) {
return false;
}
#endif
CKey key;
key.MakeNewKey(true);
CPubKey pubkey = key.GetPubKey();
return key.VerifyPubKey(pubkey);
}

0 comments on commit f321d6b

Please sign in to comment.
You can’t perform that action at this time.