5.0.9 • Published 20 days ago

@libp2p/keychain v5.0.9

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
20 days 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

20 days ago

5.0.9-c2ff2e454

21 days ago

5.0.9

26 days ago

5.0.9-ad5cfd66a

24 days ago

5.0.9-a5cd8cfbe

25 days ago

5.0.8-7383821e1

28 days ago

5.0.8-d34642db1

26 days ago

5.0.8-a657bbd2e

26 days ago

5.0.8-717731e49

29 days ago

5.0.8

1 month ago

5.0.7-3bc9769b8

1 month ago

5.0.7-3244ed086

1 month ago

5.0.7-4521cf1f7

1 month ago

5.0.7-aa8de9fd3

1 month ago

5.0.7-75301ac7d

1 month ago

5.0.7-e6b4158c6

1 month ago

5.0.6-a390db4a4

2 months ago

5.0.7

1 month ago

5.0.6-58784abf7

2 months ago

5.0.6-e99e8f448

1 month ago

5.0.6-dad979f9b

2 months ago

5.0.6-934a891f9

2 months ago

5.0.6-32c176fd5

2 months ago

5.0.6-b4f02a637

2 months ago

5.0.6-0d326d102

1 month ago

5.0.6-27b2fa6b6

2 months ago

5.0.6-d4da56961

2 months ago

5.0.6-661d6586a

2 months ago

5.0.6-80e798cdc

2 months ago

5.0.6-24fa1d5af

2 months ago

5.0.6-35b48025c

2 months ago

5.0.6-82bd42bcf

2 months ago

5.0.7-5d199f9b6

1 month ago

5.0.6-d7a818e8e

1 month ago

5.0.6-d9c7e0f7e

2 months ago

5.0.6

2 months ago

5.0.5-fa83ee1c7

2 months ago

5.0.5-c5988cce8

2 months ago

5.0.5-980038477

2 months ago

5.0.5-0c5957836

2 months ago

5.0.4-c258b35af

2 months ago

5.0.5

2 months ago

5.0.4

2 months ago

5.0.3-7f7ec82ae

2 months ago

5.0.3-b3272cfce

2 months ago

5.0.2-21fe841f2

2 months ago

5.0.3

2 months ago

5.0.2-c628c44c5

2 months ago

5.0.2-4fd7eb2e1

2 months ago

5.0.2-6ccbb06f0

2 months ago

5.0.1-34455b5f2

2 months ago

5.0.2

2 months ago

5.0.1

2 months ago

5.0.0-1210884ed

2 months ago

5.0.0-18dd3cb26

2 months ago

4.1.6-2bbaf4361

2 months ago

5.0.0

2 months ago

5.0.0-7cd984569

2 months ago

4.1.6-71e5f7a5b

2 months ago

4.1.6-81ebe4e47

2 months ago

4.1.6-e1ca9cced

2 months ago

4.1.6-5214dec4a

2 months ago

4.1.6-a142bb642

2 months ago

4.1.6-b6681bd25

2 months ago

4.1.6-c010d575c

2 months ago

5.0.0-d101aac4b

2 months ago

4.1.6-df330695a

3 months ago

4.1.6-dd7b329c4

3 months ago

4.1.6-2265e59ba

3 months ago

4.1.6-737b3ea5b

3 months ago

4.1.6-1675adee2

3 months ago

4.1.6

3 months ago

4.1.5-7655e5200

3 months ago

4.1.5-e211b46cc

3 months ago

4.1.5-50b897139

3 months ago

4.0.16-44791342

5 months ago

4.1.5-359265a3a

3 months ago

4.1.5-3c8dd5bbf

3 months ago

4.0.15-90d10b565

6 months ago

4.0.16-8e4fdcde9

5 months ago

4.0.15-12106b5b0

6 months ago

4.0.15-440c9b360

6 months ago

4.1.1-ce6da9896

5 months ago

4.0.16-d1f1c2be7

5 months ago

4.0.15-e69a2f1b6

6 months ago

4.1.0-3b9cbf7d8

5 months ago

4.1.0-0b55625d1

5 months ago

4.0.15-352699ab5

6 months ago

4.0.15-bc6556f96

6 months ago

4.1.4-7939dbd5c

3 months ago

4.1.1-d1aec4d9f

5 months ago

4.0.15-169c9d85e

6 months ago

4.0.15-7aec7bd45

6 months ago

4.1.2-4a994c5ef

4 months ago

4.0.15-f6fe2cc3c

6 months ago

4.1.0-15eb66428

5 months ago

4.0.16-9e0236627

5 months ago

4.1.1-3319ff41e

5 months ago

4.1.0-abb9f90c7

5 months ago

4.1.4

4 months ago

4.1.3

4 months ago

4.1.5

3 months ago

4.1.0

5 months ago

4.1.2

4 months ago

4.1.1

5 months ago

4.0.15-6011d3697

6 months ago

4.1.0-6573cb8b0

5 months ago

4.0.16-863b3de03

5 months ago

4.1.2-40902d99b

4 months ago

4.1.4-1dfb74e79

3 months ago

4.1.2-a8ec2bcb7

4 months ago

4.1.1-151bc46fb

5 months ago

4.1.1-e9b6a242a

4 months ago

4.1.0-b0b6cae12

5 months ago

4.1.4-0edbfe7af

4 months ago

4.0.16

6 months ago

4.0.15-7464dc00c

6 months ago

4.1.2-8b3114292

4 months ago

4.1.0-21cf7bc56

5 months ago

4.0.15-4bd8e4f79

6 months ago

4.1.2-a82ff8221

4 months ago

4.0.15-f4e572cd6

6 months ago

4.1.2-73f2b6b6d

4 months ago

4.1.0-af85a7cad

5 months ago

4.1.2-a130993ed

4 months ago

4.0.15-167bf2b3c

6 months ago

4.0.16-94cac115a

5 months ago

4.1.2-34cf1f7cd

4 months ago

4.0.15-62e32252a

6 months ago

4.0.15-769461d3b

6 months ago

4.1.3-f30e2ee8d

4 months ago

4.1.2-928801a80

4 months ago

4.1.3-944935f8d

4 months ago

4.1.1-e1f0b307c

5 months ago

4.1.4-c5dba70a9

3 months ago

4.0.15-757fb2674

6 months ago

4.0.15

6 months ago

4.0.14-1a41c28bb

6 months ago

4.0.14-1eb5b2713

6 months ago

4.0.14-8214dcfb0

6 months ago

4.0.14-a3e8beabd

6 months ago

4.0.14-5b7380259

6 months ago

4.0.14-1cc6a9405

6 months ago

4.0.14-7de56f244

6 months ago

4.0.14-1cd5aae11

6 months ago

4.0.14-48444f750

6 months ago

4.0.14-3c73707ff

6 months ago

4.0.14-9d4b0596f

6 months ago

4.0.14-43046b9ae

6 months ago

4.0.14-83c14d08f

6 months ago

4.0.14-7ae6063df

7 months ago

4.0.14-4ad63bb79

7 months ago

4.0.14-767b23e71

7 months ago

4.0.14-bfa7660d5

7 months ago

4.0.14-d9366f9aa

7 months ago

4.0.14-510d9ce65

7 months ago

4.0.14-1488a7371

7 months ago

4.0.14-a11e135c2

7 months ago

4.0.14

7 months ago

4.0.13-de3f7aeaf

7 months ago

4.0.14-9d13a2f6a

7 months ago

4.0.13-c82432312

7 months ago

4.0.13-3bc94b403

7 months ago

4.0.13-3d7a9da17

7 months ago

4.0.13-e1923b0a7

7 months ago

4.0.13-998fcaf94

7 months ago

4.0.13-90cfd25e2

7 months ago

4.0.12-2281f802b

7 months ago

4.0.13

7 months ago

4.0.12-c2181f0cf

7 months ago

4.0.12-fd1f8343d

7 months ago

4.0.12-eaf8ac7cf

7 months ago

4.0.12-acef72613

7 months ago

4.0.12-ea4f26285

7 months ago

4.0.12-31c78f4ed

7 months ago

4.0.12-08dabd390

7 months ago

4.0.11-2c56203f9

7 months ago

4.0.12

7 months ago

4.0.11-b17824a1d

7 months ago

4.0.11-732c436d4

8 months ago

4.0.11-936dbba10

8 months ago

4.0.11-2b2958fe6

8 months ago

4.0.10-3e515f007

8 months ago

4.0.11

8 months ago

4.0.10-d446c6c31

8 months ago

4.0.10-a2b41f793

8 months ago

4.0.10-80278b36b

8 months ago

4.0.10-3ffecc5bf

8 months ago

4.0.10-ab5f05763

8 months ago

4.0.10-1f589c822

8 months ago

4.0.10-4fc0a7d30

8 months ago

4.0.10-afe15f669

8 months ago

4.0.9-330a5ed72

8 months ago

4.0.9-59a97b61b

8 months ago

4.0.9-82901e785

8 months ago

4.0.10

8 months ago

4.0.9-bf720c045

8 months ago

4.0.9-1fc929c1c

8 months ago

4.0.9-f39ce5f13

9 months ago

4.0.9-e1798aa26

8 months ago

4.0.9-cad9cf007

8 months ago

4.0.9-fad3074b8

8 months ago

4.0.9-83ef3717e

9 months ago

4.0.9-ab466004b

9 months ago

4.0.9-a9cc0ee49

9 months ago

4.0.9-28e51652a

9 months ago

4.0.9-2122a713d

9 months ago

4.0.9-f71bc49bd

9 months ago

4.0.9

9 months ago

4.0.8-f0d2b52d0

9 months ago

4.0.8-e1c01370b

9 months ago

4.0.8-8072a2e59

9 months ago

4.0.8-b1b77adb4

9 months ago

4.0.8-bedfd0aa2

9 months ago

4.0.8-fb7c51c3c

9 months ago

4.0.7-2370d1c39

10 months ago

4.0.8

10 months ago

4.0.7-9891ecd73

10 months ago

4.0.7-dab5cf724

10 months ago

4.0.8-0c7bbbb07

10 months ago

4.0.7-0321812e7

10 months ago

4.0.7-1cb2408ac

10 months ago

4.0.7-03ff9fd82

10 months ago

4.0.7-e1db332a4

10 months ago

4.0.7-6f323de7d

10 months ago

4.0.7-c9ed1c7d6

10 months ago

4.0.7-f4dda4a3c

10 months ago

4.0.7-74fb5671d

10 months ago

4.0.7-72f0e09f7

10 months ago

4.0.7-dbc92ab74

10 months ago

4.0.7-2e464c099

10 months ago

4.0.7-9376e61a1

10 months ago

4.0.7-74477f6ea

10 months ago

4.0.7-f27138ca1

10 months ago

4.0.7-3e47d88fd

10 months ago

4.0.7-08f6f607d

10 months ago

4.0.7-8c6654c3a

10 months ago

4.0.6-092861e23

10 months ago

4.0.7

10 months ago

4.0.6

11 months ago

4.0.5-856ccd708

11 months ago

4.0.5-ddaa59a60

11 months ago

4.0.6-8bbd43628

11 months ago

4.0.5-4691f4173

11 months ago

4.0.5-ee7ffe9b9

11 months ago

4.0.5-821a38e24

11 months ago

4.0.5-900236724

11 months ago

4.0.5

11 months ago

4.0.4-444d83751

11 months ago

4.0.4-528d73781

11 months ago

4.0.4-d011f6130

11 months ago

4.0.4-581574d6d

11 months ago

4.0.4-ba7089984

11 months ago

4.0.4-388d02b33

11 months ago

4.0.4

11 months ago

4.0.3-5d1f68e92

11 months ago

4.0.3-28587d24f

11 months ago

4.0.3-4e0135c7d

11 months ago

4.0.3-cd8cafcd5

11 months ago

4.0.3-178fe2671

11 months ago

4.0.3-c00378909

11 months ago

4.0.3-6fd681d09

11 months ago

4.0.3-83dfc7dc8

11 months ago

4.0.3-984f13e42

11 months ago

4.0.3-ad6f70bf3

11 months ago

4.0.3-f71f2e14e

11 months ago

4.0.3-07f3afe2d

11 months ago

4.0.3-230afea4b

11 months ago

4.0.3-9eff7eff0

11 months ago

4.0.3-a7c6a93c6

11 months ago

4.0.3-f81be145a

11 months ago

4.0.3-01e9a5fe4

11 months ago

4.0.3

12 months ago

4.0.3-742915567

12 months ago

4.0.2-341581166

12 months ago

4.0.2-6d11e8268

12 months ago

4.0.2-d10506189

12 months ago

4.0.2-64a915ae9

12 months ago

4.0.2-3bf6387ff

12 months ago

4.0.2-93890c8f9

12 months ago

4.0.2-887c6ffe1

12 months ago

4.0.2-16588d27c

12 months ago

3.0.7-70d5efc2e

1 year ago

4.0.2-09dd02987

12 months 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

12 months 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

12 months 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

12 months ago

3.0.3-13f5b48e

1 year ago

4.0.0

12 months ago

4.0.2

12 months 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

12 months 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

12 months 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

12 months ago

2.0.1-e9cafd3d

1 year ago

3.0.8-68db79f6b

12 months ago

3.0.4-28794fe4

1 year ago

4.0.0-bcf18265e

12 months ago

4.0.1-f537b3731

12 months ago

4.0.1-bca8d6e68

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months ago

3.0.7-fdcb801e

1 year ago

4.0.2-10ea19700

12 months 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

12 months 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

12 months ago

3.0.3-d30f09f2

1 year ago

3.0.5-62a56b54

1 year ago

4.0.1-53224004f

12 months ago

4.0.1-e7167fe52

12 months 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

12 months ago

3.0.8-8bb6d5333

12 months 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

12 months ago

4.0.1-9197f10ba

12 months 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

12 months 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

12 months ago

3.0.8-7877a50e0

12 months 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

12 months 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

1 year ago

2.0.1-8b0e6bef

1 year ago

2.0.1-d853d124

1 year ago

2.0.1-05abd49f

1 year ago

2.0.1-ea8a0637

1 year ago

2.0.1-3dfc236e

1 year ago

2.0.1-6fdaa7dc

1 year ago

2.0.1

1 year 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