Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazae41/cadenas
Zero-copy TLS protocol for the web 🏎️ (JS + WebAssembly)
https://github.com/hazae41/cadenas
browser diffie-hellman ed25519 encryption esmodules hashing hmac prf protocol rsa security sha1 sha256 tls typescript unit-testing webassembly zero-copy
Last synced: 3 months ago
JSON representation
Zero-copy TLS protocol for the web 🏎️ (JS + WebAssembly)
- Host: GitHub
- URL: https://github.com/hazae41/cadenas
- Owner: hazae41
- Created: 2022-11-17T17:58:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T15:39:01.000Z (4 months ago)
- Last Synced: 2024-10-07T21:31:20.780Z (3 months ago)
- Topics: browser, diffie-hellman, ed25519, encryption, esmodules, hashing, hmac, prf, protocol, rsa, security, sha1, sha256, tls, typescript, unit-testing, webassembly, zero-copy
- Language: TypeScript
- Homepage:
- Size: 1.61 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-ccamel - hazae41/cadenas - Zero-copy TLS protocol for the web 🏎️ (JS + WebAssembly) (TypeScript)
README
```bash
npm i @hazae41/cadenas
```[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/cadenas)
## DO NOT USE
This is experimental software in early development
1. It has security issues
2. Things change quickly## Features
### Current features
- 100% TypeScript and ESM
- Zero-copy reading and writing
- Transport agnostic (HTTP, WebSocket)
- WebStreams based backpressure
- [Common CA Database](https://www.ccadb.org/) certificates
- TLS 1.2### [Upcoming Features](https://github.com/sponsors/hazae41)
- TLS 1.3
- Zero RTT## Usage
```typescript
import { TlsClientDuplex, Ciphers } from "@hazae41/cadenas"function encrypt(tcp: ReadableWritablePair): ReadableWritablePair {
const ciphers = [Ciphers.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
const tls = new TlsClientDuplex({ host_name: "example.com", ciphers })tcp.readable.pipeTo(tls.inner.writable).catch(() => {})
tls.inner.readable.pipeTo(tcp.writable).catch(() => {})return tls.outer
}
```