Crate portal_lib

source ·
Expand description

A small Protocol Library for Portal - An encrypted file transfer utility

This crate enables a consumer to:

  • Create/serialize/deserialize Portal request/response messages.
  • Negoticate a symmetric key with a peer using SPAKE2
  • Encrypt files with Chacha20-Poly1305 using either the RustCrypto implementation or Ring’s
  • Send/receive files through a Portal relay

The library is broken up into two abstractions:

  • A higher level API, exposted via the Portal struct, to facilitate automating transfers easily
  • A lower level API, exposed via the protocol::Protocol struct, if you need access to lower-level facilities

Re-exports

Modules

  • Lower level protocol methods. Use these if the higher-level Portal interface is too abstract.

Structs

  • The primary interface into the library.

Constants