re-implemented signature system to match the standard (orinal input, including sig for full sig; or 32k blockwise hash of input and sig from hash attached to original input without the hash), verify_buffered currently not implemented, armored sig only for output.

This commit is contained in:
git@daemon.de
2014-01-23 15:40:06 +01:00
parent f09d4774cb
commit c717c060ec
12 changed files with 161 additions and 319 deletions

View File

@@ -42,7 +42,7 @@ namespace pcp {
PubKey P;
Key S;
Vault vault;
pcp_sig_t *sig;
unsigned char *sig;
// constructors
Signature(Key &skey); // sign only
@@ -55,14 +55,12 @@ namespace pcp {
// PK signature methods
// sender pubkey is P
std::string sign(std::vector<unsigned char> message);
std::string sign(std::string message);
std::string sign(unsigned char *message, size_t mlen);
unsigned char *sign(std::vector<unsigned char> message);
unsigned char *sign(unsigned char *message, size_t mlen);
// verify using P or use vault if defined
bool verify(std::string signature, std::string message);
bool verify(std::string signature, std::vector<unsigned char> message);
bool verify(std::string signature, unsigned char *message, size_t mlen);
bool verify(std::vector<unsigned char> message);
bool verify(unsigned char *signature, size_t mlen);
};
};