Skip to content

[Security] Signed Binary Updates with Ed25519 #79

@yashksaini-coder

Description

@yashksaini-coder

Goal

Prevent man-in-the-middle attacks during the auto-update process.

Description

The current updater in src/updater.rs downloads a binary and executes it. This is vulnerable to MITM attacks if the transport layer is compromised.

Implement signature verification:

  1. Generate an Ed25519 keypair; hardcode the public key in the TRX source
  2. For each release, sign the binary with the private key and upload a .sig file alongside it
  3. In updater.rs, download both the binary and the .sig file
  4. Verify the signature using the ed25519-dalek crate before executing the binary
  5. Abort the update if verification fails and display a clear error

The private key must never be committed to the repository.

Tech

Rust, Cryptography (ed25519-dalek), Release CI pipeline

Difficulty

Level 3 – Advanced

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions