From 8957cd6a0490370748752871cfb54b0c1f65f2f1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-DPA61F8\\Benedek" Date: Sun, 25 Apr 2021 18:11:53 +0200 Subject: [PATCH] Key export doesnt need protection tpye because DER format has default: PBKDF2WithHMAC-SHA1AndDES-EDE3-CBC --- server/config_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/config_init.py b/server/config_init.py index 8d19a03..598d0bb 100644 --- a/server/config_init.py +++ b/server/config_init.py @@ -14,7 +14,7 @@ def generatePrivateKeyForUser(auth: Authetication,username: str, user_passphrase private_key = RSA.generate(2048) public_key = private_key.publickey() - private_key_value = bytes.hex(private_key.exportKey('DER', passphrase=user_passphrase, pkcs=8, protection="scryptAndAES128-CBC")) + private_key_value = bytes.hex(private_key.exportKey('DER', passphrase=user_passphrase, pkcs=8)) public_key_value = bytes.hex(public_key.exportKey('DER', pkcs=8)) ##Save private key in separate file