mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
fixed scrypt() call and pbp pk export signature
This commit is contained in:
@@ -69,7 +69,7 @@ int pcpdecrypt(char *id, int useid, char *infile, char *outfile, char *passwd, i
|
||||
strncpy(passphrase, passwd, strlen(passwd)+1);
|
||||
}
|
||||
|
||||
symkey = pcp_scrypt(passphrase, crypto_secretbox_KEYBYTES, salt);
|
||||
symkey = pcp_scrypt(passphrase, crypto_secretbox_KEYBYTES, salt, 90);
|
||||
free(salt);
|
||||
}
|
||||
else {
|
||||
@@ -154,10 +154,10 @@ int pcpencrypt(char *id, char *infile, char *outfile, char *passwd, plist_t *rec
|
||||
passphrase = ucmalloc(strlen(passwd)+1);
|
||||
strncpy(passphrase, passwd, strlen(passwd)+1);
|
||||
}
|
||||
unsigned char *salt = ucmalloc(90);
|
||||
unsigned char *salt = ucmalloc(90); // FIXME: use random salt, concat it with result afterwards
|
||||
char stsalt[] = PBP_COMPAT_SALT;
|
||||
memcpy(salt, stsalt, 90);
|
||||
symkey = pcp_scrypt(passphrase, crypto_secretbox_KEYBYTES, salt);
|
||||
symkey = pcp_scrypt(passphrase, crypto_secretbox_KEYBYTES, salt, 90);
|
||||
free(salt);
|
||||
}
|
||||
else if(id != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user