# @coboxcoop/keys

> load, save and derive key pairs

Latest version **1.0.2-alpha.1** (published 2020-07-29) · AGPL-3.0.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @coboxcoop/keys
pnpm add @coboxcoop/keys
yarn add @coboxcoop/keys
bun add @coboxcoop/keys
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2-alpha.1 |
| Published | 2020-07-29 |
| First published | 2020-07-29 |
| Weekly downloads | 0 |
| License | AGPL-3.0.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 38.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | magma collective |
| Maintainers | ameba23, kyphae |

## Links

- npm: https://www.npmjs.com/package/@coboxcoop/keys
- Repository: https://gitlab.com/coboxcoop/keys
- Homepage: https://cobox.cloud
- Issues: https://gitlab.com/coboxcoop/keys/issues
- npm.io page: https://npm.io/package/@coboxcoop/keys

## Dependencies (4)

- [assert](https://npm.io/package/assert.md) ^2.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.3
- [sodium-native](https://npm.io/package/sodium-native.md) ^2.4.9
- [@coboxcoop/crypto](https://npm.io/package/@coboxcoop/crypto.md) ^1.0.2-alpha.1

## Recent versions

- 1.0.2-alpha.1 (latest) — 2020-07-29
- 1.0.1-alpha.1 — 2020-07-29
- 1.0.0-alpha.1 — 2020-07-29

## README

# keys

<div align="center">
  <img src="https://cobox.cloud/src/svg/logo.svg">
</div>

[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

## Table of Contents

  - [About](#about)
  - [Install](#install)
  - [Usage](#usage)
  - [API](#api)
  - [Contributing](#contributing)
  - [License](#license)

## About
**CoBox** is an encrypted p2p file system and distributed back-up tool. [README](https://gitlab.com/coboxcoop/readme) provides a map of the project.

`keys` is a simple repository for standardising the way we save keys across the cobox stack, as well as a derivation function that can be used in different space types.

## Install
```
npm i -g @coboxcoop/keys
```

## Usage
Stores keys as files with permissions restricted to read-only, preventing the software programatically altering the key file once it exists.

```
const crypto = require('cobox-crypto')
const keys = require('cobox-keys')

let keyName = 'encryption_key'
let encryptionKey = keys.loadKey('path/to/key', keyName) || crypto.encryptionKey()

keys.saveKey('path/to/key', keyName, encryptionKey)
```

## API
See swagger documentation... (we won't have this for a while).

## Contributing

PRs accepted.

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

# License

[`AGPL-3.0-or-later`](./LICENSE)

---
_Source: https://npm.io/package/@coboxcoop/keys · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
