add key pair derivation from ed25519 signing key

merge
This commit is contained in:
Sam Kim 2021-10-13 09:37:19 -04:00 committed by Michael Vines
parent 0cc717340c
commit f350fa7147
1 changed files with 0 additions and 9 deletions

View File

@ -14,7 +14,6 @@ use {
ed25519_dalek::SecretKey as SigningKey,
solana_sdk::pubkey::Pubkey,
serde::{Deserialize, Serialize},
solana_sdk::pubkey::Pubkey,
std::collections::HashMap,
std::convert::TryInto,
subtle::{Choice, ConstantTimeEq},
@ -58,14 +57,6 @@ impl ElGamal {
}
}
#[cfg(not(target_arch = "bpf"))]
#[allow(non_snake_case)]
pub fn from_signing_key(signing_key: &SigningKey, label: &'static [u8]) -> Self {
let secret = ElGamalSecretKey::new(signing_key, label);
let public = ElGamalPubkey::new(&secret);
Self { secret, public }
}
/// On input a public key and a message to be encrypted, the function
/// returns an ElGamal ciphertext of the message under the public key.
#[cfg(not(target_arch = "bpf"))]