@sebastienrousseau/crypto-lib 0.0.3 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +304 -314
- package/dist/accel/index.d.ts +11 -0
- package/dist/accel/index.d.ts.map +1 -0
- package/dist/accel/index.js +31 -0
- package/dist/accel/native-pqc-bridge.d.ts +18 -0
- package/dist/accel/native-pqc-bridge.d.ts.map +1 -0
- package/dist/accel/native-pqc-bridge.js +100 -0
- package/dist/accel/wasm-bridge.d.ts +35 -0
- package/dist/accel/wasm-bridge.d.ts.map +1 -0
- package/dist/accel/wasm-bridge.js +161 -0
- package/dist/accel/webcrypto-bridge.d.ts +32 -0
- package/dist/accel/webcrypto-bridge.d.ts.map +1 -0
- package/dist/accel/webcrypto-bridge.js +179 -0
- package/dist/accel/webcrypto-modern.d.ts +40 -0
- package/dist/accel/webcrypto-modern.d.ts.map +1 -0
- package/dist/accel/webcrypto-modern.js +213 -0
- package/dist/accel/worker-pool.d.ts +23 -0
- package/dist/accel/worker-pool.d.ts.map +1 -0
- package/dist/accel/worker-pool.js +119 -0
- package/dist/bin/cryptolib.d.ts +9 -7
- package/dist/bin/cryptolib.d.ts.map +1 -1
- package/dist/bin/cryptolib.js +25 -16
- package/dist/config/config.d.ts.map +1 -1
- package/dist/crypto.d.ts +43 -0
- package/dist/crypto.d.ts.map +1 -0
- package/dist/crypto.js +107 -0
- package/dist/enums.d.ts +29 -29
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +54 -54
- package/dist/errors.d.ts +14 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +22 -0
- package/dist/high-level/index.d.ts +11 -0
- package/dist/high-level/index.d.ts.map +1 -0
- package/dist/high-level/index.js +53 -0
- package/dist/high-level/key-wrap.d.ts +16 -0
- package/dist/high-level/key-wrap.d.ts.map +1 -0
- package/dist/high-level/key-wrap.js +93 -0
- package/dist/high-level/multi-recipient.d.ts +25 -0
- package/dist/high-level/multi-recipient.d.ts.map +1 -0
- package/dist/high-level/multi-recipient.js +122 -0
- package/dist/high-level/password-encrypt.d.ts +14 -0
- package/dist/high-level/password-encrypt.d.ts.map +1 -0
- package/dist/high-level/password-encrypt.js +93 -0
- package/dist/high-level/sealedbox.d.ts +13 -0
- package/dist/high-level/sealedbox.d.ts.map +1 -0
- package/dist/high-level/sealedbox.js +119 -0
- package/dist/high-level/secretbox.d.ts +7 -0
- package/dist/high-level/secretbox.d.ts.map +1 -0
- package/dist/high-level/secretbox.js +54 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -0
- package/dist/key/key.d.ts +6 -13
- package/dist/key/key.d.ts.map +1 -1
- package/dist/key/key.js +20 -14
- package/dist/key/keystore.d.ts +11 -0
- package/dist/key/keystore.d.ts.map +1 -0
- package/dist/key/keystore.js +87 -0
- package/dist/keys/index.d.ts +7 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +22 -0
- package/dist/keys/keygen.d.ts +16 -0
- package/dist/keys/keygen.d.ts.map +1 -0
- package/dist/keys/keygen.js +128 -0
- package/dist/keys/keyring.d.ts +35 -0
- package/dist/keys/keyring.d.ts.map +1 -0
- package/dist/keys/keyring.js +136 -0
- package/dist/keys/serialize.d.ts +30 -0
- package/dist/keys/serialize.d.ts.map +1 -0
- package/dist/keys/serialize.js +120 -0
- package/dist/lib/decrypt.d.ts +4 -1
- package/dist/lib/decrypt.d.ts.map +1 -1
- package/dist/lib/decrypt.js +43 -51
- package/dist/lib/encrypt.d.ts +1 -1
- package/dist/lib/encrypt.d.ts.map +1 -1
- package/dist/lib/encrypt.js +29 -45
- package/dist/lib/generate.d.ts.map +1 -1
- package/dist/lib/generate.js +56 -63
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +17 -7
- package/dist/lib/key-output.d.ts +7 -0
- package/dist/lib/key-output.d.ts.map +1 -0
- package/dist/lib/key-output.js +50 -0
- package/dist/lib/reformat.d.ts +6 -1
- package/dist/lib/reformat.d.ts.map +1 -1
- package/dist/lib/reformat.js +37 -61
- package/dist/lib/revoke.d.ts +2 -2
- package/dist/lib/revoke.d.ts.map +1 -1
- package/dist/lib/revoke.js +33 -50
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +21 -36
- package/dist/lib/sign.d.ts.map +1 -1
- package/dist/lib/sign.js +36 -43
- package/dist/lib/verify.d.ts +1 -3
- package/dist/lib/verify.d.ts.map +1 -1
- package/dist/lib/verify.js +25 -30
- package/dist/modern/aead.d.ts +17 -0
- package/dist/modern/aead.d.ts.map +1 -0
- package/dist/modern/aead.js +51 -0
- package/dist/modern/aes.d.ts +35 -0
- package/dist/modern/aes.d.ts.map +1 -0
- package/dist/modern/aes.js +82 -0
- package/dist/modern/cost-limits.d.ts +11 -0
- package/dist/modern/cost-limits.d.ts.map +1 -0
- package/dist/modern/cost-limits.js +35 -0
- package/dist/modern/curves.d.ts +86 -0
- package/dist/modern/curves.d.ts.map +1 -0
- package/dist/modern/curves.js +171 -0
- package/dist/modern/ecdh.d.ts +11 -0
- package/dist/modern/ecdh.d.ts.map +1 -0
- package/dist/modern/ecdh.js +28 -0
- package/dist/modern/fn-dsa.d.ts +19 -0
- package/dist/modern/fn-dsa.d.ts.map +1 -0
- package/dist/modern/fn-dsa.js +57 -0
- package/dist/modern/hash.d.ts +13 -0
- package/dist/modern/hash.d.ts.map +1 -0
- package/dist/modern/hash.js +45 -0
- package/dist/modern/hpke.d.ts +47 -0
- package/dist/modern/hpke.d.ts.map +1 -0
- package/dist/modern/hpke.js +207 -0
- package/dist/modern/index.d.ts +40 -0
- package/dist/modern/index.d.ts.map +1 -0
- package/dist/modern/index.js +194 -0
- package/dist/modern/kdf.d.ts +23 -0
- package/dist/modern/kdf.d.ts.map +1 -0
- package/dist/modern/kdf.js +67 -0
- package/dist/modern/mac.d.ts +51 -0
- package/dist/modern/mac.d.ts.map +1 -0
- package/dist/modern/mac.js +119 -0
- package/dist/modern/password.d.ts +40 -0
- package/dist/modern/password.d.ts.map +1 -0
- package/dist/modern/password.js +123 -0
- package/dist/modern/pq-hash-sign.d.ts +18 -0
- package/dist/modern/pq-hash-sign.d.ts.map +1 -0
- package/dist/modern/pq-hash-sign.js +73 -0
- package/dist/modern/pq-kem.d.ts +88 -0
- package/dist/modern/pq-kem.d.ts.map +1 -0
- package/dist/modern/pq-kem.js +270 -0
- package/dist/modern/pq-sign.d.ts +30 -0
- package/dist/modern/pq-sign.d.ts.map +1 -0
- package/dist/modern/pq-sign.js +94 -0
- package/dist/modern/pq.d.ts +38 -0
- package/dist/modern/pq.d.ts.map +1 -0
- package/dist/modern/pq.js +80 -0
- package/dist/modern/signing.d.ts +16 -0
- package/dist/modern/signing.d.ts.map +1 -0
- package/dist/modern/signing.js +34 -0
- package/dist/protocols/index.d.ts +7 -0
- package/dist/protocols/index.d.ts.map +1 -0
- package/dist/protocols/index.js +46 -0
- package/dist/protocols/iso20022.d.ts +51 -0
- package/dist/protocols/iso20022.d.ts.map +1 -0
- package/dist/protocols/iso20022.js +145 -0
- package/dist/protocols/opaque/ake.d.ts +51 -0
- package/dist/protocols/opaque/ake.d.ts.map +1 -0
- package/dist/protocols/opaque/ake.js +102 -0
- package/dist/protocols/opaque/client.d.ts +45 -0
- package/dist/protocols/opaque/client.d.ts.map +1 -0
- package/dist/protocols/opaque/client.js +63 -0
- package/dist/protocols/opaque/config.d.ts +14 -0
- package/dist/protocols/opaque/config.d.ts.map +1 -0
- package/dist/protocols/opaque/config.js +18 -0
- package/dist/protocols/opaque/credentials.d.ts +29 -0
- package/dist/protocols/opaque/credentials.d.ts.map +1 -0
- package/dist/protocols/opaque/credentials.js +61 -0
- package/dist/protocols/opaque/envelope.d.ts +36 -0
- package/dist/protocols/opaque/envelope.d.ts.map +1 -0
- package/dist/protocols/opaque/envelope.js +77 -0
- package/dist/protocols/opaque/ksf.d.ts +15 -0
- package/dist/protocols/opaque/ksf.d.ts.map +1 -0
- package/dist/protocols/opaque/ksf.js +27 -0
- package/dist/protocols/opaque/messages.d.ts +61 -0
- package/dist/protocols/opaque/messages.d.ts.map +1 -0
- package/dist/protocols/opaque/messages.js +94 -0
- package/dist/protocols/opaque/server.d.ts +33 -0
- package/dist/protocols/opaque/server.d.ts.map +1 -0
- package/dist/protocols/opaque/server.js +74 -0
- package/dist/protocols/opaque/suite.d.ts +58 -0
- package/dist/protocols/opaque/suite.d.ts.map +1 -0
- package/dist/protocols/opaque/suite.js +115 -0
- package/dist/protocols/pake.d.ts +14 -0
- package/dist/protocols/pake.d.ts.map +1 -0
- package/dist/protocols/pake.js +33 -0
- package/dist/protocols/pqxdh.d.ts +53 -0
- package/dist/protocols/pqxdh.d.ts.map +1 -0
- package/dist/protocols/pqxdh.js +143 -0
- package/dist/protocols/ratchet.d.ts +52 -0
- package/dist/protocols/ratchet.d.ts.map +1 -0
- package/dist/protocols/ratchet.js +187 -0
- package/dist/protocols/threshold.d.ts +23 -0
- package/dist/protocols/threshold.d.ts.map +1 -0
- package/dist/protocols/threshold.js +191 -0
- package/dist/registry.d.ts +20 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +399 -0
- package/dist/streaming/index.d.ts +7 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/index.js +15 -0
- package/dist/streaming/stream-aead.d.ts +17 -0
- package/dist/streaming/stream-aead.d.ts.map +1 -0
- package/dist/streaming/stream-aead.js +125 -0
- package/dist/streaming/stream-hash.d.ts +9 -0
- package/dist/streaming/stream-hash.d.ts.map +1 -0
- package/dist/streaming/stream-hash.js +52 -0
- package/dist/streaming/web-streams.d.ts +17 -0
- package/dist/streaming/web-streams.d.ts.map +1 -0
- package/dist/streaming/web-streams.js +114 -0
- package/dist/tokens/index.d.ts +5 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +15 -0
- package/dist/tokens/key-rotation.d.ts +20 -0
- package/dist/tokens/key-rotation.d.ts.map +1 -0
- package/dist/tokens/key-rotation.js +76 -0
- package/dist/tokens/paseto.d.ts +46 -0
- package/dist/tokens/paseto.d.ts.map +1 -0
- package/dist/tokens/paseto.js +200 -0
- package/dist/types/types.d.ts +24 -16
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils.d.ts +13 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +56 -0
- package/package.json +77 -142
- package/dist/COPYRIGHT +0 -15
- package/dist/Report.txt +0 -160
- package/dist/bin/cryptolib.js.map +0 -1
- package/dist/config/config.js.map +0 -1
- package/dist/data/decrypted.txt +0 -1
- package/dist/data/detached.sig +0 -1
- package/dist/data/encrypted.txt +0 -1
- package/dist/data/signed.sig +0 -1
- package/dist/enums.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/key/key.js.map +0 -1
- package/dist/key/rsa-reformat.cert +0 -1
- package/dist/key/rsa-reformat.key +0 -1
- package/dist/key/rsa-reformat.pub +0 -1
- package/dist/key/rsa-revoke.key +0 -1
- package/dist/key/rsa-revoke.pub +0 -1
- package/dist/key/rsa.cert +0 -1
- package/dist/key/rsa.key +0 -1
- package/dist/key/rsa.pub +0 -1
- package/dist/lib/decrypt.js.map +0 -1
- package/dist/lib/encrypt.js.map +0 -1
- package/dist/lib/generate.js.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/reformat.js.map +0 -1
- package/dist/lib/revoke.js.map +0 -1
- package/dist/lib/session.js.map +0 -1
- package/dist/lib/sign.js.map +0 -1
- package/dist/lib/verify.js.map +0 -1
- package/dist/package.json +0 -143
- package/dist/types/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,373 +1,363 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[](https://coveralls.io/github/sebastienrousseau/crypto-service?branch=main)
|
|
7
|
-
[](https://lerna.js.org/)
|
|
8
|
-
[](https://opensource.org/licenses/MIT)
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
**[Website](https://cryptolib.io) • [Documentation](https://cryptolib.io/docs/)
|
|
12
|
-
• [Submit an Issue](https://github.com/sebastienrousseau/crypto-service/issues)
|
|
13
|
-
• [Contributing Guidelines](https://github.com/sebastienrousseau/crypto-service/blob/master/.github/CONTRIBUTING.md)**
|
|
14
|
-
|
|
15
|
-
***
|
|
16
|
-
|
|
17
|
-
## 👋 Welcome to Crypto Lib
|
|
18
|
-
|
|
19
|
-
Crypto Lib is a powerful intuitive cryptographic JavaScript library that
|
|
20
|
-
encapsulates common algorithms, functions and provides an interface for
|
|
21
|
-
low-level cryptographic operations.
|
|
22
|
-
|
|
23
|
-
![divider][divider]
|
|
24
|
-
|
|
25
|
-
## ✨ Key Features
|
|
26
|
-
|
|
27
|
-
The cryptographic operations include:
|
|
28
|
-
|
|
29
|
-
- Authentication via Digital Signature,
|
|
30
|
-
- Confidentiality via Encryption and Decryption,
|
|
31
|
-
- Compression,
|
|
32
|
-
- Key Generation,
|
|
33
|
-
- Key Management,
|
|
34
|
-
- Pseudorandom Number Generation,
|
|
35
|
-
- Signature Verification.
|
|
36
|
-
|
|
37
|
-
This library is based on [OpenPGP.js][1] - a JavaScript implementation of the
|
|
38
|
-
OpenPGP protocol. It implements [RFC4880][2] and parts of [RFC4880bis][3].
|
|
39
|
-
|
|
40
|
-
Development of this library is hosted by [GitHub][4] at the [following page][5].
|
|
41
|
-
Source code is available to everyone under the standard [MIT license][6].
|
|
42
|
-
|
|
43
|
-
![divider][divider]
|
|
44
|
-
|
|
45
|
-
## ⏩ Getting Started
|
|
46
|
-
|
|
47
|
-
👉 Note: » Crypto Lib is a [Node.js][7] module available through the
|
|
48
|
-
[npm registry][8]. Before installing, [download and install Node.js][7].
|
|
49
|
-
Node.js 12.20.0 or higher is required.
|
|
50
|
-
|
|
51
|
-
This allows you to always be on the latest version when we release new builds
|
|
52
|
-
with automatic upgrades.
|
|
53
|
-
|
|
54
|
-
![divider][divider]
|
|
55
|
-
|
|
56
|
-
## 🔧 Installation
|
|
57
|
-
|
|
58
|
-
1️⃣ Install the Crypto Library via [`npm`][8], [`yarn`][9] or [`pnpm`][10]
|
|
59
|
-
package managers:
|
|
60
|
-
|
|
61
|
-
- `npm i @sebastienrousseau/crypto-lib`
|
|
62
|
-
- `yarn add @sebastienrousseau/crypto-lib`
|
|
63
|
-
- `pnpm add @sebastienrousseau/crypto-lib`
|
|
64
|
-
|
|
65
|
-
For users who are unable to install the Crypto Lib, released builds can be
|
|
66
|
-
manually downloaded from this repository's
|
|
67
|
-
[Releases page](https://github.com/sebastienrousseau/crypto-service/releases/).
|
|
68
|
-
|
|
69
|
-
### What's included
|
|
70
|
-
|
|
71
|
-
Within the download you'll find all the crypto lib source files grouped into
|
|
72
|
-
the *dist* folder.
|
|
73
|
-
|
|
74
|
-
You'll see something like this:
|
|
75
|
-
|
|
76
|
-
```shell
|
|
77
|
-
.
|
|
78
|
-
├── COPYRIGHT
|
|
79
|
-
├── Makefile
|
|
80
|
-
├── Report.txt
|
|
81
|
-
├── bin
|
|
82
|
-
│ ├── crypto-lib.d.ts
|
|
83
|
-
│ ├── crypto-lib.d.ts.map
|
|
84
|
-
│ ├── crypto-lib.js
|
|
85
|
-
│ ├── crypto-lib.js.map
|
|
86
|
-
│ ├── cryptolib.d.ts
|
|
87
|
-
│ ├── cryptolib.d.ts.map
|
|
88
|
-
│ ├── cryptolib.js
|
|
89
|
-
│ └── cryptolib.js.map
|
|
90
|
-
├── config
|
|
91
|
-
│ ├── config.d.ts
|
|
92
|
-
│ ├── config.d.ts.map
|
|
93
|
-
│ ├── config.js
|
|
94
|
-
│ └── config.js.map
|
|
95
|
-
├── enums.d.ts
|
|
96
|
-
├── enums.d.ts.map
|
|
97
|
-
├── enums.js
|
|
98
|
-
├── enums.js.map
|
|
99
|
-
├── index.d.ts
|
|
100
|
-
├── index.d.ts.map
|
|
101
|
-
├── index.js
|
|
102
|
-
├── index.js.map
|
|
103
|
-
├── key
|
|
104
|
-
│ ├── key.d.ts
|
|
105
|
-
│ ├── key.d.ts.map
|
|
106
|
-
│ ├── key.js
|
|
107
|
-
│ └── key.js.map
|
|
108
|
-
├── lib
|
|
109
|
-
│ ├── decrypt.d.ts
|
|
110
|
-
│ ├── decrypt.d.ts.map
|
|
111
|
-
│ ├── decrypt.js
|
|
112
|
-
│ ├── decrypt.js.map
|
|
113
|
-
│ ├── encrypt.d.ts
|
|
114
|
-
│ ├── encrypt.d.ts.map
|
|
115
|
-
│ ├── encrypt.js
|
|
116
|
-
│ ├── encrypt.js.map
|
|
117
|
-
│ ├── generate.d.ts
|
|
118
|
-
│ ├── generate.d.ts.map
|
|
119
|
-
│ ├── generate.js
|
|
120
|
-
│ ├── generate.js.map
|
|
121
|
-
│ ├── generateSessionKey.d.ts
|
|
122
|
-
│ ├── generateSessionKey.d.ts.map
|
|
123
|
-
│ ├── generateSessionKey.js
|
|
124
|
-
│ ├── generateSessionKey.js.map
|
|
125
|
-
│ ├── index.d.ts
|
|
126
|
-
│ ├── index.d.ts.map
|
|
127
|
-
│ ├── index.js
|
|
128
|
-
│ ├── index.js.map
|
|
129
|
-
│ ├── reformat.d.ts
|
|
130
|
-
│ ├── reformat.d.ts.map
|
|
131
|
-
│ ├── reformat.js
|
|
132
|
-
│ ├── reformat.js.map
|
|
133
|
-
│ ├── revoke.d.ts
|
|
134
|
-
│ ├── revoke.d.ts.map
|
|
135
|
-
│ ├── revoke.js
|
|
136
|
-
│ ├── revoke.js.map
|
|
137
|
-
│ ├── session.d.ts
|
|
138
|
-
│ ├── session.d.ts.map
|
|
139
|
-
│ ├── session.js
|
|
140
|
-
│ ├── session.js.map
|
|
141
|
-
│ ├── sign.d.ts
|
|
142
|
-
│ ├── sign.d.ts.map
|
|
143
|
-
│ ├── sign.js
|
|
144
|
-
│ ├── sign.js.map
|
|
145
|
-
│ ├── verify.d.ts
|
|
146
|
-
│ ├── verify.d.ts.map
|
|
147
|
-
│ ├── verify.js
|
|
148
|
-
│ └── verify.js.map
|
|
149
|
-
├── package.json
|
|
150
|
-
└── types
|
|
151
|
-
├── types.d.ts
|
|
152
|
-
├── types.d.ts.map
|
|
153
|
-
├── types.js
|
|
154
|
-
└── types.js.map
|
|
155
|
-
|
|
156
|
-
5 directories, 72 files
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/sebastienrousseau/crypto-service/main/assets/crypto-lib-logo.svg" alt="crypto-lib logo" width="360" />
|
|
5
|
+
</p>
|
|
157
6
|
|
|
158
|
-
|
|
7
|
+
<h1 align="center">@sebastienrousseau/crypto-lib</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
A modern cryptographic library for TypeScript, with post-quantum support, zero unsafe dependencies, and 100% test coverage.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://github.com/sebastienrousseau/crypto-service/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/crypto-service/ci.yml?branch=main&style=for-the-badge&logo=github" alt="Build" /></a>
|
|
15
|
+
<a href="https://coveralls.io/github/sebastienrousseau/crypto-service?branch=main"><img src="https://img.shields.io/coveralls/github/sebastienrousseau/crypto-service?branch=main&style=for-the-badge" alt="Coverage" /></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/@sebastienrousseau/crypto-lib"><img src="https://img.shields.io/npm/v/@sebastienrousseau/crypto-lib.svg?style=for-the-badge&color=f14041&logo=npm" alt="Registry" /></a>
|
|
17
|
+
<a href="https://sebastienrousseau.github.io/crypto-service/"><img src="https://img.shields.io/badge/docs-TypeDoc-blue.svg?style=for-the-badge&labelColor=555555&logo=typescript" alt="Docs" /></a>
|
|
18
|
+
<a href="https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/crypto-service" title="ossf-scorecard"><img src="https://img.shields.io/badge/OpenSSF-Scorecard-blue?style=for-the-badge&logo=openssf" alt="OpenSSF Scorecard" /></a>
|
|
19
|
+
<a href="https://github.com/sebastienrousseau/crypto-service/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg?style=for-the-badge" alt="License: Apache-2.0 OR MIT" /></a>
|
|
20
|
+
<a href="https://github.com/sebastienrousseau/crypto-service/blob/main/docs/POLICIES.md"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-93450a.svg?style=for-the-badge&logo=node.js" alt="Node.js 22 or newer" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Contents
|
|
26
|
+
|
|
27
|
+
**Getting started**
|
|
28
|
+
|
|
29
|
+
- [Install](#install) — installation via pnpm, npm, or yarn
|
|
30
|
+
- [Requirements](#requirements) — runtime floor and environment prerequisites
|
|
31
|
+
- [Quick Start](#quick-start) — minimal working usage sample
|
|
32
|
+
|
|
33
|
+
**The Crypto Service ecosystem**
|
|
159
34
|
|
|
160
|
-
|
|
35
|
+
- [The Crypto Service ecosystem](#the-crypto-service-ecosystem) — full 14-package suite overview
|
|
161
36
|
|
|
162
|
-
|
|
37
|
+
**Package reference**
|
|
163
38
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
> cd my-app
|
|
167
|
-
> yarn add @sebastienrousseau/crypto-lib -D # or yarn or pnpm
|
|
168
|
-
> yarn start \
|
|
169
|
-
--name "Jane Doe" \
|
|
170
|
-
--email "jane@doe.com" \
|
|
171
|
-
--passphrase "123456789abcdef" \
|
|
172
|
-
--type "rsa" \
|
|
173
|
-
--curve "" \
|
|
174
|
-
--bits 2048 \
|
|
175
|
-
--expiration 0 \
|
|
176
|
-
--format armored \
|
|
39
|
+
- [Reference & Usage](#overview) — features, configuration, and capabilities
|
|
40
|
+
- [Examples](#examples) — runnable sample code
|
|
177
41
|
|
|
42
|
+
**Operational**
|
|
43
|
+
|
|
44
|
+
- [Development](#development) — build, lint, format, and test targets
|
|
45
|
+
- [Security](#security) — vulnerability disclosure and cryptographic invariants
|
|
46
|
+
- [Documentation](#documentation) — TypeDoc API docs and ecosystem guides
|
|
47
|
+
- [Stability guarantees](#stability-guarantees) — SemVer axis and release policy
|
|
48
|
+
- [License](#license)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pnpm add @sebastienrousseau/crypto-lib
|
|
56
|
+
# or
|
|
57
|
+
npm install @sebastienrousseau/crypto-lib
|
|
58
|
+
# or
|
|
59
|
+
yarn add @sebastienrousseau/crypto-lib
|
|
178
60
|
```
|
|
179
61
|
|
|
180
|
-
|
|
62
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Requirements
|
|
67
|
+
|
|
68
|
+
- **Node.js**: `^22.0.0` or `>=24.0.0` (active and maintenance LTS releases)
|
|
69
|
+
- **Package Manager**: `pnpm >=9` (recommended) or `npm >=10`
|
|
70
|
+
- **TypeScript**: `>=5.0` (when compiling with TypeScript)
|
|
181
71
|
|
|
182
|
-
|
|
72
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
183
73
|
|
|
184
|
-
|
|
74
|
+
---
|
|
185
75
|
|
|
186
|
-
|
|
187
|
-
and other parameters that can control the behavior of the Crypto Lib as a whole.
|
|
76
|
+
## Quick Start
|
|
188
77
|
|
|
189
|
-
|
|
78
|
+
```ts
|
|
79
|
+
import { crypto } from "@sebastienrousseau/crypto-lib";
|
|
190
80
|
|
|
191
|
-
|
|
81
|
+
// Generate a random 256-bit key
|
|
82
|
+
const key = crypto.randomKey();
|
|
192
83
|
|
|
193
|
-
|
|
194
|
-
|
|
84
|
+
// Encrypt (XChaCha20-Poly1305 via secretbox)
|
|
85
|
+
const ciphertext = crypto.encrypt(key, "classified payload");
|
|
195
86
|
|
|
196
|
-
|
|
87
|
+
// Decrypt
|
|
88
|
+
const plaintext = crypto.decrypt(key, ciphertext);
|
|
89
|
+
console.log(Buffer.from(plaintext).toString("utf8"));
|
|
90
|
+
// => "classified payload"
|
|
197
91
|
|
|
198
|
-
|
|
199
|
-
|
|
92
|
+
// Hash
|
|
93
|
+
const digest = crypto.hash("sha3-256", "hello world");
|
|
200
94
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
--passphrase "123456789abcdef" \
|
|
206
|
-
--type "rsa" \
|
|
207
|
-
--curve "" \
|
|
208
|
-
--bits 2048 \
|
|
209
|
-
--expiration 0 \
|
|
210
|
-
--format armored \
|
|
211
|
-
--sign true
|
|
95
|
+
// Sign and verify (Ed25519)
|
|
96
|
+
const kp = crypto.generateKeyPair("ed25519");
|
|
97
|
+
const sig = crypto.sign("ed25519", kp.privateKey, "message");
|
|
98
|
+
const ok = crypto.verify("ed25519", kp.publicKey, "message", sig);
|
|
212
99
|
```
|
|
213
100
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
|
230
|
-
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
|
|
|
236
|
-
|
|
|
237
|
-
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
101
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## The Crypto Service ecosystem
|
|
106
|
+
|
|
107
|
+
Crypto Service provides a complete cryptography stack across 14 specialized packages:
|
|
108
|
+
|
|
109
|
+
| Package | Role | Description |
|
|
110
|
+
| :-------------------------------------------------------------------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
+
| [`@sebastienrousseau/crypto-api`](../crypto-api) | API Schemas | Shared TypeScript types and utilities for the Crypto Service Suite, defining the canonical API surface. |
|
|
112
|
+
| [`@sebastienrousseau/crypto-cli`](../crypto-cli) | Terminal CLI | An interactive command-line interface for cryptographic operations, supporting both legacy OpenPGP and modern post-quantum algorithms. |
|
|
113
|
+
| [`@sebastienrousseau/crypto-edge`](../crypto-edge) | Edge Runtime | Edge-runtime cryptographic operations using the Web Crypto API, optimized for Cloudflare Workers, Vercel Edge, and Deno. |
|
|
114
|
+
| [`@sebastienrousseau/crypto-kms`](../crypto-kms) | Cloud KMS | Unified Key Management Service interface for AWS KMS, GCP Cloud KMS, Azure Key Vault, and HashiCorp Vault. |
|
|
115
|
+
| **[`@sebastienrousseau/crypto-lib`](../crypto-lib)** _(this package)_ | **Core Library** | **A modern cryptographic library for TypeScript, with post-quantum support, zero unsafe dependencies, and 100% test coverage.** |
|
|
116
|
+
| [`@sebastienrousseau/crypto-middleware`](../crypto-middleware) | Middleware | Framework-agnostic cryptographic middleware for Express, Fastify, and Koa applications. |
|
|
117
|
+
| [`@sebastienrousseau/crypto-prisma`](../crypto-prisma) | ORM Adapter | Transparent field-level encryption extension for Prisma Client, using XChaCha20-Poly1305. |
|
|
118
|
+
| [`@sebastienrousseau/crypto-react`](../crypto-react) | React Hooks | React hooks and context provider for client-side cryptographic operations with zero boilerplate. |
|
|
119
|
+
| [`@sebastienrousseau/crypto-sdk`](../crypto-sdk) | Client SDK | A zero-dependency, typed HTTP client for the Crypto Service REST API, with full post-quantum support. |
|
|
120
|
+
| [`@sebastienrousseau/crypto-server`](../crypto-server) | HTTP API | A hardened Fastify REST API for cryptographic operations, with rate limiting, OpenAPI schemas, and post-quantum endpoints. |
|
|
121
|
+
| [`@sebastienrousseau/crypto-testing`](../crypto-testing) | Test Support | Deterministic keys, fast mocks, and test fixtures for crypto-lib |
|
|
122
|
+
| [`@sebastienrousseau/crypto-typeorm`](../crypto-typeorm) | ORM Adapter | TypeORM column-level encryption with a single decorator, powered by crypto-lib. |
|
|
123
|
+
| [`@sebastienrousseau/crypto-vue`](../crypto-vue) | Vue Composables | Vue 3 composables for client-side cryptography |
|
|
124
|
+
| [`@sebastienrousseau/crypto-wasm`](../crypto-wasm) | Acceleration | WebAssembly performance accelerator for crypto-lib |
|
|
125
|
+
|
|
126
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Overview
|
|
131
|
+
|
|
132
|
+
crypto-lib is the core cryptographic engine of the Crypto Service
|
|
133
|
+
Suite. It provides a unified TypeScript API over the
|
|
134
|
+
`@noble/hashes`, `@noble/curves`, `@noble/ciphers`, and
|
|
135
|
+
`@noble/post-quantum` libraries -- pure TypeScript, zero native
|
|
136
|
+
add-ons, no C bindings. The first three have had independent audits;
|
|
137
|
+
`@noble/post-quantum` has not. Post-quantum primitives (ML-KEM, ML-DSA,
|
|
138
|
+
SLH-DSA) are first-class citizens, not add-ons, and hybrid
|
|
139
|
+
constructions combine classical and PQ algorithms so security holds
|
|
140
|
+
even if one family breaks.
|
|
141
|
+
|
|
142
|
+
Two API layers serve different needs: a unified `crypto.*` namespace
|
|
143
|
+
for common tasks, and granular per-module imports for full control
|
|
144
|
+
and tree-shaking. Both layers use the same underlying noble
|
|
145
|
+
primitives; the unified API is a thin dispatcher that adds no
|
|
146
|
+
overhead.
|
|
147
|
+
|
|
148
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
149
|
+
|
|
150
|
+
## Features
|
|
151
|
+
|
|
152
|
+
| Module | Adds |
|
|
153
|
+
| :---------------------------- | :----------------------------------------------- |
|
|
154
|
+
| `modern/hash` | SHA-2, SHA-3, BLAKE2b, BLAKE3 |
|
|
155
|
+
| `modern/aead` | XChaCha20-Poly1305 encrypt/decrypt |
|
|
156
|
+
| `modern/aes` | AES-GCM, AES-GCM-SIV (128/256) |
|
|
157
|
+
| `modern/signing` | Ed25519 key generation, sign, verify |
|
|
158
|
+
| `modern/curves` | P-256, P-384, Ed448, X448, Schnorr (BIP-340) |
|
|
159
|
+
| `modern/mac` | HMAC (SHA-2, SHA-3), KMAC-128/256 |
|
|
160
|
+
| `modern/kdf` | scrypt, HKDF-SHA256, PBKDF2-SHA256 |
|
|
161
|
+
| `modern/password` | Argon2id/i/d hash, verify, PHC format |
|
|
162
|
+
| `modern/pq-kem` | ML-KEM-512/768/1024, hybrid KEMs |
|
|
163
|
+
| `modern/pq-sign` | ML-DSA-44/65/87, hybrid signatures |
|
|
164
|
+
| `modern/pq-hash-sign` | SLH-DSA (FIPS 205) |
|
|
165
|
+
| `high-level/secretbox` | Symmetric seal/open |
|
|
166
|
+
| `high-level/sealedbox` | Anonymous public-key encryption |
|
|
167
|
+
| `high-level/password-encrypt` | Password-based encryption |
|
|
168
|
+
| `high-level/key-wrap` | AES-KW, AES-KWP, X25519-AES-KW |
|
|
169
|
+
| `high-level/multi-recipient` | Multi-recipient encryption |
|
|
170
|
+
| `keys/keygen` | Unified key generation (12 algorithms) |
|
|
171
|
+
| `keys/serialize` | Hex, Base64, PEM, JWK, thumbprints |
|
|
172
|
+
| `keys/keyring` | In-memory keyring with rotation and JWKS |
|
|
173
|
+
| `streaming/stream-hash` | Incremental hashing for large inputs |
|
|
174
|
+
| `streaming/stream-aead` | Streaming AEAD encryption |
|
|
175
|
+
| `protocols/pqxdh` | Post-Quantum Extended Triple DH |
|
|
176
|
+
| `protocols/ratchet` | Double Ratchet (Signal-style) |
|
|
177
|
+
| `protocols/pake` | OPAQUE-3DH PAKE (RFC 9807) |
|
|
178
|
+
| `protocols/threshold` | Shamir SSS + Feldman VSS |
|
|
179
|
+
| `registry` | Algorithm metadata, deprecation, recommendations |
|
|
180
|
+
| `crypto` | Unified API namespace |
|
|
181
|
+
| `utils` | `timingSafeEqual`, `SecureBuffer` |
|
|
182
|
+
|
|
183
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
184
|
+
|
|
185
|
+
## Library Usage
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary><b>Hashing</b></summary>
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import { hash } from "@sebastienrousseau/crypto-lib";
|
|
192
|
+
|
|
193
|
+
const r = hash({ algorithm: "sha3-256", data: "hello" });
|
|
194
|
+
console.log(r.digest); // hex string
|
|
259
195
|
```
|
|
260
196
|
|
|
261
|
-
|
|
262
|
-
them with the password provided and writes them to a file in the [key](src/key/)
|
|
263
|
-
directory with a pgp extension.
|
|
197
|
+
</details>
|
|
264
198
|
|
|
265
|
-
|
|
199
|
+
<details>
|
|
200
|
+
<summary><b>Signing</b></summary>
|
|
266
201
|
|
|
267
|
-
|
|
202
|
+
```ts
|
|
203
|
+
import { crypto } from "@sebastienrousseau/crypto-lib";
|
|
268
204
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
205
|
+
const kp = crypto.generateKeyPair("ed25519");
|
|
206
|
+
const sig = crypto.sign("ed25519", kp.privateKey, "payload");
|
|
207
|
+
const ok = crypto.verify("ed25519", kp.publicKey, "payload", sig);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
</details>
|
|
272
211
|
|
|
273
|
-
|
|
212
|
+
<details>
|
|
213
|
+
<summary><b>Symmetric Encryption</b></summary>
|
|
274
214
|
|
|
275
|
-
|
|
215
|
+
```ts
|
|
216
|
+
import { aeadEncrypt, aeadDecrypt } from "@sebastienrousseau/crypto-lib";
|
|
217
|
+
|
|
218
|
+
const key = "a".repeat(64); // 32-byte hex key
|
|
219
|
+
const { ciphertext } = aeadEncrypt({ key, plaintext: "secret" });
|
|
220
|
+
const plain = aeadDecrypt({ key, ciphertext });
|
|
221
|
+
```
|
|
276
222
|
|
|
277
|
-
|
|
223
|
+
</details>
|
|
278
224
|
|
|
279
|
-
|
|
225
|
+
<details>
|
|
226
|
+
<summary><b>Post-Quantum KEM</b></summary>
|
|
280
227
|
|
|
281
|
-
|
|
282
|
-
|
|
228
|
+
```ts
|
|
229
|
+
import {
|
|
230
|
+
mlKemKeygen,
|
|
231
|
+
mlKemEncapsulate,
|
|
232
|
+
mlKemDecapsulate,
|
|
233
|
+
} from "@sebastienrousseau/crypto-lib";
|
|
283
234
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
235
|
+
const kp = mlKemKeygen(768);
|
|
236
|
+
const { ciphertext, sharedSecret: ss1 } = mlKemEncapsulate(768, kp.publicKey);
|
|
237
|
+
const { sharedSecret: ss2 } = mlKemDecapsulate(768, kp.secretKey, ciphertext);
|
|
238
|
+
// ss1 === ss2
|
|
288
239
|
```
|
|
289
240
|
|
|
290
|
-
|
|
241
|
+
</details>
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary><b>Password Hashing</b></summary>
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import { hashPassword, verifyPasswordPhc } from "@sebastienrousseau/crypto-lib";
|
|
248
|
+
|
|
249
|
+
const result = hashPassword({ password: "hunter2" });
|
|
250
|
+
console.log(result.phc); // $argon2id$v=19$m=65536,t=3,p=4$...
|
|
251
|
+
const { valid } = verifyPasswordPhc({ password: "hunter2", phc: result.phc });
|
|
252
|
+
```
|
|
291
253
|
|
|
292
|
-
|
|
254
|
+
</details>
|
|
293
255
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
Lib.
|
|
256
|
+
<details>
|
|
257
|
+
<summary><b>Keyring</b></summary>
|
|
297
258
|
|
|
298
|
-
|
|
259
|
+
```ts
|
|
260
|
+
import { Keyring } from "@sebastienrousseau/crypto-lib";
|
|
299
261
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
262
|
+
const ring = new Keyring();
|
|
263
|
+
const key = ring.add("ed25519", { use: "sig" });
|
|
264
|
+
const rotated = ring.rotate(key.kid);
|
|
265
|
+
const jwks = ring.toJwks();
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
</details>
|
|
269
|
+
|
|
270
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
271
|
+
|
|
272
|
+
## Examples
|
|
273
|
+
|
|
274
|
+
All examples are self-contained TypeScript files in the `examples/`
|
|
275
|
+
directory. Run any example with:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npx ts-node examples/<name>.ts
|
|
279
|
+
```
|
|
303
280
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
281
|
+
| Category | Example | Purpose |
|
|
282
|
+
| :------------- | :------------------------------------ | :---------------------------------------- |
|
|
283
|
+
| Hashing | [hash.ts](examples/hash.ts) | SHA-256, SHA-3, BLAKE3 |
|
|
284
|
+
| Encryption | [encrypt.ts](examples/encrypt.ts) | XChaCha20-Poly1305 encrypt/decrypt |
|
|
285
|
+
| Signing | [sign.ts](examples/sign.ts) | Ed25519 sign and verify |
|
|
286
|
+
| Key Generation | [keygen.ts](examples/keygen.ts) | Generate key pairs for various algorithms |
|
|
287
|
+
| Passwords | [password.ts](examples/password.ts) | Argon2id hash and verify |
|
|
288
|
+
| Secretbox | [secretbox.ts](examples/secretbox.ts) | Symmetric authenticated encryption |
|
|
289
|
+
| Sealed Box | [sealedbox.ts](examples/sealedbox.ts) | Anonymous public-key encryption |
|
|
290
|
+
| Keyring | [keyring.ts](examples/keyring.ts) | Create, rotate, and export keys |
|
|
291
|
+
| Threshold | [threshold.ts](examples/threshold.ts) | Shamir secret sharing split/combine |
|
|
292
|
+
| PQ KEM | [pqkem.ts](examples/pqkem.ts) | ML-KEM-768 key encapsulation |
|
|
293
|
+
| PQ Sign | [pqsign.ts](examples/pqsign.ts) | ML-DSA-65 sign and verify |
|
|
294
|
+
| HMAC | [hmac.ts](examples/hmac.ts) | HMAC-SHA256 compute and verify |
|
|
295
|
+
| KDF | [kdf.ts](examples/kdf.ts) | Key derivation with scrypt and HKDF |
|
|
296
|
+
| Streaming | [stream.ts](examples/stream.ts) | Incremental hashing with createHasher |
|
|
297
|
+
| Curves | [curves.ts](examples/curves.ts) | P-256, P-384, Ed448, Schnorr |
|
|
298
|
+
| Serialization | [serialize.ts](examples/serialize.ts) | PEM encode/decode, JWK conversion |
|
|
299
|
+
| Hybrid KEM | [hybrid.ts](examples/hybrid.ts) | Hybrid post-quantum key exchange |
|
|
300
|
+
| Registry | [registry.ts](examples/registry.ts) | Query algorithm registry |
|
|
301
|
+
| Unified API | [unified.ts](examples/unified.ts) | Unified crypto API overview |
|
|
302
|
+
| Ratchet | [ratchet.ts](examples/ratchet.ts) | Double Ratchet protocol demo |
|
|
303
|
+
|
|
304
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
305
|
+
|
|
306
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Development
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
pnpm --filter @sebastienrousseau/crypto-lib run build
|
|
314
|
+
pnpm --filter @sebastienrousseau/crypto-lib run test
|
|
315
|
+
pnpm --filter @sebastienrousseau/crypto-lib run lint
|
|
316
|
+
pnpm --filter @sebastienrousseau/crypto-lib run format
|
|
308
317
|
```
|
|
309
318
|
|
|
310
|
-
|
|
319
|
+
All 18 packages in the Crypto Service workspace maintain a **100% coverage floor** across statements, branches, functions, and lines.
|
|
311
320
|
|
|
312
|
-
|
|
321
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
313
322
|
|
|
314
|
-
|
|
315
|
-
compatibility, `crypto-lib` follows [semantic versioning](http://semver.org/)
|
|
316
|
-
and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
|
|
323
|
+
---
|
|
317
324
|
|
|
318
|
-
|
|
325
|
+
## Security
|
|
319
326
|
|
|
320
|
-
|
|
327
|
+
Report vulnerabilities privately via [GitHub Security Advisories](https://github.com/sebastienrousseau/crypto-service/security/advisories) or according to [`SECURITY.md`](../../SECURITY.md). Never report security issues publicly.
|
|
321
328
|
|
|
322
|
-
- [
|
|
329
|
+
Cryptographic operations use the `@noble/*` libraries, Node.js `crypto` and OpenPGP.js. `@noble/post-quantum` has not been independently audited and does not guarantee constant-time execution, and no module in this suite is FIPS 140-3 validated. Key zeroization is limited: JavaScript strings and garbage-collected buffers cannot be reliably wiped. See [`SECURITY.md`](../../SECURITY.md).
|
|
323
330
|
|
|
324
|
-
|
|
331
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
325
332
|
|
|
326
|
-
|
|
333
|
+
---
|
|
327
334
|
|
|
328
|
-
|
|
329
|
-
you can give it a star ⭐ on [GitHub][5].
|
|
335
|
+
## Documentation
|
|
330
336
|
|
|
331
|
-
|
|
332
|
-
|
|
337
|
+
- [Full Suite Documentation](https://sebastienrousseau.github.io/crypto-service/)
|
|
338
|
+
- [API Reference (TypeDoc)](https://sebastienrousseau.github.io/crypto-service/)
|
|
339
|
+
- [Developer Guide](../../DEVELOPMENT.md)
|
|
340
|
+
- [Security Policy](../../SECURITY.md)
|
|
341
|
+
- [Architecture & Design](../../ARCHITECTURE.md)
|
|
333
342
|
|
|
334
|
-
|
|
335
|
-
* Review [source code changes](https://github.com/sebastienrousseau/crypto-service/pulls), and help us improve our code quality,
|
|
336
|
-
* Review the [documentation](https://github.com/sebastienrousseau/crypto-service/docs) and make pull requests for anything from typos to additional and new content.
|
|
343
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
337
344
|
|
|
338
|
-
|
|
345
|
+
---
|
|
339
346
|
|
|
340
|
-
##
|
|
347
|
+
## Stability guarantees
|
|
341
348
|
|
|
342
|
-
|
|
349
|
+
Versions advance strictly one step at a time on the `0.0.x` line (`v0.0.1` → `v0.0.2` → `v0.0.3` ... → `v0.0.999` → `v0.1.0`). Work for every release iteration begins on a dedicated `feat/v<version>` branch.
|
|
343
350
|
|
|
344
|
-
|
|
351
|
+
All 18 packages in the workspace move in lockstep. Public API signatures, cipher output formats, and serialization schemas are strictly versioned. Breaking changes to serialized formats or algorithm defaults are considered major breaking changes. Minimum toolchain upgrades (e.g. Node.js LTS floor) are governed by [POLICIES.md](../../docs/POLICIES.md).
|
|
345
352
|
|
|
346
|
-
|
|
353
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|
|
347
354
|
|
|
348
|
-
|
|
355
|
+
---
|
|
349
356
|
|
|
350
|
-
|
|
351
|
-
people and a bunch of awesome [contributors](https://github.com/sebastienrousseau/crypto-service/graphs/contributors).
|
|
357
|
+
## License
|
|
352
358
|
|
|
353
|
-
|
|
354
|
-
|---------|
|
|
355
|
-
|[](https://sebastienrousseau.co.uk)|
|
|
356
|
-
|[Sebastien Rousseau](https://github.com/sebastienrousseau)|
|
|
359
|
+
Dual-licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) or [MIT](https://opensource.org/licenses/MIT), at your option.
|
|
357
360
|
|
|
358
|
-
|
|
359
|
-
[2]: https://tools.ietf.org/html/rfc4880
|
|
360
|
-
[3]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-10
|
|
361
|
-
[4]: https://github.com
|
|
362
|
-
[5]: https://github.com/sebastienrousseau/crypto-service
|
|
363
|
-
[6]: https://github.com/sebastienrousseau/crypto-service/blob/main/LICENSE
|
|
364
|
-
[7]: https://nodejs.org/en/
|
|
365
|
-
[8]: https://www.npmjs.com/
|
|
366
|
-
[9]: https://yarnpkg.com/getting-started
|
|
367
|
-
[10]: https://pnpm.io/motivation
|
|
368
|
-
[11]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
|
|
369
|
-
[12]: https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
|
|
370
|
-
[divider]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/divider.svg
|
|
371
|
-
[getting started]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-primary.svg
|
|
372
|
-
[download]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-secondary.svg
|
|
361
|
+
Copyright (c) 2022-2026 Sebastien Rousseau and The Crypto Service Suite contributors.
|
|
373
362
|
|
|
363
|
+
<p align="right"><a href="#contents">Back to Top</a></p>
|