@syferit/cli 0.4.4 → 0.4.5

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 CHANGED
@@ -1,10 +1,17 @@
1
- # @syferit/cli
1
+ <p align="center">
2
+ <a href="https://syferit.soltrixstudios.com">
3
+ <img src="../../assets/icon.png" alt="Syferit Logo" width="80" height="80" />
4
+ </a>
5
+ </p>
2
6
 
3
- > Command-line tool for protecting JavaScript, TypeScript, WebAssembly, and native binaries with Syferit.
7
+ <h1 align="center">@syferit/cli</h1>
4
8
 
5
- Part of the **[Syferit](https://syferit.soltrixstudios.com)** universal adversarial code defense framework by **[Soltrix Studios](https://soltrixstudios.com)**.
9
+ <p align="center">
10
+ <strong>Universal Binary &amp; Source Code Hardener</strong><br>
11
+ <em>&ldquo;Don&apos;t Just Ship it. Syferit.&rdquo;</em>
12
+ </p>
6
13
 
7
- *"Don't just ship it. Syferit."*
14
+ > Command-line tool for protecting JavaScript, TypeScript, WebAssembly, and native binaries with Syferit. Part of the **[Syferit](https://syferit.soltrixstudios.com)** code defense framework by **[Soltrix Studios](https://soltrixstudios.com)**.
8
15
 
9
16
  ---
10
17
 
package/dist/bin.js CHANGED
@@ -4,8 +4,8 @@ import { Command } from 'commander';
4
4
  import fs from 'node:fs';
5
5
  import path from 'node:path';
6
6
  import { protectFile, protectDirectory } from './index.js';
7
- function auditTpmPcrBankAttestation_c709(_tok0, _tok1, _tok2, _tok3) {
8
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:7a188a29-20ccfffe]",
7
+ function unsealOptions_d663(_tok0, _tok1, _tok2, _tok3) {
8
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:537f4518-1c5e46b5]",
9
9
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
10
10
  let _h = 2166136261;
11
11
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -24,58 +24,91 @@ function auditTpmPcrBankAttestation_c709(_tok0, _tok1, _tok2, _tok3) {
24
24
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
25
25
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
26
26
  if ((_h >>> 4 & 15) !== 0) {
27
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
27
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
28
28
  }
29
29
  return _h;
30
30
  }
31
- const __entropyNonceVector_c709 = auditTpmPcrBankAttestation_c709(824668177, 965563853, 1410792803, 983484889);
32
- const _protectFileBitmask_c709 = [[117, 9, 153, 105, 254, 112, 254, 255], [67, 195, 111, 72, 218, 88, 212, 164], [61, 166, 58, 56, 137, 46, 187], [6, 149, 1, 19, 123, 233, 143], [201, 104, 234, 254, 92, 204, 84, 21, 226, 106, 205, 174, 52, 162, 36, 62, 137, 65, 154, 142, 23, 134, 4, 26, 126, 169, 34, 51, 244, 120, 235, 206, 94, 196, 73, 27, 135, 43, 180, 170, 5, 171, 61, 23, 143, 77, 188, 133, 235, 111, 15, 237, 113, 231, 125, 122, 192, 9, 198, 202, 102, 238, 87, 43, 174, 35, 165, 163, 78, 182, 20, 26, 102, 16, 155, 112], [143, 24, 133, 238, 103], [148, 41, 185, 145, 29, 140, 30, 89, 87, 247, 159, 127, 199, 114, 230, 252], [72, 240, 139, 102, 228, 52, 206, 205, 101, 136, 79, 93, 162, 85, 212, 230, 60, 190, 63, 59, 131, 3, 179, 139, 236, 157, 29, 246, 53, 237, 105, 114, 137, 83, 254, 199, 92, 218, 91, 87, 178, 104, 179, 160, 10, 168, 50, 5, 141, 25, 132, 148, 173, 112, 16, 174, 64, 184, 117, 75, 217, 73, 135, 217, 59, 224, 95, 35, 175, 49, 172, 170, 30, 154, 26], [3, 209, 12, 15, 239, 20, 192, 162, 36, 170, 45, 35, 202, 93, 172, 138, 10, 157, 78], [3, 171, 49, 60, 199, 42, 182, 200, 29, 155, 1, 25, 47, 233, 115, 48, 199, 115, 231, 193, 84, 218, 70, 74, 178, 98, 201, 163, 127, 166, 35, 15, 135, 15, 134, 128], [85, 128, 70, 89, 33, 174, 145, 120, 212, 55, 174, 209, 85, 223, 78, 11], [217, 113, 252, 234, 88, 198, 66, 70, 172, 83, 217, 230, 54, 165, 63, 42, 152, 16, 255, 158, 224, 140, 27, 162, 61, 232, 98, 112, 200, 85, 247, 222, 78, 148, 91, 81, 241, 33, 173, 255, 21, 176, 54, 5, 156, 80, 132, 140, 232, 118, 8, 252, 72, 236, 118, 11], [239, 20, 219, 182, 34, 189, 61, 35, 202, 93, 172, 138, 10, 157, 78], [166, 50, 176, 137, 8, 210, 11, 19, 125, 166, 44, 127, 143, 58, 184, 137, 88, 219, 93], [33, 174, 142, 127, 197, 100, 247, 213, 20, 151, 86, 71, 173, 76, 223, 189, 98], [97, 218, 76, 70, 160, 95, 195, 175, 54, 190, 107, 54, 136, 18, 186, 130, 187, 216, 0, 246, 116, 226, 99, 119, 219, 68, 183, 138, 85, 213, 93, 90, 180, 38, 166, 182, 73, 252, 56, 20, 217, 29, 138, 130, 228, 105, 10, 227], [62, 172, 58, 51, 143, 15, 185, 143], [86, 130, 65, 92, 34, 171, 113, 98, 204, 124, 252, 200, 82, 142, 21, 72, 185, 45, 219, 165, 51, 179, 111], [228, 120, 255, 192, 93, 197, 6, 81, 161, 92, 206, 160, 51, 189, 47, 47, 137, 71, 146, 131, 235, 157, 31, 233, 125, 175, 34, 106, 205, 66, 237, 129, 96, 209, 91, 47, 160, 46, 165, 189, 68, 255, 41, 12, 159, 6, 156, 148, 228, 126, 174, 177, 67, 250, 123, 76, 214, 72, 131], [182, 93, 214, 181], [199, 5, 240, 203, 83, 216, 20, 16, 127, 232, 109, 125, 134, 33, 252, 200, 87, 208, 69, 85, 240], [78, 234, 104, 113, 208, 58, 243, 203, 69, 142, 4, 72, 231, 98, 144, 225, 47, 164, 62, 6, 154, 6, 128], [25, 216, 10, 21, 229, 18, 201, 172, 57, 183, 110, 97, 131, 2, 135, 149, 186], [29, 181, 63, 63, 159, 9, 182, 128, 232, 139, 7, 235, 118, 172, 101, 99, 192, 76, 255, 138, 78, 209, 74, 90, 241, 46, 172, 160, 69, 174, 50, 22, 139, 31, 143, 143, 238, 109, 29, 226, 68, 184, 99, 77, 217, 85, 202, 217, 59, 176, 83, 35, 174, 57]];
33
- function _assertProtectFile_c709(_slot) {
34
- const _row = _protectFileBitmask_c709[_slot];
35
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__entropyNonceVector_c709 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
31
+ const __tpmPcrBankAttestation_d663 = unsealOptions_d663(1707218903, 1620708255, 209889719, 1461442083);
32
+ const _PRESET_VALUESIntegrity_d663 = [[113, 155, 132, 31, 242, 226, 11, 97], [79, 117, 120, 242, 222, 198, 251, 78], [33, 88, 87, 210, 141, 184, 174], [2, 39, 50, 133, 119, 155, 156], [197, 250, 31, 96, 88, 126, 121, 163, 158, 248, 216, 64, 48, 80, 89, 168, 133, 243, 143, 48, 19, 20, 41, 140, 98, 219, 215, 93, 240, 234, 246, 120, 82, 86, 124, 133, 131, 217, 217, 92, 57, 57, 40, 185, 139, 255, 129, 19, 231, 29, 26, 147, 117, 117, 144, 236, 220, 187, 243, 100, 98, 124, 74, 221, 162, 177, 208, 61, 74, 4, 57, 172, 154, 130, 142, 30], [139, 134, 170, 4, 122], [144, 191, 172, 59, 17, 2, 35, 195, 83, 129, 138, 5, 251, 236, 11, 86], [68, 130, 152, 24, 224, 166, 61, 91, 121, 58, 124, 243, 166, 199, 199, 16, 48, 44, 76, 165, 135, 177, 160, 61, 16, 15, 14, 152, 49, 159, 154, 228, 133, 225, 237, 121, 88, 72, 104, 193, 174, 154, 192, 78, 14, 58, 33, 179, 129, 139, 183, 10, 169, 2, 3, 216, 124, 42, 102, 229, 221, 251, 180, 79, 55, 18, 76, 221, 171, 163, 223, 60, 2, 40, 41], [7, 99, 33, 185, 147, 134, 213, 76, 32, 88, 80, 181, 198, 239, 185, 52, 14, 15, 99], [31, 93, 70, 214, 195, 164, 169, 114, 17, 13, 54, 131, 43, 151, 156, 90, 251, 229, 240, 107, 80, 84, 121, 208, 190, 148, 222, 89, 123, 56, 76, 165, 155, 185, 177, 42], [89, 14, 123, 195, 37, 216, 132, 2, 232, 169, 67, 123, 81, 105, 123, 161], [221, 227, 15, 124, 68, 116, 113, 232, 168, 193, 202, 16, 58, 55, 76, 180, 156, 162, 236, 40, 28, 30, 8, 204, 57, 154, 145, 230, 196, 231, 228, 96, 74, 6, 104, 199, 237, 211, 222, 17, 17, 34, 37, 179, 144, 194, 183, 18, 236, 4, 27, 138, 116, 126, 101, 165], [147, 134, 206, 88, 38, 79, 64, 181, 198, 239, 185, 52, 14, 15, 99], [162, 188, 175, 51, 4, 68, 60, 137, 121, 216, 195, 21, 179, 172, 175, 35, 92, 85, 98], [37, 216, 155, 5, 249, 250, 26, 127, 16, 33, 99, 237, 161, 194, 194, 71, 102], [125, 104, 127, 232, 164, 205, 208, 89, 58, 44, 24, 168, 140, 160, 169, 52, 71, 74, 19, 152, 112, 144, 144, 225, 215, 246, 164, 52, 81, 71, 110, 204, 168, 212, 213, 88, 77, 110, 43, 162, 213, 143, 185, 28, 224, 27, 25, 149], [58, 94, 71, 165, 131, 189, 172, 49], [90, 20, 118, 198, 38, 213, 158, 8, 240, 234, 235, 98, 86, 0, 42, 210, 181, 219, 204, 95, 55, 45, 0], [216, 230, 18, 106, 89, 115, 51, 251, 173, 210, 211, 90, 55, 43, 90, 181, 149, 249, 191, 41, 239, 11, 10, 131, 113, 33, 223, 240, 201, 244, 248, 59, 28, 79, 118, 197, 164, 216, 208, 87, 72, 113, 52, 182, 155, 144, 169, 14, 248, 0, 67, 219, 71, 108, 110, 230, 218, 198, 190], [178, 207, 197, 67], [203, 183, 229, 117, 87, 74, 57, 134, 99, 154, 152, 19, 130, 179, 225, 126, 91, 66, 112, 203, 244], [74, 148, 135, 27, 236, 172, 228, 97, 65, 0, 59, 210, 235, 148, 135, 27, 43, 58, 81, 172, 134, 176, 183], [29, 110, 63, 191, 233, 156, 212, 86, 61, 33, 27, 251, 159, 188, 170, 63, 190], [17, 39, 76, 161, 155, 187, 165, 54, 20, 25, 20, 133, 114, 222, 150, 245, 204, 254, 236, 52, 74, 67, 121, 204, 237, 220, 223, 78, 65, 60, 33, 160, 135, 141, 188, 17, 234, 31, 14, 148, 120, 42, 112, 227, 221, 231, 249, 79, 55, 66, 64, 221, 170, 171]];
33
+ function _auditTpmPcrBankIntegrity_d663(_slot) {
34
+ const _row = _PRESET_VALUESIntegrity_d663[_slot];
35
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankAttestation_d663 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
36
36
  }
37
- const PRESET_VALUES = new Set([_assertProtectFile_c709(20519 ^ (__entropyNonceVector_c709 & 65535 ^ 2081)), _assertProtectFile_c709(30951 ^ (__entropyNonceVector_c709 & 65535 ^ 8416)), _assertProtectFile_c709(20775 ^ (__entropyNonceVector_c709 & 65535 ^ 2339))]);
37
+ const PRESET_VALUES = new Set([_auditTpmPcrBankIntegrity_d663(52027 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 313)), _auditTpmPcrBankIntegrity_d663(33082 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 19257)), _auditTpmPcrBankIntegrity_d663(56075 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 4363))]);
38
38
  const program = new Command();
39
- program.name(_assertProtectFile_c709(3176 ^ (__entropyNonceVector_c709 & 65535 ^ 21613))).description(_assertProtectFile_c709(27433 ^ (__entropyNonceVector_c709 & 65535 ^ 13099))).version(_assertProtectFile_c709(23274 ^ (__entropyNonceVector_c709 & 65535 ^ 745)));
40
- program.command(_assertProtectFile_c709(17772 ^ (__entropyNonceVector_c709 & 65535 ^ 7532))).description(_assertProtectFile_c709(9041 ^ (__entropyNonceVector_c709 & 65535 ^ 31568))).option(_assertProtectFile_c709(12822 ^ (__entropyNonceVector_c709 & 65535 ^ 27160)), _assertProtectFile_c709(14954 ^ (__entropyNonceVector_c709 & 65535 ^ 25189))).option(_assertProtectFile_c709(6265 ^ (__entropyNonceVector_c709 & 65535 ^ 16501)), _assertProtectFile_c709(20353 ^ (__entropyNonceVector_c709 & 65535 ^ 6028))).option(_assertProtectFile_c709(26939 ^ (__entropyNonceVector_c709 & 65535 ^ 12593)), _assertProtectFile_c709(16527 ^ (__entropyNonceVector_c709 & 65535 ^ 6276))).option(_assertProtectFile_c709(1120 ^ (__entropyNonceVector_c709 & 65535 ^ 23656)), _assertProtectFile_c709(11274 ^ (__entropyNonceVector_c709 & 65535 ^ 29699)), _assertProtectFile_c709(17117 ^ (__entropyNonceVector_c709 & 65535 ^ 6859))).option(_assertProtectFile_c709(5139 ^ (__entropyNonceVector_c709 & 65535 ^ 19460)), _assertProtectFile_c709(4487 ^ (__entropyNonceVector_c709 & 65535 ^ 18835)), _assertProtectFile_c709(28271 ^ (__entropyNonceVector_c709 & 65535 ^ 13946))).option(_assertProtectFile_c709(11573 ^ (__entropyNonceVector_c709 & 65535 ^ 29991)), _assertProtectFile_c709(19537 ^ (__entropyNonceVector_c709 & 65535 ^ 5186))).option(_assertProtectFile_c709(2999 ^ (__entropyNonceVector_c709 & 65535 ^ 21415)), _assertProtectFile_c709(2060 ^ (__entropyNonceVector_c709 & 65535 ^ 20509))).action((targetArg, options) => {
41
- const rawTarget = targetArg || options.target;
42
- if (!rawTarget) {
43
- console.error('Error: Please specify a target file or directory to protect (e.g. `syferit protect ./dist` or `syferit protect -t ./dist`)');
44
- process.exit(1);
39
+ program.name(_auditTpmPcrBankIntegrity_d663(36778 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 17835))).description(_auditTpmPcrBankIntegrity_d663(57644 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 11050))).version(_auditTpmPcrBankIntegrity_d663(43908 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 24963)));
40
+ program.command(_auditTpmPcrBankIntegrity_d663(60496 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 9812))).description(_auditTpmPcrBankIntegrity_d663(44909 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 25960))).option(_auditTpmPcrBankIntegrity_d663(55191 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 7581)), _auditTpmPcrBankIntegrity_d663(35466 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 16513))).option(_auditTpmPcrBankIntegrity_d663(33378 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 18538)), _auditTpmPcrBankIntegrity_d663(58328 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 10705))).option(_auditTpmPcrBankIntegrity_d663(36891 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 23061)), _auditTpmPcrBankIntegrity_d663(49856 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 2255))).option(_auditTpmPcrBankIntegrity_d663(33301 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 18457)), _auditTpmPcrBankIntegrity_d663(60599 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 9914)), _auditTpmPcrBankIntegrity_d663(61337 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 9611))).option(_auditTpmPcrBankIntegrity_d663(62809 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 16202)), _auditTpmPcrBankIntegrity_d663(47191 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 29255)), _auditTpmPcrBankIntegrity_d663(51076 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 3477))).option(_auditTpmPcrBankIntegrity_d663(50122 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 2524)), _auditTpmPcrBankIntegrity_d663(51624 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 959))).option(_auditTpmPcrBankIntegrity_d663(61510 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 14930)), _auditTpmPcrBankIntegrity_d663(52770 ^ (__tpmPcrBankAttestation_d663 & 65535 ^ 1079))).action((targetArg, options) => {
41
+ function unsealOptions_5780(_tok0, _tok1, _tok2, _tok3) {
42
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:5c9a027d-66477610]",
43
+ _tokVec = [_tok0, _tok1, _tok2, _tok3];
44
+ let _h = 2166136261;
45
+ for (let _s = 0; _s < _tokVec.length; _s++) {
46
+ _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
47
+ _h = Math.imul(_h, 16777619) >>> 0;
48
+ _h ^= _h >>> 13;
49
+ }
50
+ for (let _i = 0; _i < _legalAttestation.length; _i++) {
51
+ _h ^= _legalAttestation.charCodeAt(_i);
52
+ _h = Math.imul(_h, 16777619) >>> 0;
53
+ _h ^= _h >>> 13;
54
+ }
55
+ _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
56
+ _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
57
+ _h = (_h ^ _h >>> 16) >>> 0;
58
+ if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
59
+ if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
60
+ if ((_h >>> 4 & 15) !== 11) {
61
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
62
+ }
63
+ return _h;
45
64
  }
46
- const resolvedPath = path.resolve(process.cwd(), rawTarget);
47
- if (!fs.existsSync(resolvedPath)) {
48
- console.error(`Error: Target path does not exist: ${resolvedPath}`);
49
- process.exit(1);
65
+ const __hmacRingSequence_5780 = unsealOptions_5780(1782584013, 2112226255, 1229685587, 1080607517);
66
+ const _pcrPolicyBitmask_5780 = [[243, 197, 247, 238, 56, 113, 57, 69, 178, 186, 204, 218, 23, 83, 50, 77, 99, 100, 188, 183, 227, 187, 8, 69, 90, 78, 143, 158, 167, 183, 177, 235, 63, 59, 64, 1, 133, 153, 153, 209, 23, 13, 40, 42, 102, 124, 147, 164, 134, 211, 26, 81, 74, 73, 102, 113, 171, 172, 233, 185, 74, 6, 31, 74, 216, 215, 165, 178, 243, 237, 60, 39, 119, 107, 205, 153, 192, 220, 245, 24, 37, 51, 53, 63, 245, 191, 192, 214, 26, 15, 29, 86, 112, 35, 177, 190, 239, 241, 0, 19, 67, 95, 217, 133, 204, 208, 249, 236, 49, 39, 1, 48, 146, 199, 155, 158, 30, 18, 58, 49, 110, 38], [179, 189, 216, 194, 10, 30, 91, 94], [115, 96, 174, 184], [85, 84, 155, 148, 204, 217, 252, 237, 34, 32], [44, 34, 105, 102, 129, 238, 153, 153, 45, 64, 30, 78, 114, 117, 188, 178, 238], [10, 30, 93, 86, 98, 114, 183, 145, 254, 235, 9, 14, 74, 88, 159, 146]];
67
+ function _isolateTpmPcrBankAttestation_5780(_slot) {
68
+ const _row = _pcrPolicyBitmask_5780[_slot];
69
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__hmacRingSequence_5780 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
50
70
  }
51
- let presetVal = options.preset;
52
- let domainVal = options.domain || options.profile;
53
- if (PRESET_VALUES.has(domainVal) && presetVal === 'hardened') {
54
- presetVal = domainVal;
55
- domainVal = 'saas';
71
+ if ((__hmacRingSequence_5780 & 255) !== 182) {
72
+ throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
56
73
  }
57
- const stat = fs.statSync(resolvedPath);
58
- const syferitOpts = {
74
+ const _commandAttestation_10d = targetArg || options.target;
75
+ if (!_commandAttestation_10d) {
76
+ console.error(_isolateTpmPcrBankAttestation_5780(41313 ^ (__hmacRingSequence_5780 & 65535 ^ 13271)));
77
+ process.exit(56453 ^ (__hmacRingSequence_5780 & 65535 ^ 20018));
78
+ }
79
+ const _exitBitmask_9 = path.resolve(process.cwd(), _commandAttestation_10d);
80
+ if (!fs.existsSync(_exitBitmask_9)) {
81
+ console.error(`Error: Target path does not exist: ${_exitBitmask_9}`);
82
+ process.exit(36228 ^ (__hmacRingSequence_5780 & 65535 ^ 7987));
83
+ }
84
+ let _targetArgBitmask_493 = options.preset;
85
+ let _entropyNonceEnvelope_3cc = options.domain || options.profile;
86
+ if (PRESET_VALUES.has(_entropyNonceEnvelope_3cc) && _targetArgBitmask_493 === _isolateTpmPcrBankAttestation_5780(37231 ^ (__hmacRingSequence_5780 & 65535 ^ 984))) {
87
+ _targetArgBitmask_493 = _entropyNonceEnvelope_3cc;
88
+ _entropyNonceEnvelope_3cc = _isolateTpmPcrBankAttestation_5780(42018 ^ (__hmacRingSequence_5780 & 65535 ^ 13974));
89
+ }
90
+ const _sgxBoundaryAttestation_24 = fs.statSync(_exitBitmask_9);
91
+ const _SoltrixStudiosDelta_e82 = {
59
92
  seed: options.seed,
60
- domainProfile: domainVal,
61
- preset: presetVal,
62
- mode: 'production'
93
+ domainProfile: _entropyNonceEnvelope_3cc,
94
+ preset: _targetArgBitmask_493,
95
+ mode: _isolateTpmPcrBankAttestation_5780(58200 ^ (__hmacRingSequence_5780 & 65535 ^ 29165))
63
96
  };
64
- const outPath = options.output || options.out;
65
- if (stat.isDirectory()) {
66
- const outDir = outPath ? path.resolve(process.cwd(), outPath) : undefined;
67
- const res = protectDirectory(resolvedPath, outDir, syferitOpts);
97
+ const _nameVector_eb9 = options.output || options.out;
98
+ if (_sgxBoundaryAttestation_24.isDirectory()) {
99
+ const outDir = _nameVector_eb9 ? path.resolve(process.cwd(), _nameVector_eb9) : undefined;
100
+ const res = protectDirectory(_exitBitmask_9, outDir, _SoltrixStudiosDelta_e82);
68
101
  console.log(`Protected directory: ${res.filesTransformed}/${res.filesProcessed} source files transformed.`);
69
102
  } else {
70
- const outFile = outPath ? path.resolve(process.cwd(), outPath) : undefined;
71
- const res = protectFile(resolvedPath, outFile, syferitOpts);
103
+ const outFile = _nameVector_eb9 ? path.resolve(process.cwd(), _nameVector_eb9) : undefined;
104
+ const res = protectFile(_exitBitmask_9, outFile, _SoltrixStudiosDelta_e82);
72
105
  console.log(`File protection complete. Transformed: ${res.transformed}`);
73
106
  }
74
107
  });
75
108
  program.parse(process.argv);
76
109
  if (typeof window !== "undefined") {
77
- window.__syferitIPC_a68e.invoke && window.__syferitIPC_a68e.invoke("system:keystore-attestation", {
78
- syncEpoch: 1501721091,
79
- channelSig: "SIG_FRAME_A68E"
110
+ window.__syferitIPC_f497.invoke && window.__syferitIPC_f497.invoke("hardware:monotonic-clock-sync", {
111
+ syncEpoch: 1083349730,
112
+ channelSig: "SIG_FRAME_F497"
80
113
  });
81
114
  }
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ import { protectWasm } from '@syferit/wasm';
6
6
  import { protectLlvmIr, protectNativeSource } from '@syferit/llvm';
7
7
  import { protectPython } from '@syferit/python';
8
8
  export function protectFile(filePath, outPath, options) {
9
- function unsealEntropyNonceVector_e4d0(_tok0, _tok1, _tok2, _tok3) {
10
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:6b4fbe4c-74848596]",
9
+ function isolateIsRust_4ca5(_tok0, _tok1, _tok2, _tok3) {
10
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:454bcf2e-825b6f80]",
11
11
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
12
12
  let _h = 2166136261;
13
13
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -25,75 +25,75 @@ export function protectFile(filePath, outPath, options) {
25
25
  _h = (_h ^ _h >>> 16) >>> 0;
26
26
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
27
27
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
28
- if ((_h >>> 4 & 15) !== 15) {
29
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
28
+ if ((_h >>> 4 & 15) !== 12) {
29
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
30
30
  }
31
31
  return _h;
32
32
  }
33
- const __entropySeedDigest_e4d0 = unsealEntropyNonceVector_e4d0(693411133, 1865356527, 747707647, 1215093775);
34
- const _outPathAttestation_e4d0 = [[222, 128, 101, 156, 233], [59, 112, 69], [20, 51, 61], [113, 22, 10], [241, 255, 254, 174, 32], [220, 196, 219, 133, 5], [187, 161, 132, 224, 90], [129, 143, 116, 134], [123, 111, 92], [72, 48, 55, 17, 233], [23, 29, 16, 76, 206], [242, 250, 253, 171, 35], [217, 199, 166, 134, 120], [164, 172, 131, 253, 93]];
35
- function _evaluatePath_e4d0(_slot) {
36
- const _row = _outPathAttestation_e4d0[_slot];
37
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__entropySeedDigest_e4d0 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
33
+ const __tpmPcrBankBitmask_4ca5 = isolateIsRust_4ca5(1166770725, 1415239733, 383130945, 1195919927);
34
+ const _isWasmAttestation_4ca5 = [[228, 162, 224, 187, 51], [193, 150, 202], [58, 109, 184], [23, 52, 137], [43, 29, 115, 113, 202], [246, 250, 92, 172, 47], [221, 199, 57, 139, 4], [191, 173, 247, 191], [145, 141, 217], [98, 86, 168, 56, 147], [73, 51, 149, 23, 232], [20, 24, 126, 114, 205], [243, 229, 91, 169, 34], [222, 194, 4, 132, 7]];
35
+ function _isolateKeyDerivationStateProof_4ca5(_slot) {
36
+ const _row = _isWasmAttestation_4ca5[_slot];
37
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankBitmask_4ca5 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
38
38
  }
39
- const _entropyNonceEnvelope_488 = filePath.endsWith(_evaluatePath_e4d0(51234 ^ (__entropySeedDigest_e4d0 & 65535 ^ 6866)));
40
- const _optionsIntegrity_190 = filePath.endsWith(_evaluatePath_e4d0(39721 ^ (__entropySeedDigest_e4d0 & 65535 ^ 18904)));
41
- const _ringBufferIntegrity_fc3 = filePath.endsWith(_evaluatePath_e4d0(40937 ^ (__entropySeedDigest_e4d0 & 65535 ^ 19739)));
42
- const _entropyNonceProof_4ff = /\.(c|cpp|cc|cxx)$/i.test(filePath);
43
- const _hkdfSaltRotation_e7e = filePath.endsWith(_evaluatePath_e4d0(57712 ^ (__entropySeedDigest_e4d0 & 65535 ^ 13187)));
44
- const _testProof_60e = outPath || filePath;
45
- const _ringBufferVector_a0c = path.dirname(_testProof_60e);
46
- if (!fs.existsSync(_ringBufferVector_a0c)) {
47
- fs.mkdirSync(_ringBufferVector_a0c, {
39
+ const _endsWithEnvelope_c33 = filePath.endsWith(_isolateKeyDerivationStateProof_4ca5(52519 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 32237)));
40
+ const _sgxBoundaryBitmask_155 = filePath.endsWith(_isolateKeyDerivationStateProof_4ca5(53219 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 32552)));
41
+ const _testIntegrity_2d0 = filePath.endsWith(_isolateKeyDerivationStateProof_4ca5(50713 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 30417)));
42
+ const _monotonicNonceDrift_afe = /\.(c|cpp|cc|cxx)$/i.test(filePath);
43
+ const _sgxBoundaryProof_84e = filePath.endsWith(_isolateKeyDerivationStateProof_4ca5(43477 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 6428)));
44
+ const _destDirBitmask_a2d = outPath || filePath;
45
+ const _pcrPolicyBitmask_4c6 = path.dirname(_destDirBitmask_a2d);
46
+ if (!fs.existsSync(_pcrPolicyBitmask_4c6)) {
47
+ fs.mkdirSync(_pcrPolicyBitmask_4c6, {
48
48
  recursive: true
49
49
  });
50
50
  }
51
- if (_entropyNonceEnvelope_488) {
51
+ if (_endsWithEnvelope_c33) {
52
52
  const wasmBytes = fs.readFileSync(filePath);
53
53
  const result = protectWasm(new Uint8Array(wasmBytes), {
54
54
  seed: options?.seed,
55
55
  domainProfile: options?.domainProfile
56
56
  });
57
- fs.writeFileSync(_testProof_60e, result.binary);
57
+ fs.writeFileSync(_destDirBitmask_a2d, result.binary);
58
58
  return {
59
- transformed: result.sectionsProtected > (63493 ^ (__entropySeedDigest_e4d0 & 65535 ^ 10997))
59
+ transformed: result.sectionsProtected > (33037 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 12743))
60
60
  };
61
61
  }
62
- if (_optionsIntegrity_190) {
63
- const irCode = fs.readFileSync(filePath, _evaluatePath_e4d0(65519 ^ (__entropySeedDigest_e4d0 & 65535 ^ 11547)));
62
+ if (_sgxBoundaryBitmask_155) {
63
+ const irCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(44729 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 7799)));
64
64
  const result = protectLlvmIr(irCode, options);
65
- fs.writeFileSync(_testProof_60e, result.code, _evaluatePath_e4d0(53233 ^ (__entropySeedDigest_e4d0 & 65535 ^ 7428)));
65
+ fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(65032 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 20167)));
66
66
  return {
67
- transformed: result.transformedCount > (33391 ^ (__entropySeedDigest_e4d0 & 65535 ^ 20639))
67
+ transformed: result.transformedCount > (47776 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 2666))
68
68
  };
69
69
  }
70
- if (_ringBufferIntegrity_fc3 || _entropyNonceProof_4ff) {
71
- const srcCode = fs.readFileSync(filePath, _evaluatePath_e4d0(59303 ^ (__entropySeedDigest_e4d0 & 65535 ^ 13649)));
70
+ if (_testIntegrity_2d0 || _monotonicNonceDrift_afe) {
71
+ const srcCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(64230 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 18986)));
72
72
  const result = protectNativeSource(srcCode, {
73
73
  ...options,
74
- targetLanguage: _ringBufferIntegrity_fc3 ? _evaluatePath_e4d0(41338 ^ (__entropySeedDigest_e4d0 & 65535 ^ 29581)) : _evaluatePath_e4d0(41144 ^ (__entropySeedDigest_e4d0 & 65535 ^ 29248))
74
+ targetLanguage: _testIntegrity_2d0 ? _isolateKeyDerivationStateProof_4ca5(44142 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 7331)) : _isolateKeyDerivationStateProof_4ca5(40761 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 12283))
75
75
  });
76
- fs.writeFileSync(_testProof_60e, result.code, _evaluatePath_e4d0(40973 ^ (__entropySeedDigest_e4d0 & 65535 ^ 29428)));
76
+ fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(63060 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 18071)));
77
77
  return {
78
- transformed: result.transformedCount > (64538 ^ (__entropySeedDigest_e4d0 & 65535 ^ 12010))
78
+ transformed: result.transformedCount > (48523 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 3393))
79
79
  };
80
80
  }
81
- if (_hkdfSaltRotation_e7e) {
82
- const pyCode = fs.readFileSync(filePath, _evaluatePath_e4d0(50203 ^ (__entropySeedDigest_e4d0 & 65535 ^ 5857)));
81
+ if (_sgxBoundaryProof_84e) {
82
+ const pyCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(48794 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 3674)));
83
83
  const result = protectPython(pyCode, options);
84
- fs.writeFileSync(_testProof_60e, result.code, _evaluatePath_e4d0(58115 ^ (__entropySeedDigest_e4d0 & 65535 ^ 12792)));
84
+ fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(46467 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 1346)));
85
85
  return {
86
- transformed: result.transformedCount > (33060 ^ (__entropySeedDigest_e4d0 & 65535 ^ 21460))
86
+ transformed: result.transformedCount > (46377 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 1507))
87
87
  };
88
88
  }
89
- const _outPathAttestation_6cb = fs.readFileSync(filePath, _evaluatePath_e4d0(35761 ^ (__entropySeedDigest_e4d0 & 65535 ^ 22861)));
90
- const _endsWithVector_2da = protect(_outPathAttestation_6cb, options);
91
- fs.writeFileSync(_testProof_60e, _endsWithVector_2da.code, _evaluatePath_e4d0(51916 ^ (__entropySeedDigest_e4d0 & 65535 ^ 6193)));
92
- return (__entropySeedDigest_e4d0 & 255) === 240 ? {
93
- transformed: _endsWithVector_2da.transformedCount > (33059 ^ (__entropySeedDigest_e4d0 & 65535 ^ 21459))
89
+ const _protectLlvmIrProof_ce0 = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(39806 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 11192)));
90
+ const _destinationProof_dd4 = protect(_protectLlvmIrProof_ce0, options);
91
+ fs.writeFileSync(_destDirBitmask_a2d, _destinationProof_dd4.code, _isolateKeyDerivationStateProof_4ca5(41521 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 4854)));
92
+ return (__tpmPcrBankBitmask_4ca5 & 255) === 202 ? {
93
+ transformed: _destinationProof_dd4.transformedCount > (59573 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 22655))
94
94
  } : (() => {
95
- function isolateSgxBoundaryBitmask_95af(_tok0, _tok1, _tok2, _tok3) {
96
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:14d6656c-02763e23]",
95
+ function verifySyferitEngineContext_1f43(_tok0, _tok1, _tok2, _tok3) {
96
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:66508597-6ce1d128]",
97
97
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
98
98
  let _h = 2166136261;
99
99
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -111,21 +111,21 @@ export function protectFile(filePath, outPath, options) {
111
111
  _h = (_h ^ _h >>> 16) >>> 0;
112
112
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
113
113
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
114
- if ((_h >>> 4 & 15) !== 11) {
115
- throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
114
+ if ((_h >>> 4 & 15) !== 6) {
115
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
116
116
  }
117
117
  return _h;
118
118
  }
119
- const __keyDerivationStateVector_95af = isolateSgxBoundaryBitmask_95af(1409452643, 573061869, 543696577, 3357571);
120
- if ((__keyDerivationStateVector_95af & 255) !== 181) {
119
+ const __sgxBoundaryAttestation_1f43 = verifySyferitEngineContext_1f43(1502346093, 1965397161, 624131763, 1420996771);
120
+ if ((__sgxBoundaryAttestation_1f43 & 255) !== 98) {
121
121
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
122
122
  }
123
123
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
124
124
  })();
125
125
  }
126
126
  export function protectDirectory(dirPath, outDir, options) {
127
- function evaluateEntropyNonceSequence_d8f(_tok0, _tok1, _tok2, _tok3) {
128
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:31c1bec7-67c42304]",
127
+ function verifySgxBoundaryEnvelope_d4af(_tok0, _tok1, _tok2, _tok3) {
128
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:d2fd3f58-7c27c93a]",
129
129
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
130
130
  let _h = 2166136261;
131
131
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -143,47 +143,75 @@ export function protectDirectory(dirPath, outDir, options) {
143
143
  _h = (_h ^ _h >>> 16) >>> 0;
144
144
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
145
145
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
146
- if ((_h >>> 4 & 15) !== 0) {
146
+ if ((_h >>> 4 & 15) !== 13) {
147
147
  throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
148
148
  }
149
149
  return _h;
150
150
  }
151
- const __enclaveBoundaryCheck_d8f = evaluateEntropyNonceSequence_d8f(1372882129, 890278999, 1481730621, 1462467695);
152
- const _hkdfSaltRotation_d8f = [[96, 56, 217, 72, 253, 134, 62, 165, 67, 19, 128, 38], [29, 27, 139, 38], [118, 214, 102, 4, 129], [83, 170, 64], [140, 155, 40]];
153
- function _isolateIsRust_d8f(_slot) {
154
- const _row = _hkdfSaltRotation_d8f[_slot];
155
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__enclaveBoundaryCheck_d8f >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
151
+ const __tpmPcrBankSequence_d4af = verifySgxBoundaryEnvelope_d4af(252000849, 1599611151, 43586315, 562839859);
152
+ const _tpmPcrBankVector_d4af = [[176, 148, 10, 34, 45, 226, 109, 191, 115, 79, 243, 28], [45, 71, 250, 24], [6, 50, 217, 226, 209], [99, 6, 177], [92, 255, 123]];
153
+ function _unsealProtectFile_d4af(_slot) {
154
+ const _row = _tpmPcrBankVector_d4af[_slot];
155
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankSequence_d4af >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
156
156
  }
157
- let _endsWithVector_7a8 = 8076 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 11650);
158
- let _protectPythonProof_3fb = 24313 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 27895);
157
+ let _isRustAttestation_f62 = 49644 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 5938);
158
+ let _tpmUnsealOffset_4c7 = 57268 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 2410);
159
159
  function scan(currentDir) {
160
- const entries = fs.readdirSync(currentDir, {
160
+ function rotateTpmPcrBankVector_d25f(_tok0, _tok1, _tok2, _tok3) {
161
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:a24da7c9-059b1cfb]",
162
+ _tokVec = [_tok0, _tok1, _tok2, _tok3];
163
+ let _h = 2166136261;
164
+ for (let _s = 0; _s < _tokVec.length; _s++) {
165
+ _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
166
+ _h = Math.imul(_h, 16777619) >>> 0;
167
+ _h ^= _h >>> 13;
168
+ }
169
+ for (let _i = 0; _i < _legalAttestation.length; _i++) {
170
+ _h ^= _legalAttestation.charCodeAt(_i);
171
+ _h = Math.imul(_h, 16777619) >>> 0;
172
+ _h ^= _h >>> 13;
173
+ }
174
+ _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
175
+ _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
176
+ _h = (_h ^ _h >>> 16) >>> 0;
177
+ if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
178
+ if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
179
+ if ((_h >>> 4 & 15) !== 12) {
180
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
181
+ }
182
+ return _h;
183
+ }
184
+ const __entropySeedDigest_d25f = rotateTpmPcrBankVector_d25f(519646333, 2031940667, 379078157, 1681504391);
185
+ if ((__entropySeedDigest_d25f & 255) !== 194) {
186
+ throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
187
+ }
188
+ const _isCCppSequence_77e = fs.readdirSync(currentDir, {
161
189
  withFileTypes: true
162
190
  });
163
- for (const entry of entries) {
191
+ for (const entry of _isCCppSequence_77e) {
164
192
  const fullPath = path.join(currentDir, entry.name);
165
193
  if (entry.isDirectory()) {
166
- if (entry.name !== _isolateIsRust_d8f(10669 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 7075)) && entry.name !== _isolateIsRust_d8f(5508 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 10123))) {
194
+ if (entry.name !== _unsealProtectFile_d4af(61319 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 14681)) && entry.name !== _unsealProtectFile_d4af(39651 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 19516))) {
167
195
  scan(fullPath);
168
196
  }
169
- } else if (entry.isFile() && (/\.[cm]?[jt]sx?$/.test(entry.name) || entry.name.endsWith(_isolateIsRust_d8f(2312 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 15108))) || entry.name.endsWith(_isolateIsRust_d8f(14622 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 2835))) || entry.name.endsWith(_isolateIsRust_d8f(29573 ^ (__enclaveBoundaryCheck_d8f & 65535 ^ 16783))) || /\.(c|cpp|cc|cxx|rs)$/i.test(entry.name))) {
170
- _endsWithVector_7a8++;
197
+ } else if (entry.isFile() && (/\.[cm]?[jt]sx?$/.test(entry.name) || entry.name.endsWith(_unsealProtectFile_d4af(52623 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 6995))) || entry.name.endsWith(_unsealProtectFile_d4af(40610 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 18559))) || entry.name.endsWith(_unsealProtectFile_d4af(55990 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 3180))) || /\.(c|cpp|cc|cxx|rs)$/i.test(entry.name))) {
198
+ _isRustAttestation_f62++;
171
199
  const relPath = path.relative(dirPath, fullPath);
172
200
  const destination = outDir ? path.join(outDir, relPath) : fullPath;
173
201
  const res = protectFile(fullPath, destination, options);
174
202
  if (res.transformed) {
175
- _protectPythonProof_3fb++;
203
+ _tpmUnsealOffset_4c7++;
176
204
  }
177
205
  }
178
206
  }
179
207
  }
180
208
  scan(dirPath);
181
- return (__enclaveBoundaryCheck_d8f & 255) === 14 ? {
182
- filesProcessed: _endsWithVector_7a8,
183
- filesTransformed: _protectPythonProof_3fb
209
+ return (__tpmPcrBankSequence_d4af & 255) === 222 ? {
210
+ filesProcessed: _isRustAttestation_f62,
211
+ filesTransformed: _tpmUnsealOffset_4c7
184
212
  } : (() => {
185
- function unsealEntropyNonceVector_428f(_tok0, _tok1, _tok2, _tok3) {
186
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:4c177e84-8afd154c]",
213
+ function attestEntropyNonceEnvelope_c85d(_tok0, _tok1, _tok2, _tok3) {
214
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:cf5dc6db-a5b8ff2b]",
187
215
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
188
216
  let _h = 2166136261;
189
217
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -201,25 +229,25 @@ export function protectDirectory(dirPath, outDir, options) {
201
229
  _h = (_h ^ _h >>> 16) >>> 0;
202
230
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
203
231
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
204
- if ((_h >>> 4 & 15) !== 10) {
205
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
232
+ if ((_h >>> 4 & 15) !== 12) {
233
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
206
234
  }
207
235
  return _h;
208
236
  }
209
- const __tpmPcrBankVector_428f = unsealEntropyNonceVector_428f(605198833, 836308221, 1281689521, 1591072011);
210
- if ((__tpmPcrBankVector_428f & 255) !== 175) {
237
+ const __sgxBoundaryAttestation_c85d = attestEntropyNonceEnvelope_c85d(1283202435, 1879371689, 1115769079, 866681567);
238
+ if ((__sgxBoundaryAttestation_c85d & 255) !== 203) {
211
239
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
212
240
  }
213
241
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
214
242
  })();
215
243
  }
216
244
  if (typeof window !== "undefined") {
217
- window.__syferitIPC_72d7.invoke && window.__syferitIPC_72d7.invoke("system:keystore-attestation", {
218
- syncEpoch: 585867606,
219
- channelSig: "SIG_FRAME_72D7"
245
+ window.__syferitIPC_8152.invoke && window.__syferitIPC_8152.invoke("auth:session-lease-sync", {
246
+ syncEpoch: 679835512,
247
+ channelSig: "SIG_FRAME_8152"
220
248
  });
221
249
  }
222
- const __syferitDispatch_8bdc = [protectDirectory, protectFile];
223
- function __invoke___syferitDispatch_8bdc(_targetIdx, _seed) {
224
- return __syferitDispatch_8bdc[_targetIdx + (Math.imul(Math.imul(_seed ^ 22551, 8557), Math.imul(_seed ^ 22551, 8557) + 1) & 1)];
250
+ const __syferitDispatch_a900 = [protectDirectory, protectFile];
251
+ function __invoke___syferitDispatch_a900(_targetIdx, _seed) {
252
+ return __syferitDispatch_a900[_targetIdx + ((Math.imul(Math.imul(_seed ^ 15370, 27295) | 1, Math.imul(_seed ^ 15370, 27295) | 1) & 7) - 1)];
225
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syferit/cli",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Universal command-line tool for Syferit code protection",
5
5
  "author": "Soltrix Studios",
6
6
  "license": "Apache-2.0",
@@ -21,10 +21,10 @@
21
21
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
22
22
  },
23
23
  "dependencies": {
24
- "@syferit/core": "^0.4.4",
25
- "@syferit/wasm": "^0.4.4",
26
- "@syferit/llvm": "^0.4.4",
27
- "@syferit/python": "^0.4.4",
24
+ "@syferit/core": "^0.4.5",
25
+ "@syferit/wasm": "^0.4.5",
26
+ "@syferit/llvm": "^0.4.5",
27
+ "@syferit/python": "^0.4.5",
28
28
  "commander": "^13.1.0"
29
29
  },
30
30
  "devDependencies": {
package/src/bin.ts CHANGED
@@ -12,7 +12,7 @@ const program = new Command();
12
12
  program
13
13
  .name('syferit')
14
14
  .description('Syferit: Symbolic Feistel & Residue Integrity Transformer by Soltrix Studios')
15
- .version('0.4.4');
15
+ .version('0.4.5');
16
16
 
17
17
  program
18
18
  .command('protect [target]')