diff options
Diffstat (limited to 'openpgp/src/crypto/backend/botan/asymmetric.rs')
-rw-r--r-- | openpgp/src/crypto/backend/botan/asymmetric.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/openpgp/src/crypto/backend/botan/asymmetric.rs b/openpgp/src/crypto/backend/botan/asymmetric.rs index 66e64b35..d9f989ad 100644 --- a/openpgp/src/crypto/backend/botan/asymmetric.rs +++ b/openpgp/src/crypto/backend/botan/asymmetric.rs @@ -185,30 +185,6 @@ impl KeyPair { }) }, - (EdDSA, - PublicKey::EdDSA { curve, .. }, - mpi::SecretKeyMaterial::EdDSA { scalar }) => match curve { - Curve::Ed25519 => { - let size = 32; - let scalar = scalar.value_padded(size); - let secret = Privkey::load_ed25519(&scalar)?; - let sig = secret.sign(digest, "", &mut rng)?; - - if sig.len() != size * 2 { - return Err(Error::MalformedMPI( - format!("Expected signature with length {}, got {}", - size * 2, sig.len())).into()); - } - - Ok(mpi::Signature::EdDSA { - r: MPI::new(&sig[..size]), - s: MPI::new(&sig[size..]), - }) - }, - _ => Err( - Error::UnsupportedEllipticCurve(curve.clone()).into()), - }, - (ECDSA, PublicKey::ECDSA { curve, .. }, mpi::SecretKeyMaterial::ECDSA { scalar }) => { |