aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto.rs')
-rw-r--r--src/crypto.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto.rs b/src/crypto.rs
index acbb464..034e9cc 100644
--- a/src/crypto.rs
+++ b/src/crypto.rs
@@ -6,7 +6,7 @@ use aes::Aes128;
use aes::cipher::{BlockDecrypt, BlockEncrypt, generic_array::GenericArray};
use bytes::{Buf, BufMut, Bytes, BytesMut};
use curve25519_dalek::MontgomeryPoint;
-use ed25519_dalek::{VerifyingKey, hazmat::ExpandedSecretKey};
+use ed25519_dalek::{SigningKey, VerifyingKey, hazmat::ExpandedSecretKey};
use hmac::{Hmac, Mac};
use sha2::Sha256;
@@ -82,6 +82,7 @@ impl Clone for PrivateKey {
impl Default for PrivateKey {
fn default() -> Self {
+ /*
// To make a key whole-cloth, we need to start with a SigningKey made
// using a good RNG. Then we can use that to make an ExpandedSecretKey.
use ed25519_dalek::SigningKey;
@@ -95,6 +96,8 @@ impl Default for PrivateKey {
// Then, there are only a few constructors for making an ExpandedSecretKey.
// Meshcore uses this kind of key, so it's what we need in this application,
// but it's an uncommon formulation.
+ */
+ let signing_key = SigningKey::from_bytes(&[0u8; 32]);
let esk = ExpandedSecretKey::from(&signing_key.to_bytes());
Self(esk)
}