Skip to content

hazae41/x25519

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 6, 2024
f54f224 Â· Sep 6, 2024

History

46 Commits
Mar 26, 2023
Sep 6, 2024
Mar 26, 2023
Mar 26, 2023
Aug 31, 2024
Sep 6, 2024
Sep 6, 2024
Oct 10, 2023
Oct 12, 2023

Repository files navigation

X25519

X25519 adapter for WebAssembly and JS implementations

npm i @hazae41/x25519

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Usage

Native (WebCrypto)

https://github.com/tQsW/webcrypto-curve25519/blob/master/explainer.md

import { X25519 } from "@hazae41/x25519"

X25519.set(await X25519.fromNative())

WebAssembly

npm i @hazae41/x25519.wasm
import { X25519 } from "@hazae41/x25519"
import { X25519Wasm } from "@hazae41/x25519.wasm"

await X25519Wasm.initBundled()

X25519.set(await X25519.fromNativeOrWasm(X25519Wasm))

Noble (JavaScript)

npm i @noble/curves
import { X25519 } from "@hazae41/x25519"
import * as Ed25519Noble from "@noble/curves/ed25519"

X25519.set(await X25519.fromNativeOrNoble(Ed25519Noble))