@parmanasystems/crypto 1.83.0 → 1.86.0
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 +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @parmanasystems/crypto
|
|
1
|
+
# @parmanasystems/crypto
|
|
2
2
|
|
|
3
3
|
Ed25519 signing and verification primitives for governance artifacts.
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ Ed25519 signing and verification primitives for governance artifacts.
|
|
|
10
10
|
|
|
11
11
|
`@parmanasystems/crypto` provides the low-level cryptographic operations used across the Parmana Systems governance pipeline: signing and verifying bundle manifests, loading trust root keys from disk, and packaging bundles with Ed25519 signatures.
|
|
12
12
|
|
|
13
|
-
Most applications should use `@parmanasystems/core` or `@parmanasystems/governance`. Use this package directly only when building tooling that needs the raw signing primitives
|
|
13
|
+
Most applications should use `@parmanasystems/core` or `@parmanasystems/governance`. Use this package directly only when building tooling that needs the raw signing primitives - for example, a CI step that signs a bundle before deployment.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -35,13 +35,13 @@ const { privateKey, publicKey } = crypto.generateKeyPairSync("ed25519", {
|
|
|
35
35
|
publicKeyEncoding: { type: "spki", format: "pem" },
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
// Store keys
|
|
38
|
+
// Store keys - in production use a secrets manager, not plain files
|
|
39
39
|
fs.mkdirSync("trust", { recursive: true });
|
|
40
40
|
fs.writeFileSync("trust/root.key", privateKey, { mode: 0o600 });
|
|
41
41
|
fs.writeFileSync("trust/root.pub", publicKey);
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Pass paths **explicitly** to all signing and verification functions
|
|
44
|
+
Pass paths **explicitly** to all signing and verification functions - there is no implicit key discovery.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -52,7 +52,7 @@ Pass paths **explicitly** to all signing and verification functions — there is
|
|
|
52
52
|
```typescript
|
|
53
53
|
import { loadPrivateKey, loadPublicKey } from "@parmanasystems/crypto";
|
|
54
54
|
|
|
55
|
-
// Both functions require an explicit path
|
|
55
|
+
// Both functions require an explicit path - there is no default path fallback
|
|
56
56
|
const privateKeyPem = loadPrivateKey("./trust/root.key");
|
|
57
57
|
const publicKeyPem = loadPublicKey("./trust/root.pub");
|
|
58
58
|
```
|
|
@@ -108,7 +108,7 @@ await signBundle({
|
|
|
108
108
|
| `verifySignature` | Verify a base64 signature over a manifest file using a public key path |
|
|
109
109
|
| `verifyPayloadSignature` | Verify a base64 signature over an arbitrary UTF-8 payload string |
|
|
110
110
|
| `verifyManifestSignature` | Verify a `bundle.sig` file against a manifest on disk |
|
|
111
|
-
| `signBundle` | Sign a bundle directory
|
|
111
|
+
| `signBundle` | Sign a bundle directory - reads manifest, writes `bundle.sig` |
|
|
112
112
|
| `writeSignature` | Write a base64 signature string to `bundle.sig` in a directory |
|
|
113
113
|
| `readSignature` | Read a `bundle.sig` file and return the base64 signature string |
|
|
114
114
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parmanasystems/crypto",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.86.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@parmanasystems/bundle": "^1.
|
|
21
|
+
"@parmanasystems/bundle": "^1.86.0"
|
|
22
22
|
},
|
|
23
23
|
"description": "Signing and verification primitives for deterministic governance infrastructure.",
|
|
24
24
|
"license": "Apache-2.0",
|