@syferit/llvm 0.4.3 → 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/llvm
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
- > LLVM intermediate representation (IR) pass and native source defense for C/C++/Rust/Zig binaries.
7
+ <h1 align="center">@syferit/llvm</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>Native C/C++/Rust/Zig LLVM IR Protection &amp; Compiler Pass</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
+ > 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/index.js CHANGED
@@ -9,8 +9,8 @@ export function protectLlvmIr(irCode, options) {
9
9
  return transformer.transform(irCode);
10
10
  }
11
11
  export function protectNativeSource(sourceCode, options) {
12
- function verifyTransformer_c9d0(_tok0, _tok1, _tok2, _tok3) {
13
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:2597120f-e8f33295]",
12
+ function unsealSgxBoundaryEnvelope_7fe9(_tok0, _tok1, _tok2, _tok3) {
13
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:747b6947-d68a9560]",
14
14
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
15
15
  let _h = 2166136261;
16
16
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -28,30 +28,30 @@ export function protectNativeSource(sourceCode, options) {
28
28
  _h = (_h ^ _h >>> 16) >>> 0;
29
29
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
30
30
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
31
- if ((_h >>> 4 & 15) !== 10) {
32
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
31
+ if ((_h >>> 4 & 15) !== 14) {
32
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
33
33
  }
34
34
  return _h;
35
35
  }
36
- const __ringBufferEnvelope_c9d0 = verifyTransformer_c9d0(1595811283, 1625755325, 804911471, 1407648493);
37
- const _sgxEcallCounter_c9d0 = [[194, 66, 9], [160, 62, 238, 206, 5, 218, 6, 97, 177, 76, 153, 150, 246, 97, 51, 26, 98], [142, 18, 160, 142, 30, 102, 50, 41, 122, 215, 132, 102, 198, 76, 26, 250]];
38
- function _rotateRingBufferAttestation_c9d0(_slot) {
39
- const _row = _sgxEcallCounter_c9d0[_slot];
40
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferEnvelope_c9d0 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
36
+ const __ringBufferSequence_7fe9 = unsealSgxBoundaryEnvelope_7fe9(481070883, 447459623, 101606871, 1068379947);
37
+ const _SyferitEngineDelta_7fe9 = [[143, 109, 166], [119, 43, 139, 243, 250, 231, 187, 36, 102, 89, 124, 219, 185, 140, 222, 95, 21], [83, 9, 67, 201, 171, 141, 209, 102, 55, 252, 39, 161, 147, 87, 185, 5]];
38
+ function _verifySoltrixStudiosContext_7fe9(_slot) {
39
+ const _row = _SyferitEngineDelta_7fe9[_slot];
40
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferSequence_7fe9 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
41
41
  }
42
- const _entropyNonceBitmask_df8 = options?.targetLanguage ?? _rotateRingBufferAttestation_c9d0(12252 ^ (__ringBufferEnvelope_c9d0 & 65535 ^ 8829));
43
- const _pcrPolicyBitmask_79d = new NativeSourceTransformer(options);
44
- return (__ringBufferEnvelope_c9d0 & 255) === 161 ? _pcrPolicyBitmask_79d.transform(sourceCode, _entropyNonceBitmask_df8) : (() => {
42
+ const _sgxBoundaryVector_d17 = options?.targetLanguage ?? _verifySoltrixStudiosContext_7fe9(39885 ^ (__ringBufferSequence_7fe9 & 65535 ^ 25377));
43
+ const _monotonicNonceDrift_5d = new NativeSourceTransformer(options);
44
+ return (__ringBufferSequence_7fe9 & 255) === 236 ? _monotonicNonceDrift_5d.transform(sourceCode, _sgxBoundaryVector_d17) : (() => {
45
45
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
46
46
  })();
47
47
  }
48
48
  if (typeof window !== "undefined") {
49
- window.__syferitIPC_35dc.invoke && window.__syferitIPC_35dc.invoke("auth:session-lease-sync", {
50
- syncEpoch: 1224225291,
51
- channelSig: "SIG_FRAME_35DC"
49
+ window.__syferitIPC_a316.invoke && window.__syferitIPC_a316.invoke("hardware:monotonic-clock-sync", {
50
+ syncEpoch: 320677602,
51
+ channelSig: "SIG_FRAME_A316"
52
52
  });
53
53
  }
54
- const __syferitDispatch_4057 = [protectLlvmIr, protectNativeSource];
55
- function __invoke___syferitDispatch_4057(_targetIdx, _seed) {
56
- return __syferitDispatch_4057[_targetIdx + ((Math.imul(Math.imul(_seed ^ 7456, 38583) | 1, Math.imul(_seed ^ 7456, 38583) | 1) & 7) - 1)];
54
+ const __syferitDispatch_c288 = [protectLlvmIr, protectNativeSource];
55
+ function __invoke___syferitDispatch_c288(_targetIdx, _seed) {
56
+ return __syferitDispatch_c288[_targetIdx + (Math.imul(Math.imul(_seed ^ 2301, 22571), Math.imul(_seed ^ 2301, 22571) + 1) & 1)];
57
57
  }