5.0.9 • Published 2 months ago

@libp2p/keychain v5.0.9

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
2 months ago

@libp2p/keychain

libp2p.io Discuss codecov CI

Key management and cryptographically protected messages

About

  • Manages the lifecycle of a key
  • Keys are encrypted at rest
  • Enforces the use of safe key names
  • Uses encrypted PKCS 8 for key storage
  • Uses PBKDF2 for a "stetched" key encryption key
  • Enforces NIST SP 800-131A and NIST SP 800-132
  • Delays reporting errors to slow down brute force attacks

KeyInfo

The key management and naming service API all return a KeyInfo object. The id is a universally unique identifier for the key. The name is local to the key chain.

{
  "name": "rsa-key",
  "id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
}

The key id is the SHA-256 multihash of its public key.

The public key is a protobuf encoding containing a type and the DER encoding of the PKCS SubjectPublicKeyInfo.

Private key storage

A private key is stored as an encrypted PKCS 8 structure in the PEM format. It is protected by a key generated from the key chain's passPhrase using PBKDF2.

The default options for generating the derived encryption key are in the dek object. This, along with the passPhrase, is the input to a PBKDF2 function.

const defaultOptions = {
  // See https://cryptosense.com/parameter-choice-for-pbkdf2/
  dek: {
    keyLength: 512 / 8,
    iterationCount: 1000,
    salt: 'at least 16 characters long',
    hash: 'sha2-512'
  }
}

key storage

Physical storage

The actual physical storage of an encrypted key is left to implementations of interface-datastore.

A key benefit is that now the key chain can be used in browser with the js-datastore-level implementation.

Install

$ npm i @libp2p/keychain

Browser <script> tag

Loading this module through a script tag will make it's exports available as Libp2pKeychain in the global namespace.

<script src="https://unpkg.com/@libp2p/keychain/dist/index.min.js"></script>

API Docs

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

5.0.9-0a3406a05

2 months ago

5.0.9-c2ff2e454

2 months ago

5.0.9

2 months ago

5.0.9-ad5cfd66a

2 months ago

5.0.9-a5cd8cfbe

2 months ago

5.0.8-7383821e1

2 months ago

5.0.8-d34642db1

2 months ago

5.0.8-a657bbd2e

2 months ago

5.0.8-717731e49

2 months ago

5.0.8

2 months ago

5.0.7-3bc9769b8

2 months ago

5.0.7-3244ed086

2 months ago

5.0.7-4521cf1f7

2 months ago

5.0.7-aa8de9fd3

2 months ago

5.0.7-75301ac7d

2 months ago

5.0.7-e6b4158c6

2 months ago

5.0.6-a390db4a4

3 months ago

5.0.7

2 months ago

5.0.6-58784abf7

3 months ago

5.0.6-e99e8f448

3 months ago

5.0.6-dad979f9b

3 months ago

5.0.6-934a891f9

3 months ago

5.0.6-32c176fd5

3 months ago

5.0.6-b4f02a637

3 months ago

5.0.6-0d326d102

2 months ago

5.0.6-27b2fa6b6

3 months ago

5.0.6-d4da56961

3 months ago

5.0.6-661d6586a

3 months ago

5.0.6-80e798cdc

3 months ago

5.0.6-24fa1d5af

3 months ago

5.0.6-35b48025c

3 months ago

5.0.6-82bd42bcf

3 months ago

5.0.7-5d199f9b6

2 months ago

5.0.6-d7a818e8e

3 months ago

5.0.6-d9c7e0f7e

3 months ago

5.0.6

3 months ago

5.0.5-fa83ee1c7

3 months ago

5.0.5-c5988cce8

3 months ago

5.0.5-980038477

3 months ago

5.0.5-0c5957836

3 months ago

5.0.4-c258b35af

3 months ago

5.0.5

3 months ago

5.0.4

3 months ago

5.0.3-7f7ec82ae

3 months ago

5.0.3-b3272cfce

3 months ago

5.0.2-21fe841f2

3 months ago

5.0.3

3 months ago

5.0.2-c628c44c5

3 months ago

5.0.2-4fd7eb2e1

3 months ago

5.0.2-6ccbb06f0

3 months ago

5.0.1-34455b5f2

3 months ago

5.0.2

3 months ago

5.0.1

3 months ago

5.0.0-1210884ed

3 months ago

5.0.0-18dd3cb26

3 months ago

4.1.6-2bbaf4361

3 months ago

5.0.0

3 months ago

5.0.0-7cd984569

3 months ago

4.1.6-71e5f7a5b

3 months ago

4.1.6-81ebe4e47

3 months ago

4.1.6-e1ca9cced

3 months ago

4.1.6-5214dec4a

4 months ago

4.1.6-a142bb642

3 months ago

4.1.6-b6681bd25

3 months ago

4.1.6-c010d575c

3 months ago

5.0.0-d101aac4b

3 months ago

4.1.6-df330695a

4 months ago

4.1.6-dd7b329c4

4 months ago

4.1.6-2265e59ba

4 months ago

4.1.6-737b3ea5b

4 months ago

4.1.6-1675adee2

4 months ago

4.1.6

4 months ago

4.1.5-7655e5200

4 months ago

4.1.5-e211b46cc

4 months ago

4.1.5-50b897139

4 months ago

4.0.16-44791342

6 months ago

4.1.5-359265a3a

4 months ago

4.1.5-3c8dd5bbf

4 months ago

4.0.15-90d10b565

7 months ago

4.0.16-8e4fdcde9

6 months ago

4.0.15-12106b5b0

7 months ago

4.0.15-440c9b360

7 months ago

4.1.1-ce6da9896

6 months ago

4.0.16-d1f1c2be7

6 months ago

4.0.15-e69a2f1b6

7 months ago

4.1.0-3b9cbf7d8

6 months ago

4.1.0-0b55625d1

6 months ago

4.0.15-352699ab5

7 months ago

4.0.15-bc6556f96

7 months ago

4.1.4-7939dbd5c

4 months ago

4.1.1-d1aec4d9f

6 months ago

4.0.15-169c9d85e

7 months ago

4.0.15-7aec7bd45

7 months ago

4.1.2-4a994c5ef

5 months ago

4.0.15-f6fe2cc3c

7 months ago

4.1.0-15eb66428

6 months ago

4.0.16-9e0236627

6 months ago

4.1.1-3319ff41e

6 months ago

4.1.0-abb9f90c7

6 months ago

4.1.4

5 months ago

4.1.3

5 months ago

4.1.5

4 months ago

4.1.0

6 months ago

4.1.2

5 months ago

4.1.1

6 months ago

4.0.15-6011d3697

7 months ago

4.1.0-6573cb8b0

6 months ago

4.0.16-863b3de03

6 months ago

4.1.2-40902d99b

5 months ago

4.1.4-1dfb74e79

4 months ago

4.1.2-a8ec2bcb7

5 months ago

4.1.1-151bc46fb

6 months ago

4.1.1-e9b6a242a

5 months ago

4.1.0-b0b6cae12

6 months ago

4.1.4-0edbfe7af

5 months ago

4.0.16

7 months ago

4.0.15-7464dc00c

7 months ago

4.1.2-8b3114292

5 months ago

4.1.0-21cf7bc56

6 months ago

4.0.15-4bd8e4f79

7 months ago

4.1.2-a82ff8221

5 months ago

4.0.15-f4e572cd6

7 months ago

4.1.2-73f2b6b6d

5 months ago

4.1.0-af85a7cad

6 months ago

4.1.2-a130993ed

5 months ago

4.0.15-167bf2b3c

7 months ago

4.0.16-94cac115a

6 months ago

4.1.2-34cf1f7cd

5 months ago

4.0.15-62e32252a

7 months ago

4.0.15-769461d3b

7 months ago

4.1.3-f30e2ee8d

5 months ago

4.1.2-928801a80

5 months ago

4.1.3-944935f8d

5 months ago

4.1.1-e1f0b307c

6 months ago

4.1.4-c5dba70a9

4 months ago

4.0.15-757fb2674

7 months ago

4.0.15

7 months ago

4.0.14-1a41c28bb

7 months ago

4.0.14-1eb5b2713

7 months ago

4.0.14-8214dcfb0

7 months ago

4.0.14-a3e8beabd

7 months ago

4.0.14-5b7380259

7 months ago

4.0.14-1cc6a9405

7 months ago

4.0.14-7de56f244

7 months ago

4.0.14-1cd5aae11

7 months ago

4.0.14-48444f750

7 months ago

4.0.14-3c73707ff

7 months ago

4.0.14-9d4b0596f

7 months ago

4.0.14-43046b9ae

7 months ago

4.0.14-83c14d08f

7 months ago

4.0.14-7ae6063df

8 months ago

4.0.14-4ad63bb79

8 months ago

4.0.14-767b23e71

8 months ago

4.0.14-bfa7660d5

8 months ago

4.0.14-d9366f9aa

8 months ago

4.0.14-510d9ce65

8 months ago

4.0.14-1488a7371

8 months ago

4.0.14-a11e135c2

8 months ago

4.0.14

8 months ago

4.0.13-de3f7aeaf

8 months ago

4.0.14-9d13a2f6a

8 months ago

4.0.13-c82432312

8 months ago

4.0.13-3bc94b403

8 months ago

4.0.13-3d7a9da17

8 months ago

4.0.13-e1923b0a7

8 months ago

4.0.13-998fcaf94

8 months ago

4.0.13-90cfd25e2

8 months ago

4.0.12-2281f802b

8 months ago

4.0.13

8 months ago

4.0.12-c2181f0cf

8 months ago

4.0.12-fd1f8343d

8 months ago

4.0.12-eaf8ac7cf

8 months ago

4.0.12-acef72613

8 months ago

4.0.12-ea4f26285

8 months ago

4.0.12-31c78f4ed

8 months ago

4.0.12-08dabd390

8 months ago

4.0.11-2c56203f9

9 months ago

4.0.12

8 months ago

4.0.11-b17824a1d

8 months ago

4.0.11-732c436d4

9 months ago

4.0.11-936dbba10

9 months ago

4.0.11-2b2958fe6

9 months ago

4.0.10-3e515f007

9 months ago

4.0.11

9 months ago

4.0.10-d446c6c31

9 months ago

4.0.10-a2b41f793

9 months ago

4.0.10-80278b36b

9 months ago

4.0.10-3ffecc5bf

9 months ago

4.0.10-ab5f05763

9 months ago

4.0.10-1f589c822

9 months ago

4.0.10-4fc0a7d30

9 months ago

4.0.10-afe15f669

9 months ago

4.0.9-330a5ed72

9 months ago

4.0.9-59a97b61b

9 months ago

4.0.9-82901e785

9 months ago

4.0.10

9 months ago

4.0.9-bf720c045

9 months ago

4.0.9-1fc929c1c

9 months ago

4.0.9-f39ce5f13

10 months ago

4.0.9-e1798aa26

9 months ago

4.0.9-cad9cf007

9 months ago

4.0.9-fad3074b8

9 months ago

4.0.9-83ef3717e

10 months ago

4.0.9-ab466004b

10 months ago

4.0.9-a9cc0ee49

10 months ago

4.0.9-28e51652a

10 months ago

4.0.9-2122a713d

10 months ago

4.0.9-f71bc49bd

10 months ago

4.0.9

10 months ago

4.0.8-f0d2b52d0

10 months ago

4.0.8-e1c01370b

10 months ago

4.0.8-8072a2e59

10 months ago

4.0.8-b1b77adb4

10 months ago

4.0.8-bedfd0aa2

10 months ago

4.0.8-fb7c51c3c

11 months ago

4.0.7-2370d1c39

11 months ago

4.0.8

11 months ago

4.0.7-9891ecd73

11 months ago

4.0.7-dab5cf724

11 months ago

4.0.8-0c7bbbb07

11 months ago

4.0.7-0321812e7

11 months ago

4.0.7-1cb2408ac

11 months ago

4.0.7-03ff9fd82

11 months ago

4.0.7-e1db332a4

11 months ago

4.0.7-6f323de7d

11 months ago

4.0.7-c9ed1c7d6

11 months ago

4.0.7-f4dda4a3c

11 months ago

4.0.7-74fb5671d

11 months ago

4.0.7-72f0e09f7

11 months ago

4.0.7-dbc92ab74

11 months ago

4.0.7-2e464c099

11 months ago

4.0.7-9376e61a1

11 months ago

4.0.7-74477f6ea

11 months ago

4.0.7-f27138ca1

11 months ago

4.0.7-3e47d88fd

11 months ago

4.0.7-08f6f607d

11 months ago

4.0.7-8c6654c3a

11 months ago

4.0.6-092861e23

11 months ago

4.0.7

11 months ago

4.0.6

12 months ago

4.0.5-856ccd708

12 months ago

4.0.5-ddaa59a60

12 months ago

4.0.6-8bbd43628

12 months ago

4.0.5-4691f4173

12 months ago

4.0.5-ee7ffe9b9

12 months ago

4.0.5-821a38e24

12 months ago

4.0.5-900236724

12 months ago

4.0.5

12 months ago

4.0.4-444d83751

12 months ago

4.0.4-528d73781

12 months ago

4.0.4-d011f6130

12 months ago

4.0.4-581574d6d

12 months ago

4.0.4-ba7089984

12 months ago

4.0.4-388d02b33

12 months ago

4.0.4

12 months ago

4.0.3-5d1f68e92

12 months ago

4.0.3-28587d24f

12 months ago

4.0.3-4e0135c7d

12 months ago

4.0.3-cd8cafcd5

1 year ago

4.0.3-178fe2671

1 year ago

4.0.3-c00378909

1 year ago

4.0.3-6fd681d09

1 year ago

4.0.3-83dfc7dc8

1 year ago

4.0.3-984f13e42

1 year ago

4.0.3-ad6f70bf3

1 year ago

4.0.3-f71f2e14e

1 year ago

4.0.3-07f3afe2d

1 year ago

4.0.3-230afea4b

1 year ago

4.0.3-9eff7eff0

1 year ago

4.0.3-a7c6a93c6

1 year ago

4.0.3-f81be145a

1 year ago

4.0.3-01e9a5fe4

1 year ago

4.0.3

1 year ago

4.0.3-742915567

1 year ago

4.0.2-341581166

1 year ago

4.0.2-6d11e8268

1 year ago

4.0.2-d10506189

1 year ago

4.0.2-64a915ae9

1 year ago

4.0.2-3bf6387ff

1 year ago

4.0.2-93890c8f9

1 year ago

4.0.2-887c6ffe1

1 year ago

4.0.2-16588d27c

1 year ago

3.0.7-70d5efc2e

1 year ago

4.0.2-09dd02987

1 year ago

3.0.2-6b839807

1 year ago

2.0.1-7f60b579

1 year ago

3.0.3-46dc3ce9

1 year ago

3.0.3-6a02d765

1 year ago

3.0.3-d9159dd5

1 year ago

3.0.4-f1053159

1 year ago

4.0.1-561797a89

1 year ago

3.0.3-b599905c

1 year ago

2.0.1-a1ec46b5

1 year ago

3.0.5-cf3ae893

1 year ago

4.0.0-06e6d235f

1 year ago

3.0.4-b57bca44

1 year ago

3.0.3-24c1c248

1 year ago

3.0.0-5ffa7a74

1 year ago

4.0.1

1 year ago

3.0.3-13f5b48e

1 year ago

4.0.0

1 year ago

4.0.2

1 year ago

3.0.7-051154dd

1 year ago

3.0.0-c858ca7f

1 year ago

3.0.2-a31b420f

1 year ago

3.0.2-123ded59

1 year ago

3.0.7-8b82e68e8

1 year ago

3.0.3-0634e3b7

1 year ago

3.0.2-3345f28b

1 year ago

4.0.1-7861ed882

1 year ago

3.0.5-ab2c1f67

1 year ago

3.0.4-f09ac4a7

1 year ago

3.0.3-10cbc8fa

1 year ago

3.0.0-a4a10fd4

1 year ago

2.0.1-791f56f0

1 year ago

3.0.8-4a474d54d

1 year ago

3.0.0-e66f4891

1 year ago

3.0.3-9a69e6f7

1 year ago

3.0.5-68504939

1 year ago

4.0.0-a32e70bac

1 year ago

2.0.1-e9cafd3d

1 year ago

3.0.8-68db79f6b

1 year ago

3.0.4-28794fe4

1 year ago

4.0.0-bcf18265e

1 year ago

4.0.1-f537b3731

1 year ago

4.0.1-bca8d6e68

1 year ago

3.0.3-32825633

1 year ago

3.0.3-4ef9c79c

1 year ago

3.0.2-364e0592

1 year ago

3.0.6-b686fb5a

1 year ago

3.0.4-6640116d

1 year ago

2.0.1-69c93ac5

1 year ago

3.0.3-7b2ddc17

1 year ago

3.0.5-b5a808af

1 year ago

3.0.4-e9099d40

1 year ago

3.0.3-28d6722f

1 year ago

3.0.8-adea7bbbf

1 year ago

3.0.3-122f1e67

1 year ago

4.0.2-5a9362e21

1 year ago

3.0.7-fb8a6f188

1 year ago

2.0.1-6eab9c5e

1 year ago

3.0.3-725f5df1

1 year ago

3.0.3-4db2f5f5

1 year ago

3.0.7-d25d9510

1 year ago

3.0.4-7d8b1551

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.3-0ee4f784

1 year ago

3.0.5

1 year ago

2.0.1-eabf6f36

1 year ago

3.0.0

1 year ago

3.0.3-0ce318ec

1 year ago

3.0.3-f3fd7b62

1 year ago

3.0.3-c4eff4c5

1 year ago

3.0.6-7903d7a5

1 year ago

3.0.8-e2267d437

1 year ago

3.0.3-24a5edae

1 year ago

3.0.4-c97dea04

1 year ago

2.0.1-1f7e18b0

1 year ago

3.0.3-0d228f9f

1 year ago

3.0.8-13a870cbe

1 year ago

3.0.8-6625a27fc

1 year ago

3.0.3-01acccef

1 year ago

3.0.3-098ba082

1 year ago

2.0.1-57c32721

1 year ago

3.0.3-7517082d

1 year ago

3.0.8-d729d66a5

1 year ago

3.0.6-69581367

1 year ago

3.0.2-9c0353cf

1 year ago

2.0.1-5eee70a4

1 year ago

3.0.2-02b89323

1 year ago

3.0.4-e3ab1929

1 year ago

3.0.8-0b4a2ee79

1 year ago

3.0.7-dfbe0cc0

1 year ago

3.0.7-f4fac961

1 year ago

3.0.3-5294f14c

1 year ago

3.0.4-ae36e86b

1 year ago

3.0.3-73b87c5a

1 year ago

3.0.4-96166ada

1 year ago

3.0.6-025c082a

1 year ago

3.0.3-a533cc39

1 year ago

3.0.8-6b6ba9ab7

1 year ago

4.0.1-cf963694f

1 year ago

3.0.3-6abcd22f

1 year ago

3.0.3-2b755a82

1 year ago

3.0.4-91842c93

1 year ago

3.0.3-4559a624

1 year ago

3.0.6-d5ef1c91

1 year ago

3.0.3-87dc7e9f

1 year ago

3.0.2-32212959

1 year ago

3.0.8-effcfaa8e

1 year ago

2.0.1-b1024c6c

1 year ago

3.0.3-89778624

1 year ago

2.0.1-7debe031

1 year ago

3.0.4-6cb80f7d

1 year ago

3.0.8-d8f5bc211

1 year ago

3.0.0-58421e11

1 year ago

4.0.1-8c169db1b

1 year ago

3.0.3-63041afe

1 year ago

3.0.6-50442d7a

1 year ago

2.0.1-06f4901a

1 year ago

4.0.2-bcfa15993

1 year ago

3.0.7-1d141331a

1 year ago

3.0.3-20d5f220

1 year ago

3.0.0-8f855a3c

1 year ago

3.0.4-980857c3

1 year ago

2.0.1-daeb43d8

1 year ago

4.0.0-273d8177c

1 year ago

3.0.7-fdcb801e

1 year ago

4.0.2-10ea19700

1 year ago

3.0.2-4c1a33b3

1 year ago

3.0.8-9c67c5b3d

1 year ago

2.0.1-a41d25d4

1 year ago

4.0.0-551622a96

1 year ago

3.0.2-18567b7c

1 year ago

3.0.0-ef83dd1d

1 year ago

3.0.5-77e3cbc3

1 year ago

3.0.3-d9948596

1 year ago

3.0.3-e664d14f

1 year ago

4.0.1-6c1f0ee81

1 year ago

3.0.3-d30f09f2

1 year ago

3.0.5-62a56b54

1 year ago

4.0.1-53224004f

1 year ago

4.0.1-e7167fe52

1 year ago

3.0.0-72e81dc1

1 year ago

3.0.6-16a87076

1 year ago

3.0.3-87165551

1 year ago

3.0.8-8f921ee97

1 year ago

3.0.8-8bb6d5333

1 year ago

2.0.1-c2232166

1 year ago

3.0.6-346ff5a2

1 year ago

3.0.4-c88de8e1

1 year ago

3.0.8-3dee5df4d

1 year ago

3.0.0-8f681db3

1 year ago

3.0.8-c960eb659

1 year ago

3.0.4-972b10a9

1 year ago

3.0.0-fdd80820

1 year ago

4.0.0-7682861f9

1 year ago

4.0.1-9197f10ba

1 year ago

3.0.2-e26848b0

1 year ago

3.0.2-5e85154b

1 year ago

3.0.2-eaac8943

1 year ago

3.0.4-e8123d3f

1 year ago

3.0.8-97ab31c0c

1 year ago

2.0.1-c999d6a7

1 year ago

3.0.8-bb6ceb192

1 year ago

3.0.7-78db573f9

1 year ago

3.0.4-5a6a4379

1 year ago

2.0.1-5315f7bc

1 year ago

3.0.5-7534ae7b

1 year ago

3.0.0-8d49602f

1 year ago

4.0.0-8e4fbe13a

1 year ago

3.0.3-88c47f51

1 year ago

3.0.3-a6be8f0f

1 year ago

3.0.8-05b52d69c

1 year ago

2.0.1-7b5c54dd

1 year ago

3.0.4-f670307a

1 year ago

3.0.1-446fff87

1 year ago

4.0.1-738dd40f1

1 year ago

3.0.8-7877a50e0

1 year ago

3.0.4-72319fe6

1 year ago

3.0.2-a1fbb7e2

1 year ago

3.0.5-f9d1c072

1 year ago

3.0.8-74e84bc29

1 year ago

3.0.8-0f5c305af

1 year ago

3.0.5-50f912c2

1 year ago

2.0.1-f427cfc9

1 year ago

2.0.1-7fb23cd3

1 year ago

2.0.1-85a317bb

1 year ago

2.0.1-2e561fe9

1 year ago

2.0.1-42c1c097

1 year ago

2.0.1-879f4794

1 year ago

1.0.1

2 years ago

2.0.1-ab0e3980

2 years ago

2.0.1-8b0e6bef

2 years ago

2.0.1-d853d124

2 years ago

2.0.1-05abd49f

2 years ago

2.0.1-ea8a0637

2 years ago

2.0.1-3dfc236e

2 years ago

2.0.1-6fdaa7dc

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago