xypriss-security 2.1.12 → 2.1.13
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/src/core/keys.d.ts +43 -4
- package/dist/src/core/keys.d.ts.map +1 -1
- package/dist/src/core/keys.js +81 -27
- package/dist/src/core/keys.js.map +1 -1
- package/package.json +1 -1
package/dist/src/core/keys.d.ts
CHANGED
|
@@ -51,15 +51,54 @@ export declare class Keys {
|
|
|
51
51
|
*/
|
|
52
52
|
static rsaDecrypt(privateKey: string, encryptedHex: string): Promise<string>;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
54
|
+
* Encrypts a large file using high-performance, hardware-accelerated chunking.
|
|
55
|
+
*
|
|
56
|
+
* @description
|
|
57
|
+
* Processes files via a native encryption bridge using derived keys (PBKDF2).
|
|
58
|
+
* Implements a staging strategy to ensure data integrity: ciphertext is
|
|
59
|
+
* finalized with a 32-byte salt header before an atomic move to the target path.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} inputPath - Absolute path to the source file.
|
|
62
|
+
* @param {string} outputPath - Target destination for the encrypted data.
|
|
63
|
+
* @param {string} key - Raw passphrase for cryptographic derivation.
|
|
64
|
+
* @param {object} [options={}] - Encryption parameters.
|
|
65
|
+
* @param {string} [options.algorithm="aes-256-gcm"] - Selection of the cipher suite.
|
|
66
|
+
* @param {number} [options.keyDerivationIterations=100000] - Cost factor for PBKDF2.
|
|
67
|
+
* @param {boolean} [options.quantumSafe=false] - If true, enforces Post-Quantum resistant ciphers.
|
|
68
|
+
*
|
|
69
|
+
* @throws {Error | SystemError} On bridge failure, I/O exhaustion, or permission issues.
|
|
70
|
+
* @returns {Promise<void>}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await Cipher.crypto.encryptFile('./data.zip', './data.vault', 'secret-key');
|
|
56
74
|
*/
|
|
57
75
|
static encryptFile(inputPath: string, outputPath: string, key: string, options?: any): Promise<void>;
|
|
58
76
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
77
|
+
* Decrypts a large file using PBKDF2 key derivation and a secure bridge.
|
|
78
|
+
*
|
|
79
|
+
* @description
|
|
80
|
+
* This method extracts a 32-byte salt from the input file header, derives a 256-bit key
|
|
81
|
+
* (100,000 iterations), and performs decryption via temporary staging files to
|
|
82
|
+
* ensure data integrity. The final output is moved atomically.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} inputPath - Absolute path to the encrypted source file.
|
|
85
|
+
* @param {string} outputPath - Destination path for the decrypted plaintext.
|
|
86
|
+
* @param {string} key - The raw passphrase used for key derivation.
|
|
87
|
+
*
|
|
88
|
+
* @throws {Error} If the salt extraction fails or the decryption bridge returns an error.
|
|
89
|
+
* @throws {SystemError} If disk space is insufficient for temp files or if file moves fail.
|
|
90
|
+
*
|
|
91
|
+
* @returns {Promise<void>} Resolves once the file is successfully decrypted and moved to `outputPath`.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* await Cipher.crypto.decryptFile('./vault.enc', './vault.txt', 'super-secret-key');
|
|
61
95
|
*/
|
|
62
96
|
static decryptFile(inputPath: string, outputPath: string, key: string): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Moves a file atomically from src to dest.
|
|
99
|
+
* Handles EXDEV errors for cross-partition moves.
|
|
100
|
+
*/
|
|
101
|
+
private static moveFileAtomic;
|
|
63
102
|
}
|
|
64
103
|
/**
|
|
65
104
|
* Generates a high-entropy 4096-bit RSA key pair.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/core/keys.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,qBAAa,IAAI;IACf;;;;;;;OAOG;WACiB,SAAS,CAC3B,KAAK,EAAE,MAAM,GAAG,UAAU,EAC1B,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,M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C,OAAO,CAAC;IAInB;;;;;OAKG;WACiB,UAAU,CAC5B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;;OAKG;WACiB,UAAU,CAC5B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;;;;;;;;;;;;;;;;;;OAqBG;WACiB,WAAW,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,GAAQ,GAChB,OAAO,CAAC,IAAI,CAAC;IA2DhB;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,WAAW,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAkDhB;;;OAGG;mBACkB,cAAc;CAmBpC;AAID;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gCAA0B,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,qBAAe,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,uBAAiB,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wBAAkB,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wBAAkB,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,uBAAiB,CAAC"}
|
package/dist/src/core/keys.js
CHANGED
|
@@ -83,20 +83,42 @@ class Keys {
|
|
|
83
83
|
return bridge_1.Bridge.rsaDecrypt(privateKey, encryptedHex);
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
86
|
+
* Encrypts a large file using high-performance, hardware-accelerated chunking.
|
|
87
|
+
*
|
|
88
|
+
* @description
|
|
89
|
+
* Processes files via a native encryption bridge using derived keys (PBKDF2).
|
|
90
|
+
* Implements a staging strategy to ensure data integrity: ciphertext is
|
|
91
|
+
* finalized with a 32-byte salt header before an atomic move to the target path.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} inputPath - Absolute path to the source file.
|
|
94
|
+
* @param {string} outputPath - Target destination for the encrypted data.
|
|
95
|
+
* @param {string} key - Raw passphrase for cryptographic derivation.
|
|
96
|
+
* @param {object} [options={}] - Encryption parameters.
|
|
97
|
+
* @param {string} [options.algorithm="aes-256-gcm"] - Selection of the cipher suite.
|
|
98
|
+
* @param {number} [options.keyDerivationIterations=100000] - Cost factor for PBKDF2.
|
|
99
|
+
* @param {boolean} [options.quantumSafe=false] - If true, enforces Post-Quantum resistant ciphers.
|
|
100
|
+
*
|
|
101
|
+
* @throws {Error | SystemError} On bridge failure, I/O exhaustion, or permission issues.
|
|
102
|
+
* @returns {Promise<void>}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await Cipher.crypto.encryptFile('./data.zip', './data.vault', 'secret-key');
|
|
88
106
|
*/
|
|
89
107
|
static async encryptFile(inputPath, outputPath, key, options = {}) {
|
|
90
108
|
const fs = require("fs");
|
|
91
|
-
const
|
|
109
|
+
const os = require("os");
|
|
110
|
+
const path = require("path");
|
|
111
|
+
const { pipeline: pl } = require("stream");
|
|
112
|
+
const { promisify: pr } = require("util");
|
|
113
|
+
const pipelineAsync = pr(pl);
|
|
92
114
|
const id = Math.random().toString(36).substring(7);
|
|
93
|
-
const
|
|
94
|
-
const
|
|
115
|
+
const tmpDir = os.tmpdir();
|
|
116
|
+
const goTempPath = path.join(tmpDir, `xy-enc-${id}.go.tmp`);
|
|
117
|
+
const finalTempPath = path.join(tmpDir, `xy-enc-${id}.out.tmp`);
|
|
95
118
|
try {
|
|
96
119
|
const { algorithm = "aes-256-gcm", keyDerivationIterations = 100000, quantumSafe = false, } = options;
|
|
97
120
|
const SALT_LENGTH = 32;
|
|
98
121
|
const salt = Random_1.Random.getRandomBytes(SALT_LENGTH);
|
|
99
|
-
// Derive key
|
|
100
122
|
const derivedKeyHex = await bridge_1.Bridge.pbkdf2(key, salt.toUint8Array(), keyDerivationIterations, 32, "sha256");
|
|
101
123
|
const derivedKey = Buffer.from(derivedKeyHex, "hex");
|
|
102
124
|
const algoTarget = algorithm === "chacha20-poly1305" || quantumSafe ? "chacha20" : "aes";
|
|
@@ -105,18 +127,12 @@ class Keys {
|
|
|
105
127
|
if (result !== "OK")
|
|
106
128
|
throw new Error(result);
|
|
107
129
|
// 2. Combine Salt + Go Output into finalTempPath
|
|
108
|
-
const { pipeline: pl } = require("stream");
|
|
109
|
-
const { promisify: pr } = require("util");
|
|
110
|
-
const pipelineAsync = pr(pl);
|
|
111
130
|
fs.writeFileSync(finalTempPath, Buffer.from(salt.toUint8Array()));
|
|
112
131
|
const finalOut = fs.createWriteStream(finalTempPath, { flags: "a" });
|
|
113
132
|
const goTempIn = fs.createReadStream(goTempPath);
|
|
114
133
|
await pipelineAsync(goTempIn, finalOut);
|
|
115
|
-
// 3. Atomically
|
|
116
|
-
|
|
117
|
-
fs.unlinkSync(outputPath);
|
|
118
|
-
}
|
|
119
|
-
fs.renameSync(finalTempPath, outputPath);
|
|
134
|
+
// 3. Atomically move to final output
|
|
135
|
+
await this.moveFileAtomic(finalTempPath, outputPath);
|
|
120
136
|
}
|
|
121
137
|
catch (error) {
|
|
122
138
|
if (fs.existsSync(finalTempPath))
|
|
@@ -129,16 +145,37 @@ class Keys {
|
|
|
129
145
|
}
|
|
130
146
|
}
|
|
131
147
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
148
|
+
* Decrypts a large file using PBKDF2 key derivation and a secure bridge.
|
|
149
|
+
*
|
|
150
|
+
* @description
|
|
151
|
+
* This method extracts a 32-byte salt from the input file header, derives a 256-bit key
|
|
152
|
+
* (100,000 iterations), and performs decryption via temporary staging files to
|
|
153
|
+
* ensure data integrity. The final output is moved atomically.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} inputPath - Absolute path to the encrypted source file.
|
|
156
|
+
* @param {string} outputPath - Destination path for the decrypted plaintext.
|
|
157
|
+
* @param {string} key - The raw passphrase used for key derivation.
|
|
158
|
+
*
|
|
159
|
+
* @throws {Error} If the salt extraction fails or the decryption bridge returns an error.
|
|
160
|
+
* @throws {SystemError} If disk space is insufficient for temp files or if file moves fail.
|
|
161
|
+
*
|
|
162
|
+
* @returns {Promise<void>} Resolves once the file is successfully decrypted and moved to `outputPath`.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* await Cipher.crypto.decryptFile('./vault.enc', './vault.txt', 'super-secret-key');
|
|
134
166
|
*/
|
|
135
167
|
static async decryptFile(inputPath, outputPath, key) {
|
|
136
168
|
const fs = require("fs");
|
|
137
|
-
const
|
|
169
|
+
const os = require("os");
|
|
170
|
+
const path = require("path");
|
|
171
|
+
const { pipeline: pl2 } = require("stream");
|
|
172
|
+
const { promisify: pr2 } = require("util");
|
|
173
|
+
const pipelineAsync2 = pr2(pl2);
|
|
138
174
|
const SALT_LENGTH = 32;
|
|
139
175
|
const id = Math.random().toString(36).substring(7);
|
|
140
|
-
const
|
|
141
|
-
const
|
|
176
|
+
const tmpDir = os.tmpdir();
|
|
177
|
+
const tempInPath = path.join(tmpDir, `xy-dec-${id}.in.tmp`);
|
|
178
|
+
const tempOutPath = path.join(tmpDir, `xy-dec-${id}.out.tmp`);
|
|
142
179
|
try {
|
|
143
180
|
const fd = fs.openSync(inputPath, "r");
|
|
144
181
|
const salt = Buffer.alloc(SALT_LENGTH);
|
|
@@ -147,9 +184,6 @@ class Keys {
|
|
|
147
184
|
const derivedKeyHex = await bridge_1.Bridge.pbkdf2(key, salt, 100000, 32, "sha256");
|
|
148
185
|
const derivedKey = Buffer.from(derivedKeyHex, "hex");
|
|
149
186
|
// 1. Prepare input for Go (remove salt) into tempInPath
|
|
150
|
-
const { pipeline: pl2 } = require("stream");
|
|
151
|
-
const { promisify: pr2 } = require("util");
|
|
152
|
-
const pipelineAsync2 = pr2(pl2);
|
|
153
187
|
const finalInStream = fs.createReadStream(inputPath, {
|
|
154
188
|
start: SALT_LENGTH,
|
|
155
189
|
});
|
|
@@ -159,11 +193,8 @@ class Keys {
|
|
|
159
193
|
const result = bridge_1.Bridge.decryptFile(tempInPath, tempOutPath, derivedKey);
|
|
160
194
|
if (result !== "OK")
|
|
161
195
|
throw new Error(result);
|
|
162
|
-
// 3. Atomically
|
|
163
|
-
|
|
164
|
-
fs.unlinkSync(outputPath);
|
|
165
|
-
}
|
|
166
|
-
fs.renameSync(tempOutPath, outputPath);
|
|
196
|
+
// 3. Atomically move to final output
|
|
197
|
+
await this.moveFileAtomic(tempOutPath, outputPath);
|
|
167
198
|
}
|
|
168
199
|
catch (error) {
|
|
169
200
|
if (fs.existsSync(tempOutPath))
|
|
@@ -175,6 +206,29 @@ class Keys {
|
|
|
175
206
|
fs.unlinkSync(tempInPath);
|
|
176
207
|
}
|
|
177
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Moves a file atomically from src to dest.
|
|
211
|
+
* Handles EXDEV errors for cross-partition moves.
|
|
212
|
+
*/
|
|
213
|
+
static async moveFileAtomic(src, dest) {
|
|
214
|
+
const fs = require("fs");
|
|
215
|
+
try {
|
|
216
|
+
// Fast path: rename (on same partition)
|
|
217
|
+
if (fs.existsSync(dest) && src !== dest)
|
|
218
|
+
fs.unlinkSync(dest);
|
|
219
|
+
fs.renameSync(src, dest);
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
// Fallback path: copy + unlink (cross-partition)
|
|
223
|
+
if (error.code === "EXDEV") {
|
|
224
|
+
fs.copyFileSync(src, dest);
|
|
225
|
+
fs.unlinkSync(src);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
throw error;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
178
232
|
}
|
|
179
233
|
exports.Keys = Keys;
|
|
180
234
|
// =================================== UTILES ==========================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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