v0.0.7: Chunked encrypted file transfer

Protocol:
- WireMessage::FileHeader { id, sender_fp, filename, file_size, total_chunks, sha256 }
- WireMessage::FileChunk { id, sender_fp, filename, chunk_index, total_chunks, data }
- 64KB chunks, SHA-256 integrity verification

CLI TUI:
- /file <path> command: reads file, chunks, encrypts each with ratchet, sends
- Progress display: "Sending file.pdf [3/10]..."
- Incoming file reassembly with chunk tracking
- SHA-256 verification on complete
- Saves to data_dir/downloads/
- Max file size: 10MB

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 10:26:05 +04:00
parent b168ecc609
commit 708080f7be
7 changed files with 431 additions and 11 deletions

View File

@@ -448,5 +448,11 @@ pub fn decrypt_wire_message(
"receipt_type": rt_str,
}).to_string())
}
_ => {
// File transfer messages not yet handled in WASM
Ok(serde_json::json!({
"type": "unsupported",
}).to_string())
}
}
}