kyber.wasm

command module
v1.18.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2022 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

README

kyber.wasm

kyber.wasm is a wasm of cloudflare circl kyber.

how to use

download compiled files or clone this repo and compile.

you must import main.wasm and wasm_exec.js to your app, like index.html.

a process in web console.

wasm_exec.js:22 2022/06/19 22:23:23 Load Kyber.WASM
let a = newKeyPair1024()
// undefined
let b = newKeyPair1024()
//  undefined
let enc = encrypt1024(a['private'], b['public'])
// undefined
let dec = decrypt1024(b['private'], enc['ciphertext'])
/// undefined
enc['shared']
// (32) [12, 123, 225, 192, 156, 36, 134, 194, 180, 191, 215, 18, 226, 109, 253, 215, 142, 230, 135, 55, 110, 252, 155, 20, 146, 177, 240, 128, 114, 87, 174, 132]
dec['shared']
// (32) [12, 123, 225, 192, 156, 36, 134, 194, 180, 191, 215, 18, 226, 109, 253, 215, 142, 230, 135, 55, 110, 252, 155, 20, 146, 177, 240, 128, 114, 87, 174, 132]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL