Skip to content

yepengding/MyPubDecryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyPub Decryptor

Decryptor of MyPub Cipher Suite.

Usage

USAGE:
    mypub-decryptor.exe [OPTIONS] --id <CID> --key <PRIVATE KEY> <FILE>

ARGS:
    <FILE>    Sets an input file path

FLAGS:
    -h, --help       Print help information
    -V, --version    Print version information

OPTIONS:
    -i, --id <CID>               Sets the publication cid
    -k, --key <PRIVATE KEY>      Sets your private key
    -o, --output <OUTPUT DIR>    Sets your output directory

Flow

  1. Parse CLI argument to Config struct;
  2. Read input file;
  3. Verify file integrity on Filecoin Chain;
  4. Verify payment on Ethereum chain;
  5. Decrypt file with hard-coded key;
  6. Output decrypted file.

Development

Configuration

config.rs

  • network Ethereum network
  • contract_address Deployed publication contract address
  • secret Hardcoded secret key
  • decrypted_name Decrypted name

Run tests

cargo test

Build Debug

cargo build

Build Release

cargo build --release

UI

UI

MyPub Components

Reference