diff options
| author | s-ol <s+removethis@s-ol.nu> | 2026-03-28 22:35:26 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2026-03-28 22:38:32 +0000 |
| commit | b4bb62b7ca0be710a0a7d5484cb9d3371f24ec2a (patch) | |
| tree | 2cb6178dfa67f52f9be5bd7844969ca92e8cb4f8 /src/crypto.rs | |
| parent | expose more fields (diff) | |
| download | meshcore-rs-dumb-no-std.tar.gz meshcore-rs-dumb-no-std.zip | |
no-std compatible cryptodumb-no-std
Diffstat (limited to 'src/crypto.rs')
| -rw-r--r-- | src/crypto.rs | 5 |
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) } |
