Skip to main content

max / everycycle

appraise: upgrade ed25519-dalek to 3 and naga to 30 ed25519-dalek 3 moves to rand_core 0.10, which no longer ships OsRng. Rather than pull in the whole rand crate for 32 bytes, generate() now fills a seed from getrandom and goes through from_seed, which is what SigningKey::generate did internally anyway. Verified wire compatibility across the major bump: for the fixture seed, dalek 2 and dalek 3 produce a byte-identical public key and signature, so existing keys and signatures still validate. naga 30 needed no source changes. Nothing in the tree pins it (the probes drive Vulkan through ash directly, there is no wgpu).
Co-Authored-By
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-22 02:39 UTC
Signed with PGP, not checked
Commit: 52d786e1d6969468ada93d5b25cbbed18a95b7f4
Parent: f430101
2 files changed, +12 insertions, -9 deletions
@@ -12,12 +12,12 @@
12 12 everycycle-hal = { path = "../hal" }
13 13 serde = { version = "1", features = ["derive"] }
14 14 serde_json = "1"
15 - ed25519-dalek = { version = "2", features = ["rand_core"] }
16 - rand_core = { version = "0.6", features = ["std"] }
15 + ed25519-dalek = "3"
16 + getrandom = "0.4"
17 17 sha2 = "0.11"
18 18 base64 = "0.22"
19 19 ash = "0.38"
20 - naga = { version = "29", features = ["wgsl-in", "spv-out"] }
20 + naga = { version = "30", features = ["wgsl-in", "spv-out"] }
21 21
22 22 [[bin]]
23 23 name = "everycycle-appraise-enumerate"
@@ -12,7 +12,6 @@
12 12 use base64::{Engine, engine::general_purpose::STANDARD as B64};
13 13 use ed25519_dalek::{Signature as DalekSig, Signer, SigningKey, Verifier, VerifyingKey};
14 14 use everycycle_hal::{BoxReport, BoxReportPayload, CardReport, CardReportPayload, Signature};
15 - use rand_core::OsRng;
16 15 use sha2::{Digest, Sha256};
17 16
18 17 use crate::canonical::{CanonicalError, canonical_json};
@@ -90,13 +89,17 @@
90 89 }
91 90
92 91 impl TenantKey {
93 - /// Generate a new keypair using the OS RNG.
92 + /// Generate a new keypair from OS entropy.
93 + ///
94 + /// # Panics
95 + ///
96 + /// Panics if the OS entropy source is unavailable, matching the
97 + /// behaviour of the `OsRng` this previously went through.
94 98 #[must_use]
95 99 pub fn generate(identity: impl Into<String>) -> Self {
96 - Self {
97 - identity: identity.into(),
98 - signing: SigningKey::generate(&mut OsRng),
99 - }
100 + let mut seed = [0u8; 32];
101 + getrandom::fill(&mut seed).expect("OS entropy source unavailable");
102 + Self::from_seed(identity, seed)
100 103 }
101 104
102 105 /// Reconstruct a key from raw seed bytes. Used for fixture tests