summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend/openssl
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2023-05-12 14:14:31 +0200
committerJustus Winter <justus@sequoia-pgp.org>2023-05-22 12:00:10 +0200
commit3e84692aa4cbf047ca8fb16ca424deed8d9c3769 (patch)
treea757a823b9fc1ea184ed48dc270c7c457017ee0e /openpgp/src/crypto/backend/openssl
parent2245b12bb056a390a5bb3541ce72ef66835297e6 (diff)
openpgp: Deduplicate Key::import_secret_ed25519.
Diffstat (limited to 'openpgp/src/crypto/backend/openssl')
-rw-r--r--openpgp/src/crypto/backend/openssl/asymmetric.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/openpgp/src/crypto/backend/openssl/asymmetric.rs b/openpgp/src/crypto/backend/openssl/asymmetric.rs
index cee5ebba..d45443fd 100644
--- a/openpgp/src/crypto/backend/openssl/asymmetric.rs
+++ b/openpgp/src/crypto/backend/openssl/asymmetric.rs
@@ -456,33 +456,6 @@ impl<R> Key4<SecretParts, R>
where
R: key::KeyRole,
{
- /// Creates a new OpenPGP secret key packet for an existing Ed25519 key.
- ///
- /// The ECDH key will use hash algorithm `hash` and symmetric
- /// algorithm `sym`. If one or both are `None` secure defaults
- /// will be used. The key will have it's creation date set to
- /// `ctime` or the current time if `None` is given.
- pub fn import_secret_ed25519<T>(private_key: &[u8], ctime: T) -> Result<Self>
- where
- T: Into<Option<SystemTime>>,
- {
- let key = PKey::private_key_from_raw_bytes(private_key, openssl::pkey::Id::ED25519)?;
- let public_key = key.raw_public_key()?;
-
- Self::with_secret(
- ctime.into().unwrap_or_else(crate::now),
- PublicKeyAlgorithm::EdDSA,
- mpi::PublicKey::EdDSA {
- curve: Curve::Ed25519,
- q: public_key.into(),
- },
- mpi::SecretKeyMaterial::EdDSA {
- scalar: private_key.into(),
- }
- .into(),
- )
- }
-
/// Creates a new OpenPGP public key packet for an existing RSA key.
///
/// The RSA key will use public exponent `e` and modulo `n`. The key will