rust/pv: Fix padding of retrievable private keys

Fix the padding of keys that are smaller than the architected slot for
the retrievable key. Previously the keys where appended with zeros.
However, processing software expects a left-padding.
Affected key types:
  * Ed448
  * SecP521

While at it, fix documentation in the retrievable key struct.

Fixes: fd024387d7 ("rust/pv: Retrievable secrets support")
Acked-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2025-01-21 13:03:18 +01:00
committed by Jan Höppner
parent 7bd159de1d
commit 26d2e2d786
3 changed files with 55 additions and 30 deletions
+3
View File
@@ -117,6 +117,9 @@ pub enum Error {
exp: String,
},
#[error("Invalid data from OpenSSL")]
InvalSslData,
// errors from other crates
#[error(transparent)]
PvCore(#[from] pv_core::Error),