bmatusiak / onlykey-sea

Home Page:https://bmatusiak.github.io/onlykey-sea/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onlykey-sea

Get a Key: http://onlykey.io/sea


This is a 3rd Party API for onlykey

Supports

  • NACL
  • ECDH and ECDSA (p256)
  • CURVE25519

API

var ok = require("./onlykey-api.js");

Events

ok.on(event,function() {})

List of events

  • "status" outputs current operation in english
  • "error" emits any errors during operations
  • "debug" outpus any debug and status in english, like status but more details

Methods

ok.connect(function() {})

connect sets onlykey time

ok.derive_public_key(AdditionalData, keyType, press_required, function(error, jwk_epub) {})
ok.derive_shared_secret(AdditionalData, jwk_epub, keyType, press_required, function(error, shared_secret) {})
  • additional_d = string or buffer to point to a derived key
  • jwk_epub = public key in jwk format
  • keyType = key generation type
  • shared_secret = shared AES-GCM key

KEYTYPE

  • KEYTYPE_NACL = 0
  • KEYTYPE_P256R1 = 1
  • KEYTYPE_P256K1 = 2
  • KEYTYPE_CURVE25519 = 3

API Authors

  • Tim ~ onlykey.io
  • Brad ~ bmatusiak.us

About

https://bmatusiak.github.io/onlykey-sea/


Languages

Language:JavaScript 97.1%Language:HTML 2.9%