From 0c8b6961e3f9644a0a8686f11ced038a6f8d89fc Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 17 Dec 2019 07:56:16 -0600 Subject: [PATCH] EC: fix PKCS8 Ed25519 private keys --- phpseclib/Crypt/EC/Formats/Keys/PKCS8.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php index b678545e..fa7ed457 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php @@ -223,7 +223,7 @@ abstract class PKCS8 extends Progenitor null, $password, $curve instanceof Ed25519 ? 'id-Ed25519' : 'id-Ed448', - $curve->encodePoint($publicKey) + "\0" . $curve->encodePoint($publicKey) ); }