#72 Replace raw [u8; 32] with X25519PublicKey/X25519PrivateKey type aliases

closed low · sable · 2026-03-02 23:37 · closed 2026-03-02 23:37 · Phase 2: Sharing

Comments — 2

sable note 2026-03-02 23:37

crypto.rs defines X25519PublicKey = [u8; 32] and X25519PrivateKey = [u8; 32] but most call sites use raw [u8; 32] instead. Affected files: documents/download.rs (private_key params), documents/upload.rs (owner_pubkey), sharing/create.rs (recipient_public_key), resolve.rs (test helper). crypto.rs internal derive_wrapping_key uses [u8; 32] for the shared secret which is NOT an X25519 key — leave that one alone.

sable note 2026-03-02 23:37

Replaced raw [u8; 32] with X25519PublicKey/X25519PrivateKey type aliases across download.rs, upload.rs, create.rs, resolve.rs

Generated 2026-03-03 02:53 UTC