Skip to content

nichoth/ssc-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssc keys

Key operations for web browsers.

This uses the one-webcrypto API, so the WebCrypto API in a browser.

This is used to create keys that are visible as strings in a web browser, for use with ssc-server

install

npm i ssc-keys

example

import { create } from 'ssc-keys'

create().then(kp => {
    console.log('*kp*', kp)
    // =>
    // *kp* 
    // {
    //     "publicKey": "BPVcET2JN9HP3M3BaXGAtcZHDmKSrRjbSUXUFPjY+bS4wHesYEqKHIhKCx4mSQb4aZaA5eeRrK73SPWvIxqfXwY=",
    //     "privateKey": "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgjBVEyaAeWR63att0e9guTZpPI9ptabkz+TUpntepf+qhRANCAAT1XBE9iTfRz9zNwWlxgLXGRw5ikq0Y20lF1BT42Pm0uMB3rGBKihyISgseJkkG+GmWgOXnkayu90j1ryMan18G"
    // }
})

Keys are created with this algorithm

// (algorithm, extractable, uses)
webcrypto.subtle.generateKey({
    name:   'ECDSA',
    namedCurve: 'P-256'
}, true, ['sign', 'verify'])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published