secp256k1/ecdsa.h

23 lines
578 B
C
Raw Normal View History

2013-03-10 04:34:04 +00:00
#ifndef _SECP256K1_ECDSA_
#define _SECP256K1_ECDSA_
namespace secp256k1 {
class Signature {
private:
Number r,s;
public:
2013-03-16 14:51:55 +00:00
bool Parse(const unsigned char *sig, int size);
2013-03-18 01:41:01 +00:00
bool Serialize(unsigned char *sig, int *size);
bool RecomputeR(Number &r2, const GroupElemJac &pubkey, const Number &message) const;
bool Verify(const GroupElemJac &pubkey, const Number &message) const;
bool Sign(const Number &seckey, const Number &message, const Number &nonce);
2013-03-16 14:51:55 +00:00
void SetRS(const Number &rin, const Number &sin);
std::string ToString() const;
2013-03-10 04:34:04 +00:00
};
}
#endif