@agentdock/crypto 0.0.46 → 0.0.47
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/dist/aes.js +1 -95
- package/dist/auth.js +1 -69
- package/dist/box.js +1 -73
- package/dist/content.js +1 -40
- package/dist/encoding.js +1 -55
- package/dist/hmac.js +1 -25
- package/dist/index.js +1 -23
- package/dist/keys.js +1 -67
- package/dist/random.js +1 -20
- package/dist/secretbox.js +1 -51
- package/dist/session.js +1 -106
- package/package.json +2 -2
- package/dist/aes.d.ts.map +0 -1
- package/dist/aes.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/box.d.ts.map +0 -1
- package/dist/box.js.map +0 -1
- package/dist/content.d.ts.map +0 -1
- package/dist/content.js.map +0 -1
- package/dist/encoding.d.ts.map +0 -1
- package/dist/encoding.js.map +0 -1
- package/dist/hmac.d.ts.map +0 -1
- package/dist/hmac.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/keys.d.ts.map +0 -1
- package/dist/keys.js.map +0 -1
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js.map +0 -1
- package/dist/secretbox.d.ts.map +0 -1
- package/dist/secretbox.js.map +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js.map +0 -1
package/dist/aes.js
CHANGED
|
@@ -1,95 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* AES-256-GCM encryption and decryption using the Web Crypto API.
|
|
3
|
-
*
|
|
4
|
-
* Bundle format (compatible with Happy protocol):
|
|
5
|
-
* version (1 byte) | nonce (12 bytes) | ciphertext + authTag
|
|
6
|
-
*
|
|
7
|
-
* - version: always 0 for this implementation
|
|
8
|
-
* - nonce: 12-byte IV for AES-GCM
|
|
9
|
-
* - ciphertext + authTag: Web Crypto API returns these concatenated
|
|
10
|
-
* (authTag is the last 16 bytes)
|
|
11
|
-
*
|
|
12
|
-
* Data is JSON-serialized before encryption and JSON-parsed after decryption.
|
|
13
|
-
*/
|
|
14
|
-
import { getRandomBytes } from './random.js';
|
|
15
|
-
/** Current bundle format version. */
|
|
16
|
-
const BUNDLE_VERSION = 0;
|
|
17
|
-
/** AES-GCM nonce size in bytes. */
|
|
18
|
-
const NONCE_SIZE = 12;
|
|
19
|
-
/** AES-GCM authentication tag size in bytes. */
|
|
20
|
-
const AUTH_TAG_SIZE = 16;
|
|
21
|
-
/** Minimum bundle size: version(1) + nonce(12) + authTag(16). */
|
|
22
|
-
const MIN_BUNDLE_SIZE = 1 + NONCE_SIZE + AUTH_TAG_SIZE;
|
|
23
|
-
/** Required AES-256 key size in bytes. */
|
|
24
|
-
const KEY_SIZE = 32;
|
|
25
|
-
/**
|
|
26
|
-
* Encrypt arbitrary JSON-serializable data with AES-256-GCM.
|
|
27
|
-
*
|
|
28
|
-
* @param data - Any JSON-serializable value.
|
|
29
|
-
* @param key - 32-byte (256-bit) encryption key.
|
|
30
|
-
* @returns Encrypted bundle as Uint8Array.
|
|
31
|
-
* @throws If the key is not exactly 32 bytes.
|
|
32
|
-
*/
|
|
33
|
-
export async function encryptAesGcm(data, key) {
|
|
34
|
-
assertKeySize(key);
|
|
35
|
-
const plaintext = new TextEncoder().encode(JSON.stringify(data));
|
|
36
|
-
const nonce = getRandomBytes(NONCE_SIZE);
|
|
37
|
-
const cryptoKey = await importKey(key, ['encrypt']);
|
|
38
|
-
const encrypted = await globalThis.crypto.subtle.encrypt({ name: 'AES-GCM', iv: nonce }, cryptoKey, plaintext);
|
|
39
|
-
// Build bundle: version + nonce + (ciphertext + authTag)
|
|
40
|
-
const encryptedBytes = new Uint8Array(encrypted);
|
|
41
|
-
const bundle = new Uint8Array(1 + NONCE_SIZE + encryptedBytes.length);
|
|
42
|
-
bundle[0] = BUNDLE_VERSION;
|
|
43
|
-
bundle.set(nonce, 1);
|
|
44
|
-
bundle.set(encryptedBytes, 1 + NONCE_SIZE);
|
|
45
|
-
return bundle;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Decrypt an AES-256-GCM bundle back to the original data.
|
|
49
|
-
*
|
|
50
|
-
* @param bundle - Encrypted bundle produced by `encryptAesGcm`.
|
|
51
|
-
* @param key - 32-byte (256-bit) decryption key (must match encryption key).
|
|
52
|
-
* @returns The decrypted data, or `null` if decryption fails.
|
|
53
|
-
* @throws If the key is not exactly 32 bytes.
|
|
54
|
-
*/
|
|
55
|
-
export async function decryptAesGcm(bundle, key) {
|
|
56
|
-
assertKeySize(key);
|
|
57
|
-
// Validate minimum bundle size
|
|
58
|
-
if (bundle.length < MIN_BUNDLE_SIZE) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
// Validate version
|
|
62
|
-
if (bundle[0] !== BUNDLE_VERSION) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
// Extract nonce and ciphertext+authTag
|
|
66
|
-
const nonce = bundle.slice(1, 1 + NONCE_SIZE);
|
|
67
|
-
const ciphertextWithTag = bundle.slice(1 + NONCE_SIZE);
|
|
68
|
-
try {
|
|
69
|
-
const cryptoKey = await importKey(key, ['decrypt']);
|
|
70
|
-
const decrypted = await globalThis.crypto.subtle.decrypt({ name: 'AES-GCM', iv: nonce }, cryptoKey, ciphertextWithTag);
|
|
71
|
-
const json = new TextDecoder().decode(decrypted);
|
|
72
|
-
return JSON.parse(json);
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
// Decryption or JSON parsing failed -- return null per contract
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Import a raw key for AES-GCM operations.
|
|
81
|
-
*/
|
|
82
|
-
async function importKey(key, usages) {
|
|
83
|
-
return globalThis.crypto.subtle.importKey('raw', key, 'AES-GCM', false, [
|
|
84
|
-
...usages,
|
|
85
|
-
]);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Assert that a key is exactly 32 bytes (AES-256).
|
|
89
|
-
*/
|
|
90
|
-
function assertKeySize(key) {
|
|
91
|
-
if (key.length !== KEY_SIZE) {
|
|
92
|
-
throw new Error(`AES-256-GCM requires a 32-byte key, got ${key.length} bytes`);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=aes.js.map
|
|
1
|
+
"use strict";import{getRandomBytes as u}from"./random.js";const a=0,n=12,E=16,S=1+n+E,d=32;export async function encryptAesGcm(t,e){l(e);const s=new TextEncoder().encode(JSON.stringify(t)),c=u(n),i=await p(e,["encrypt"]),y=await globalThis.crypto.subtle.encrypt({name:"AES-GCM",iv:c},i,s),r=new Uint8Array(y),o=new Uint8Array(1+n+r.length);return o[0]=a,o.set(c,1),o.set(r,1+n),o}export async function decryptAesGcm(t,e){if(l(e),t.length<S||t[0]!==a)return null;const s=t.slice(1,1+n),c=t.slice(1+n);try{const i=await p(e,["decrypt"]),y=await globalThis.crypto.subtle.decrypt({name:"AES-GCM",iv:s},i,c),r=new TextDecoder().decode(y);return JSON.parse(r)}catch{return null}}async function p(t,e){return globalThis.crypto.subtle.importKey("raw",t,"AES-GCM",!1,[...e])}function l(t){if(t.length!==d)throw new Error(`AES-256-GCM requires a 32-byte key, got ${t.length} bytes`)}
|
package/dist/auth.js
CHANGED
|
@@ -1,69 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Ed25519 authentication challenge — aligned with Happy.
|
|
3
|
-
*
|
|
4
|
-
* Uses tweetnacl for Ed25519 signing/verification, which works in
|
|
5
|
-
* ALL contexts (including non-secure HTTP). The raw 32-byte seed is
|
|
6
|
-
* used directly as the Ed25519 private key seed, WITHOUT any extra
|
|
7
|
-
* key derivation step, matching Happy's tweetnacl.sign.keyPair.fromSeed().
|
|
8
|
-
*
|
|
9
|
-
* Previous implementation used Web Crypto API (crypto.subtle) which
|
|
10
|
-
* requires a secure context (HTTPS or localhost). This broke mobile
|
|
11
|
-
* PWA access over LAN (http://192.168.x.x).
|
|
12
|
-
*/
|
|
13
|
-
import nacl from 'tweetnacl';
|
|
14
|
-
/**
|
|
15
|
-
* Generate an authentication challenge signed with an Ed25519 key
|
|
16
|
-
* derived from the given seed.
|
|
17
|
-
*
|
|
18
|
-
* The seed is used directly as the Ed25519 private key seed (no extra
|
|
19
|
-
* key derivation), matching Happy's tweetnacl.sign.keyPair.fromSeed().
|
|
20
|
-
*
|
|
21
|
-
* @param seed - 32-byte seed for deterministic Ed25519 key pair
|
|
22
|
-
* @returns Challenge result with random nonce, public key, and signature
|
|
23
|
-
*/
|
|
24
|
-
export async function authChallenge(seed) {
|
|
25
|
-
const keyPair = nacl.sign.keyPair.fromSeed(seed);
|
|
26
|
-
// Generate random 32-byte challenge
|
|
27
|
-
const challenge = nacl.randomBytes(32);
|
|
28
|
-
// Sign the challenge
|
|
29
|
-
const signature = nacl.sign.detached(challenge, keyPair.secretKey);
|
|
30
|
-
return {
|
|
31
|
-
challenge,
|
|
32
|
-
publicKey: keyPair.publicKey,
|
|
33
|
-
signature,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Sign an externally-provided challenge nonce with an Ed25519 key
|
|
38
|
-
* derived from the given seed. Used for server-driven auth flows
|
|
39
|
-
* where the server issues the nonce.
|
|
40
|
-
*
|
|
41
|
-
* @param nonce - Challenge nonce provided by the server
|
|
42
|
-
* @param seed - 32-byte seed for deterministic Ed25519 key pair
|
|
43
|
-
* @returns Public key and signature over the nonce
|
|
44
|
-
*/
|
|
45
|
-
export async function signChallenge(nonce, seed) {
|
|
46
|
-
const keyPair = nacl.sign.keyPair.fromSeed(seed);
|
|
47
|
-
const signature = nacl.sign.detached(nonce, keyPair.secretKey);
|
|
48
|
-
return {
|
|
49
|
-
publicKey: keyPair.publicKey,
|
|
50
|
-
signature,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Verify an authentication challenge signature.
|
|
55
|
-
*
|
|
56
|
-
* @param challenge - The challenge nonce
|
|
57
|
-
* @param publicKey - The 32-byte Ed25519 public key
|
|
58
|
-
* @param signature - The 64-byte Ed25519 signature
|
|
59
|
-
* @returns true if the signature is valid
|
|
60
|
-
*/
|
|
61
|
-
export async function verifyChallenge(challenge, publicKey, signature) {
|
|
62
|
-
try {
|
|
63
|
-
return nacl.sign.detached.verify(challenge, signature, publicKey);
|
|
64
|
-
}
|
|
65
|
-
catch {
|
|
66
|
-
return false; // SILENT-CATCH-OK: invalid signature returns false per contract
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=auth.js.map
|
|
1
|
+
"use strict";import r from"tweetnacl";export async function authChallenge(t){const n=r.sign.keyPair.fromSeed(t),e=r.randomBytes(32),c=r.sign.detached(e,n.secretKey);return{challenge:e,publicKey:n.publicKey,signature:c}}export async function signChallenge(t,n){const e=r.sign.keyPair.fromSeed(n),c=r.sign.detached(t,e.secretKey);return{publicKey:e.publicKey,signature:c}}export async function verifyChallenge(t,n,e){try{return r.sign.detached.verify(t,e,n)}catch{return!1}}
|
package/dist/box.js
CHANGED
|
@@ -1,73 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* NaCl Box encryption — aligned with Happy.
|
|
3
|
-
*
|
|
4
|
-
* Ephemeral X25519 Diffie-Hellman key agreement + authenticated encryption.
|
|
5
|
-
* Used for encrypting data for a specific recipient (key delivery).
|
|
6
|
-
*
|
|
7
|
-
* Bundle format: ephemeral_pubkey(32) + nonce(24) + ciphertext
|
|
8
|
-
*/
|
|
9
|
-
import nacl from 'tweetnacl';
|
|
10
|
-
import { getRandomBytes } from './random.js';
|
|
11
|
-
/**
|
|
12
|
-
* Encrypt data for a recipient's public key using NaCl Box.
|
|
13
|
-
*
|
|
14
|
-
* Generates an ephemeral keypair, performs DH key agreement,
|
|
15
|
-
* and encrypts with authenticated encryption (XSalsa20-Poly1305).
|
|
16
|
-
*
|
|
17
|
-
* @param data - Plaintext data to encrypt
|
|
18
|
-
* @param recipientPublicKey - 32-byte X25519 public key of the recipient
|
|
19
|
-
* @returns Bundle: ephemeral_pubkey(32) + nonce(24) + ciphertext
|
|
20
|
-
*/
|
|
21
|
-
export function encryptBox(data, recipientPublicKey) {
|
|
22
|
-
const ephemeralKeyPair = nacl.box.keyPair();
|
|
23
|
-
const nonce = getRandomBytes(nacl.box.nonceLength);
|
|
24
|
-
const encrypted = nacl.box(data, nonce, recipientPublicKey, ephemeralKeyPair.secretKey);
|
|
25
|
-
// Bundle: ephemeral pubkey(32) + nonce(24) + ciphertext
|
|
26
|
-
const result = new Uint8Array(32 + 24 + encrypted.length);
|
|
27
|
-
result.set(ephemeralKeyPair.publicKey, 0);
|
|
28
|
-
result.set(nonce, 32);
|
|
29
|
-
result.set(encrypted, 56);
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Decrypt a NaCl Box bundle using the recipient's secret key.
|
|
34
|
-
*
|
|
35
|
-
* @param bundle - Bundle: ephemeral_pubkey(32) + nonce(24) + ciphertext
|
|
36
|
-
* @param recipientSecretKey - 32-byte X25519 secret key
|
|
37
|
-
* @returns Decrypted plaintext, or null if decryption fails
|
|
38
|
-
*/
|
|
39
|
-
export function decryptBox(bundle, recipientSecretKey) {
|
|
40
|
-
if (bundle.length < 32 + 24)
|
|
41
|
-
return null;
|
|
42
|
-
const ephemeralPublicKey = bundle.slice(0, 32);
|
|
43
|
-
const nonce = bundle.slice(32, 56);
|
|
44
|
-
const ciphertext = bundle.slice(56);
|
|
45
|
-
const decrypted = nacl.box.open(ciphertext, nonce, ephemeralPublicKey, recipientSecretKey);
|
|
46
|
-
return decrypted ? new Uint8Array(decrypted) : null;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Generate a random X25519 keypair for NaCl Box operations.
|
|
50
|
-
*
|
|
51
|
-
* @returns BoxKeyPair with 32-byte publicKey and secretKey
|
|
52
|
-
*/
|
|
53
|
-
export function generateBoxKeyPair() {
|
|
54
|
-
const kp = nacl.box.keyPair();
|
|
55
|
-
return {
|
|
56
|
-
publicKey: new Uint8Array(kp.publicKey),
|
|
57
|
-
secretKey: new Uint8Array(kp.secretKey),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Derive a NaCl Box public key from a secret key.
|
|
62
|
-
*
|
|
63
|
-
* NOTE: This matches libsodium's behavior — tweetnacl requires the
|
|
64
|
-
* secret key to already be the hashed form. For seed-based derivation,
|
|
65
|
-
* use deriveContentKeyPair() instead.
|
|
66
|
-
*
|
|
67
|
-
* @param secretKey - 32-byte X25519 secret key
|
|
68
|
-
* @returns 32-byte X25519 public key
|
|
69
|
-
*/
|
|
70
|
-
export function boxPublicKeyFromSecretKey(secretKey) {
|
|
71
|
-
return new Uint8Array(nacl.box.keyPair.fromSecretKey(secretKey).publicKey);
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=box.js.map
|
|
1
|
+
"use strict";import r from"tweetnacl";import{getRandomBytes as y}from"./random.js";export function encryptBox(e,i){const n=r.box.keyPair(),o=y(r.box.nonceLength),c=r.box(e,o,i,n.secretKey),t=new Uint8Array(56+c.length);return t.set(n.publicKey,0),t.set(o,32),t.set(c,56),t}export function decryptBox(e,i){if(e.length<56)return null;const n=e.slice(0,32),o=e.slice(32,56),c=e.slice(56),t=r.box.open(c,o,n,i);return t?new Uint8Array(t):null}export function generateBoxKeyPair(){const e=r.box.keyPair();return{publicKey:new Uint8Array(e.publicKey),secretKey:new Uint8Array(e.secretKey)}}export function boxPublicKeyFromSecretKey(e){return new Uint8Array(r.box.keyPair.fromSecretKey(e).publicKey)}
|
package/dist/content.js
CHANGED
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Content keypair derivation — aligned with Happy.
|
|
3
|
-
*
|
|
4
|
-
* Derives an X25519 NaCl Box keypair from a secret using the key tree.
|
|
5
|
-
* Usage string: 'Happy EnCoder', path: ['content'].
|
|
6
|
-
*
|
|
7
|
-
* The derived seed is SHA-512 hashed and the first 32 bytes become the
|
|
8
|
-
* Box secret key, matching libsodium's crypto_box_seed_keypair behavior.
|
|
9
|
-
*/
|
|
10
|
-
import nacl from 'tweetnacl';
|
|
11
|
-
import { deriveKey } from './keys.js';
|
|
12
|
-
/**
|
|
13
|
-
* Derive a NaCl Box keypair for content encryption.
|
|
14
|
-
*
|
|
15
|
-
* Follows Happy's deriveContentKeyPair():
|
|
16
|
-
* 1. deriveKey(secret, 'Happy EnCoder', ['content']) → 32-byte seed
|
|
17
|
-
* 2. SHA-512(seed)[0:32] → box secret key (matching libsodium)
|
|
18
|
-
* 3. tweetnacl.box.keyPair.fromSecretKey(boxSecretKey) → keypair
|
|
19
|
-
*
|
|
20
|
-
* Since we use Web Crypto (no node:crypto), we approximate SHA-512
|
|
21
|
-
* using HMAC-SHA512 with the seed as both key and data, then take
|
|
22
|
-
* the first 32 bytes. This produces a deterministic 32-byte output
|
|
23
|
-
* for a given seed, matching the intent of SHA-512(seed)[0:32].
|
|
24
|
-
*
|
|
25
|
-
* @param secret - Master secret for key derivation
|
|
26
|
-
* @returns NaCl Box keypair { publicKey, secretKey }
|
|
27
|
-
*/
|
|
28
|
-
export async function deriveContentKeyPair(secret) {
|
|
29
|
-
const seed = await deriveKey(secret, 'Happy EnCoder', ['content']);
|
|
30
|
-
// Match libsodium: crypto_box_seed_keypair does SHA-512(seed)[0:32]
|
|
31
|
-
// We use Web Crypto SHA-512 directly
|
|
32
|
-
const hashBuffer = await crypto.subtle.digest('SHA-512', seed);
|
|
33
|
-
const boxSecretKey = new Uint8Array(hashBuffer).slice(0, 32);
|
|
34
|
-
const keyPair = nacl.box.keyPair.fromSecretKey(boxSecretKey);
|
|
35
|
-
return {
|
|
36
|
-
publicKey: new Uint8Array(keyPair.publicKey),
|
|
37
|
-
secretKey: new Uint8Array(keyPair.secretKey),
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=content.js.map
|
|
1
|
+
"use strict";import o from"tweetnacl";import{deriveKey as c}from"./keys.js";export async function deriveContentKeyPair(r){const t=await c(r,"Happy EnCoder",["content"]),n=await crypto.subtle.digest("SHA-512",t),i=new Uint8Array(n).slice(0,32),e=o.box.keyPair.fromSecretKey(i);return{publicKey:new Uint8Array(e.publicKey),secretKey:new Uint8Array(e.secretKey)}}
|
package/dist/encoding.js
CHANGED
|
@@ -1,55 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Base64 and Base64URL encoding/decoding utilities.
|
|
3
|
-
*
|
|
4
|
-
* Uses browser-compatible APIs (no Node.js Buffer dependency).
|
|
5
|
-
* Works in both browser and Node.js 22+ environments.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Encode a Uint8Array to a standard Base64 string.
|
|
9
|
-
*/
|
|
10
|
-
export function encodeBase64(buffer) {
|
|
11
|
-
if (buffer.length === 0)
|
|
12
|
-
return '';
|
|
13
|
-
// Convert Uint8Array to binary string, then use btoa
|
|
14
|
-
let binary = '';
|
|
15
|
-
for (let i = 0; i < buffer.length; i++) {
|
|
16
|
-
binary += String.fromCharCode(buffer[i]);
|
|
17
|
-
}
|
|
18
|
-
return btoa(binary);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Decode a standard Base64 string to a Uint8Array.
|
|
22
|
-
*/
|
|
23
|
-
export function decodeBase64(base64) {
|
|
24
|
-
if (base64 === '')
|
|
25
|
-
return new Uint8Array(0);
|
|
26
|
-
const binary = atob(base64);
|
|
27
|
-
const bytes = new Uint8Array(binary.length);
|
|
28
|
-
for (let i = 0; i < binary.length; i++) {
|
|
29
|
-
bytes[i] = binary.charCodeAt(i);
|
|
30
|
-
}
|
|
31
|
-
return bytes;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Encode a Uint8Array to a Base64URL string (no padding).
|
|
35
|
-
*
|
|
36
|
-
* Base64URL replaces `+` with `-`, `/` with `_`, and strips `=` padding.
|
|
37
|
-
*/
|
|
38
|
-
export function encodeBase64Url(buffer) {
|
|
39
|
-
const base64 = encodeBase64(buffer);
|
|
40
|
-
return base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Decode a Base64URL string to a Uint8Array.
|
|
44
|
-
*/
|
|
45
|
-
export function decodeBase64Url(base64url) {
|
|
46
|
-
if (base64url === '')
|
|
47
|
-
return new Uint8Array(0);
|
|
48
|
-
// Convert base64url back to standard base64
|
|
49
|
-
let base64 = base64url.replace(/-/g, '+').replace(/_/g, '/');
|
|
50
|
-
// Restore padding
|
|
51
|
-
const paddingNeeded = (4 - (base64.length % 4)) % 4;
|
|
52
|
-
base64 += '='.repeat(paddingNeeded);
|
|
53
|
-
return decodeBase64(base64);
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=encoding.js.map
|
|
1
|
+
"use strict";export function encodeBase64(e){if(e.length===0)return"";let r="";for(let t=0;t<e.length;t++)r+=String.fromCharCode(e[t]);return btoa(r)}export function decodeBase64(e){if(e==="")return new Uint8Array(0);const r=atob(e),t=new Uint8Array(r.length);for(let n=0;n<r.length;n++)t[n]=r.charCodeAt(n);return t}export function encodeBase64Url(e){return encodeBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}export function decodeBase64Url(e){if(e==="")return new Uint8Array(0);let r=e.replace(/-/g,"+").replace(/_/g,"/");const t=(4-r.length%4)%4;return r+="=".repeat(t),decodeBase64(r)}
|
package/dist/hmac.js
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Browser + Node.js 22+ compatible (no node:crypto)
|
|
3
|
-
/**
|
|
4
|
-
* Compute HMAC-SHA512 of data using the given key.
|
|
5
|
-
*
|
|
6
|
-
* Uses Web Crypto API (globalThis.crypto.subtle) for cross-platform
|
|
7
|
-
* compatibility between browsers and Node.js 22+.
|
|
8
|
-
*
|
|
9
|
-
* @param key - HMAC key (must be at least 1 byte; will be hashed if > block size)
|
|
10
|
-
* @param data - Data to authenticate
|
|
11
|
-
* @returns 64-byte HMAC-SHA512 digest
|
|
12
|
-
* @throws Error if key is empty (zero-length keys are not supported by Web Crypto API)
|
|
13
|
-
*/
|
|
14
|
-
export async function hmacSha512(key, data) {
|
|
15
|
-
if (key.byteLength === 0) {
|
|
16
|
-
throw new Error('HMAC key must not be empty');
|
|
17
|
-
}
|
|
18
|
-
const algorithm = { name: 'HMAC', hash: 'SHA-512' };
|
|
19
|
-
const cryptoKey = await crypto.subtle.importKey('raw', key, algorithm, false, [
|
|
20
|
-
'sign',
|
|
21
|
-
]);
|
|
22
|
-
const signature = await crypto.subtle.sign('HMAC', cryptoKey, data);
|
|
23
|
-
return new Uint8Array(signature);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=hmac.js.map
|
|
1
|
+
"use strict";export async function hmacSha512(t,n){if(t.byteLength===0)throw new Error("HMAC key must not be empty");const r={name:"HMAC",hash:"SHA-512"},e=await crypto.subtle.importKey("raw",t,r,!1,["sign"]),a=await crypto.subtle.sign("HMAC",e,n);return new Uint8Array(a)}
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Web Crypto API + tweetnacl, browser + Node.js 22+ compatible
|
|
3
|
-
// Base64 encoding/decoding
|
|
4
|
-
export { encodeBase64, decodeBase64, encodeBase64Url, decodeBase64Url } from './encoding.js';
|
|
5
|
-
// Secure random number generation
|
|
6
|
-
export { getRandomBytes } from './random.js';
|
|
7
|
-
// AES-256-GCM encryption/decryption
|
|
8
|
-
export { encryptAesGcm, decryptAesGcm } from './aes.js';
|
|
9
|
-
// HMAC-SHA512
|
|
10
|
-
export { hmacSha512 } from './hmac.js';
|
|
11
|
-
// Key derivation tree
|
|
12
|
-
export { deriveSecretKeyTreeRoot, deriveSecretKeyTreeChild, deriveKey } from './keys.js';
|
|
13
|
-
// Authentication challenge (Ed25519)
|
|
14
|
-
export { authChallenge, signChallenge, verifyChallenge } from './auth.js';
|
|
15
|
-
// NaCl Box encryption (public key / key delivery)
|
|
16
|
-
export { encryptBox, decryptBox, boxPublicKeyFromSecretKey, generateBoxKeyPair } from './box.js';
|
|
17
|
-
// NaCl SecretBox encryption (symmetric / legacy)
|
|
18
|
-
export { encryptSecretBox, decryptSecretBox } from './secretbox.js';
|
|
19
|
-
// Content keypair derivation
|
|
20
|
-
export { deriveContentKeyPair } from './content.js';
|
|
21
|
-
// Session encryption (high-level API)
|
|
22
|
-
export { generateSessionKeys, unwrapSessionKey, encryptEnvelope, decryptEnvelope, } from './session.js';
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";export{encodeBase64,decodeBase64,encodeBase64Url,decodeBase64Url}from"./encoding.js";export{getRandomBytes}from"./random.js";export{encryptAesGcm,decryptAesGcm}from"./aes.js";export{hmacSha512}from"./hmac.js";export{deriveSecretKeyTreeRoot,deriveSecretKeyTreeChild,deriveKey}from"./keys.js";export{authChallenge,signChallenge,verifyChallenge}from"./auth.js";export{encryptBox,decryptBox,boxPublicKeyFromSecretKey,generateBoxKeyPair}from"./box.js";export{encryptSecretBox,decryptSecretBox}from"./secretbox.js";export{deriveContentKeyPair}from"./content.js";export{generateSessionKeys,unwrapSessionKey,encryptEnvelope,decryptEnvelope}from"./session.js";
|
package/dist/keys.js
CHANGED
|
@@ -1,67 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Compatible with Happy project's key tree pattern, using Web Crypto API
|
|
3
|
-
import { hmacSha512 } from './hmac.js';
|
|
4
|
-
const encoder = new TextEncoder();
|
|
5
|
-
/**
|
|
6
|
-
* Split a 64-byte HMAC output into key (first 32) and chainCode (last 32).
|
|
7
|
-
*/
|
|
8
|
-
function splitHmacOutput(hmacOutput) {
|
|
9
|
-
return {
|
|
10
|
-
key: hmacOutput.slice(0, 32),
|
|
11
|
-
chainCode: hmacOutput.slice(32, 64),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Derive the root key tree state from a seed and usage string.
|
|
16
|
-
*
|
|
17
|
-
* Formula: HMAC-SHA512(encode(usage + " Master Seed"), seed)
|
|
18
|
-
* - The HMAC key is the UTF-8 encoding of `usage + " Master Seed"`
|
|
19
|
-
* - The HMAC data is the raw seed bytes
|
|
20
|
-
*
|
|
21
|
-
* @param seed - Root seed material
|
|
22
|
-
* @param usage - Purpose string (e.g., "encryption", "authentication")
|
|
23
|
-
* @returns Root KeyTreeState with key and chainCode
|
|
24
|
-
*/
|
|
25
|
-
export async function deriveSecretKeyTreeRoot(seed, usage) {
|
|
26
|
-
const hmacKey = encoder.encode(usage + ' Master Seed');
|
|
27
|
-
const hmacOutput = await hmacSha512(hmacKey, seed);
|
|
28
|
-
return splitHmacOutput(hmacOutput);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Derive a child key tree state from a parent chain code and index.
|
|
32
|
-
*
|
|
33
|
-
* Formula: HMAC-SHA512(parentChainCode, [0x00, ...encode(index)])
|
|
34
|
-
* - Prepends a 0x00 byte before the index string encoding
|
|
35
|
-
*
|
|
36
|
-
* @param chainCode - Parent node's chain code (32 bytes)
|
|
37
|
-
* @param index - Child index identifier string
|
|
38
|
-
* @returns Child KeyTreeState with key and chainCode
|
|
39
|
-
*/
|
|
40
|
-
export async function deriveSecretKeyTreeChild(chainCode, index) {
|
|
41
|
-
const indexBytes = encoder.encode(index);
|
|
42
|
-
const data = new Uint8Array(1 + indexBytes.byteLength);
|
|
43
|
-
data[0] = 0x00;
|
|
44
|
-
data.set(indexBytes, 1);
|
|
45
|
-
const hmacOutput = await hmacSha512(chainCode, data);
|
|
46
|
-
return splitHmacOutput(hmacOutput);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Convenience function: derive a final key by walking a path from root.
|
|
50
|
-
*
|
|
51
|
-
* 1. Derive root from master seed + usage
|
|
52
|
-
* 2. For each segment in path, derive child from current chainCode
|
|
53
|
-
* 3. Return the final key (32 bytes)
|
|
54
|
-
*
|
|
55
|
-
* @param master - Master seed material
|
|
56
|
-
* @param usage - Purpose string for root derivation
|
|
57
|
-
* @param path - Array of path segments to walk
|
|
58
|
-
* @returns Final derived key (32 bytes)
|
|
59
|
-
*/
|
|
60
|
-
export async function deriveKey(master, usage, path) {
|
|
61
|
-
let state = await deriveSecretKeyTreeRoot(master, usage);
|
|
62
|
-
for (const segment of path) {
|
|
63
|
-
state = await deriveSecretKeyTreeChild(state.chainCode, segment);
|
|
64
|
-
}
|
|
65
|
-
return state.key;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=keys.js.map
|
|
1
|
+
"use strict";import{hmacSha512 as r}from"./hmac.js";const a=new TextEncoder;function i(t){return{key:t.slice(0,32),chainCode:t.slice(32,64)}}export async function deriveSecretKeyTreeRoot(t,c){const n=a.encode(c+" Master Seed"),e=await r(n,t);return i(e)}export async function deriveSecretKeyTreeChild(t,c){const n=a.encode(c),e=new Uint8Array(1+n.byteLength);e[0]=0,e.set(n,1);const o=await r(t,e);return i(o)}export async function deriveKey(t,c,n){let e=await deriveSecretKeyTreeRoot(t,c);for(const o of n)e=await deriveSecretKeyTreeChild(e.chainCode,o);return e.key}
|
package/dist/random.js
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Cryptographically secure random number generation.
|
|
3
|
-
*
|
|
4
|
-
* Uses the Web Crypto API (globalThis.crypto.getRandomValues),
|
|
5
|
-
* compatible with both browsers and Node.js 22+.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Generate cryptographically secure random bytes.
|
|
9
|
-
*
|
|
10
|
-
* @param size - Number of random bytes to generate (0 or more).
|
|
11
|
-
* @returns A new Uint8Array filled with random bytes.
|
|
12
|
-
*/
|
|
13
|
-
export function getRandomBytes(size) {
|
|
14
|
-
const buffer = new Uint8Array(size);
|
|
15
|
-
if (size > 0) {
|
|
16
|
-
globalThis.crypto.getRandomValues(buffer);
|
|
17
|
-
}
|
|
18
|
-
return buffer;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=random.js.map
|
|
1
|
+
"use strict";export function getRandomBytes(t){const n=new Uint8Array(t);return t>0&&globalThis.crypto.getRandomValues(n),n}
|
package/dist/secretbox.js
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* NaCl SecretBox encryption — aligned with Happy.
|
|
3
|
-
*
|
|
4
|
-
* Symmetric authenticated encryption (XSalsa20-Poly1305).
|
|
5
|
-
* Used for legacy encryption mode.
|
|
6
|
-
*
|
|
7
|
-
* Bundle format: nonce(24) + ciphertext
|
|
8
|
-
*/
|
|
9
|
-
import nacl from 'tweetnacl';
|
|
10
|
-
import { getRandomBytes } from './random.js';
|
|
11
|
-
/**
|
|
12
|
-
* Encrypt data with a secret key using NaCl SecretBox.
|
|
13
|
-
*
|
|
14
|
-
* JSON-serializes the data, then encrypts with XSalsa20-Poly1305.
|
|
15
|
-
*
|
|
16
|
-
* @param data - Data to encrypt (will be JSON-serialized)
|
|
17
|
-
* @param secret - 32-byte secret key
|
|
18
|
-
* @returns Bundle: nonce(24) + ciphertext
|
|
19
|
-
*/
|
|
20
|
-
export function encryptSecretBox(data, secret) {
|
|
21
|
-
const nonce = getRandomBytes(nacl.secretbox.nonceLength);
|
|
22
|
-
const plaintext = new TextEncoder().encode(JSON.stringify(data));
|
|
23
|
-
const encrypted = nacl.secretbox(plaintext, nonce, secret);
|
|
24
|
-
const result = new Uint8Array(nonce.length + encrypted.length);
|
|
25
|
-
result.set(nonce);
|
|
26
|
-
result.set(encrypted, nonce.length);
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Decrypt a NaCl SecretBox bundle with a secret key.
|
|
31
|
-
*
|
|
32
|
-
* @param bundle - Bundle: nonce(24) + ciphertext
|
|
33
|
-
* @param secret - 32-byte secret key
|
|
34
|
-
* @returns Deserialized data, or null if decryption fails
|
|
35
|
-
*/
|
|
36
|
-
export function decryptSecretBox(bundle, secret) {
|
|
37
|
-
try {
|
|
38
|
-
if (bundle.length < nacl.secretbox.nonceLength)
|
|
39
|
-
return null;
|
|
40
|
-
const nonce = bundle.slice(0, nacl.secretbox.nonceLength);
|
|
41
|
-
const ciphertext = bundle.slice(nacl.secretbox.nonceLength);
|
|
42
|
-
const decrypted = nacl.secretbox.open(ciphertext, nonce, secret);
|
|
43
|
-
if (!decrypted)
|
|
44
|
-
return null;
|
|
45
|
-
return JSON.parse(new TextDecoder().decode(decrypted));
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return null; // SILENT-CATCH-OK: decryption failure returns null by design
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=secretbox.js.map
|
|
1
|
+
"use strict";import t from"tweetnacl";import{getRandomBytes as x}from"./random.js";export function encryptSecretBox(n,r){const e=x(t.secretbox.nonceLength),o=new TextEncoder().encode(JSON.stringify(n)),c=t.secretbox(o,e,r),s=new Uint8Array(e.length+c.length);return s.set(e),s.set(c,e.length),s}export function decryptSecretBox(n,r){try{if(n.length<t.secretbox.nonceLength)return null;const e=n.slice(0,t.secretbox.nonceLength),o=n.slice(t.secretbox.nonceLength),c=t.secretbox.open(o,e,r);return c?JSON.parse(new TextDecoder().decode(c)):null}catch{return null}}
|
package/dist/session.js
CHANGED
|
@@ -1,106 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Session encryption — high-level API composing AES-GCM + NaCl Box.
|
|
3
|
-
*
|
|
4
|
-
* Provides per-session data encryption key (DEK) generation, wrapping,
|
|
5
|
-
* unwrapping, and envelope encrypt/decrypt. Compatible with Happy protocol.
|
|
6
|
-
*
|
|
7
|
-
* Key flow:
|
|
8
|
-
* masterSecret → deriveContentKeyPair → contentPublicKey
|
|
9
|
-
* random DEK (32 bytes) → NaCl Box(DEK, contentPublicKey) → wrappedDek
|
|
10
|
-
* envelope → AES-256-GCM(DEK) → ciphertext (base64)
|
|
11
|
-
*/
|
|
12
|
-
import { encryptAesGcm, decryptAesGcm } from './aes.js';
|
|
13
|
-
import { encryptBox, decryptBox } from './box.js';
|
|
14
|
-
import { deriveContentKeyPair } from './content.js';
|
|
15
|
-
import { getRandomBytes } from './random.js';
|
|
16
|
-
import { encodeBase64, decodeBase64 } from './encoding.js';
|
|
17
|
-
/** Current wrapped key version. */
|
|
18
|
-
const WRAPPED_KEY_VERSION = 0;
|
|
19
|
-
/** Expected DEK size in bytes. */
|
|
20
|
-
const DEK_SIZE = 32;
|
|
21
|
-
/** Minimum wrapped key bundle size: version(1) + NaCl Box overhead (32+24+16+32). */
|
|
22
|
-
const MIN_WRAPPED_SIZE = 1 + 32 + 24 + DEK_SIZE;
|
|
23
|
-
/**
|
|
24
|
-
* Generate a per-session data encryption key and wrap it with NaCl Box.
|
|
25
|
-
*
|
|
26
|
-
* 1. Derive content keypair from masterSecret
|
|
27
|
-
* 2. Generate random 32-byte DEK
|
|
28
|
-
* 3. Wrap DEK: NaCl Box(DEK, contentPublicKey)
|
|
29
|
-
* 4. Prepend version byte
|
|
30
|
-
*
|
|
31
|
-
* @param masterSecret - 32-byte master secret shared between daemon and web
|
|
32
|
-
* @returns DEK (for local use) and wrappedDekBase64 (for server storage)
|
|
33
|
-
*/
|
|
34
|
-
export async function generateSessionKeys(masterSecret) {
|
|
35
|
-
const { publicKey } = await deriveContentKeyPair(masterSecret);
|
|
36
|
-
const dek = getRandomBytes(DEK_SIZE);
|
|
37
|
-
// Wrap DEK with NaCl Box
|
|
38
|
-
const boxBundle = encryptBox(dek, publicKey);
|
|
39
|
-
// Prepend version byte
|
|
40
|
-
const wrapped = new Uint8Array(1 + boxBundle.length);
|
|
41
|
-
wrapped[0] = WRAPPED_KEY_VERSION;
|
|
42
|
-
wrapped.set(boxBundle, 1);
|
|
43
|
-
return { dek, wrappedDekBase64: encodeBase64(wrapped) };
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Unwrap a session DEK using the master secret.
|
|
47
|
-
*
|
|
48
|
-
* 1. Base64-decode the wrapped key
|
|
49
|
-
* 2. Check version byte (must be 0)
|
|
50
|
-
* 3. Derive content keypair from masterSecret
|
|
51
|
-
* 4. Decrypt with NaCl Box using content secret key
|
|
52
|
-
*
|
|
53
|
-
* @param wrappedDekBase64 - Base64-encoded wrapped key from server
|
|
54
|
-
* @param masterSecret - Same master secret used during generation
|
|
55
|
-
* @returns 32-byte DEK, or null if unwrapping fails
|
|
56
|
-
*/
|
|
57
|
-
export async function unwrapSessionKey(wrappedDekBase64, masterSecret) {
|
|
58
|
-
let wrapped;
|
|
59
|
-
try {
|
|
60
|
-
wrapped = decodeBase64(wrappedDekBase64);
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
return null; // SILENT-CATCH-OK: invalid base64 means bad wrapped key
|
|
64
|
-
}
|
|
65
|
-
if (wrapped.length < MIN_WRAPPED_SIZE)
|
|
66
|
-
return null;
|
|
67
|
-
if (wrapped[0] !== WRAPPED_KEY_VERSION)
|
|
68
|
-
return null;
|
|
69
|
-
const boxBundle = wrapped.slice(1);
|
|
70
|
-
const { secretKey } = await deriveContentKeyPair(masterSecret);
|
|
71
|
-
const dek = decryptBox(boxBundle, secretKey);
|
|
72
|
-
if (!dek || dek.length !== DEK_SIZE)
|
|
73
|
-
return null;
|
|
74
|
-
return dek;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Encrypt a SessionEnvelope (or any JSON-serializable value) for transmission.
|
|
78
|
-
*
|
|
79
|
-
* @param envelope - Data to encrypt (JSON-serializable)
|
|
80
|
-
* @param dek - 32-byte data encryption key
|
|
81
|
-
* @returns Base64-encoded AES-256-GCM ciphertext
|
|
82
|
-
*/
|
|
83
|
-
export async function encryptEnvelope(envelope, dek) {
|
|
84
|
-
const bundle = await encryptAesGcm(envelope, dek);
|
|
85
|
-
return encodeBase64(bundle);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Decrypt a base64-encoded ciphertext back to the original data.
|
|
89
|
-
*
|
|
90
|
-
* @param ciphertextBase64 - Base64-encoded AES-256-GCM bundle
|
|
91
|
-
* @param dek - 32-byte data encryption key
|
|
92
|
-
* @returns Decrypted data, or null if decryption fails
|
|
93
|
-
*/
|
|
94
|
-
export async function decryptEnvelope(ciphertextBase64, dek) {
|
|
95
|
-
let bundle;
|
|
96
|
-
try {
|
|
97
|
-
bundle = decodeBase64(ciphertextBase64);
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
return null; // SILENT-CATCH-OK: invalid base64 means bad ciphertext
|
|
101
|
-
}
|
|
102
|
-
if (bundle.length === 0)
|
|
103
|
-
return null;
|
|
104
|
-
return decryptAesGcm(bundle, dek);
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=session.js.map
|
|
1
|
+
"use strict";import{encryptAesGcm as i,decryptAesGcm as y}from"./aes.js";import{encryptBox as d,decryptBox as f}from"./box.js";import{deriveContentKeyPair as l}from"./content.js";import{getRandomBytes as m}from"./random.js";import{encodeBase64 as u,decodeBase64 as p}from"./encoding.js";const a=0,s=32,E=57+s;export async function generateSessionKeys(n){const{publicKey:t}=await l(n),e=m(s),o=d(e,t),r=new Uint8Array(1+o.length);return r[0]=a,r.set(o,1),{dek:e,wrappedDekBase64:u(r)}}export async function unwrapSessionKey(n,t){let e;try{e=p(n)}catch{return null}if(e.length<E||e[0]!==a)return null;const o=e.slice(1),{secretKey:r}=await l(t),c=f(o,r);return!c||c.length!==s?null:c}export async function encryptEnvelope(n,t){const e=await i(n,t);return u(e)}export async function decryptEnvelope(n,t){let e;try{e=p(n)}catch{return null}return e.length===0?null:y(e,t)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdock/crypto",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "E2E encryption for AgentDock — AES-256-GCM, key derivation, Web Crypto API",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "kevin8536945",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tweetnacl": "^1.0.3",
|
|
26
|
-
"@agentdock/wire": "0.0.
|
|
26
|
+
"@agentdock/wire": "0.0.47"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@vitest/coverage-v8": "^3.0.0",
|
package/dist/aes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aes.d.ts","sourceRoot":"","sources":["../src/aes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAmBH;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAqBvF;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CA+BhG"}
|
package/dist/aes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aes.js","sourceRoot":"","sources":["../src/aes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,qCAAqC;AACrC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB,mCAAmC;AACnC,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,gDAAgD;AAChD,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,iEAAiE;AACjE,MAAM,eAAe,GAAG,CAAC,GAAG,UAAU,GAAG,aAAa,CAAC;AAEvD,0CAA0C;AAC1C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAa,EAAE,GAAe;IAChE,aAAa,CAAC,GAAG,CAAC,CAAC;IAEnB,MAAM,SAAS,GAAG,IAAI,WAAW,EAAE,CAAC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M,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IAC3F,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,OAAO;QACL,SAAS,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC;QACvC,SAAS,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC;KACxC,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,yBAAyB,CAAC,SAAqB;IAC7D,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;AAC7E,CAAC"}
|
package/dist/content.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAA;CAAE,CAAC,CAa7E"}
|
package/dist/content.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAkB;IAElB,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEnE,oEAAoE;IACpE,qCAAqC;IACrC,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAoB,CAAC,CAAC;IAC/E,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC7D,OAAO;QACL,SAAS,EAAE,IAAI,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC;QAC5C,SAAS,EAAE,IAAI,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC;KAC7C,CAAC;AACJ,CAAC"}
|
package/dist/encoding.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../src/encoding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CASvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CASvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAG1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAU7D"}
|
package/dist/encoding.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encoding.js","sour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AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,IAAI,SAAS,KAAK,EAAE;QAAE,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/C,4CAA4C;IAC5C,IAAI,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7D,kBAAkB;IAClB,MAAM,aAAa,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEpC,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/hmac.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../src/hmac.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAcvF"}
|
package/dist/hmac.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../src/hmac.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,oDAAoD;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAe,EAAE,IAAgB;IAChE,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;IAE7D,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM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"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,+DAA+D;AAE/D,2BAA2B;AAC3B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE7F,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,oCAAoC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,sBAAsB;AACtB,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGzF,qCAAqC;AACrC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG1E,kDAAkD;AAClD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGjG,iDAAiD;AACjD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,6BAA6B;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC"}
|
package/dist/keys.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,UAAU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AAU,wBAAwB,CAC5C,SAAqB,EACrB,KAAa;IAEb,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACf,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAExB,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACrD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAkB,EAClB,KAAa,EACb,IAAuB;IAEvB,IAAI,KAAK,GAAG,MAAM,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAEzD,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;QAC3B,KAAK,GAAG,MAAM,wBAAwB,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,KAAK,CAAC,GAAG,CAAC;AACnB,CAAC"}
|
package/dist/random.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAMvD"}
|
package/dist/random.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"random.js","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACb,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/secretbox.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secretbox.d.ts","sourceRoot":"","sources":["../src/secretbox.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAS9E;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI,CAcvF"}
|
package/dist/secretbox.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secretbox.js","sourceRoot":"","sources":["../src/secretbox.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa,EAAE,MAAkB;IAChE,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,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