Changeset View
Changeset View
Standalone View
Standalone View
src/key.h
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Create a DER-serialized ECDSA signature. | * Create a DER-serialized ECDSA signature. | ||||
* The test_case parameter tweaks the deterministic nonce. | * The test_case parameter tweaks the deterministic nonce. | ||||
*/ | */ | ||||
bool SignECDSA(const uint256 &hash, std::vector<uint8_t> &vchSig, | bool SignECDSA(const uint256 &hash, std::vector<uint8_t> &vchSig, | ||||
uint32_t test_case = 0) const; | uint32_t test_case = 0) const; | ||||
/** | /** | ||||
* Create a Schnorr signature. | |||||
* The test_case parameter tweaks the deterministic nonce. | |||||
*/ | |||||
bool SignSchnorr(const uint256 &hash, std::vector<uint8_t> &vchSig, | |||||
uint32_t test_case = 0) const; | |||||
/** | |||||
* Create a compact ECDSA signature (65 bytes), which allows reconstructing | * Create a compact ECDSA signature (65 bytes), which allows reconstructing | ||||
* the used public key. | * the used public key. | ||||
* The format is one header byte, followed by two times 32 bytes for the | * The format is one header byte, followed by two times 32 bytes for the | ||||
* serialized r and s values. | * serialized r and s values. | ||||
* The header byte: 0x1B = first key with even y, 0x1C = first key with odd | * The header byte: 0x1B = first key with even y, 0x1C = first key with odd | ||||
* y, | * y, | ||||
* 0x1D = second key with even y, 0x1E = second key with | * 0x1D = second key with even y, 0x1E = second key with | ||||
* odd y, | * odd y, | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |