mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-18 12:20:58 +01:00
changed internal key format again, now we've got a master-key-signing keypair as well, used for exports. also, fixed a security hole in pcp_keynew(): the actual key material, unencrypted, have been stored on heap and not zeroed after exit.
This commit is contained in:
@@ -37,6 +37,15 @@ unsigned char * pcp_ed_verify(unsigned char *signature, size_t siglen, pcp_pubke
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned char *pcp_ed_sign_key(unsigned char *message, size_t messagesize, pcp_key_t *s) {
|
||||
unsigned long long mlen = messagesize + crypto_sign_BYTES;
|
||||
unsigned char *signature = ucmalloc(mlen);
|
||||
|
||||
crypto_sign(signature, &mlen, message, messagesize, s->mastersecret);
|
||||
|
||||
return signature;
|
||||
}
|
||||
|
||||
unsigned char *pcp_ed_sign(unsigned char *message, size_t messagesize, pcp_key_t *s) {
|
||||
unsigned long long mlen = messagesize + crypto_sign_BYTES;
|
||||
unsigned char *signature = ucmalloc(mlen);
|
||||
|
||||
Reference in New Issue
Block a user