kryptnostic-js

0.8.0 • Public • Published

kryptnostic.js

kryptnostic.js is an SDK for secure search, sharing, and storage on the Kryptnostic platform. No private keys are sent to the server in plaintext, and all user data is encrypted with 256-bit AES. It uses state-of-the-art advancements in fully homomorphic encryption to provide searchable encryption over text data.

build status npm version bower version

Getting Started

Installation

To install the latest version:

npm install --save kryptnostic-js

Loading

To load the library:

var KJS = require('./node_modules/kryptnostic-js/dist/kryptnostic.umd.js');

Configuration

Currently, you must configure the library with valid URLs for 2 backend services. To run against our production services:

KJS.ConfigurationService.set({
  servicesUrlV2 : 'https://kodex.im/services2/v2',
  heraclesUrlV2 : 'https://kodex.im/heracles2/v2'
});

Registration

To register:

var registrationClient = new KJS.RegistrationClient();

registrationClient.register({ 'krypto@kryptnostic.com', 'krypto', 'mansbestfriend1^' })
.then(function() {
    // confirm successful registration.
})
.catch(function() {
  // registration failed :(
});

API

interface  KJS {
  ConfigurationService    ConfigurationService;
  AuthenticationService   AuthenticationService;
  UserDirectoryApi        UserDirectoryApi;
  RegistrationClient      RegistrationClient;
  UserDirectoryApi        UserDirectoryApi;
}

interface  ConfigurationService {
  void                    set(Config);
  String                  get(ConfigKey);
}

enum       ConfigKey = {'servicesUrlV2', 'heraclesUrlV2'}

dictionary Config {
  String?                 ConfigKey;
  ...
}

interface  RegistrationClient {
  Promise<void>           register: ( RegistrationRequest );
}

dictionary RegistrationRequest {
  String                  email;
  String                  name;
  String                  password;
}

Developing

See docs/development.md

Readme

Keywords

none

Package Sidebar

Install

npm i kryptnostic-js

Weekly Downloads

1

Version

0.8.0

License

Apache-2.0

Last publish

Collaborators

  • kryptnostic