| 177 | } |
| 178 | |
| 179 | CPubKey CKey::GetPubKey() const { |
| 180 | assert(fValid); |
| 181 | secp256k1_pubkey pubkey; |
| 182 | size_t clen = CPubKey::PUBLIC_KEY_SIZE; |
| 183 | CPubKey result; |
| 184 | int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, begin()); |
| 185 | assert(ret); |
| 186 | secp256k1_ec_pubkey_serialize(secp256k1_context_sign, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED); |
| 187 | assert(result.size() == clen); |
| 188 | assert(result.IsValid()); |
| 189 | return result; |
| 190 | } |
| 191 | |
| 192 | // Check that the sig has a low R value and will be less than 71 bytes |
| 193 | bool SigHasLowR(const secp256k1_ecdsa_signature* sig) |
no test coverage detected