@sebastienrousseau/crypto-lib 0.0.3 → 0.0.7

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.
Files changed (253) hide show
  1. package/README.md +304 -314
  2. package/dist/accel/index.d.ts +11 -0
  3. package/dist/accel/index.d.ts.map +1 -0
  4. package/dist/accel/index.js +31 -0
  5. package/dist/accel/native-pqc-bridge.d.ts +18 -0
  6. package/dist/accel/native-pqc-bridge.d.ts.map +1 -0
  7. package/dist/accel/native-pqc-bridge.js +100 -0
  8. package/dist/accel/wasm-bridge.d.ts +35 -0
  9. package/dist/accel/wasm-bridge.d.ts.map +1 -0
  10. package/dist/accel/wasm-bridge.js +161 -0
  11. package/dist/accel/webcrypto-bridge.d.ts +32 -0
  12. package/dist/accel/webcrypto-bridge.d.ts.map +1 -0
  13. package/dist/accel/webcrypto-bridge.js +179 -0
  14. package/dist/accel/webcrypto-modern.d.ts +40 -0
  15. package/dist/accel/webcrypto-modern.d.ts.map +1 -0
  16. package/dist/accel/webcrypto-modern.js +213 -0
  17. package/dist/accel/worker-pool.d.ts +23 -0
  18. package/dist/accel/worker-pool.d.ts.map +1 -0
  19. package/dist/accel/worker-pool.js +119 -0
  20. package/dist/bin/cryptolib.d.ts +9 -7
  21. package/dist/bin/cryptolib.d.ts.map +1 -1
  22. package/dist/bin/cryptolib.js +25 -16
  23. package/dist/config/config.d.ts.map +1 -1
  24. package/dist/crypto.d.ts +43 -0
  25. package/dist/crypto.d.ts.map +1 -0
  26. package/dist/crypto.js +107 -0
  27. package/dist/enums.d.ts +29 -29
  28. package/dist/enums.d.ts.map +1 -1
  29. package/dist/enums.js +54 -54
  30. package/dist/errors.d.ts +14 -0
  31. package/dist/errors.d.ts.map +1 -0
  32. package/dist/errors.js +22 -0
  33. package/dist/high-level/index.d.ts +11 -0
  34. package/dist/high-level/index.d.ts.map +1 -0
  35. package/dist/high-level/index.js +53 -0
  36. package/dist/high-level/key-wrap.d.ts +16 -0
  37. package/dist/high-level/key-wrap.d.ts.map +1 -0
  38. package/dist/high-level/key-wrap.js +93 -0
  39. package/dist/high-level/multi-recipient.d.ts +25 -0
  40. package/dist/high-level/multi-recipient.d.ts.map +1 -0
  41. package/dist/high-level/multi-recipient.js +122 -0
  42. package/dist/high-level/password-encrypt.d.ts +14 -0
  43. package/dist/high-level/password-encrypt.d.ts.map +1 -0
  44. package/dist/high-level/password-encrypt.js +93 -0
  45. package/dist/high-level/sealedbox.d.ts +13 -0
  46. package/dist/high-level/sealedbox.d.ts.map +1 -0
  47. package/dist/high-level/sealedbox.js +119 -0
  48. package/dist/high-level/secretbox.d.ts +7 -0
  49. package/dist/high-level/secretbox.d.ts.map +1 -0
  50. package/dist/high-level/secretbox.js +54 -0
  51. package/dist/index.d.ts +14 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +59 -0
  54. package/dist/key/key.d.ts +6 -13
  55. package/dist/key/key.d.ts.map +1 -1
  56. package/dist/key/key.js +20 -14
  57. package/dist/key/keystore.d.ts +11 -0
  58. package/dist/key/keystore.d.ts.map +1 -0
  59. package/dist/key/keystore.js +87 -0
  60. package/dist/keys/index.d.ts +7 -0
  61. package/dist/keys/index.d.ts.map +1 -0
  62. package/dist/keys/index.js +22 -0
  63. package/dist/keys/keygen.d.ts +16 -0
  64. package/dist/keys/keygen.d.ts.map +1 -0
  65. package/dist/keys/keygen.js +128 -0
  66. package/dist/keys/keyring.d.ts +35 -0
  67. package/dist/keys/keyring.d.ts.map +1 -0
  68. package/dist/keys/keyring.js +136 -0
  69. package/dist/keys/serialize.d.ts +30 -0
  70. package/dist/keys/serialize.d.ts.map +1 -0
  71. package/dist/keys/serialize.js +120 -0
  72. package/dist/lib/decrypt.d.ts +4 -1
  73. package/dist/lib/decrypt.d.ts.map +1 -1
  74. package/dist/lib/decrypt.js +43 -51
  75. package/dist/lib/encrypt.d.ts +1 -1
  76. package/dist/lib/encrypt.d.ts.map +1 -1
  77. package/dist/lib/encrypt.js +29 -45
  78. package/dist/lib/generate.d.ts.map +1 -1
  79. package/dist/lib/generate.js +56 -63
  80. package/dist/lib/index.d.ts.map +1 -1
  81. package/dist/lib/index.js +17 -7
  82. package/dist/lib/key-output.d.ts +7 -0
  83. package/dist/lib/key-output.d.ts.map +1 -0
  84. package/dist/lib/key-output.js +50 -0
  85. package/dist/lib/reformat.d.ts +6 -1
  86. package/dist/lib/reformat.d.ts.map +1 -1
  87. package/dist/lib/reformat.js +37 -61
  88. package/dist/lib/revoke.d.ts +2 -2
  89. package/dist/lib/revoke.d.ts.map +1 -1
  90. package/dist/lib/revoke.js +33 -50
  91. package/dist/lib/session.d.ts.map +1 -1
  92. package/dist/lib/session.js +21 -36
  93. package/dist/lib/sign.d.ts.map +1 -1
  94. package/dist/lib/sign.js +36 -43
  95. package/dist/lib/verify.d.ts +1 -3
  96. package/dist/lib/verify.d.ts.map +1 -1
  97. package/dist/lib/verify.js +25 -30
  98. package/dist/modern/aead.d.ts +17 -0
  99. package/dist/modern/aead.d.ts.map +1 -0
  100. package/dist/modern/aead.js +51 -0
  101. package/dist/modern/aes.d.ts +35 -0
  102. package/dist/modern/aes.d.ts.map +1 -0
  103. package/dist/modern/aes.js +82 -0
  104. package/dist/modern/cost-limits.d.ts +11 -0
  105. package/dist/modern/cost-limits.d.ts.map +1 -0
  106. package/dist/modern/cost-limits.js +35 -0
  107. package/dist/modern/curves.d.ts +86 -0
  108. package/dist/modern/curves.d.ts.map +1 -0
  109. package/dist/modern/curves.js +171 -0
  110. package/dist/modern/ecdh.d.ts +11 -0
  111. package/dist/modern/ecdh.d.ts.map +1 -0
  112. package/dist/modern/ecdh.js +28 -0
  113. package/dist/modern/fn-dsa.d.ts +19 -0
  114. package/dist/modern/fn-dsa.d.ts.map +1 -0
  115. package/dist/modern/fn-dsa.js +57 -0
  116. package/dist/modern/hash.d.ts +13 -0
  117. package/dist/modern/hash.d.ts.map +1 -0
  118. package/dist/modern/hash.js +45 -0
  119. package/dist/modern/hpke.d.ts +47 -0
  120. package/dist/modern/hpke.d.ts.map +1 -0
  121. package/dist/modern/hpke.js +207 -0
  122. package/dist/modern/index.d.ts +40 -0
  123. package/dist/modern/index.d.ts.map +1 -0
  124. package/dist/modern/index.js +194 -0
  125. package/dist/modern/kdf.d.ts +23 -0
  126. package/dist/modern/kdf.d.ts.map +1 -0
  127. package/dist/modern/kdf.js +67 -0
  128. package/dist/modern/mac.d.ts +51 -0
  129. package/dist/modern/mac.d.ts.map +1 -0
  130. package/dist/modern/mac.js +119 -0
  131. package/dist/modern/password.d.ts +40 -0
  132. package/dist/modern/password.d.ts.map +1 -0
  133. package/dist/modern/password.js +123 -0
  134. package/dist/modern/pq-hash-sign.d.ts +18 -0
  135. package/dist/modern/pq-hash-sign.d.ts.map +1 -0
  136. package/dist/modern/pq-hash-sign.js +73 -0
  137. package/dist/modern/pq-kem.d.ts +88 -0
  138. package/dist/modern/pq-kem.d.ts.map +1 -0
  139. package/dist/modern/pq-kem.js +270 -0
  140. package/dist/modern/pq-sign.d.ts +30 -0
  141. package/dist/modern/pq-sign.d.ts.map +1 -0
  142. package/dist/modern/pq-sign.js +94 -0
  143. package/dist/modern/pq.d.ts +38 -0
  144. package/dist/modern/pq.d.ts.map +1 -0
  145. package/dist/modern/pq.js +80 -0
  146. package/dist/modern/signing.d.ts +16 -0
  147. package/dist/modern/signing.d.ts.map +1 -0
  148. package/dist/modern/signing.js +34 -0
  149. package/dist/protocols/index.d.ts +7 -0
  150. package/dist/protocols/index.d.ts.map +1 -0
  151. package/dist/protocols/index.js +46 -0
  152. package/dist/protocols/iso20022.d.ts +51 -0
  153. package/dist/protocols/iso20022.d.ts.map +1 -0
  154. package/dist/protocols/iso20022.js +145 -0
  155. package/dist/protocols/opaque/ake.d.ts +51 -0
  156. package/dist/protocols/opaque/ake.d.ts.map +1 -0
  157. package/dist/protocols/opaque/ake.js +102 -0
  158. package/dist/protocols/opaque/client.d.ts +45 -0
  159. package/dist/protocols/opaque/client.d.ts.map +1 -0
  160. package/dist/protocols/opaque/client.js +63 -0
  161. package/dist/protocols/opaque/config.d.ts +14 -0
  162. package/dist/protocols/opaque/config.d.ts.map +1 -0
  163. package/dist/protocols/opaque/config.js +18 -0
  164. package/dist/protocols/opaque/credentials.d.ts +29 -0
  165. package/dist/protocols/opaque/credentials.d.ts.map +1 -0
  166. package/dist/protocols/opaque/credentials.js +61 -0
  167. package/dist/protocols/opaque/envelope.d.ts +36 -0
  168. package/dist/protocols/opaque/envelope.d.ts.map +1 -0
  169. package/dist/protocols/opaque/envelope.js +77 -0
  170. package/dist/protocols/opaque/ksf.d.ts +15 -0
  171. package/dist/protocols/opaque/ksf.d.ts.map +1 -0
  172. package/dist/protocols/opaque/ksf.js +27 -0
  173. package/dist/protocols/opaque/messages.d.ts +61 -0
  174. package/dist/protocols/opaque/messages.d.ts.map +1 -0
  175. package/dist/protocols/opaque/messages.js +94 -0
  176. package/dist/protocols/opaque/server.d.ts +33 -0
  177. package/dist/protocols/opaque/server.d.ts.map +1 -0
  178. package/dist/protocols/opaque/server.js +74 -0
  179. package/dist/protocols/opaque/suite.d.ts +58 -0
  180. package/dist/protocols/opaque/suite.d.ts.map +1 -0
  181. package/dist/protocols/opaque/suite.js +115 -0
  182. package/dist/protocols/pake.d.ts +14 -0
  183. package/dist/protocols/pake.d.ts.map +1 -0
  184. package/dist/protocols/pake.js +33 -0
  185. package/dist/protocols/pqxdh.d.ts +53 -0
  186. package/dist/protocols/pqxdh.d.ts.map +1 -0
  187. package/dist/protocols/pqxdh.js +143 -0
  188. package/dist/protocols/ratchet.d.ts +52 -0
  189. package/dist/protocols/ratchet.d.ts.map +1 -0
  190. package/dist/protocols/ratchet.js +187 -0
  191. package/dist/protocols/threshold.d.ts +23 -0
  192. package/dist/protocols/threshold.d.ts.map +1 -0
  193. package/dist/protocols/threshold.js +191 -0
  194. package/dist/registry.d.ts +20 -0
  195. package/dist/registry.d.ts.map +1 -0
  196. package/dist/registry.js +399 -0
  197. package/dist/streaming/index.d.ts +7 -0
  198. package/dist/streaming/index.d.ts.map +1 -0
  199. package/dist/streaming/index.js +15 -0
  200. package/dist/streaming/stream-aead.d.ts +17 -0
  201. package/dist/streaming/stream-aead.d.ts.map +1 -0
  202. package/dist/streaming/stream-aead.js +125 -0
  203. package/dist/streaming/stream-hash.d.ts +9 -0
  204. package/dist/streaming/stream-hash.d.ts.map +1 -0
  205. package/dist/streaming/stream-hash.js +52 -0
  206. package/dist/streaming/web-streams.d.ts +17 -0
  207. package/dist/streaming/web-streams.d.ts.map +1 -0
  208. package/dist/streaming/web-streams.js +114 -0
  209. package/dist/tokens/index.d.ts +5 -0
  210. package/dist/tokens/index.d.ts.map +1 -0
  211. package/dist/tokens/index.js +15 -0
  212. package/dist/tokens/key-rotation.d.ts +20 -0
  213. package/dist/tokens/key-rotation.d.ts.map +1 -0
  214. package/dist/tokens/key-rotation.js +76 -0
  215. package/dist/tokens/paseto.d.ts +46 -0
  216. package/dist/tokens/paseto.d.ts.map +1 -0
  217. package/dist/tokens/paseto.js +200 -0
  218. package/dist/types/types.d.ts +24 -16
  219. package/dist/types/types.d.ts.map +1 -1
  220. package/dist/utils.d.ts +13 -0
  221. package/dist/utils.d.ts.map +1 -0
  222. package/dist/utils.js +56 -0
  223. package/package.json +77 -142
  224. package/dist/COPYRIGHT +0 -15
  225. package/dist/Report.txt +0 -160
  226. package/dist/bin/cryptolib.js.map +0 -1
  227. package/dist/config/config.js.map +0 -1
  228. package/dist/data/decrypted.txt +0 -1
  229. package/dist/data/detached.sig +0 -1
  230. package/dist/data/encrypted.txt +0 -1
  231. package/dist/data/signed.sig +0 -1
  232. package/dist/enums.js.map +0 -1
  233. package/dist/index.js.map +0 -1
  234. package/dist/key/key.js.map +0 -1
  235. package/dist/key/rsa-reformat.cert +0 -1
  236. package/dist/key/rsa-reformat.key +0 -1
  237. package/dist/key/rsa-reformat.pub +0 -1
  238. package/dist/key/rsa-revoke.key +0 -1
  239. package/dist/key/rsa-revoke.pub +0 -1
  240. package/dist/key/rsa.cert +0 -1
  241. package/dist/key/rsa.key +0 -1
  242. package/dist/key/rsa.pub +0 -1
  243. package/dist/lib/decrypt.js.map +0 -1
  244. package/dist/lib/encrypt.js.map +0 -1
  245. package/dist/lib/generate.js.map +0 -1
  246. package/dist/lib/index.js.map +0 -1
  247. package/dist/lib/reformat.js.map +0 -1
  248. package/dist/lib/revoke.js.map +0 -1
  249. package/dist/lib/session.js.map +0 -1
  250. package/dist/lib/sign.js.map +0 -1
  251. package/dist/lib/verify.js.map +0 -1
  252. package/dist/package.json +0 -143
  253. package/dist/types/types.js.map +0 -1
package/README.md CHANGED
@@ -1,373 +1,363 @@
1
- # ⚙️ Crypto Lib
1
+ <!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
2
2
 
3
- ![Banner representing Crypto Lib](https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/crypto-lib-logo.svg)
4
-
5
- [![NPM Version](https://img.shields.io/npm/v/solid-js.svg?style=for-the-badge)](https://www.npmjs.com/package/@sebastienrousseau/crypto-lib)
6
- [![Coverage Status](https://img.shields.io/coveralls/github/sebastienrousseau/crypto-service/solid.svg?branch=main&style=for-the-badge\&color=blueviolet)](https://coveralls.io/github/sebastienrousseau/crypto-service?branch=main)
7
- [![Maintained with Lerna](https://img.shields.io/badge/maintained%20with-lerna-blue?style=for-the-badge)](https://lerna.js.org/)
8
- [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge&logo=)](https://opensource.org/licenses/MIT)
9
- ![Made with Love](https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/made-with-love.svg)
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
- 2️⃣ Set up your app
35
+ - [The Crypto Service ecosystem](#the-crypto-service-ecosystem) — full 14-package suite overview
161
36
 
162
- You can get started with a simple app by running the following in your terminal:
37
+ **Package reference**
163
38
 
164
- ```shell
165
- > mkdir my-app
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
- 3️⃣ Try it out and let us know what you think!
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
- ![divider][divider]
72
+ <p align="right"><a href="#contents">Back to Top</a></p>
183
73
 
184
- ## ❯ Crypto Lib commands
74
+ ---
185
75
 
186
- The Crypto Lib accepts multiple types of options. Options are a list of flags
187
- and other parameters that can control the behavior of the Crypto Lib as a whole.
76
+ ## Quick Start
188
77
 
189
- Below is the full list of supported options for the Crypto Lib.
78
+ ```ts
79
+ import { crypto } from "@sebastienrousseau/crypto-lib";
190
80
 
191
- ### Generating a new RSA key pair
81
+ // Generate a random 256-bit key
82
+ const key = crypto.randomKey();
192
83
 
193
- [RSA][11] is a public-key algorithm for encrypting and signing messages. To
194
- generate a Rivest-Shamir-Adelman (RSA) public key pair:
84
+ // Encrypt (XChaCha20-Poly1305 via secretbox)
85
+ const ciphertext = crypto.encrypt(key, "classified payload");
195
86
 
196
- - Open Terminal for Mac or Command Prompt for Windows,
87
+ // Decrypt
88
+ const plaintext = crypto.decrypt(key, ciphertext);
89
+ console.log(Buffer.from(plaintext).toString("utf8"));
90
+ // => "classified payload"
197
91
 
198
- - Enter the following example command that will start the generation process
199
- in the `dist/` directory.
92
+ // Hash
93
+ const digest = crypto.hash("sha3-256", "hello world");
200
94
 
201
- ```js
202
- yarn start \
203
- --name "Jane Doe" \
204
- --email "jane@doe.com" \
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
- This starts generating a 2048-bit RSA key pair, encrypts them with the password
215
- provided and writes them to a file in the [key](src/key/) directory with a pgp
216
- extension.
217
-
218
- ***
219
-
220
- ### Generating a new Elliptic-curve cryptography (ECC) key pair
221
-
222
- [Elliptic-curve cryptography (ECC)][12] is an alternative technique to RSA. It
223
- generates security between key pairs for public key encryption by using the
224
- mathematics of elliptic curves. Elliptic curve cryptography provides stronger
225
- security per bits of key, which allows for much faster operations.
226
-
227
- Currently the following curves are supported:
228
-
229
- | Curve | Encryption | Signature | NodeCrypto | WebCrypto |
230
- |:---------------:|:----------:|:---------:|:----------:|:---------:|
231
- | curve25519 | ECDH | N/A | No | No |
232
- | ed25519 | N/A | EdDSA | No | No |
233
- | p256 | ECDH | ECDSA | Yes | Yes |
234
- | p384 | ECDH | ECDSA | Yes | Yes |
235
- | p521 | ECDH | ECDSA | Yes | Yes |
236
- | brainpoolP256r1 | ECDH | ECDSA | Yes | No |
237
- | brainpoolP384r1 | ECDH | ECDSA | Yes | No |
238
- | brainpoolP512r1 | ECDH | ECDSA | Yes | No |
239
- | secp256k1 | ECDH | ECDSA | Yes | No |
240
-
241
- To generate an Elliptic Curve Cryptography (ECC) key pair:
242
-
243
- - Open Terminal for Mac or Command Prompt for Windows,
244
-
245
- - Enter the following example command that will start the generation process
246
- in the `dist/` directory.
247
-
248
- ```js
249
- yarn start \
250
- --name "Jane Doe" \
251
- --email "jane@doe.com" \
252
- --passphrase "123456789abcdef" \
253
- --type "ecc" \
254
- --curve curve25519 \
255
- --bits null \
256
- --expiration 0 \
257
- --format armored \
258
- --sign true
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
- This starts generating an Elliptic Curve Cryptography (ECC) key pair, encrypts
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
- ### Encrypting and Signing Data
202
+ ```ts
203
+ import { crypto } from "@sebastienrousseau/crypto-lib";
268
204
 
269
- Encryption is the transformation of data into a form in which it cannot be made
270
- sense of without the use of some key. Such transformed data is referred to as
271
- `ciphertext`.
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
- Crypto Lib makes it easy and painless to encrypt and sign data.
212
+ <details>
213
+ <summary><b>Symmetric Encryption</b></summary>
274
214
 
275
- To encrypt a message:
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
- - Open Terminal for Mac or Command Prompt for Windows,
223
+ </details>
278
224
 
279
- - Run the yarn start
225
+ <details>
226
+ <summary><b>Post-Quantum KEM</b></summary>
280
227
 
281
- - Enter the following example command that will start the encryption process
282
- in the `dist/` directory.
228
+ ```ts
229
+ import {
230
+ mlKemKeygen,
231
+ mlKemEncapsulate,
232
+ mlKemDecapsulate,
233
+ } from "@sebastienrousseau/crypto-lib";
283
234
 
284
- ```js
285
- node dist/lib/encrypt.js \
286
- --passphrase '123456789abcdef' \
287
- --message 'Hello Crypto Service Suite APIs!'
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
- ### Decrypting and Verifying Signatures
254
+ </details>
293
255
 
294
- Decryption restores encrypted data to to its original (cleartext or plaintext)
295
- form. Decrypting data and verifying signatures is being done similarly in Crypto
296
- Lib.
256
+ <details>
257
+ <summary><b>Keyring</b></summary>
297
258
 
298
- To decrypt a message:
259
+ ```ts
260
+ import { Keyring } from "@sebastienrousseau/crypto-lib";
299
261
 
300
- - Open Terminal for Mac or Command Prompt for Windows,
301
- - Enter the following example command that will start the decryption process
302
- in the `dist/` directory.
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
- ```js
305
- node dist/lib/decrypt.js \
306
- --passphrase '123456789abcdef' \
307
- --message 'LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0ZNQXpMNWFTdVU0RWM4QVEvL1RlZzN6bzFiMSszNW9lN3l6NDFpRS9LVlNZYUJYSEFESTNpbVJodlQKeXlRczdFc29iYTdoUUx4dFZESjEyc3ZNU25YUWk2Y1FVNXd4cGo1L3VENUFOT2ZuN0hVSkYrSExINlRNCjNBWktZNUFLRk40VUZBK0hQRy9GSHlaNVhxVzRLd0hpL3ZjVWxSejRreWJDc2VxYmZoY01hU0NJdHRKbwpmWkNOcTFZNEhiR1hBV1BQWXExV0tRZnl0RnRyWWlQODU3VE5hc21XNTJKUjVMQUZ5OFdzdnZNTmM3Z3AKQ0RFcUIyVWQwRmJSNEZOU2tvTXFhN3FScXFqS1V2ei9odU9ieVVsOW94RVpGVGNac1hwSVQ1QkE5WUtECmpvY1pVSE1hTjZkbnFJTk8rcWVBZWM4R1FjbEUxVVk0RWhNcEhjUktkZEJaY2pjaE0xbW9oaEMxb0Q4aQpUTVBlRU5XcDg0SGh3cVp1UjRNNmxUQjBqSUhZbytuMXpMbm0vRUFtcDdoc3VvSEFYY3pqSFhVYVE3M2IKOEZ5UWlENW1IMU1wWHRoWjVheXNRTklmRkY5TUdOQ1paWXExNitHSFQvbmJCTDNyUmU2dENCUUFRTnVaCksydnNQeThGZlJyYmVBR0llZHllOFZIUGJFYXNsNWF4TVBwc08yaUtjV3dNN1QvZjVaeG5FRUxWem5UeApHQnA5MHFKMUFUNGtVWVNOejYvZC9aT2JUVVV3WWdkKzdUNDdxQ3VTMjYxVlJpL0Jiblh1Z2pLRk90VlEKMEhpU1VKbTlCbGhFR2s3OWg3RGJuZmx0ZFc4dFRCNE9CdXJxUHRVaHRLS2hHL3JhYUY3YlFrVVowUktNCmQ0SllOM0sySmhBL2ovaHIySEE4ZUpWZ0NNVm9McXJyZW8xazNHbGxIWkxTd2RBQmJtaXpZL1JZd2JDUQpUeG91TW5KNjhvZmVtSHNrSW1MdGx2OUtBOElQVEY4UXp3enZRcmpNRGRtclg2V09QTGtKQ3JiV1JKbHcKV25NWlBkVGpzSzdicnVNOTByZXhLeFowSGZVL050V3BvZ251L3dOYVBHZ1NRbEZhdHZhclJFQlNEaExaCndNYVE2ZWkycUJLbXdDTGVERURlaU1BSWlSQVBad1d2R1Y2RlFWNW14V2xGdm9SaGRDeTc2TW5kWXNNTQoza1Nwb1doMVBYUWpWYWZLV2lhZHJJS2FOSllDZkY2bzE5Ty9NdlZITGFFV0tnM0lzRGtvMGdtQWZ5VE8KTngzb2dYdTV0VFpvelRyUzRUMUpsMUR3bnRZbGlrMWhINkNYK0ZGLzIzVzlHaHdTdlcreVgzZFlTeHZjCjFuMlBjVDY5QzdDTmZtcWpOT293d20wcjl6M0lWYlZ2dGk4ZFduVzNEZDVGS256d2VaUDhaZ2hudUl4SQptUzdrY0ZWTVd4d3p6SmptQjg3UGZPbmZtZ2k2b0NxbFRzMXJDRldTQVZqM3hzenFFRGRnT1B1QXcvdzQKWmZOSS9sSVhHdU1DakpKQlYzNTZCN2ExNkZacXVqK2ZtOUQwS1BYbGpjSEcydHFRTjVDbHVTUnhUZlBiCm42U3ZOZ2tkVTNGM3pYS3NxRW9iRzdzakg5WjZWZlJIZjlRcmN2ZXZHdWFIb2ZZQkROVzZmT3ZNODBURQpHNjkzS3BRdytEaDVnMzBzamhXbDRuMS9aZUROR0RYZ0dERGRUMU9WQXRrVTBTcm1vY0ZSM1hCUHprYnQKRmw3YlVkVG1oVFlHVys2VmRIUG9mOFZ0b1FrWVJma2YxK1hFaC9kNUFvTzdSSVZRQ29qb3pqTmhoVy9qCjg4VW56d0VqZ3VoK0VMbVFRS1ViUi9ydjg2djcyM0VtVkVSd3hvQTIvalZCbGVaaHpFOHdrY01HODM3VApLVlo3N0VHblRPcTBjbUkrang2Ri9SenRjbDRBUHN6eEJkUkVSM25HR3dqbGVIdjdpMndhQTYzbWNJLzcKM0I0dWZyVGczbHNMWDVlWVFDUnJrdXdwOVZKNzNlWmJiOTlLOU51ZDhNVGczNnE0cFhtNWRBd3ZLZzEwCm96c0t2MHVxa0tDclF1TFBWU1JtZkE9PQo9Yll1VQotLS0tLUVORCBQR1AgTUVTU0FHRS0tLS0tCg=='
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
- ![divider][divider]
319
+ All 18 packages in the Crypto Service workspace maintain a **100% coverage floor** across statements, branches, functions, and lines.
311
320
 
312
- ## 🚥 Semantic Versioning Policy
321
+ <p align="right"><a href="#contents">Back to Top</a></p>
313
322
 
314
- For transparency into our release cycle and in striving to maintain backward
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
- ![divider][divider]
325
+ ## Security
319
326
 
320
- ## ✅ Changelog
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
- - [GitHub Releases](https://github.com/sebastienrousseau/crypto-service/releases)
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
- ![divider][divider]
331
+ <p align="right"><a href="#contents">Back to Top</a></p>
325
332
 
326
- ## ❤️ Contributing
333
+ ---
327
334
 
328
- Thank you for using Crypto Lib! If you like the library, it would be great if
329
- you can give it a star ⭐ on [GitHub][5].
335
+ ## Documentation
330
336
 
331
- There are also many ways in which you can participate in this project, for
332
- example:
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
- * [Submit bugs and feature requests](https://github.com/sebastienrousseau/crypto-service/issues/new), and help us verify as they are checked in,
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
- ![divider][divider]
345
+ ---
339
346
 
340
- ## 🥂 License
347
+ ## Stability guarantees
341
348
 
342
- Copyright (c) Sebastien Rousseau. All rights reserved.
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
- Licensed under the [MIT](LICENSE) license.
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
- ![divider][divider]
353
+ <p align="right"><a href="#contents">Back to Top</a></p>
347
354
 
348
- ## 🏢 Acknowledgements
355
+ ---
349
356
 
350
- [Crypto Service Suite](https://crypto-service.co) is beautifully crafted by these
351
- people and a bunch of awesome [contributors](https://github.com/sebastienrousseau/crypto-service/graphs/contributors).
357
+ ## License
352
358
 
353
- | Contributors |
354
- |---------|
355
- |[![Sebastien Rousseau](https://avatars0.githubusercontent.com/u/1394998?s=117)](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
- [1]: https://openpgpjs.org/
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>