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