0.0.5 • Published 5 years ago
@framirez730/onlykey-fido2 v0.0.5
node-onlykey-fido2
requirments
- node >= v12
- libusb libudev
Developer Serial Monitor
This provides no help when debugging only key production.
Fido2 testing suite
This is a 3rd Party API for onlykey
Supports
- NACL
- ECDH and ECDSA (p256)
- CURVE25519
API
var ok = onlykey(KEYTYPE , ENCRYPT_RESP);KEYTYPE
- KEYTYPE_NACL =
0 - KEYTYPE_P256R1 =
1 - KEYTYPE_P256K1 =
2 - KEYTYPE_CURVE25519 =
3
ENCRYPT_RESP
- OFF =
0 - ON =
1
Methods
ok.connect(function() {})connect sets onlykey time
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, likestatusbut more details
ECDH
KEYTYPE_P256R1 = 1
After connect, 2 methods are added to ok
ok.derive_public_key(additional_d, function(error, jwk_epub) {})
ok.derive_shared_secret(additional_d, jwk_epub, function(error, shared_secret) {})additional_d=stringorbufferto point to a derived keyjwk_epub= public key in jwk formatshared_secret= shared AES-GCM key
API Authors
- Tim ~ onlykey.io
- Brad ~ bmatusiak.us