Skip to main content
Module

x/earthstar/deps.ts

Storage for private, distributed, offline-first applications.
Go to Latest
import * as earthstar from "https://deno.land/x/earthstar@v10.0.2/deps.ts";

Classes

Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy). Default Point works in affine coordinates: (x, y) https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates

Default Point works in affine coordinates: (x, y)

Each ed25519/ExtendedPoint has 8 different equivalent points. This can be a source of bugs for protocols like ring signatures. Ristretto was created to solve this. Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint, but it should work in its own namespace: do not combine those two. https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448

A self-balancing tree which can return fingerprints for ranges of items it holds using a provided monoid.

Produces and responds to messages, enabling efficient reconciliation of two sets.

Functions

Check whether binary arrays are equal to each other.

Creates a Promise with the reject and resolve functions placed as methods on the promise object itself.

Calculates ed25519 public key.

  1. private key is hashed with sha512, then first 32 bytes are taken from the hash
  2. 3 least significant bits of the first byte are cleared RFC8032 5.1.5

Signs message with privateKey. RFC8032 5.1.6

Verifies ed25519 signature against message and public key. An extended group equation is checked. RFC8032 5.1.7 Compliant with ZIP215: 0 <= sig.R/publicKey < 2**256 (can be >= curve.P) 0 <= sig.s < l Not compliant with RFC8032: it's not possible to comply to both ZIP & RFC at the same time.