rust/crypto: Export gen_ec_key and open-code the SECP521R1 NID

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2024-10-22 08:24:38 +00:00
committed by Steffen Eiden
parent dec796d52f
commit 2f3c189fda
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ impl ReqEncrCtx {
S: Into<Option<SymKey>>,
{
let iv = iv.into().unwrap_or(random_array()?);
let priv_key = priv_key.into().unwrap_or(gen_ec_key()?);
let priv_key = priv_key.into().unwrap_or(gen_ec_key(Nid::SECP521R1)?);
let prot_key = prot_key
.into()
.unwrap_or(SymKey::random(SymKeyType::Aes256)?);