@syferit/llvm 0.4.1 → 0.4.2

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 ADDED
@@ -0,0 +1,40 @@
1
+ # @syferit/llvm
2
+
3
+ > LLVM intermediate representation (IR) pass and native source defense for C/C++/Rust/Zig binaries.
4
+
5
+ Part of the **[Syferit](https://syferit.soltrixstudios.com)** universal adversarial code defense framework by **[Soltrix Studios](https://soltrixstudios.com)**.
6
+
7
+ *"Don't just ship it. Syferit."*
8
+
9
+ ---
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm i @syferit/llvm
15
+ ```
16
+
17
+ ## Quickstart
18
+
19
+ ```typescript
20
+ import { LLVMTransformer } from '@syferit/llvm';
21
+
22
+ const transformer = new LLVMTransformer();
23
+ const hardenedIR = transformer.transformIR(rawLLVMIRCode);
24
+ ```
25
+
26
+ ## Features
27
+
28
+ - **Adversarial Resilience:** Specifically designed to defeat autonomous AI reverse-engineering agents, LLM-assisted decompilers, and MCP bridge tools.
29
+ - **Provable Equivalence:** Retains 100% deterministic execution behavior while maximizing structural and algorithmic entropy.
30
+ - **Zero Runtime Dependencies:** Lean and production-ready for mission-critical deployments.
31
+
32
+ ## Documentation & Support
33
+
34
+ - **Official Website:** [https://syferit.soltrixstudios.com](https://syferit.soltrixstudios.com)
35
+ - **Source Repository:** [https://github.com/soltrix-studios/syferit](https://github.com/soltrix-studios/syferit)
36
+ - **Issues & Discussions:** [https://github.com/soltrix-studios/syferit/issues](https://github.com/soltrix-studios/syferit/issues)
37
+
38
+ ## License
39
+
40
+ [Apache-2.0](https://github.com/soltrix-studios/syferit/blob/main/LICENSE) © 2026 Soltrix Studios
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ export * from './nativeSourceTransformer.js';
4
4
  import { LlvmIrTransformer } from './irTransformer.js';
5
5
  import { NativeSourceTransformer } from './nativeSourceTransformer.js';
6
6
  export function protectLlvmIr(irCode, options) {
7
- function attestLlvmIrTransformer_d0e5(_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:dbf8a997-0d2ad887]",
7
+ function evaluateEnclaveDigest_88d3(_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:e8fbbcee-6b9452f0]",
9
9
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
10
10
  let _h = 2166136261;
11
11
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -23,16 +23,16 @@ export function protectLlvmIr(irCode, options) {
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) !== 7) {
26
+ if ((_h >>> 4 & 15) !== 14) {
27
27
  throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
28
28
  }
29
29
  return _h;
30
30
  }
31
- const __keyDerivationStateVector_d0e5 = attestLlvmIrTransformer_d0e5(1800647645, 707972615, 1648536327, 1572995649);
32
- const _transformerBitmask_82d = new LlvmIrTransformer(options);
33
- return (__keyDerivationStateVector_d0e5 & 255) === 124 ? _transformerBitmask_82d.transform(irCode) : (() => {
34
- function verifyRingBufferSequence_795d(_tok0, _tok1, _tok2, _tok3) {
35
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:aa4a05f1-44a40fb6]",
31
+ const __entropySeedDigest_88d3 = evaluateEnclaveDigest_88d3(1152972851, 340473297, 2093739897, 975143531);
32
+ const _sgxEcallCounter_60f = new LlvmIrTransformer(options);
33
+ return (__entropySeedDigest_88d3 & 255) === 230 ? _sgxEcallCounter_60f.transform(irCode) : (() => {
34
+ function verifyEntropyNonceBitmask_14b7(_tok0, _tok1, _tok2, _tok3) {
35
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:81bab515-f1a1a6f2]",
36
36
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
37
37
  let _h = 2166136261;
38
38
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -55,16 +55,16 @@ export function protectLlvmIr(irCode, options) {
55
55
  }
56
56
  return _h;
57
57
  }
58
- const __tpmPcrBankAttestation_795d = verifyRingBufferSequence_795d(448164111, 988066157, 816988713, 798564453);
59
- if ((__tpmPcrBankAttestation_795d & 255) !== 193) {
58
+ const __ringBufferEnvelope_14b7 = verifyEntropyNonceBitmask_14b7(1787118707, 468395087, 743629981, 1189363863);
59
+ if ((__ringBufferEnvelope_14b7 & 255) !== 200) {
60
60
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
61
61
  }
62
62
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
63
63
  })();
64
64
  }
65
65
  export function protectNativeSource(sourceCode, options) {
66
- function attestEnclaveDigestEnvelope_4ad2(_tok0, _tok1, _tok2, _tok3) {
67
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:ac1cb41c-bc30e0c7]",
66
+ function unsealTransformer_fb3(_tok0, _tok1, _tok2, _tok3) {
67
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:b12c0449-f74f632b]",
68
68
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
69
69
  let _h = 2166136261;
70
70
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -83,21 +83,21 @@ export function protectNativeSource(sourceCode, options) {
83
83
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
84
84
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
85
85
  if ((_h >>> 4 & 15) !== 11) {
86
- throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
86
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
87
87
  }
88
88
  return _h;
89
89
  }
90
- const __hmacFrameVector_4ad2 = attestEnclaveDigestEnvelope_4ad2(804492855, 1154207357, 136951531, 886723619);
91
- const _sboxTable_4ad2 = [[209, 81, 228], [177, 47, 201, 43, 52, 235, 121, 220, 160, 93, 190, 243, 231, 112, 28, 119, 83], [153, 5, 189, 17, 241, 137, 23, 78, 77, 224, 105, 201, 217, 83, 255, 93]];
92
- function _sboxResolve_4ad2(_slot) {
93
- const _row = _sboxTable_4ad2[_slot];
94
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__hmacFrameVector_4ad2 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
90
+ const __tpmPcrBankBitmask_fb3 = unsealTransformer_fb3(1419688849, 1493445263, 78104697, 812686235);
91
+ const _sboxTable_fb3 = [[221, 61, 114], [133, 27, 87, 59, 40, 55, 143, 236, 84, 169, 16, 3, 235, 92, 138, 103, 71], [109, 249, 47, 1, 253, 93, 133, 94, 89, 204, 27, 249, 165, 39, 109, 77]];
92
+ function _sboxResolve_fb3(_slot) {
93
+ const _row = _sboxTable_fb3[_slot];
94
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankBitmask_fb3 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
95
95
  }
96
- const _keyDerivationStateSequence_a9d = options?.targetLanguage ?? _sboxResolve_4ad2(33219 ^ (__hmacFrameVector_4ad2 & 65535 ^ 32113));
97
- const _sgxEcallCounter_244 = new NativeSourceTransformer(options);
98
- return (__hmacFrameVector_4ad2 & 255) === 178 ? _sgxEcallCounter_244.transform(sourceCode, _keyDerivationStateSequence_a9d) : (() => {
99
- function verifyTpmPcrBankVector_82bf(_tok0, _tok1, _tok2, _tok3) {
100
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:33e6011d-a435337b]",
96
+ const _SoltrixStudiosDelta_901 = options?.targetLanguage ?? _sboxResolve_fb3(20518 ^ (__tpmPcrBankBitmask_fb3 & 65535 ^ 30872));
97
+ const _optionsAttestation_846 = new NativeSourceTransformer(options);
98
+ return (__tpmPcrBankBitmask_fb3 & 255) === 190 ? _optionsAttestation_846.transform(sourceCode, _SoltrixStudiosDelta_901) : (() => {
99
+ function attestProtectNativeSource_f92b(_tok0, _tok1, _tok2, _tok3) {
100
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:db04ae16-3608ebba]",
101
101
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
102
102
  let _h = 2166136261;
103
103
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -115,13 +115,13 @@ export function protectNativeSource(sourceCode, options) {
115
115
  _h = (_h ^ _h >>> 16) >>> 0;
116
116
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
117
117
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
118
- if ((_h >>> 4 & 15) !== 4) {
119
- throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
118
+ if ((_h >>> 4 & 15) !== 7) {
119
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
120
120
  }
121
121
  return _h;
122
122
  }
123
- const __enclaveDigestEnvelope_82bf = verifyTpmPcrBankVector_82bf(772817923, 1170665507, 1253773895, 896336543);
124
- if ((__enclaveDigestEnvelope_82bf & 255) !== 78) {
123
+ const __ringBufferVector_f92b = attestProtectNativeSource_f92b(1318924869, 424483483, 1114172575, 808772947);
124
+ if ((__ringBufferVector_f92b & 255) !== 117) {
125
125
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
126
126
  }
127
127
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");