https://github.com/hazae41/ed25519
Ed25519 adapter for WebAssembly and JS implementations
https://github.com/hazae41/ed25519
adapter browser cryptography curve25519 ed25519 javascript typescript webassembly
Last synced: 10 months ago
JSON representation
Ed25519 adapter for WebAssembly and JS implementations
- Host: GitHub
- URL: https://github.com/hazae41/ed25519
- Owner: hazae41
- Created: 2023-03-26T15:33:40.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T15:33:10.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T00:02:11.303Z (over 1 year ago)
- Topics: adapter, browser, cryptography, curve25519, ed25519, javascript, typescript, webassembly
- Language: TypeScript
- Homepage:
- Size: 214 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Ed25519 (deprecated: use WebCrypto)
Ed25519 adapter for WebAssembly and JS implementations
```bash
npm i @hazae41/ed25519
```
[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/ed25519)
## Features
### Current features
- 100% TypeScript and ESM
- No external dependencies
## Usage
### Native (WebCrypto)
https://github.com/tQsW/webcrypto-curve25519/blob/master/explainer.md
```typescript
import { Ed25519 } from "@hazae41/ed25519"
Ed25519.set(Ed25519.fromNative())
```
### WebAssembly
```bash
npm i @hazae41/ed25519.wasm
```
```typescript
import { Ed25519 } from "@hazae41/ed25519"
import { Ed25519Wasm } from "@hazae41/ed25519.wasm"
await Ed25519Wasm.initBundled()
Ed25519.set(await Ed25519.fromNativeOrWasm(Ed25519Wasm))
```
### Noble Curves (JavaScript)
```bash
npm i @noble/curves
```
```typescript
import { Ed25519 } from "@hazae41/ed25519"
import * as Ed25519Noble from "@noble/curves/ed25519"
Ed25519.set(await Ed25519.fromNativeOrNoble(Ed25519Noble))
```
### Noble Ed25519 (JavaScript)
```bash
npm i @noble/ed25519
```
```typescript
import { Ed25519 } from "@hazae41/ed25519"
import * as ed25519 from "@noble/ed25519"
Ed25519.set(await Ed25519.fromNativeOrNoble({ ed25519 }))
```