Passa al contenuto principale

Overview

Verified Browser Delivery verification app for SEALed emails

Repository - https://code.vereign.com/svdh/verapp

This application is intended for IPFS and nginx deployment and should be client-side only. Its main purpose is to assemble and display SEALed emails by reversing the SEAL process and interacting with the svdh key service.

This is a Next.js project bootstrapped with create-next-app.

This project uses next/font

It utilizes a component library: Vereign UI

Verfication Application Overview

Functionality:

  • Parses the URL to extract verification parameters.
  • Communicates with the authentication service for user verification.
  • Retrieves and displays user avatars from the self-hosted avatar service.
  • Renders email content based on verification status.

Technology Stack:

  • Frontend: HTML, CSS, JavaScript (Next JS), pnpm
  • Storage: IPFS (InterPlanetary File System)
  • Backend Services:
    • Authentication Service

URL Parsing Process

  1. The entry point of the verification app (verapp) is a SEAL URL, a specific string, formatted and ready to be parsed by the verification app (verapp). When decoded it contains:
  • information about the type of recipients:
    • single
    • multiple
    • public
  • the encrypted key (used for opening the message)
  • encrypted parts of the message
  • IPFS CID of the resource needed to complete the encrypted message
  1. On successful authentication the key extracted from the SEAL URL is decrypted

  2. The remaining content is fetched from IPFS

  3. The message is decrypted using the now available key for decription

URL Structure

Example: https://domain.com/?q={SEAL_HASH}&lang=en

  • <audience> - 'p-','m-','s-' - Length 2
  • <head> - Length 26
  • <iv> - Length 12
  • <CID> - Length 46
  • <key> - Length Unknown (appended at the end of the SEAL hash)

Getting Started

Install dependencies

pnpm install

Dev

Run the development server:

pnpm dev

Open http://localhost:3000 with your browser to see the result.

Test

pnpm test

Build

pnpm build

Lint

pnpm lint

Prettify

pnpm format

Known issues

Deploying on IPFS

When deploying to IPFS make sure that the dns provider supports TXT records. If needed refer to: https://docs.ipfs.tech/how-to/websites-on-ipfs/link-a-domain/#handshake

Using Open previous windows and tabs on Firefox

In the address bar of Firefox type about:preferences. On General settings under Startup, there is a checkbox with label Open previous windows and tabs. If you have this option selected the browser will NOT delete your session cookie, no matter if you have unchecked the Remember Me checkbox. Your session will be preserved after reopening the browser.

Using Safari:

If you use Safari to read emails, follow those steps:

  • From the top left corner click on Safari -> Settings, then go to Privacy tab and make sure you have the following checkboxes unchecked if you don't see them you might need to click on open advanced settings:
    • Prevent cross-site tracking
    • Block all cookies
  • Also you might need to delete all your previous cookies - In the same Privacy tab, click on Manage Website Data and click Remove All button to delete all cookies.
  • Safari does not authenticate on localhost no matter if you do all those steps.

DID:SVDX: https://code.vereign.com/tech-spec/did-svdx/-/blob/main/svdx.md?ref_type=heads