From f7052f4869f15fb6142e9c24aef97147abe4f97b Mon Sep 17 00:00:00 2001 From: Nguyen Van Nguyen Date: Wed, 27 Nov 2024 11:01:42 +0700 Subject: [PATCH] Fix ecdh decrypt with curve25519 Signed-off-by: Nguyen Van Nguyen --- lib/src/packet/key/ecdh_session_key_params.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/packet/key/ecdh_session_key_params.dart b/lib/src/packet/key/ecdh_session_key_params.dart index 02a0866f..9723317b 100644 --- a/lib/src/packet/key/ecdh_session_key_params.dart +++ b/lib/src/packet/key/ecdh_session_key_params.dart @@ -146,7 +146,7 @@ class ECDHSessionKeyParams extends SessionKeyParams { Uint8List.fromList( secretParams.d.toUnsignedBytes().reversed.toList(), ), - ephemeralKey.toUnsignedBytes(), + ephemeralKey.toUnsignedBytes().sublist(1), ); break; case CurveInfo.ed25519: