| 94 | } |
| 95 | |
| 96 | bool static IsCompressedPubKey(const valtype &vchPubKey) { |
| 97 | if (vchPubKey.size() != CPubKey::COMPRESSED_SIZE) { |
| 98 | // Non-canonical public key: invalid length for compressed key |
| 99 | return false; |
| 100 | } |
| 101 | if (vchPubKey[0] != 0x02 && vchPubKey[0] != 0x03) { |
| 102 | // Non-canonical public key: invalid prefix for compressed key |
| 103 | return false; |
| 104 | } |
| 105 | return true; |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype> |
no test coverage detected