From ff32442200fe6e39d2b43e39d51d4533fde46019 Mon Sep 17 00:00:00 2001 From: Monica Moniot Date: Thu, 30 Nov 2023 17:58:57 -0500 Subject: [PATCH] fixed big endian padding --- src/p384.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p384.rs b/src/p384.rs index 7ae24eb..992276b 100644 --- a/src/p384.rs +++ b/src/p384.rs @@ -270,6 +270,9 @@ impl P384KeyPair { // Double check big-endian-ness. output.copy_within(..size, P384_SECRET_KEY_SIZE - size); + for i in 0..P384_SECRET_KEY_SIZE - size { + output[i] = 0x00; + } } }