@syferit/cli 0.4.5 → 0.4.6

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
@@ -51,8 +51,8 @@ syferit protect ./dist/app.js --preset maximum
51
51
  | `-d, --domain <domain>` | Domain dictionary profile: `saas`, `fintech`, `security`, `gaming` | `'saas'` |
52
52
  | `-p, --profile <profile>` | Alias for `-d, --domain` (smart auto-routes if preset name given) | `'saas'` |
53
53
  | `-s, --seed <seed>` | Deterministic seed for reproducible polymorphism | *(Auto-generated UUIDv4)* |
54
- | `-v, --version` | Output the current Syferit version | — |
55
- | `-h, --help` | Display CLI help and flag usage | — |
54
+ | `-v, --version` | Output the current Syferit version | N/A |
55
+ | `-h, --help` | Display CLI help and flag usage | N/A |
56
56
 
57
57
  > [!TIP]
58
58
  > **Smart Collision Avoidance:** If you pass `-p standard` or `-p maximum` (thinking `-p` was preset), Syferit automatically detects the preset value and routes it to `--preset` without error.
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 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]",
7
+ function assertRingBufferIntegrity_fd97(_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:f3239365-d245cc9d]",
9
9
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
10
10
  let _h = 2166136261;
11
11
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -23,92 +23,59 @@ function unsealOptions_d663(_tok0, _tok1, _tok2, _tok3) {
23
23
  _h = (_h ^ _h >>> 16) >>> 0;
24
24
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
25
25
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
26
- if ((_h >>> 4 & 15) !== 0) {
27
- throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
26
+ if ((_h >>> 4 & 15) !== 2) {
27
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
28
28
  }
29
29
  return _h;
30
30
  }
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));
31
+ const __keyDerivationStateIntegrity_fd97 = assertRingBufferIntegrity_fd97(422519099, 1671097669, 356768137, 373134081);
32
+ const _targetArgAttestation_fd97 = [[84, 42, 6, 175, 223, 147, 137, 49], [36, 226, 254, 130, 133, 121, 69, 30], [28, 201, 201, 98, 104, 73, 40], [229, 180, 176, 85, 88, 8, 30], [232, 139, 157, 48, 61, 239, 251, 211, 195, 73, 90, 16, 21, 193, 219, 120, 104, 98, 13, 192, 246, 165, 171, 92, 95, 74, 85, 237, 149, 155, 116, 8, 63, 231, 254, 213, 166, 72, 91, 236, 228, 200, 170, 105, 110, 110, 3, 195, 202, 140, 152, 35, 80, 4, 18, 188, 161, 42, 113, 20, 71, 205, 200, 109, 143, 64, 82, 237, 175, 149, 187, 92, 71, 51, 12, 206], [208, 57, 20, 84, 65], [117, 78, 42, 235, 252, 179, 173, 19, 118, 16, 12, 181, 166, 157, 117, 6], [107, 17, 26, 168, 199, 213, 191, 11, 6, 169, 254, 131, 129, 116, 69, 160, 31, 223, 206, 117, 96, 34, 34, 205, 207, 188, 140, 72, 22, 12, 24, 180, 234, 114, 111, 9, 63, 251, 234, 145, 145, 9, 66, 254, 233, 201, 163, 67, 110, 56, 53, 218, 142, 145, 129, 104, 35, 89, 228, 181, 186, 104, 54, 31, 24, 129, 206, 109, 140, 80, 93, 236, 253, 187, 171], [98, 242, 163, 201, 206, 55, 87, 28, 5, 201, 210, 101, 43, 126, 59, 196, 235, 190, 225], [36, 202, 192, 102, 40, 75, 39, 130, 250, 186, 176, 83, 16, 8, 2, 234, 160, 146, 118, 59, 59, 251, 247, 128, 149, 3, 88, 233, 160, 199, 178, 117, 96, 46, 55, 218], [180, 191, 245, 19, 0, 73, 2, 178, 181, 216, 61, 43, 52, 248, 253, 209], [250, 144, 141, 44, 59, 231, 243, 152, 143, 114, 72, 160, 21, 196, 206, 100, 123, 49, 110, 216, 195, 173, 138, 28, 30, 9, 19, 182, 171, 116, 102, 16, 45, 181, 234, 151, 210, 64, 92, 161, 246, 209, 167, 67, 127, 113, 53, 194, 203, 151, 153, 58, 43, 13, 231, 245], [206, 55, 76, 8, 3, 222, 194, 101, 43, 126, 59, 196, 235, 190, 225], [73, 83, 33, 195, 239, 243, 186, 89, 66, 71, 93, 165, 232, 219, 41, 115, 55, 250, 236], [0, 73, 29, 181, 164, 139, 100, 47, 117, 176, 229, 157, 140, 83, 76, 247, 67], [2, 251, 253, 152, 131, 126, 82, 233, 21, 223, 154, 120, 107, 51, 43, 196, 152, 249, 145, 72, 87, 3, 18, 177, 184, 101, 38, 68, 54, 244, 236, 156, 151, 71, 87, 232, 170, 157, 169, 82, 58, 60, 59, 204, 199, 136, 155, 37], [31, 207, 197, 117, 110, 44, 46, 193], [177, 163, 240, 22, 29, 74, 0, 184, 171, 157, 109, 50, 61, 175, 164, 130, 158, 76, 74, 239, 236, 210, 254], [133, 151, 108, 58, 60, 226, 181, 139, 128, 67, 93, 234, 18, 218, 220, 101, 104, 104, 33, 217, 202, 186, 140, 83, 92, 80, 81, 160, 172, 101, 126, 75, 65, 254, 200, 149, 129, 73, 86, 231, 165, 224, 186, 70, 126, 33, 47, 222, 197, 145, 221, 107, 34, 29, 232, 182, 183, 119, 48], [149, 124, 71, 243], [38, 38, 103, 133, 178, 251, 187, 86, 94, 11, 26, 163, 231, 194, 99, 14, 54, 243, 242, 155, 209], [113, 11, 25, 171, 183, 219, 98, 49, 42, 175, 181, 130, 192, 3, 1, 171, 240, 197, 175, 124, 125, 39, 49], [120, 255, 185, 207, 196, 13, 90, 230, 24, 208, 157, 43, 98, 45, 52, 207, 155], [62, 212, 206, 113, 124, 40, 39, 198, 203, 170, 150, 85, 85, 77, 20, 165, 163, 109, 110, 68, 45, 240, 251, 156, 210, 79, 93, 254, 166, 207, 163, 80, 104, 62, 62, 193, 205, 140, 140, 36, 39, 89, 242, 179, 186, 116, 123, 31, 24, 209, 194, 109, 141, 88]];
33
+ function _isolateSgxBoundaryEnvelope_fd97(_slot) {
34
+ const _row = _targetArgAttestation_fd97[_slot];
35
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__keyDerivationStateIntegrity_fd97 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
36
36
  }
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))]);
37
+ const PRESET_VALUES = new Set([_isolateSgxBoundaryEnvelope_fd97(8304 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 6487)), _isolateSgxBoundaryEnvelope_fd97(6277 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 8611)), _isolateSgxBoundaryEnvelope_fd97(24061 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 25816))]);
38
38
  const program = new Command();
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;
39
+ program.name(_isolateSgxBoundaryEnvelope_fd97(29632 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 19172))).description(_isolateSgxBoundaryEnvelope_fd97(13576 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 3115))).version(_isolateSgxBoundaryEnvelope_fd97(31700 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 17142)));
40
+ program.command(_isolateSgxBoundaryEnvelope_fd97(22184 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 28553))).description(_isolateSgxBoundaryEnvelope_fd97(8339 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 6579))).option(_isolateSgxBoundaryEnvelope_fd97(21879 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 27736)), _isolateSgxBoundaryEnvelope_fd97(3475 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 13501))).option(_isolateSgxBoundaryEnvelope_fd97(25110 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 23355)), _isolateSgxBoundaryEnvelope_fd97(24885 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 22553))).option(_isolateSgxBoundaryEnvelope_fd97(14351 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 292)), _isolateSgxBoundaryEnvelope_fd97(868 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 14926))).option(_isolateSgxBoundaryEnvelope_fd97(24147 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 26490)), _isolateSgxBoundaryEnvelope_fd97(538 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 15154)), _isolateSgxBoundaryEnvelope_fd97(31669 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 17026))).option(_isolateSgxBoundaryEnvelope_fd97(11076 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 4722)), _isolateSgxBoundaryEnvelope_fd97(20327 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 30290)), _isolateSgxBoundaryEnvelope_fd97(1520 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 15556))).option(_isolateSgxBoundaryEnvelope_fd97(21362 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 27201)), _isolateSgxBoundaryEnvelope_fd97(9259 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 7449))).option(_isolateSgxBoundaryEnvelope_fd97(16702 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 30735)), _isolateSgxBoundaryEnvelope_fd97(17395 ^ (__keyDerivationStateIntegrity_fd97 & 65535 ^ 31427))).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);
64
45
  }
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));
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);
70
50
  }
71
- if ((__hmacRingSequence_5780 & 255) !== 182) {
72
- throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
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';
73
56
  }
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 = {
57
+ const stat = fs.statSync(resolvedPath);
58
+ const syferitOpts = {
92
59
  seed: options.seed,
93
- domainProfile: _entropyNonceEnvelope_3cc,
94
- preset: _targetArgBitmask_493,
95
- mode: _isolateTpmPcrBankAttestation_5780(58200 ^ (__hmacRingSequence_5780 & 65535 ^ 29165))
60
+ domainProfile: domainVal,
61
+ preset: presetVal,
62
+ mode: 'production'
96
63
  };
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);
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);
101
68
  console.log(`Protected directory: ${res.filesTransformed}/${res.filesProcessed} source files transformed.`);
102
69
  } else {
103
- const outFile = _nameVector_eb9 ? path.resolve(process.cwd(), _nameVector_eb9) : undefined;
104
- const res = protectFile(_exitBitmask_9, outFile, _SoltrixStudiosDelta_e82);
70
+ const outFile = outPath ? path.resolve(process.cwd(), outPath) : undefined;
71
+ const res = protectFile(resolvedPath, outFile, syferitOpts);
105
72
  console.log(`File protection complete. Transformed: ${res.transformed}`);
106
73
  }
107
74
  });
108
75
  program.parse(process.argv);
109
76
  if (typeof window !== "undefined") {
110
- window.__syferitIPC_f497.invoke && window.__syferitIPC_f497.invoke("hardware:monotonic-clock-sync", {
111
- syncEpoch: 1083349730,
112
- channelSig: "SIG_FRAME_F497"
77
+ window.__syferitIPC_fa4b && window.__syferitIPC_fa4b.invoke && window.__syferitIPC_fa4b.invoke("crypto:tpm-enclave-verify", {
78
+ syncEpoch: 1308161214,
79
+ channelSig: "SIG_FRAME_FA4B"
113
80
  });
114
81
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
1
+ // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
2
  import type { SyferitOptions } from '@syferit/core';
3
3
  export interface CliProtectOptions extends SyferitOptions {
4
4
  out?: string;
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 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]",
9
+ function auditPath_1ecf(_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:4d41196d-6c5a2f2a]",
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) !== 12) {
28
+ if ((_h >>> 4 & 15) !== 9) {
29
29
  throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
30
30
  }
31
31
  return _h;
32
32
  }
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));
33
+ const __ringBufferBitmask_1ecf = auditPath_1ecf(445681529, 972206971, 514079737, 573858603);
34
+ const _protectPythonEnvelope_1ecf = [[183, 70, 193, 64, 64], [144, 58, 169], [205, 9, 153], [38, 208, 118], [88, 177, 82, 234, 249], [39, 158, 63, 193, 222], [2, 123, 24, 60, 51], [238, 65, 208, 66], [162, 41, 184], [147, 10, 139, 173, 66], [126, 215, 116, 136, 167], [69, 188, 81, 231, 252], [32, 153, 58, 194, 209], [15, 102, 231, 57, 54]];
35
+ function _attestProtectFile_1ecf(_slot) {
36
+ const _row = _protectPythonEnvelope_1ecf[_slot];
37
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferBitmask_1ecf >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
38
38
  }
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, {
39
+ const _ringBufferEnvelope_bef = filePath.endsWith(_attestProtectFile_1ecf(25174 ^ (__ringBufferBitmask_1ecf & 65535 ^ 28367)));
40
+ const _protectFileEnvelope_4ba = filePath.endsWith(_attestProtectFile_1ecf(19563 ^ (__ringBufferBitmask_1ecf & 65535 ^ 16627)));
41
+ const _sgxBoundaryProof_7a9 = filePath.endsWith(_attestProtectFile_1ecf(12939 ^ (__ringBufferBitmask_1ecf & 65535 ^ 15888)));
42
+ const _protectVector_b51 = /\.(c|cpp|cc|cxx)$/i.test(filePath);
43
+ const _hmacFrameProof_79b = filePath.endsWith(_attestProtectFile_1ecf(17074 ^ (__ringBufferBitmask_1ecf & 65535 ^ 20008)));
44
+ const _monotonicNonceDrift_cc9 = outPath || filePath;
45
+ const _dirnameAttestation_a50 = path.dirname(_monotonicNonceDrift_cc9);
46
+ if (!fs.existsSync(_dirnameAttestation_a50)) {
47
+ fs.mkdirSync(_dirnameAttestation_a50, {
48
48
  recursive: true
49
49
  });
50
50
  }
51
- if (_endsWithEnvelope_c33) {
51
+ if (_ringBufferEnvelope_bef) {
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(_destDirBitmask_a2d, result.binary);
57
+ fs.writeFileSync(_monotonicNonceDrift_cc9, result.binary);
58
58
  return {
59
- transformed: result.sectionsProtected > (33037 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 12743))
59
+ transformed: result.sectionsProtected > (13799 ^ (__ringBufferBitmask_1ecf & 65535 ^ 14718))
60
60
  };
61
61
  }
62
- if (_sgxBoundaryBitmask_155) {
63
- const irCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(44729 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 7799)));
62
+ if (_protectFileEnvelope_4ba) {
63
+ const irCode = fs.readFileSync(filePath, _attestProtectFile_1ecf(21387 ^ (__ringBufferBitmask_1ecf & 65535 ^ 24342)));
64
64
  const result = protectLlvmIr(irCode, options);
65
- fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(65032 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 20167)));
65
+ fs.writeFileSync(_monotonicNonceDrift_cc9, result.code, _attestProtectFile_1ecf(32723 ^ (__ringBufferBitmask_1ecf & 65535 ^ 29519)));
66
66
  return {
67
- transformed: result.transformedCount > (47776 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 2666))
67
+ transformed: result.transformedCount > (26287 ^ (__ringBufferBitmask_1ecf & 65535 ^ 27190))
68
68
  };
69
69
  }
70
- if (_testIntegrity_2d0 || _monotonicNonceDrift_afe) {
71
- const srcCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(64230 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 18986)));
70
+ if (_sgxBoundaryProof_7a9 || _protectVector_b51) {
71
+ const srcCode = fs.readFileSync(filePath, _attestProtectFile_1ecf(25964 ^ (__ringBufferBitmask_1ecf & 65535 ^ 27123)));
72
72
  const result = protectNativeSource(srcCode, {
73
73
  ...options,
74
- targetLanguage: _testIntegrity_2d0 ? _isolateKeyDerivationStateProof_4ca5(44142 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 7331)) : _isolateKeyDerivationStateProof_4ca5(40761 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 12283))
74
+ targetLanguage: _sgxBoundaryProof_7a9 ? _attestProtectFile_1ecf(25677 ^ (__ringBufferBitmask_1ecf & 65535 ^ 26835)) : _attestProtectFile_1ecf(17048 ^ (__ringBufferBitmask_1ecf & 65535 ^ 19977))
75
75
  });
76
- fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(63060 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 18071)));
76
+ fs.writeFileSync(_monotonicNonceDrift_cc9, result.code, _attestProtectFile_1ecf(23015 ^ (__ringBufferBitmask_1ecf & 65535 ^ 21879)));
77
77
  return {
78
- transformed: result.transformedCount > (48523 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 3393))
78
+ transformed: result.transformedCount > (9947 ^ (__ringBufferBitmask_1ecf & 65535 ^ 10818))
79
79
  };
80
80
  }
81
- if (_sgxBoundaryProof_84e) {
82
- const pyCode = fs.readFileSync(filePath, _isolateKeyDerivationStateProof_4ca5(48794 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 3674)));
81
+ if (_hmacFrameProof_79b) {
82
+ const pyCode = fs.readFileSync(filePath, _attestProtectFile_1ecf(6434 ^ (__ringBufferBitmask_1ecf & 65535 ^ 5553)));
83
83
  const result = protectPython(pyCode, options);
84
- fs.writeFileSync(_destDirBitmask_a2d, result.code, _isolateKeyDerivationStateProof_4ca5(46467 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 1346)));
84
+ fs.writeFileSync(_monotonicNonceDrift_cc9, result.code, _attestProtectFile_1ecf(16311 ^ (__ringBufferBitmask_1ecf & 65535 ^ 13093)));
85
85
  return {
86
- transformed: result.transformedCount > (46377 ^ (__tpmPcrBankBitmask_4ca5 & 65535 ^ 1507))
86
+ transformed: result.transformedCount > (20169 ^ (__ringBufferBitmask_1ecf & 65535 ^ 16976))
87
87
  };
88
88
  }
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))
89
+ const _isRustVector_8f1 = fs.readFileSync(filePath, _attestProtectFile_1ecf(30581 ^ (__ringBufferBitmask_1ecf & 65535 ^ 31712)));
90
+ const _keyDerivationStateEnvelope_b25 = protect(_isRustVector_8f1, options);
91
+ fs.writeFileSync(_monotonicNonceDrift_cc9, _keyDerivationStateEnvelope_b25.code, _attestProtectFile_1ecf(32538 ^ (__ringBufferBitmask_1ecf & 65535 ^ 29582)));
92
+ return (__ringBufferBitmask_1ecf & 255) === 153 ? {
93
+ transformed: _keyDerivationStateEnvelope_b25.transformedCount > (9407 ^ (__ringBufferBitmask_1ecf & 65535 ^ 10278))
94
94
  } : (() => {
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]",
95
+ function evaluateRingBufferEnvelope_711b(_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:600d4cbf-1da06054]",
97
97
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
98
98
  let _h = 2166136261;
99
99
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -111,54 +111,24 @@ 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) !== 6) {
115
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
114
+ if ((_h >>> 4 & 15) !== 1) {
115
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
116
116
  }
117
117
  return _h;
118
118
  }
119
- const __sgxBoundaryAttestation_1f43 = verifySyferitEngineContext_1f43(1502346093, 1965397161, 624131763, 1420996771);
120
- if ((__sgxBoundaryAttestation_1f43 & 255) !== 98) {
119
+ const __hmacRingSequence_711b = evaluateRingBufferEnvelope_711b(1569782453, 2001169493, 1331047931, 1319672585);
120
+ if ((__hmacRingSequence_711b & 255) !== 21) {
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 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
- _tokVec = [_tok0, _tok1, _tok2, _tok3];
130
- let _h = 2166136261;
131
- for (let _s = 0; _s < _tokVec.length; _s++) {
132
- _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
133
- _h = Math.imul(_h, 16777619) >>> 0;
134
- _h ^= _h >>> 13;
135
- }
136
- for (let _i = 0; _i < _legalAttestation.length; _i++) {
137
- _h ^= _legalAttestation.charCodeAt(_i);
138
- _h = Math.imul(_h, 16777619) >>> 0;
139
- _h ^= _h >>> 13;
140
- }
141
- _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
142
- _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
143
- _h = (_h ^ _h >>> 16) >>> 0;
144
- if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
145
- if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
146
- if ((_h >>> 4 & 15) !== 13) {
147
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
148
- }
149
- return _h;
150
- }
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
- }
157
- let _isRustAttestation_f62 = 49644 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 5938);
158
- let _tpmUnsealOffset_4c7 = 57268 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 2410);
127
+ let filesProcessed = 0;
128
+ let filesTransformed = 0;
159
129
  function scan(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]",
130
+ function verifyHmacFrameEnvelope_608c(_tok0, _tok1, _tok2, _tok3) {
131
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:7bf0c50e-e775252e]",
162
132
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
163
133
  let _h = 2166136261;
164
134
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -176,78 +146,53 @@ export function protectDirectory(dirPath, outDir, options) {
176
146
  _h = (_h ^ _h >>> 16) >>> 0;
177
147
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
178
148
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
179
- if ((_h >>> 4 & 15) !== 12) {
149
+ if ((_h >>> 4 & 15) !== 5) {
180
150
  throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
181
151
  }
182
152
  return _h;
183
153
  }
184
- const __entropySeedDigest_d25f = rotateTpmPcrBankVector_d25f(519646333, 2031940667, 379078157, 1681504391);
185
- if ((__entropySeedDigest_d25f & 255) !== 194) {
154
+ const __entropyNonceSequence_608c = verifyHmacFrameEnvelope_608c(1054595365, 769471615, 448084637, 292043417);
155
+ const _endsWithIntegrity_608c = [[53, 155, 141, 184, 176, 229, 18, 21, 246, 112, 116, 118], [174, 126, 103, 118], [139, 73, 82, 84, 84], [228, 15, 52], [193, 248, 4]];
156
+ function _evaluateEnclaveDigest_608c(_slot) {
157
+ const _row = _endsWithIntegrity_608c[_slot];
158
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__entropyNonceSequence_608c >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
159
+ }
160
+ if ((__entropyNonceSequence_608c & 255) !== 91) {
186
161
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
187
162
  }
188
- const _isCCppSequence_77e = fs.readdirSync(currentDir, {
163
+ const _hmacFrameEnvelope_bc9 = fs.readdirSync(currentDir, {
189
164
  withFileTypes: true
190
165
  });
191
- for (const entry of _isCCppSequence_77e) {
166
+ for (const entry of _hmacFrameEnvelope_bc9) {
192
167
  const fullPath = path.join(currentDir, entry.name);
193
168
  if (entry.isDirectory()) {
194
- if (entry.name !== _unsealProtectFile_d4af(61319 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 14681)) && entry.name !== _unsealProtectFile_d4af(39651 ^ (__tpmPcrBankSequence_d4af & 65535 ^ 19516))) {
169
+ if (entry.name !== _evaluateEnclaveDigest_608c(62611 ^ (__entropyNonceSequence_608c & 65535 ^ 15304)) && entry.name !== _evaluateEnclaveDigest_608c(45866 ^ (__entropyNonceSequence_608c & 65535 ^ 31856))) {
195
170
  scan(fullPath);
196
171
  }
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++;
172
+ } else if (entry.isFile() && (/\.[cm]?[jt]sx?$/.test(entry.name) || entry.name.endsWith(_evaluateEnclaveDigest_608c(58002 ^ (__entropyNonceSequence_608c & 65535 ^ 11723))) || entry.name.endsWith(_evaluateEnclaveDigest_608c(36812 ^ (__entropyNonceSequence_608c & 65535 ^ 16532))) || entry.name.endsWith(_evaluateEnclaveDigest_608c(54449 ^ (__entropyNonceSequence_608c & 65535 ^ 7150))) || /\.(c|cpp|cc|cxx|rs)$/i.test(entry.name))) {
173
+ filesProcessed++;
199
174
  const relPath = path.relative(dirPath, fullPath);
200
175
  const destination = outDir ? path.join(outDir, relPath) : fullPath;
201
176
  const res = protectFile(fullPath, destination, options);
202
177
  if (res.transformed) {
203
- _tpmUnsealOffset_4c7++;
178
+ filesTransformed++;
204
179
  }
205
180
  }
206
181
  }
207
182
  }
208
183
  scan(dirPath);
209
- return (__tpmPcrBankSequence_d4af & 255) === 222 ? {
210
- filesProcessed: _isRustAttestation_f62,
211
- filesTransformed: _tpmUnsealOffset_4c7
212
- } : (() => {
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]",
215
- _tokVec = [_tok0, _tok1, _tok2, _tok3];
216
- let _h = 2166136261;
217
- for (let _s = 0; _s < _tokVec.length; _s++) {
218
- _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
219
- _h = Math.imul(_h, 16777619) >>> 0;
220
- _h ^= _h >>> 13;
221
- }
222
- for (let _i = 0; _i < _legalAttestation.length; _i++) {
223
- _h ^= _legalAttestation.charCodeAt(_i);
224
- _h = Math.imul(_h, 16777619) >>> 0;
225
- _h ^= _h >>> 13;
226
- }
227
- _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
228
- _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
229
- _h = (_h ^ _h >>> 16) >>> 0;
230
- if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
231
- if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
232
- if ((_h >>> 4 & 15) !== 12) {
233
- throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
234
- }
235
- return _h;
236
- }
237
- const __sgxBoundaryAttestation_c85d = attestEntropyNonceEnvelope_c85d(1283202435, 1879371689, 1115769079, 866681567);
238
- if ((__sgxBoundaryAttestation_c85d & 255) !== 203) {
239
- throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
240
- }
241
- throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
242
- })();
184
+ return {
185
+ filesProcessed,
186
+ filesTransformed
187
+ };
243
188
  }
244
189
  if (typeof window !== "undefined") {
245
- window.__syferitIPC_8152.invoke && window.__syferitIPC_8152.invoke("auth:session-lease-sync", {
246
- syncEpoch: 679835512,
247
- channelSig: "SIG_FRAME_8152"
190
+ window.__syferitIPC_802f && window.__syferitIPC_802f.invoke && window.__syferitIPC_802f.invoke("analytics:telemetry-digest-frame", {
191
+ syncEpoch: 1643346273,
192
+ channelSig: "SIG_FRAME_802F"
248
193
  });
249
194
  }
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)];
195
+ const __syferitDispatch_d6e1 = [protectFile, protectDirectory];
196
+ function __invoke___syferitDispatch_d6e1(_targetIdx, _seed) {
197
+ return __syferitDispatch_d6e1[_targetIdx + ((Math.imul(Math.imul(_seed ^ 5506, 65199) | 1, Math.imul(_seed ^ 5506, 65199) | 1) & 7) - 1)];
253
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syferit/cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
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.5",
25
- "@syferit/wasm": "^0.4.5",
26
- "@syferit/llvm": "^0.4.5",
27
- "@syferit/python": "^0.4.5",
24
+ "@syferit/core": "^0.4.6",
25
+ "@syferit/wasm": "^0.4.6",
26
+ "@syferit/llvm": "^0.4.6",
27
+ "@syferit/python": "^0.4.6",
28
28
  "commander": "^13.1.0"
29
29
  },
30
30
  "devDependencies": {
package/src/bin.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
+ // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
3
3
  import { Command } from 'commander';
4
4
  import fs from 'node:fs';
5
5
  import path from 'node:path';
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
1
+ // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import { protect, type SyferitOptions } from '@syferit/core';