@syferit/python 0.4.2 → 0.4.4
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/index.d.ts +10 -34
- package/dist/index.js +177 -191
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
// [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
|
|
2
|
+
import type { SyferitOptions } from '@syferit/core';
|
|
2
3
|
export interface PythonProtectionOptions extends SyferitOptions {
|
|
3
|
-
|
|
4
|
-
* Whether to encrypt standalone string literals inside functions using the S-Box keystream.
|
|
5
|
-
* Defaults to true.
|
|
6
|
-
*/
|
|
7
|
-
encryptStrings?: boolean;
|
|
4
|
+
encryptStrings?: boolean;
|
|
8
5
|
}
|
|
9
6
|
export interface PythonTransformResult {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
code: string;
|
|
8
|
+
transformedCount: number;
|
|
9
|
+
seedUsed: number;
|
|
10
|
+
inoculationInjected: boolean;
|
|
11
|
+
stateKeyDerived: number;
|
|
15
12
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Adversarial Python 3 Source & AST Protection Engine (`@syferit/python`)
|
|
18
|
-
*
|
|
19
|
-
* Implements the full 6-layer Syferit Iron Dome for Python (`.py`) applications,
|
|
20
|
-
* AI/ML inference pipelines, FastAPI/Django backends, and PyInstaller distributions:
|
|
21
|
-
*
|
|
22
|
-
* 1. Statutory Legal Inoculation (`__syferit_attestation__` bound to key derivation)
|
|
23
|
-
* 2. 128-Bit Multi-Word Salt + Per-Module Nonce FNV-1a/MurmurHash3 Key Derivation
|
|
24
|
-
* 3. Symmetric Euler Quartic Residue Opaque Predicates (`(((u | 1)**4) & 15) == 1`)
|
|
25
|
-
* 4. True Non-Linear Polynomial MBA on integer arithmetic & constants (`& 0xFFFFFFFF`)
|
|
26
|
-
* 5. Dynamic S-Box Keystream String Literal Encryption
|
|
27
|
-
* 6. 3-Layer Procedural CFG Anti-Fingerprinting + Python Identifier Harvesting
|
|
28
|
-
*/
|
|
29
13
|
export declare class PythonTransformer {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private mba;
|
|
33
|
-
private seed;
|
|
34
|
-
constructor(options?: PythonProtectionOptions);
|
|
35
|
-
transform(pythonCode: string): PythonTransformResult;
|
|
14
|
+
constructor(options?: PythonProtectionOptions);
|
|
15
|
+
transform(pythonCode: string): PythonTransformResult;
|
|
36
16
|
}
|
|
37
|
-
/**
|
|
38
|
-
* High-level API to protect a Python 3 source file (`.py`) with Syferit.
|
|
39
|
-
*/
|
|
40
17
|
export declare function protectPython(pythonCode: string, options?: PythonProtectionOptions): PythonTransformResult;
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ export class PythonTransformer {
|
|
|
11
11
|
this.mba = new MBASynthesizer(this.prng);
|
|
12
12
|
}
|
|
13
13
|
transform(pythonCode) {
|
|
14
|
-
function
|
|
15
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
14
|
+
function attestSeededPRNG_5094(_tok0, _tok1, _tok2, _tok3) {
|
|
15
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:88fe28cd-3666bc94]",
|
|
16
16
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
17
17
|
let _h = 2166136261;
|
|
18
18
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -30,71 +30,71 @@ export class PythonTransformer {
|
|
|
30
30
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
31
31
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
32
32
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
33
|
-
if ((_h >>> 4 & 15) !==
|
|
34
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
33
|
+
if ((_h >>> 4 & 15) !== 9) {
|
|
34
|
+
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
35
35
|
}
|
|
36
36
|
return _h;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
function
|
|
41
|
-
const _row =
|
|
42
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
38
|
+
const __tpmPcrBankEnvelope_5094 = attestSeededPRNG_5094(727087545, 2100777669, 68065837, 149903989);
|
|
39
|
+
const _hmacFrameSequence_5094 = [[240, 72, 93, 214, 117, 132, 245, 9, 225, 122, 10, 190, 38, 175, 128, 2, 146], [223, 35, 36, 175, 35, 181, 150, 51, 134, 0, 14], [133, 5, 20, 131, 21, 137, 110, 220, 97, 224, 240, 123, 253, 83, 86, 207], [118, 241, 253, 103], [76, 220, 177, 74, 225, 120, 97, 253, 13, 238, 182, 18, 146, 3, 20, 150, 14], [42, 180, 133, 50, 130, 24, 31, 173, 30, 113, 97, 234, 106, 226, 199, 126]];
|
|
40
|
+
function _unsealPythonTransformer_5094(_slot) {
|
|
41
|
+
const _row = _hmacFrameSequence_5094[_slot];
|
|
42
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankEnvelope_5094 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
43
43
|
}
|
|
44
|
-
if (this.options.mode ===
|
|
44
|
+
if (this.options.mode === _unsealPythonTransformer_5094(52952 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 12878)) && (Math.imul(Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 93 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 93 | 1), Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 93 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 93 | 1)) & 15 ^ (__tpmPcrBankEnvelope_5094 >>> 10 & 255 ^ 71)) === 179) {
|
|
45
45
|
return {
|
|
46
46
|
code: pythonCode,
|
|
47
|
-
transformedCount: (
|
|
47
|
+
transformedCount: (65200 ^ __tpmPcrBankEnvelope_5094 & 65535) / (13867 ^ __tpmPcrBankEnvelope_5094 >>> 16 & 65535),
|
|
48
48
|
seedUsed: this.seed,
|
|
49
49
|
inoculationInjected: false,
|
|
50
|
-
stateKeyDerived: (
|
|
50
|
+
stateKeyDerived: (65248 ^ __tpmPcrBankEnvelope_5094 & 65535) / (13867 ^ __tpmPcrBankEnvelope_5094 >>> 16 & 65535)
|
|
51
51
|
};
|
|
52
|
-
} else if (this.options.mode ===
|
|
52
|
+
} else if (this.options.mode === _unsealPythonTransformer_5094(59779 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 5396)) && (Math.imul(Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 31 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 31 | 1), Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 31 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 31 | 1)) & 15 ^ (__tpmPcrBankEnvelope_5094 >>> 1 & 255 ^ 17)) === 91) {
|
|
53
53
|
return {
|
|
54
54
|
code: pythonCode,
|
|
55
|
-
transformedCount:
|
|
55
|
+
transformedCount: 57115 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 9101),
|
|
56
56
|
seedUsed: this.seed,
|
|
57
57
|
inoculationInjected: false,
|
|
58
|
-
stateKeyDerived:
|
|
58
|
+
stateKeyDerived: 42187 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 22621)
|
|
59
59
|
};
|
|
60
|
-
} else if (this.options.mode ===
|
|
60
|
+
} else if (this.options.mode === _unsealPythonTransformer_5094(36640 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 29620)) && (Math.imul(Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 85 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 85 | 1), Math.imul(((pythonCode.seats || pythonCode | 0) | 0) ^ 85 | 1, ((pythonCode.seats || pythonCode | 0) | 0) ^ 85 | 1)) & 15 ^ (__tpmPcrBankEnvelope_5094 >>> 18 & 255 ^ 54)) === 131) {
|
|
61
61
|
return {
|
|
62
62
|
code: pythonCode,
|
|
63
|
-
transformedCount: (
|
|
63
|
+
transformedCount: (64920 ^ __tpmPcrBankEnvelope_5094 & 65535) / (13867 ^ __tpmPcrBankEnvelope_5094 >>> 16 & 65535),
|
|
64
64
|
seedUsed: this.seed,
|
|
65
65
|
inoculationInjected: false,
|
|
66
|
-
stateKeyDerived: (
|
|
66
|
+
stateKeyDerived: (64532 ^ __tpmPcrBankEnvelope_5094 & 65535) / (13867 ^ __tpmPcrBankEnvelope_5094 >>> 16 & 65535)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
let
|
|
72
|
-
while ((
|
|
73
|
-
if (
|
|
74
|
-
|
|
69
|
+
const _codeSequence_a95 = [];
|
|
70
|
+
const _modeAttestation_b00 = /\bdef\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g;
|
|
71
|
+
let _MBASynthesizerBitmask_5d6;
|
|
72
|
+
while ((_MBASynthesizerBitmask_5d6 = _modeAttestation_b00.exec(pythonCode)) !== null) {
|
|
73
|
+
if (_MBASynthesizerBitmask_5d6[55517 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 9290)] && _MBASynthesizerBitmask_5d6[47015 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 19248)].length >= (36352 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 29330)) && !_MBASynthesizerBitmask_5d6[61886 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 3369)].startsWith('__')) {
|
|
74
|
+
_codeSequence_a95.push(_MBASynthesizerBitmask_5d6[35306 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 30077)]);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
function
|
|
97
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
77
|
+
const _tpmUnsealOffset_857 = buildPolymorphicDictionary(this.options.domainProfile ?? _unsealPythonTransformer_5094(50560 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 14613)), this.prng, _codeSequence_a95, this.options.customDictionary ?? []);
|
|
78
|
+
const _entropyNonceVector_797 = this.prng.pick(_tpmUnsealOffset_857.legalInoculations);
|
|
79
|
+
const _generateCryptoSeedSequence_a7b = `${this.prng.nextUint32().toString(63530 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1196)).padStart(64237 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1651), '0')}-${this.prng.nextUint32().toString(54896 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 10998)).padStart(63425 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 2911), '0')}`;
|
|
80
|
+
const _enclaveDigestEnvelope_b09 = `${_entropyNonceVector_797} [ATTESTATION_ID:${_generateCryptoSeedSequence_a7b}]`;
|
|
81
|
+
const _pcrPolicyBitmask_7 = (this.prng.nextUint32() & (6606 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 6823))).toString(39950 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 24712));
|
|
82
|
+
const _SoltrixStudiosDelta_574 = `_${this.prng.pick(_tpmUnsealOffset_857.stateKeys).replace(/^_+/, '')}_attestation_${_pcrPolicyBitmask_7}`;
|
|
83
|
+
const _transformedCountSequence_4a2 = `_${this.prng.pick(_tpmUnsealOffset_857.symbols)}_${_pcrPolicyBitmask_7}`;
|
|
84
|
+
const _harvestedVector_16c = `_${this.prng.pick(_tpmUnsealOffset_857.stateKeys).replace(/^_+/, '')}_${_pcrPolicyBitmask_7}`;
|
|
85
|
+
const _enclaveDigestSequence_83a = `_enclave_matrix_${_pcrPolicyBitmask_7}`;
|
|
86
|
+
const _SeededPRNGBitmask_2f7 = `_unseal_slot_${_pcrPolicyBitmask_7}`;
|
|
87
|
+
const _hashStringIntegrity_ee3 = `_verify_quorum_${_pcrPolicyBitmask_7}`;
|
|
88
|
+
const _transformSequence_ce4 = `_fold_carry_${_pcrPolicyBitmask_7}`;
|
|
89
|
+
const _constructorProof_a8c = `_${this.prng.pick(_tpmUnsealOffset_857.symbols)}_decoy_${_pcrPolicyBitmask_7}`;
|
|
90
|
+
const _seedUsedIntegrity_ac7 = [this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_5094 & 255) - 150) | 33785 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 32622), this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_5094 & 255) - 150) | 61835 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 3356), this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_5094 & 255) - 150) | 34727 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 31536), this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_5094 & 255) - 150) | 57351 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 7312)];
|
|
91
|
+
const _SyferitEngineDelta_8c6 = this.mba.computeStringKey(_enclaveDigestEnvelope_b09, _seedUsedIntegrity_ac7);
|
|
92
|
+
const _inoculationInjectedSequence_8e0 = _SyferitEngineDelta_8c6 >>> (57535 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 7213)) & (61710 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 3479));
|
|
93
|
+
const _stateKeyDerivedEnvelope_577 = this.prng.pick(_tpmUnsealOffset_857.assertions);
|
|
94
|
+
const _ProprietaryEnclaveDelta_f8c = [];
|
|
95
|
+
const _tpmPcrBankProof_b22 = rawStr => {
|
|
96
|
+
function verifyHmacSequenceFrame_a86e(_tok0, _tok1, _tok2, _tok3) {
|
|
97
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:e0687022-d1579331]",
|
|
98
98
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
99
99
|
let _h = 2166136261;
|
|
100
100
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -112,79 +112,24 @@ export class PythonTransformer {
|
|
|
112
112
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
113
113
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
114
114
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
115
|
-
if ((_h >>> 4 & 15) !==
|
|
115
|
+
if ((_h >>> 4 & 15) !== 8) {
|
|
116
116
|
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
117
117
|
}
|
|
118
118
|
return _h;
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
126
|
-
let _h = 2166136261;
|
|
127
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
128
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
129
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
130
|
-
_h ^= _h >>> 13;
|
|
131
|
-
}
|
|
132
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
133
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
134
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
135
|
-
_h ^= _h >>> 13;
|
|
136
|
-
}
|
|
137
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
138
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
139
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
140
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
141
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
142
|
-
if ((_h >>> 4 & 15) !== 7) {
|
|
143
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
144
|
-
}
|
|
145
|
-
return _h;
|
|
146
|
-
}
|
|
147
|
-
const __tpmPcrBankAttestation_60ab = verifySyferitEngineContext_60ab(1149988799, 822415149, 182705883, 840523297);
|
|
148
|
-
const _hmacFrameVector_dfb = (_entropyNonceSequence_f33 >>> (charIdx & (56595 ^ (__hmacFrameVector_ac30 & 65535 ^ 20160))) * (44995 ^ (__hmacFrameVector_ac30 & 65535 ^ 15387))) + Math.imul(charIdx + _modeBitmask_c0a, 43436 ^ (__hmacFrameVector_ac30 & 65535 ^ 14937)) & (56031 ^ (__hmacFrameVector_ac30 & 65535 ^ 18928));
|
|
149
|
-
return (__tpmPcrBankAttestation_60ab & 255) === 122 ? (ch.charCodeAt(60071 ^ (__hmacFrameVector_ac30 & 65535 ^ 31095)) ^ _hmacFrameVector_dfb) & (62331 ^ (__hmacFrameVector_ac30 & 65535 ^ 24660)) : (() => {
|
|
150
|
-
function auditGenerateCryptoSeed_13c9(_tok0, _tok1, _tok2, _tok3) {
|
|
151
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:c747863e-5297268d]",
|
|
152
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
153
|
-
let _h = 2166136261;
|
|
154
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
155
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
156
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
157
|
-
_h ^= _h >>> 13;
|
|
158
|
-
}
|
|
159
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
160
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
161
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
162
|
-
_h ^= _h >>> 13;
|
|
163
|
-
}
|
|
164
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
165
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
166
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
167
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
168
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
169
|
-
if ((_h >>> 4 & 15) !== 2) {
|
|
170
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
171
|
-
}
|
|
172
|
-
return _h;
|
|
173
|
-
}
|
|
174
|
-
const __ringBufferEnvelope_13c9 = auditGenerateCryptoSeed_13c9(998514327, 1076750775, 613421709, 240619979);
|
|
175
|
-
if ((__ringBufferEnvelope_13c9 & 255) !== 46) {
|
|
176
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
177
|
-
}
|
|
178
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
179
|
-
})();
|
|
120
|
+
const __enclaveDigestIntegrity_a86e = verifyHmacSequenceFrame_a86e(1930020819, 2016371801, 961924969, 1964755365);
|
|
121
|
+
const _hmacFrameSequence_3db = _ProprietaryEnclaveDelta_f8c.length;
|
|
122
|
+
const _enclaveDigestSequence_3d = rawStr.split('').map((ch, charIdx) => {
|
|
123
|
+
const byteKey = (_SyferitEngineDelta_8c6 >>> (charIdx & (64163 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1590))) * (42919 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 23353))) + Math.imul(charIdx + _hmacFrameSequence_3db, 43343 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 22012)) & (52534 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 12639));
|
|
124
|
+
return (ch.charCodeAt(61347 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 4917)) ^ byteKey) & (63971 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1418));
|
|
180
125
|
});
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
return (
|
|
186
|
-
function
|
|
187
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
126
|
+
_ProprietaryEnclaveDelta_f8c.push(_enclaveDigestSequence_3d);
|
|
127
|
+
const _hkdfSaltRotation_82d = _SyferitEngineDelta_8c6 & (30458 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 30099)) ^ this.prng.nextRange(46373 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 18611), 65232 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 32185));
|
|
128
|
+
const _entropyNonceVector_a1a = _hmacFrameSequence_3db ^ _hkdfSaltRotation_82d;
|
|
129
|
+
const _MBASynthesizerBitmask_be9 = _hkdfSaltRotation_82d ^ _SyferitEngineDelta_8c6 & (16030 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 15863));
|
|
130
|
+
return (__enclaveDigestIntegrity_a86e & 255) === 135 ? `${_SeededPRNGBitmask_2f7}(${_entropyNonceVector_a1a} ^ ((${_harvestedVector_16c} & 0xFFFF) ^ ${_MBASynthesizerBitmask_be9}), ${_harvestedVector_16c})` : (() => {
|
|
131
|
+
function verifyProprietaryEnclaveContext_35db(_tok0, _tok1, _tok2, _tok3) {
|
|
132
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:1193b924-9e0e147c]",
|
|
188
133
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
189
134
|
let _h = 2166136261;
|
|
190
135
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -202,55 +147,90 @@ export class PythonTransformer {
|
|
|
202
147
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
203
148
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
204
149
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
205
|
-
if ((_h >>> 4 & 15) !==
|
|
206
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
150
|
+
if ((_h >>> 4 & 15) !== 12) {
|
|
151
|
+
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
207
152
|
}
|
|
208
153
|
return _h;
|
|
209
154
|
}
|
|
210
|
-
const
|
|
211
|
-
if ((
|
|
155
|
+
const __enclaveDigestEnvelope_35db = verifyProprietaryEnclaveContext_35db(993768003, 294476123, 1760423191, 1540717247);
|
|
156
|
+
if ((__enclaveDigestEnvelope_35db & 255) !== 205) {
|
|
212
157
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
213
158
|
}
|
|
214
159
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
215
160
|
})();
|
|
216
161
|
};
|
|
217
|
-
let
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
162
|
+
let _sgxEcallCounter_17f = 50501 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 14803);
|
|
163
|
+
const _keyDerivationStateProof_737 = pythonCode.split(/\r?\n/);
|
|
164
|
+
const _monotonicNonceDrift_d41 = [];
|
|
165
|
+
let _hmacFrameAttestation_2b6 = 52688 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 12614);
|
|
166
|
+
while (_hmacFrameAttestation_2b6 < _keyDerivationStateProof_737.length && (/^\s*#!/.test(_keyDerivationStateProof_737[_hmacFrameAttestation_2b6]) || /^\s*#\s*-\*-/.test(_keyDerivationStateProof_737[_hmacFrameAttestation_2b6]) || /^\s*from\s+__future__\s+import\b/.test(_keyDerivationStateProof_737[_hmacFrameAttestation_2b6]) || /^\s*$/.test(_keyDerivationStateProof_737[_hmacFrameAttestation_2b6]))) {
|
|
167
|
+
_hmacFrameAttestation_2b6++;
|
|
168
|
+
}
|
|
169
|
+
if (_hmacFrameAttestation_2b6 < _keyDerivationStateProof_737.length && /^\s*("""|''')/.test(_keyDerivationStateProof_737[_hmacFrameAttestation_2b6])) {
|
|
170
|
+
const quoteType = _keyDerivationStateProof_737[_hmacFrameAttestation_2b6].match(/^\s*("""|''')/)[51593 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 13598)];
|
|
171
|
+
const trimmedFirst = _keyDerivationStateProof_737[_hmacFrameAttestation_2b6].trim();
|
|
172
|
+
_keyDerivationStateProof_737[_hmacFrameAttestation_2b6] = '';
|
|
173
|
+
if (!trimmedFirst.slice(33794 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 30871)).includes(quoteType)) {
|
|
174
|
+
_hmacFrameAttestation_2b6++;
|
|
175
|
+
while (_hmacFrameAttestation_2b6 < _keyDerivationStateProof_737.length) {
|
|
176
|
+
const cur = _keyDerivationStateProof_737[_hmacFrameAttestation_2b6];
|
|
177
|
+
_keyDerivationStateProof_737[_hmacFrameAttestation_2b6] = '';
|
|
178
|
+
if (cur.includes(quoteType)) break;
|
|
179
|
+
_hmacFrameAttestation_2b6++;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
for (let i = 64780 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 410); i < _keyDerivationStateProof_737.length; i++) {
|
|
184
|
+
let line = _keyDerivationStateProof_737[i];
|
|
185
|
+
if (/^\s*#/.test(line) && !/^\s*#!/.test(line) && !/^\s*#\s*-\*-/.test(line)) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if (line.includes('#') && !/^\s*#!/.test(line) && !/^\s*#\s*-\*-/.test(line)) {
|
|
189
|
+
let inSingle = false;
|
|
190
|
+
let inDouble = false;
|
|
191
|
+
for (let c = 52415 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 12329); c < line.length; c++) {
|
|
192
|
+
const ch = line[c];
|
|
193
|
+
if (ch === "'" && !inDouble && line[c - (52915 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 12836))] !== '\\') inSingle = !inSingle;else if (ch === '"' && !inSingle && line[c - (46721 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 18966))] !== '\\') inDouble = !inDouble;else if (ch === '#' && !inSingle && !inDouble) {
|
|
194
|
+
line = line.slice(45720 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 19982), c).trimEnd();
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
222
199
|
const defMatch = line.match(/^(\s*)def\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*\(([^)]*)\)(\s*(?:->\s*[^:]+)?):(\s*)$/);
|
|
223
200
|
if (defMatch) {
|
|
224
|
-
|
|
225
|
-
const defIndent = defMatch[
|
|
201
|
+
_sgxEcallCounter_17f++;
|
|
202
|
+
const defIndent = defMatch[48727 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 17088)];
|
|
226
203
|
const bodyIndent = `${defIndent} `;
|
|
227
|
-
|
|
228
|
-
|
|
204
|
+
_monotonicNonceDrift_d41.push(line);
|
|
205
|
+
while (i + (41687 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 24128)) < _keyDerivationStateProof_737.length && /^\s*$/.test(_keyDerivationStateProof_737[i + (65444 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 819))])) {
|
|
229
206
|
i++;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
207
|
+
}
|
|
208
|
+
if (i + (44238 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 20569)) < _keyDerivationStateProof_737.length && /^\s*("""|''')/.test(_keyDerivationStateProof_737[i + (55721 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 9534))])) {
|
|
209
|
+
const quoteType = _keyDerivationStateProof_737[i + (63456 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 2935))].match(/^\s*("""|''')/)[33301 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 32386)];
|
|
210
|
+
i++;
|
|
211
|
+
const trimmedDoc = _keyDerivationStateProof_737[i].trim();
|
|
212
|
+
if (!trimmedDoc.slice(44056 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 20621)).includes(quoteType)) {
|
|
213
|
+
while (i + (39791 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 26616)) < _keyDerivationStateProof_737.length) {
|
|
233
214
|
i++;
|
|
234
|
-
|
|
235
|
-
if (/("""|''')\s*$/.test(_ringBufferEnvelope_2d9[i])) break;
|
|
215
|
+
if (_keyDerivationStateProof_737[i].includes(quoteType)) break;
|
|
236
216
|
}
|
|
237
217
|
}
|
|
238
218
|
}
|
|
239
|
-
const mask = this.prng.nextUint32() & 2147483646 + ((
|
|
240
|
-
const c1 = (
|
|
241
|
-
const c2 = (mask ^
|
|
242
|
-
|
|
243
|
-
|
|
219
|
+
const mask = this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_5094 & 255) - 150) | 42620 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 23275);
|
|
220
|
+
const c1 = (33498 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 32333) ^ mask) >>> (52070 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 14320));
|
|
221
|
+
const c2 = (mask ^ _SyferitEngineDelta_8c6) >>> (42803 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 23461));
|
|
222
|
+
_monotonicNonceDrift_d41.push(`${bodyIndent}${_harvestedVector_16c} = ${_transformedCountSequence_4a2}(${_seedUsedIntegrity_ac7[65274 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 620)]}, ${_seedUsedIntegrity_ac7[57511 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 7216)]}, ${_seedUsedIntegrity_ac7[45501 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 19753)]}, ${_seedUsedIntegrity_ac7[46690 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 19191)]})`);
|
|
223
|
+
_monotonicNonceDrift_d41.push(`${bodyIndent}if not ${_hashStringIntegrity_ee3}(${_harvestedVector_16c}, ${c1}, ${c2}): return ${_constructorProof_a8c}(${_harvestedVector_16c})`);
|
|
244
224
|
continue;
|
|
245
225
|
}
|
|
246
|
-
if (
|
|
226
|
+
if (_sgxEcallCounter_17f > (36528 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 29222)) && /^\s{4,}\S/.test(line) && !/^\s*#/.test(line) && !/^\s*@/.test(line)) {
|
|
247
227
|
let modifiedLine = line;
|
|
248
228
|
if (this.options.encryptStrings !== false) {
|
|
249
|
-
modifiedLine = modifiedLine.replace(/(?<![fFrRbB])"([^"\\\n]{3,40})"/g, (_m, strContent) =>
|
|
229
|
+
modifiedLine = modifiedLine.replace(/(?<![fFrRbB])"([^"\\\n]{3,40})"/g, (_m, strContent) => _tpmPcrBankProof_b22(strContent));
|
|
250
230
|
}
|
|
251
231
|
modifiedLine = modifiedLine.replace(/(\breturn\s+|\s=\s*|\s\+\s*|\s-\s*|\s\*\s*)([1-9]\d{0,6})\b(?!\s*\.)/g, (_m, prefix, numStr) => {
|
|
252
|
-
function
|
|
253
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
232
|
+
function auditTrim_9041(_tok0, _tok1, _tok2, _tok3) {
|
|
233
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:76606e02-39887b38]",
|
|
254
234
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
255
235
|
let _h = 2166136261;
|
|
256
236
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -268,20 +248,20 @@ export class PythonTransformer {
|
|
|
268
248
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
269
249
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
270
250
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
271
|
-
if ((_h >>> 4 & 15) !==
|
|
251
|
+
if ((_h >>> 4 & 15) !== 6) {
|
|
272
252
|
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
273
253
|
}
|
|
274
254
|
return _h;
|
|
275
255
|
}
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
const
|
|
281
|
-
const
|
|
282
|
-
return (
|
|
283
|
-
function
|
|
284
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
256
|
+
const __sgxBoundaryAttestation_9041 = auditTrim_9041(2128713817, 1127850947, 1114142767, 1241921487);
|
|
257
|
+
const _SoltrixStudiosDelta_534 = parseInt(numStr, 60797 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 4577));
|
|
258
|
+
const _transformSequence_de0 = (_SyferitEngineDelta_8c6 & (12148 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 11293))) >>> (59276 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 6938));
|
|
259
|
+
const _hmacFrameAttestation_178 = _transformSequence_de0 ^ this.prng.nextRange(65456 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 550), 34530 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1419));
|
|
260
|
+
const _defRegexSequence_57c = _SoltrixStudiosDelta_534 ^ _hmacFrameAttestation_178;
|
|
261
|
+
const _hmacFrameSequence_746 = _hmacFrameAttestation_178 ^ _transformSequence_de0;
|
|
262
|
+
return (__sgxBoundaryAttestation_9041 & 255) === 101 ? `${prefix}(${_defRegexSequence_57c} ^ ((${_harvestedVector_16c} & 0xFFFF) ^ ${_hmacFrameSequence_746}))` : (() => {
|
|
263
|
+
function evaluateStateKeyDerived_3545(_tok0, _tok1, _tok2, _tok3) {
|
|
264
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:9098ef91-71460b19]",
|
|
285
265
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
286
266
|
let _h = 2166136261;
|
|
287
267
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -299,55 +279,55 @@ export class PythonTransformer {
|
|
|
299
279
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
300
280
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
301
281
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
302
|
-
if ((_h >>> 4 & 15) !==
|
|
282
|
+
if ((_h >>> 4 & 15) !== 8) {
|
|
303
283
|
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
304
284
|
}
|
|
305
285
|
return _h;
|
|
306
286
|
}
|
|
307
|
-
const
|
|
308
|
-
if ((
|
|
287
|
+
const __entropyNonceVector_3545 = evaluateStateKeyDerived_3545(161821319, 135655877, 833392125, 1628499849);
|
|
288
|
+
if ((__entropyNonceVector_3545 & 255) !== 140) {
|
|
309
289
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
310
290
|
}
|
|
311
291
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
312
292
|
})();
|
|
313
293
|
});
|
|
314
|
-
|
|
294
|
+
_monotonicNonceDrift_d41.push(modifiedLine);
|
|
315
295
|
} else {
|
|
316
|
-
|
|
296
|
+
_monotonicNonceDrift_d41.push(line);
|
|
317
297
|
}
|
|
318
298
|
}
|
|
319
|
-
if (
|
|
299
|
+
if (_sgxEcallCounter_17f === (48789 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 16899))) {
|
|
320
300
|
return {
|
|
321
301
|
code: pythonCode,
|
|
322
|
-
transformedCount:
|
|
302
|
+
transformedCount: 62581 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 2275),
|
|
323
303
|
seedUsed: this.seed,
|
|
324
304
|
inoculationInjected: false,
|
|
325
|
-
stateKeyDerived:
|
|
305
|
+
stateKeyDerived: 43213 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 21595)
|
|
326
306
|
};
|
|
327
307
|
}
|
|
328
|
-
if (
|
|
329
|
-
for (const decoyStr of
|
|
330
|
-
|
|
308
|
+
if (_ProprietaryEnclaveDelta_f8c.length < (40187 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 24681))) {
|
|
309
|
+
for (const decoyStr of _tpmUnsealOffset_857.decoyTierStrings.slice(37732 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 28658), 36975 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 27899))) {
|
|
310
|
+
_tpmPcrBankProof_b22(decoyStr);
|
|
331
311
|
}
|
|
332
312
|
}
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
let
|
|
338
|
-
while (
|
|
339
|
-
|
|
313
|
+
const _defRegexSequence_82e = _enclaveDigestEnvelope_b09.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
314
|
+
const _sgxBoundaryAttestation_995 = _stateKeyDerivedEnvelope_577.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
315
|
+
const _tpmPcrBankEnvelope_c5b = JSON.stringify(_ProprietaryEnclaveDelta_f8c);
|
|
316
|
+
const _hmacFrameSequence_bf3 = [`# [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]`, `${_SoltrixStudiosDelta_574} = "${_defRegexSequence_82e}"`, `${_enclaveDigestSequence_83a} = ${_tpmPcrBankEnvelope_c5b}`, ``, `def ${_transformedCountSequence_4a2}(_tok0, _tok1, _tok2, _tok3):`, ` _h = 0x811C9DC5`, ` for _s in (_tok0, _tok1, _tok2, _tok3):`, ` _h = (_h ^ (_s & 0xFFFFFFFF)) & 0xFFFFFFFF`, ` _h = ((_h * 0x01000193) & 0xFFFFFFFF)`, ` _h = (_h ^ (_h >> 13)) & 0xFFFFFFFF`, ` for _ch in ${_SoltrixStudiosDelta_574}:`, ` _h = (_h ^ ord(_ch)) & 0xFFFFFFFF`, ` _h = ((_h * 0x01000193) & 0xFFFFFFFF)`, ` _h = (_h ^ (_h >> 13)) & 0xFFFFFFFF`, ` _h = (((_h ^ (_h >> 16)) * 0x85EBCA6B) & 0xFFFFFFFF)`, ` _h = (((_h ^ (_h >> 13)) * 0xC2B2AE35) & 0xFFFFFFFF)`, ` _h = (_h ^ (_h >> 16)) & 0xFFFFFFFF`, ` if (_h & 0xFFFF) == 0:`, ` _h = (_h | 0x1337) & 0xFFFFFFFF`, ` if ((_h >> 16) & 0xFFFF) == 0:`, ` _h = (_h | 0x73310000) & 0xFFFFFFFF`, ` if ((_h >> 4) & 0xF) != ${_inoculationInjectedSequence_8e0}:`, ` raise RuntimeError("${_sgxBoundaryAttestation_995}")`, ` return _h`, ``, `def ${_SeededPRNGBitmask_2f7}(_slot, _k):`, ` _row = ${_enclaveDigestSequence_83a}[_slot]`, ` return "".join(chr((_b ^ (((_k >> ((_idx & 3) * 8)) + (((_idx + _slot) * 37) & 0xFFFFFFFF)) & 0xFF)) & 0xFF) for _idx, _b in enumerate(_row))`, ``, `def ${_transformSequence_ce4}(_x, _y):`, ` return (((_x ^ _y) + ((_x & _y) << 1)) & 0xFFFFFFFF)`, ``, `def ${_hashStringIntegrity_ee3}(_k, _c1, _c2):`, ` _u = (_k | 1) & 0xFFFFFFFF`, ` _u2 = (_u * _u) & 0xFFFFFFFF`, ` _u4 = (_u2 * _u2) & 0xFFFFFFFF`, ` _expected = (_c1 ^ (_k ^ _c2)) & 0xFFFFFFFF`, ` return (_u4 & 15) == _expected`, ``, `def ${_constructorProof_a8c}(_k):`, ` return ${_transformSequence_ce4}(_k, 0x5A17E9B3) ^ 0xDEADBEEF`, ``].join('\n');
|
|
317
|
+
let _PythonTransformerAttestation_e07 = 63523 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 1205);
|
|
318
|
+
while (_PythonTransformerAttestation_e07 < _monotonicNonceDrift_d41.length && (/^\s*#!/.test(_monotonicNonceDrift_d41[_PythonTransformerAttestation_e07]) || /^\s*#\s*-\*-/.test(_monotonicNonceDrift_d41[_PythonTransformerAttestation_e07]) || /^\s*from\s+__future__\s+import\b/.test(_monotonicNonceDrift_d41[_PythonTransformerAttestation_e07]))) {
|
|
319
|
+
_PythonTransformerAttestation_e07++;
|
|
340
320
|
}
|
|
341
|
-
const
|
|
342
|
-
return (
|
|
343
|
-
code:
|
|
344
|
-
transformedCount:
|
|
321
|
+
const _trimIntegrity_32b = [..._monotonicNonceDrift_d41.slice(57630 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 7560), _PythonTransformerAttestation_e07), _hmacFrameSequence_bf3, ..._monotonicNonceDrift_d41.slice(_PythonTransformerAttestation_e07)];
|
|
322
|
+
return (__tpmPcrBankEnvelope_5094 & 255) === 150 ? {
|
|
323
|
+
code: _trimIntegrity_32b.join('\n'),
|
|
324
|
+
transformedCount: _sgxEcallCounter_17f,
|
|
345
325
|
seedUsed: this.seed,
|
|
346
326
|
inoculationInjected: true,
|
|
347
|
-
stateKeyDerived:
|
|
327
|
+
stateKeyDerived: _SyferitEngineDelta_8c6 >>> (56945 ^ (__tpmPcrBankEnvelope_5094 & 65535 ^ 8935))
|
|
348
328
|
} : (() => {
|
|
349
|
-
function
|
|
350
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
329
|
+
function unsealPythonTransformer_1117(_tok0, _tok1, _tok2, _tok3) {
|
|
330
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:715d9163-350aadfa]",
|
|
351
331
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
352
332
|
let _h = 2166136261;
|
|
353
333
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -365,13 +345,13 @@ export class PythonTransformer {
|
|
|
365
345
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
366
346
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
367
347
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
368
|
-
if ((_h >>> 4 & 15) !==
|
|
369
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
348
|
+
if ((_h >>> 4 & 15) !== 5) {
|
|
349
|
+
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
370
350
|
}
|
|
371
351
|
return _h;
|
|
372
352
|
}
|
|
373
|
-
const
|
|
374
|
-
if ((
|
|
353
|
+
const __hmacFrameAttestation_1117 = unsealPythonTransformer_1117(884524473, 1619973801, 409765961, 615738197);
|
|
354
|
+
if ((__hmacFrameAttestation_1117 & 255) !== 94) {
|
|
375
355
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
376
356
|
}
|
|
377
357
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
@@ -379,8 +359,8 @@ export class PythonTransformer {
|
|
|
379
359
|
}
|
|
380
360
|
}
|
|
381
361
|
export function protectPython(pythonCode, options = {}) {
|
|
382
|
-
function
|
|
383
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
362
|
+
function assertHmacFrameAttestation_df43(_tok0, _tok1, _tok2, _tok3) {
|
|
363
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:62413b9f-c9c0a4f5]",
|
|
384
364
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
385
365
|
let _h = 2166136261;
|
|
386
366
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -398,16 +378,16 @@ export function protectPython(pythonCode, options = {}) {
|
|
|
398
378
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
399
379
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
400
380
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
401
|
-
if ((_h >>> 4 & 15) !==
|
|
402
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
381
|
+
if ((_h >>> 4 & 15) !== 8) {
|
|
382
|
+
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
403
383
|
}
|
|
404
384
|
return _h;
|
|
405
385
|
}
|
|
406
|
-
const
|
|
407
|
-
const
|
|
408
|
-
return (
|
|
409
|
-
function
|
|
410
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
386
|
+
const __sgxBoundaryVector_df43 = assertHmacFrameAttestation_df43(1213875921, 593321673, 135921989, 869411779);
|
|
387
|
+
const _monotonicNonceDrift_390 = new PythonTransformer(options);
|
|
388
|
+
return (__sgxBoundaryVector_df43 & 255) === 132 ? _monotonicNonceDrift_390.transform(pythonCode) : (() => {
|
|
389
|
+
function evaluateEnclaveDigest_70e6(_tok0, _tok1, _tok2, _tok3) {
|
|
390
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:db74b47f-def8a4c5]",
|
|
411
391
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
412
392
|
let _h = 2166136261;
|
|
413
393
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -425,15 +405,21 @@ export function protectPython(pythonCode, options = {}) {
|
|
|
425
405
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
426
406
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
427
407
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
428
|
-
if ((_h >>> 4 & 15) !==
|
|
408
|
+
if ((_h >>> 4 & 15) !== 12) {
|
|
429
409
|
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
430
410
|
}
|
|
431
411
|
return _h;
|
|
432
412
|
}
|
|
433
|
-
const
|
|
434
|
-
if ((
|
|
413
|
+
const __enclaveBoundaryCheck_70e6 = evaluateEnclaveDigest_70e6(185681013, 119192445, 6954301, 414264799);
|
|
414
|
+
if ((__enclaveBoundaryCheck_70e6 & 255) !== 203) {
|
|
435
415
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
436
416
|
}
|
|
437
417
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
438
418
|
})();
|
|
419
|
+
}
|
|
420
|
+
if (typeof window !== "undefined") {
|
|
421
|
+
window.__syferitIPC_f343.invoke && window.__syferitIPC_f343.invoke("hardware:monotonic-clock-sync", {
|
|
422
|
+
syncEpoch: 1520241665,
|
|
423
|
+
channelSig: "SIG_FRAME_F343"
|
|
424
|
+
});
|
|
439
425
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syferit/python",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Adversarial Python 3 AST & Source Defense Engine against AI Reverse-Engineering Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"test": "vitest run"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@syferit/core": "^0.4.
|
|
13
|
+
"@syferit/core": "^0.4.4"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/node": "^20.11.0",
|