@syferit/llvm 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/dist/index.d.ts +1 -1
- package/dist/index.js +15 -57
- package/package.json +2 -2
- package/dist/irTransformer.js +0 -365
- package/dist/nativeSourceTransformer.js +0 -428
- package/dist/types.js +0 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// [Protected by Soltrix Studios
|
|
1
|
+
// [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
|
|
2
2
|
import type { SyferitOptions } from '@syferit/core';
|
|
3
3
|
export type NativeTargetLanguage = 'llvm-ir' | 'c' | 'cpp' | 'rust';
|
|
4
4
|
export interface NativeProtectionOptions extends SyferitOptions {
|
package/dist/index.js
CHANGED
|
@@ -1,57 +1,15 @@
|
|
|
1
|
-
// [Protected by Soltrix Studios
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
17
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
18
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
19
|
-
_h ^= _h >>> 13;
|
|
20
|
-
}
|
|
21
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
22
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
23
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
24
|
-
_h ^= _h >>> 13;
|
|
25
|
-
}
|
|
26
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
27
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
28
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
29
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
30
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
31
|
-
if ((_h >>> 4 & 15) !== 14) {
|
|
32
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
33
|
-
}
|
|
34
|
-
return _h;
|
|
35
|
-
}
|
|
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
|
-
}
|
|
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
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
46
|
-
})();
|
|
47
|
-
}
|
|
48
|
-
if (typeof window !== "undefined") {
|
|
49
|
-
window.__syferitIPC_a316.invoke && window.__syferitIPC_a316.invoke("hardware:monotonic-clock-sync", {
|
|
50
|
-
syncEpoch: 320677602,
|
|
51
|
-
channelSig: "SIG_FRAME_A316"
|
|
52
|
-
});
|
|
53
|
-
}
|
|
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
|
-
}
|
|
1
|
+
// [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
|
|
2
|
+
import{SeededPRNG as M,MBASynthesizer as lt,buildPolymorphicDictionary as dt}from"@syferit/core";var j=class{options;prng;mba;seed;constructor(t={}){this.options=t,this.seed=typeof t.seed=="number"?t.seed:typeof t.seed=="string"&&t.seed.trim()!==""?M.hashString(t.seed):M.generateCryptoSeed(),this.prng=new M(this.seed),this.mba=new lt(this.prng)}transform(t){if(this.options.mode==="development")return{code:t,transformedCount:0,seedUsed:this.seed,inoculationInjected:!1,stateKeyDerived:0};let o=t.replace(/^\s*;.*$/gm,""),u=[],F=/define\s+[^@]*@([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g,r;for(;(r=F.exec(o))!==null;)r[1]&&r[1].length>=4&&u.push(r[1]);let a=dt(this.options.domainProfile??"saas",this.prng,u,this.options.customDictionary??[]),v=this.prng.pick(a.legalInoculations),E=`${this.prng.nextUint32().toString(16).padStart(8,"0")}-${this.prng.nextUint32().toString(16).padStart(8,"0")}`,$=`${v} [ATTESTATION_ID:${E}]`,s=(this.prng.nextUint32()&65535).toString(16),p=`${this.prng.pick(a.symbols)}_${s}`,h=`${this.prng.pick(a.stateKeys)}_${s}`,l=this.prng.nextUint32()&2147483646|1,_=this.mba.computeStringKey($,l),g=_>>>4&15,c=0,I=1,x=o.replace(/(define\s+[^@{]+@[a-zA-Z0-9_$.]+\s*\([^)]*\)[^{]*\{)([\s\S]*?)(\n\})/g,(q,O,L,H)=>{c++;let K=`%${h}_k${c}`,G=L.match(/^(\s*[a-zA-Z0-9_$.]+:\s*\n)/),X=`
|
|
3
|
+
${K} = call i32 @${p}(i32 ${l})
|
|
4
|
+
`,Q=L.replace(/^(\s*)(%[a-zA-Z0-9_$.]+)\s*=\s*(add|sub|xor)(?:\s+nsw|\s+nuw)*\s+i32\s+([^,\n]+),\s*([^\n]+)$/gm,(B,n,Y,J,_t,ct)=>{let y=_t.trim(),d=ct.trim(),i=I++,e=[];if(/^-?\d+$/.test(d)){let S=parseInt(d,10)|0,m=this.prng.nextUint32()&2147483646|1,b=S^m|0,k=m^_|0,z=`%_m_kxor_${i}`,A=`%_m_const_${i}`;e.push(`${n}${z} = xor i32 ${K}, ${k}`),e.push(`${n}${A} = xor i32 ${b}, ${z}`),d=A}if(J==="add"){let S=`%_m_axor_${i}`,m=`%_m_aand_${i}`,b=`%_m_ashl_${i}`,k=`%_m_abase_${i}`,z=`%_m_u0_${i}`,A=`%_m_u1_${i}`,P=`%_m_u2_${i}`,et=`%_m_u4_${i}`,nt=`%_m_q1_${i}`,st=`%_m_ko1_${i}`,it=`%_m_ko2_${i}`,ot=`%_m_zinv_${i}`,rt=this.prng.nextUint32()&2147483646|1,ut=1^rt|0,$t=rt^_|0;return e.push(`${n}${S} = xor i32 ${y}, ${d}`),e.push(`${n}${m} = and i32 ${y}, ${d}`),e.push(`${n}${b} = shl i32 ${m}, 1`),e.push(`${n}${k} = add i32 ${S}, ${b}`),e.push(`${n}${z} = xor i32 ${y}, ${K}`),e.push(`${n}${A} = or i32 ${z}, 1`),e.push(`${n}${P} = mul i32 ${A}, ${A}`),e.push(`${n}${et} = mul i32 ${P}, ${P}`),e.push(`${n}${nt} = and i32 ${et}, 15`),e.push(`${n}${st} = xor i32 ${K}, ${$t}`),e.push(`${n}${it} = xor i32 ${ut}, ${st}`),e.push(`${n}${ot} = xor i32 ${nt}, ${it}`),e.push(`${n}${Y} = add i32 ${k}, ${ot}`),e.join(`
|
|
5
|
+
`)}if(J==="sub"){let S=`%_m_sxor_${i}`,m=`%_m_snot_${i}`,b=`%_m_sand_${i}`,k=`%_m_sshl_${i}`;return e.push(`${n}${S} = xor i32 ${y}, ${d}`),e.push(`${n}${m} = xor i32 ${y}, -1`),e.push(`${n}${b} = and i32 ${m}, ${d}`),e.push(`${n}${k} = shl i32 ${b}, 1`),e.push(`${n}${Y} = sub i32 ${S}, ${k}`),e.join(`
|
|
6
|
+
`)}let W=`%_m_xor_or_${i}`,tt=`%_m_xor_and_${i}`;return e.push(`${n}${W} = or i32 ${y}, ${d}`),e.push(`${n}${tt} = and i32 ${y}, ${d}`),e.push(`${n}${Y} = sub i32 ${W}, ${tt}`),e.join(`
|
|
7
|
+
`)});if(G){let B=G[1],n=Q.slice(B.length);return`${O}${B}${X}${n}${H}`}return`${O}${X}${Q}${H}`});if(c===0)return{code:t,transformedCount:0,seedUsed:this.seed,inoculationInjected:!1,stateKeyDerived:0};let D=Buffer.from($,"utf-8").length+1,C=$.replace(/\\/g,"\\\\").replace(/"/g,"\\22"),N=1511516595,R=l^N|0,f=(_|0)-R|0;return{code:`${["; [Protected by Soltrix Studios \u2014 Syferit Code Defense Engine | https://syferit.soltrixstudios.com]",`@.syferit.legal.attestation_${s} = private unnamed_addr constant [${D} x i8] c"${C}\\00", align 1`,`@llvm.compiler.used = appending global [1 x ptr] [ptr @.syferit.legal.attestation_${s}], section "llvm.metadata"`,"","declare void @llvm.trap() #0","",`define internal i32 @${p}(i32 %_tok) noinline optnone {`,"entry:",` %_att_byte = load volatile i8, ptr @.syferit.legal.attestation_${s}, align 1`," %_att_valid = icmp ne i8 %_att_byte, 0",` %_x0 = xor i32 %_tok, ${N}`,` %_key = add i32 %_x0, ${f}`," %_shr = lshr i32 %_key, 4"," %_nib = and i32 %_shr, 15",` %_nib_ok = icmp eq i32 %_nib, ${g}`," %_all_ok = and i1 %_att_valid, %_nib_ok"," br i1 %_all_ok, label %hash.ok, label %tamper.trap","","tamper.trap:"," call void @llvm.trap()"," unreachable","","hash.ok:"," ret i32 %_key","}",""].join(`
|
|
8
|
+
`)}
|
|
9
|
+
${x}`,transformedCount:c,seedUsed:this.seed,inoculationInjected:!0,stateKeyDerived:_>>>0}}};import{SeededPRNG as V,MBASynthesizer as pt,buildPolymorphicDictionary as at}from"@syferit/core";var Z=class{options;prng;mba;seed;constructor(t={}){this.options=t,this.seed=typeof t.seed=="number"?t.seed:typeof t.seed=="string"&&t.seed.trim()!==""?V.hashString(t.seed):V.generateCryptoSeed(),this.prng=new V(this.seed),this.mba=new pt(this.prng)}transform(t,o="cpp"){return this.options.mode==="development"?{code:t,transformedCount:0,seedUsed:this.seed,inoculationInjected:!1,stateKeyDerived:0}:o==="rust"?this.transformRust(t):this.transformCCpp(t)}transformCCpp(t){let o=t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(?<!:)\/\/.*$/gm,""),u=[],F=/\b([a-zA-Z_][a-zA-Z0-9_]{3,20})\b/g,r;for(;(r=F.exec(o))!==null;){let f=r[1];["int","void","char","float","double","return","const","static","struct","class","public","private","uint32_t","include"].includes(f)||u.push(f)}let a=at(this.options.domainProfile??"saas",this.prng,u,this.options.customDictionary??[]),v=this.prng.pick(a.legalInoculations),E=`${this.prng.nextUint32().toString(16).padStart(8,"0")}-${this.prng.nextUint32().toString(16).padStart(8,"0")}`,$=`${v} [ATTESTATION_ID:${E}]`,s=(this.prng.nextUint32()&65535).toString(16),p=`${this.prng.pick(a.symbols)}_${s}`,h=`${this.prng.pick(a.stateKeys)}_${s}`,l=`_fold_carry_${s}`,_=`_unmask_scalar_${s}`,g=`_verify_quorum_${s}`,c=`${this.prng.pick(a.symbols)}_decoy_${s}`,I=this.prng.nextUint32()&2147483646|1,x=this.mba.computeStringKey($,I),U=x>>>4&15,D=$.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),C=0,N=o.replace(/(\b(?:int|long|short|unsigned|uint32_t|int32_t|uint64_t|int64_t|double|float|bool|auto)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\([^;{}]*\)\s*\{)/g,f=>{C++;let w=this.prng.nextUint32()&2147483646|1,q=(1^w)>>>0,O=(w^x)>>>0;return[f,` const unsigned int ${h} = ${p}(${I}u);`,` if (${g}(${h}, ${q}u, ${O}u) == 0u) { return ${c}(${h}); }`].join(`
|
|
10
|
+
`)});return{code:`${["/* [Protected by Soltrix Studios \u2014 Syferit Code Defense Engine | https://syferit.soltrixstudios.com] */","#if defined(__GNUC__) || defined(__clang__)"," #define SYFERIT_USED __attribute__((used))"," #define SYFERIT_NOINLINE __attribute__((noinline))","#elif defined(_MSC_VER)"," #define SYFERIT_USED"," #define SYFERIT_NOINLINE __declspec(noinline)","#else"," #define SYFERIT_USED"," #define SYFERIT_NOINLINE","#endif","",`SYFERIT_USED static const char _syferit_attestation_${s}[] = "${D}";`,"",`SYFERIT_NOINLINE static unsigned int ${p}(unsigned int _tok) {`," unsigned int _h = (2166136261u ^ _tok);",` for (unsigned int _i = 0; _syferit_attestation_${s}[_i] != '\\0'; ++_i) {`,` _h ^= (unsigned char)_syferit_attestation_${s}[_i];`," _h *= 16777619u;"," _h ^= (_h >> 13);"," }"," _h = (_h ^ (_h >> 16)) * 2246822507u;"," _h = (_h ^ (_h >> 13)) * 3266489909u;"," _h = (_h ^ (_h >> 16));"," if ((_h & 0xFFFFu) == 0u) _h |= 0x1337u;"," if (((_h >> 16) & 0xFFFFu) == 0u) _h |= 0x73310000u;",` if (((_h >> 4) & 0xFu) != ${U}u) {`," volatile int *_trap = (volatile int *)0; *_trap = 0;"," }"," return _h;","}","",`static inline unsigned int ${_}(unsigned int _c1, unsigned int _c2, unsigned int _k) {`," return _c1 ^ (_k ^ _c2);","}","",`static inline unsigned int ${l}(unsigned int _x, unsigned int _y) {`," return (_x ^ _y) + ((_x & _y) << 1u);","}","",`static inline unsigned int ${g}(unsigned int _k, unsigned int _c1, unsigned int _c2) {`," unsigned int _u = _k | 1u;"," unsigned int _u2 = _u * _u;"," unsigned int _u4 = _u2 * _u2;",` unsigned int _expected = ${_}(_c1, _c2, _k);`," return ((_u4 & 15u) == _expected) ? 1u : 0u;","}","",`SYFERIT_NOINLINE static int ${c}(unsigned int _k) {`,` unsigned int _acc = ${l}(_k, 0x5A17E9B3u);`," return (int)(_acc ^ 0xDEADBEEFu);","}",""].join(`
|
|
11
|
+
`)}
|
|
12
|
+
${N}`,transformedCount:C,seedUsed:this.seed,inoculationInjected:!0,stateKeyDerived:x>>>0}}transformRust(t){let o=t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(?<!:)\/\/.*$/gm,""),u=[],F=/\bfn\s+([a-zA-Z_][a-zA-Z0-9_]*)/g,r;for(;(r=F.exec(o))!==null;)r[1]&&r[1].length>=4&&u.push(r[1]);let a=at(this.options.domainProfile??"saas",this.prng,u,this.options.customDictionary??[]),v=this.prng.pick(a.legalInoculations),E=`${this.prng.nextUint32().toString(16).padStart(8,"0")}-${this.prng.nextUint32().toString(16).padStart(8,"0")}`,$=`${v} [ATTESTATION_ID:${E}]`,s=(this.prng.nextUint32()&65535).toString(16),p=`${this.prng.pick(a.symbols)}_${s}`.toLowerCase(),h=`${this.prng.pick(a.stateKeys)}_${s}`.toLowerCase(),l=`_verify_quorum_${s}`,_=`_fold_carry_${s}`,g=this.prng.nextUint32()&2147483646|1,c=this.mba.computeStringKey($,g),I=c>>>4&15,x=$.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),U=0,D=o.replace(/(\b(?:pub\s+)?fn\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\([^{;]*\)(?:\s*->\s*[^{;]+)?\s*\{)/g,N=>{U++;let R=this.prng.nextUint32()&2147483646|1,f=(1^R)>>>0,w=(R^c)>>>0;return[N,` let ${h}: u32 = ${p}(${g}u32);`,` if !${l}(${h}, ${f}u32, ${w}u32) { panic!("ASSERTION_INVARIANT: State quorum mismatch"); }`].join(`
|
|
13
|
+
`)});return{code:`${["// [Protected by Soltrix Studios \u2014 Syferit Code Defense Engine | https://syferit.soltrixstudios.com]","#[used]",`static _SYFERIT_ATTESTATION_${s.toUpperCase()}: &[u8] = b"${x}\\0";`,"","#[inline(never)]",`fn ${p}(_tok: u32) -> u32 {`," let mut _h: u32 = 2166136261u32 ^ _tok;"," let mut _i: usize = 0;",` while _i + 1 < _SYFERIT_ATTESTATION_${s.toUpperCase()}.len() {`,` _h ^= _SYFERIT_ATTESTATION_${s.toUpperCase()}[_i] as u32;`," _h = _h.wrapping_mul(16777619u32);"," _h ^= _h >> 13;"," _i += 1;"," }"," _h = (_h ^ (_h >> 16)).wrapping_mul(2246822507u32);"," _h = (_h ^ (_h >> 13)).wrapping_mul(3266489909u32);"," _h = _h ^ (_h >> 16);"," if (_h & 0xFFFFu32) == 0 { _h |= 0x1337u32; }"," if ((_h >> 16) & 0xFFFFu32) == 0 { _h |= 0x73310000u32; }",` if ((_h >> 4) & 0xFu32) != ${I}u32 {`,' panic!("ASSERTION_INVARIANT: Attestation keyframe corrupted");'," }"," _h","}","","#[inline(always)]",`fn ${_}(_x: u32, _y: u32) -> u32 {`," (_x ^ _y).wrapping_add((_x & _y) << 1)","}","","#[inline(always)]",`fn ${l}(_k: u32, _c1: u32, _c2: u32) -> bool {`," let _u: u32 = _k | 1u32;"," let _u2: u32 = _u.wrapping_mul(_u);"," let _u4: u32 = _u2.wrapping_mul(_u2);"," let _expected: u32 = _c1 ^ (_k ^ _c2);",` (_u4 & 15u32) == ${_}(_expected, 0u32)`,"}",""].join(`
|
|
14
|
+
`)}
|
|
15
|
+
${D}`,transformedCount:U,seedUsed:this.seed,inoculationInjected:!0,stateKeyDerived:c>>>0}}};function St(T,t){return new j(t).transform(T)}function bt(T,t){let o=t?.targetLanguage??"cpp";return new Z(t).transform(T,o)}export{j as LlvmIrTransformer,Z as NativeSourceTransformer,St as protectLlvmIr,bt as protectNativeSource};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syferit/llvm",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Portable LLVM IR (.ll) and Native C/C++/Rust adversarial protection engine for Syferit",
|
|
5
5
|
"author": "Soltrix Studios",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@syferit/core": "^0.4.
|
|
21
|
+
"@syferit/core": "^0.4.6"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
package/dist/irTransformer.js
DELETED
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import { SeededPRNG, MBASynthesizer, buildPolymorphicDictionary } from '@syferit/core';
|
|
2
|
-
export class LlvmIrTransformer {
|
|
3
|
-
options;
|
|
4
|
-
prng;
|
|
5
|
-
mba;
|
|
6
|
-
seed;
|
|
7
|
-
constructor(options = {}) {
|
|
8
|
-
this.options = options;
|
|
9
|
-
this.seed = typeof options.seed === 'number' ? options.seed : typeof options.seed === 'string' && options.seed.trim() !== '' ? SeededPRNG.hashString(options.seed) : SeededPRNG.generateCryptoSeed();
|
|
10
|
-
this.prng = new SeededPRNG(this.seed);
|
|
11
|
-
this.mba = new MBASynthesizer(this.prng);
|
|
12
|
-
}
|
|
13
|
-
transform(rawIrCode) {
|
|
14
|
-
function unsealRingBufferIntegrity_ccb0(_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:94f5252d-67d66fd5]",
|
|
16
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
17
|
-
let _h = 2166136261;
|
|
18
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
19
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
20
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
21
|
-
_h ^= _h >>> 13;
|
|
22
|
-
}
|
|
23
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
24
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
25
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
26
|
-
_h ^= _h >>> 13;
|
|
27
|
-
}
|
|
28
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
29
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
30
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
31
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
32
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
33
|
-
if ((_h >>> 4 & 15) !== 2) {
|
|
34
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
35
|
-
}
|
|
36
|
-
return _h;
|
|
37
|
-
}
|
|
38
|
-
const __ringBufferIntegrity_ccb0 = unsealRingBufferIntegrity_ccb0(1046876895, 873676015, 1560315435, 1708886027);
|
|
39
|
-
const _stateKeyDerivedSequence_ccb0 = [[65, 49, 69, 235, 217, 133, 223, 68, 37, 244, 33, 195, 129, 111, 135, 39], [45, 225, 61, 201, 177, 119, 175, 45, 20, 194, 7], [8, 192, 0, 162, 93, 12, 48, 85, 201, 226, 199, 138, 94, 23, 69, 238, 202], [224, 175, 244, 133], [222, 154, 202, 104, 19, 182, 122, 159, 191, 40, 189, 48, 0, 221, 31, 180, 124], [188, 124, 187], [106, 78, 105, 58, 231, 164, 247, 139, 95, 8, 115, 225, 209, 154, 171, 68, 54], [79, 17, 68, 213, 202, 131, 210, 108, 58, 231, 14, 222, 140, 125, 142, 35, 19], [63, 242, 44], [20, 194, 16, 184, 100, 54, 98, 55, 240, 167, 244, 144, 76, 28, 74, 244], [227, 165, 254, 212, 18], [231, 196, 143]];
|
|
40
|
-
function _isolateEntropyNonceVector_ccb0(_slot) {
|
|
41
|
-
const _row = _stateKeyDerivedSequence_ccb0[_slot];
|
|
42
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferIntegrity_ccb0 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
43
|
-
}
|
|
44
|
-
if (this.options.mode === _isolateEntropyNonceVector_ccb0(27887 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 22219)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 43 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 43 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 43 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 43 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 23 & 255 ^ 20)) === 32) {
|
|
45
|
-
return {
|
|
46
|
-
code: rawIrCode,
|
|
47
|
-
transformedCount: (15190 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535),
|
|
48
|
-
seedUsed: this.seed,
|
|
49
|
-
inoculationInjected: false,
|
|
50
|
-
stateKeyDerived: (14418 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535)
|
|
51
|
-
};
|
|
52
|
-
} else if (this.options.mode === _isolateEntropyNonceVector_ccb0(32711 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 17890)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 56 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 56 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 56 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 56 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 12 & 255 ^ 131)) === 65) {
|
|
53
|
-
return {
|
|
54
|
-
code: rawIrCode,
|
|
55
|
-
transformedCount: 20302 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 30058),
|
|
56
|
-
seedUsed: this.seed,
|
|
57
|
-
inoculationInjected: false,
|
|
58
|
-
stateKeyDerived: 24797 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 23289)
|
|
59
|
-
};
|
|
60
|
-
} else if (this.options.mode === _isolateEntropyNonceVector_ccb0(31946 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 18156)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 106 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 106 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 106 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 106 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 17 & 255 ^ 125)) === 24) {
|
|
61
|
-
return {
|
|
62
|
-
code: rawIrCode,
|
|
63
|
-
transformedCount: (15190 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535),
|
|
64
|
-
seedUsed: this.seed,
|
|
65
|
-
inoculationInjected: false,
|
|
66
|
-
stateKeyDerived: (15014 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535)
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const _ringBufferIntegrity_685 = rawIrCode.replace(/^\s*;.*$/gm, '');
|
|
70
|
-
const _generateCryptoSeedIntegrity_d5 = [];
|
|
71
|
-
const _tpmPcrBankVector_138 = /define\s+[^@]*@([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g;
|
|
72
|
-
let _enclaveDigestAttestation_c7e;
|
|
73
|
-
while ((_enclaveDigestAttestation_c7e = _tpmPcrBankVector_138.exec(_ringBufferIntegrity_685)) !== null) {
|
|
74
|
-
if (_enclaveDigestAttestation_c7e[27180 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 20489)] && _enclaveDigestAttestation_c7e[21796 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 28417)].length >= (31168 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 17376))) {
|
|
75
|
-
_generateCryptoSeedIntegrity_d5.push(_enclaveDigestAttestation_c7e[8208 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 6709)]);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const _hashStringProof_8c4 = buildPolymorphicDictionary(this.options.domainProfile ?? _isolateEntropyNonceVector_ccb0(21975 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 28656)), this.prng, _generateCryptoSeedIntegrity_d5, this.options.customDictionary ?? []);
|
|
79
|
-
const _rawIrCodeVector_19d = this.prng.pick(_hashStringProof_8c4.legalInoculations);
|
|
80
|
-
const _replaceAttestation_c7d = `${this.prng.nextUint32().toString(9221 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 7729)).padStart(18050 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 31918), '0')}-${this.prng.nextUint32().toString(9239 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 7715)).padStart(1075 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 15903), '0')}`;
|
|
81
|
-
const _irCodeEnvelope_8b0 = `${_rawIrCodeVector_19d} [ATTESTATION_ID:${_replaceAttestation_c7d}]`;
|
|
82
|
-
const _hmacFrameAttestation_8c6 = (this.prng.nextUint32() & (58662 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 8445))).toString(9010 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 6406));
|
|
83
|
-
const _transformedCountSequence_66b = `${this.prng.pick(_hashStringProof_8c4.symbols)}_${_hmacFrameAttestation_8c6}`;
|
|
84
|
-
const _ringBufferSequence_9e6 = `${this.prng.pick(_hashStringProof_8c4.stateKeys)}_${_hmacFrameAttestation_8c6}`;
|
|
85
|
-
const _keyDerivationStateSequence_936 = this.prng.nextUint32() & 2147483646 + ((__ringBufferIntegrity_ccb0 & 255) - 36) | 24016 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 26613);
|
|
86
|
-
const _inoculationInjectedIntegrity_bf0 = this.mba.computeStringKey(_irCodeEnvelope_8b0, _keyDerivationStateSequence_936);
|
|
87
|
-
const _ringBufferProof_67e = _inoculationInjectedIntegrity_bf0 >>> (28353 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 21729)) & (17257 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 31042));
|
|
88
|
-
let _monotonicNonceDrift_fd2 = 31461 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 16577);
|
|
89
|
-
let _SeededPRNGEnvelope_49b = 10589 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 4984);
|
|
90
|
-
const _constructorIntegrity_13e = _ringBufferIntegrity_685.replace(/(define\s+[^@{]+@[a-zA-Z0-9_$.]+\s*\([^)]*\)[^{]*\{)([\s\S]*?)(\n\})/g, (_fullMatch, header, body, footer) => {
|
|
91
|
-
_monotonicNonceDrift_fd2++;
|
|
92
|
-
const stateKeyVar = `%${_ringBufferSequence_9e6}_k${_monotonicNonceDrift_fd2}`;
|
|
93
|
-
const labelMatch = body.match(/^(\s*[a-zA-Z0-9_$.]+:\s*\n)/);
|
|
94
|
-
let preamble = `\n ${stateKeyVar} = call i32 @${_transformedCountSequence_66b}(i32 ${_keyDerivationStateSequence_936})\n`;
|
|
95
|
-
const rewrittenBody = body.replace(/^(\s*)(%[a-zA-Z0-9_$.]+)\s*=\s*(add|sub|xor)(?:\s+nsw|\s+nuw)*\s+i32\s+([^,\n]+),\s*([^\n]+)$/gm, (_instMatch, indent, destReg, op, lhsRaw, rhsRaw) => {
|
|
96
|
-
function evaluateRingBufferVector_3950(_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:013eada9-aba2b799]",
|
|
98
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
99
|
-
let _h = 2166136261;
|
|
100
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
101
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
102
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
103
|
-
_h ^= _h >>> 13;
|
|
104
|
-
}
|
|
105
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
106
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
107
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
108
|
-
_h ^= _h >>> 13;
|
|
109
|
-
}
|
|
110
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
111
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
112
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
113
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
114
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
115
|
-
if ((_h >>> 4 & 15) !== 1) {
|
|
116
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
117
|
-
}
|
|
118
|
-
return _h;
|
|
119
|
-
}
|
|
120
|
-
const __entropySeedDigest_3950 = evaluateRingBufferVector_3950(61233769, 290344363, 74478995, 629518669);
|
|
121
|
-
const _sgxBoundaryAttestation_905 = lhsRaw.trim();
|
|
122
|
-
let _transformedCountSequence_f96 = rhsRaw.trim();
|
|
123
|
-
const _tpmUnsealOffset_f69 = _SeededPRNGEnvelope_49b++;
|
|
124
|
-
const _keyDerivationStateProof_b2b = [];
|
|
125
|
-
if (/^-?\d+$/.test(_transformedCountSequence_f96)) {
|
|
126
|
-
const literalVal = parseInt(_transformedCountSequence_f96, 16205 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 1379)) | 2196 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 12976);
|
|
127
|
-
const mask = this.prng.nextUint32() & 2147483646 + ((__ringBufferIntegrity_ccb0 & 255) - 36) | 29256 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 18541);
|
|
128
|
-
const c1 = literalVal ^ mask | 6143 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 11739);
|
|
129
|
-
const c2 = mask ^ _inoculationInjectedIntegrity_bf0 | 11249 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 4565);
|
|
130
|
-
const tMask1 = `%_m_kxor_${_tpmUnsealOffset_f69}`;
|
|
131
|
-
const tMask2 = `%_m_const_${_tpmUnsealOffset_f69}`;
|
|
132
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tMask1} = xor i32 ${stateKeyVar}, ${c2}`);
|
|
133
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tMask2} = xor i32 ${c1}, ${tMask1}`);
|
|
134
|
-
_transformedCountSequence_f96 = tMask2;
|
|
135
|
-
}
|
|
136
|
-
if (op === _isolateEntropyNonceVector_ccb0(27179 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 20491)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 105 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 105 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 105 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 105 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 17 & 255 ^ 35)) === 70) {
|
|
137
|
-
const tXor = `%_m_axor_${_tpmUnsealOffset_f69}`;
|
|
138
|
-
const tAnd = `%_m_aand_${_tpmUnsealOffset_f69}`;
|
|
139
|
-
const tShl = `%_m_ashl_${_tpmUnsealOffset_f69}`;
|
|
140
|
-
const tBase = `%_m_abase_${_tpmUnsealOffset_f69}`;
|
|
141
|
-
const tU0 = `%_m_u0_${_tpmUnsealOffset_f69}`;
|
|
142
|
-
const tU1 = `%_m_u1_${_tpmUnsealOffset_f69}`;
|
|
143
|
-
const tU2 = `%_m_u2_${_tpmUnsealOffset_f69}`;
|
|
144
|
-
const tU4 = `%_m_u4_${_tpmUnsealOffset_f69}`;
|
|
145
|
-
const tQ1 = `%_m_q1_${_tpmUnsealOffset_f69}`;
|
|
146
|
-
const tKOne1 = `%_m_ko1_${_tpmUnsealOffset_f69}`;
|
|
147
|
-
const tKOne2 = `%_m_ko2_${_tpmUnsealOffset_f69}`;
|
|
148
|
-
const tZero = `%_m_zinv_${_tpmUnsealOffset_f69}`;
|
|
149
|
-
const oneMask = this.prng.nextUint32() & (14338 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535) | (15146 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
150
|
-
const oneC1 = (14338 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535) ^ oneMask | (14418 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
151
|
-
const oneC2 = oneMask ^ _inoculationInjectedIntegrity_bf0 | (15190 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
152
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
153
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
154
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
155
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
156
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU0} = xor i32 ${_sgxBoundaryAttestation_905}, ${stateKeyVar}`);
|
|
157
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
158
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
159
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
160
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
161
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne1} = xor i32 ${stateKeyVar}, ${oneC2}`);
|
|
162
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
163
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
164
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
165
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
166
|
-
} else if (op === _isolateEntropyNonceVector_ccb0(13096 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 2313)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 49 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 49 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 49 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 49 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 8 & 255 ^ 132)) === 191) {
|
|
167
|
-
const tXor = `%_m_axor_${_tpmUnsealOffset_f69}`;
|
|
168
|
-
const tAnd = `%_m_aand_${_tpmUnsealOffset_f69}`;
|
|
169
|
-
const tShl = `%_m_ashl_${_tpmUnsealOffset_f69}`;
|
|
170
|
-
const tBase = `%_m_abase_${_tpmUnsealOffset_f69}`;
|
|
171
|
-
const tU0 = `%_m_u0_${_tpmUnsealOffset_f69}`;
|
|
172
|
-
const tU1 = `%_m_u1_${_tpmUnsealOffset_f69}`;
|
|
173
|
-
const tU2 = `%_m_u2_${_tpmUnsealOffset_f69}`;
|
|
174
|
-
const tU4 = `%_m_u4_${_tpmUnsealOffset_f69}`;
|
|
175
|
-
const tQ1 = `%_m_q1_${_tpmUnsealOffset_f69}`;
|
|
176
|
-
const tKOne1 = `%_m_ko1_${_tpmUnsealOffset_f69}`;
|
|
177
|
-
const tKOne2 = `%_m_ko2_${_tpmUnsealOffset_f69}`;
|
|
178
|
-
const tZero = `%_m_zinv_${_tpmUnsealOffset_f69}`;
|
|
179
|
-
const oneMask = this.prng.nextUint32() & 2147483646 + ((__ringBufferIntegrity_ccb0 & 255) - 36) | 13361 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 3604);
|
|
180
|
-
const oneC1 = 9070 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 6475) ^ oneMask | 22890 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 25422);
|
|
181
|
-
const oneC2 = oneMask ^ _inoculationInjectedIntegrity_bf0 | 24721 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 23221);
|
|
182
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
183
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
184
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
185
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
186
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU0} = xor i32 ${_sgxBoundaryAttestation_905}, ${stateKeyVar}`);
|
|
187
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
188
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
189
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
190
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
191
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne1} = xor i32 ${stateKeyVar}, ${oneC2}`);
|
|
192
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
193
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
194
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
195
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
196
|
-
} else if (op === _isolateEntropyNonceVector_ccb0(12499 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 2801)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 79 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 79 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 79 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 79 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 2 & 255 ^ 172)) === 46) {
|
|
197
|
-
const tXor = `%_m_axor_${_tpmUnsealOffset_f69}`;
|
|
198
|
-
const tAnd = `%_m_aand_${_tpmUnsealOffset_f69}`;
|
|
199
|
-
const tShl = `%_m_ashl_${_tpmUnsealOffset_f69}`;
|
|
200
|
-
const tBase = `%_m_abase_${_tpmUnsealOffset_f69}`;
|
|
201
|
-
const tU0 = `%_m_u0_${_tpmUnsealOffset_f69}`;
|
|
202
|
-
const tU1 = `%_m_u1_${_tpmUnsealOffset_f69}`;
|
|
203
|
-
const tU2 = `%_m_u2_${_tpmUnsealOffset_f69}`;
|
|
204
|
-
const tU4 = `%_m_u4_${_tpmUnsealOffset_f69}`;
|
|
205
|
-
const tQ1 = `%_m_q1_${_tpmUnsealOffset_f69}`;
|
|
206
|
-
const tKOne1 = `%_m_ko1_${_tpmUnsealOffset_f69}`;
|
|
207
|
-
const tKOne2 = `%_m_ko2_${_tpmUnsealOffset_f69}`;
|
|
208
|
-
const tZero = `%_m_zinv_${_tpmUnsealOffset_f69}`;
|
|
209
|
-
const oneMask = this.prng.nextUint32() & (14418 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535) | (14418 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
210
|
-
const oneC1 = (15014 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535) ^ oneMask | (15014 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
211
|
-
const oneC2 = oneMask ^ _inoculationInjectedIntegrity_bf0 | (15014 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535);
|
|
212
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
213
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
214
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
215
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
216
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU0} = xor i32 ${_sgxBoundaryAttestation_905}, ${stateKeyVar}`);
|
|
217
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
218
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
219
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
220
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
221
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne1} = xor i32 ${stateKeyVar}, ${oneC2}`);
|
|
222
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
223
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
224
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
225
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
226
|
-
}
|
|
227
|
-
if (op === _isolateEntropyNonceVector_ccb0(23663 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 26188)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 62 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 62 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 62 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 62 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 14 & 255 ^ 53)) === 64) {
|
|
228
|
-
const tXor = `%_m_sxor_${_tpmUnsealOffset_f69}`;
|
|
229
|
-
const tNot = `%_m_snot_${_tpmUnsealOffset_f69}`;
|
|
230
|
-
const tAnd = `%_m_sand_${_tpmUnsealOffset_f69}`;
|
|
231
|
-
const tShl = `%_m_sshl_${_tpmUnsealOffset_f69}`;
|
|
232
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
233
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tNot} = xor i32 ${_sgxBoundaryAttestation_905}, -1`);
|
|
234
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${tNot}, ${_transformedCountSequence_f96}`);
|
|
235
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
236
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
237
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
238
|
-
} else if (op === _isolateEntropyNonceVector_ccb0(24751 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 23171)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 118 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 118 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 118 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 118 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 9 & 255 ^ 109)) === 113) {
|
|
239
|
-
const tXor = `%_m_sxor_${_tpmUnsealOffset_f69}`;
|
|
240
|
-
const tNot = `%_m_snot_${_tpmUnsealOffset_f69}`;
|
|
241
|
-
const tAnd = `%_m_sand_${_tpmUnsealOffset_f69}`;
|
|
242
|
-
const tShl = `%_m_sshl_${_tpmUnsealOffset_f69}`;
|
|
243
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
244
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tNot} = xor i32 ${_sgxBoundaryAttestation_905}, -1`);
|
|
245
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${tNot}, ${_transformedCountSequence_f96}`);
|
|
246
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
247
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
248
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
249
|
-
} else if (op === _isolateEntropyNonceVector_ccb0(21698 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 28399)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 17 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 17 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 17 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 17 | 1)) & 15 ^ (__ringBufferIntegrity_ccb0 >>> 9 & 255 ^ 188)) === 164) {
|
|
250
|
-
const tXor = `%_m_sxor_${_tpmUnsealOffset_f69}`;
|
|
251
|
-
const tNot = `%_m_snot_${_tpmUnsealOffset_f69}`;
|
|
252
|
-
const tAnd = `%_m_sand_${_tpmUnsealOffset_f69}`;
|
|
253
|
-
const tShl = `%_m_sshl_${_tpmUnsealOffset_f69}`;
|
|
254
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tXor} = xor i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
255
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tNot} = xor i32 ${_sgxBoundaryAttestation_905}, -1`);
|
|
256
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tAnd} = and i32 ${tNot}, ${_transformedCountSequence_f96}`);
|
|
257
|
-
_keyDerivationStateProof_b2b.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
258
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
259
|
-
return _keyDerivationStateProof_b2b.join('\n');
|
|
260
|
-
}
|
|
261
|
-
const _replaceAttestation_8e7 = `%_m_xor_or_${_tpmUnsealOffset_f69}`;
|
|
262
|
-
const _enclaveDigestAttestation_750 = `%_m_xor_and_${_tpmUnsealOffset_f69}`;
|
|
263
|
-
_keyDerivationStateProof_b2b.push(`${indent}${_replaceAttestation_8e7} = or i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
264
|
-
_keyDerivationStateProof_b2b.push(`${indent}${_enclaveDigestAttestation_750} = and i32 ${_sgxBoundaryAttestation_905}, ${_transformedCountSequence_f96}`);
|
|
265
|
-
_keyDerivationStateProof_b2b.push(`${indent}${destReg} = sub i32 ${_replaceAttestation_8e7}, ${_enclaveDigestAttestation_750}`);
|
|
266
|
-
return (__entropySeedDigest_3950 & 255) === 19 ? _keyDerivationStateProof_b2b.join('\n') : (() => {
|
|
267
|
-
function assertGenerateCryptoSeed_a806(_tok0, _tok1, _tok2, _tok3) {
|
|
268
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:30163ecb-be0f79fa]",
|
|
269
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
270
|
-
let _h = 2166136261;
|
|
271
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
272
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
273
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
274
|
-
_h ^= _h >>> 13;
|
|
275
|
-
}
|
|
276
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
277
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
278
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
279
|
-
_h ^= _h >>> 13;
|
|
280
|
-
}
|
|
281
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
282
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
283
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
284
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
285
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
286
|
-
if ((_h >>> 4 & 15) !== 1) {
|
|
287
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
288
|
-
}
|
|
289
|
-
return _h;
|
|
290
|
-
}
|
|
291
|
-
const __enclaveBoundaryCheck_a806 = assertGenerateCryptoSeed_a806(1379060527, 1588871631, 1094515261, 778566973);
|
|
292
|
-
if ((__enclaveBoundaryCheck_a806 & 255) !== 23) {
|
|
293
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
294
|
-
}
|
|
295
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
296
|
-
})();
|
|
297
|
-
});
|
|
298
|
-
if (labelMatch) {
|
|
299
|
-
const labelPart = labelMatch[8210 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 6711)];
|
|
300
|
-
const rest = rewrittenBody.slice(labelPart.length);
|
|
301
|
-
return `${header}${labelPart}${preamble}${rest}${footer}`;
|
|
302
|
-
}
|
|
303
|
-
return `${header}${preamble}${rewrittenBody}${footer}`;
|
|
304
|
-
});
|
|
305
|
-
if (_monotonicNonceDrift_fd2 === (20067 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 29767))) {
|
|
306
|
-
return {
|
|
307
|
-
code: rawIrCode,
|
|
308
|
-
transformedCount: 26027 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 24463),
|
|
309
|
-
seedUsed: this.seed,
|
|
310
|
-
inoculationInjected: false,
|
|
311
|
-
stateKeyDerived: 30318 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 19530)
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
const _ProprietaryEnclaveDelta_343 = Buffer.from(_irCodeEnvelope_8b0, _isolateEntropyNonceVector_ccb0(25562 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 23028)));
|
|
315
|
-
const _codeSequence_778 = _ProprietaryEnclaveDelta_343.length + (6867 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 8438));
|
|
316
|
-
const _hmacFrameIntegrity_4d8 = _irCodeEnvelope_8b0.replace(/\\/g, '\\\\').replace(/"/g, _isolateEntropyNonceVector_ccb0(28080 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 22431)));
|
|
317
|
-
const _tpmPcrBankSequence_7b4 = 1511516595 + ((__ringBufferIntegrity_ccb0 & 255) - 36);
|
|
318
|
-
const _hkdfSaltRotation_7d6 = _keyDerivationStateSequence_936 ^ _tpmPcrBankSequence_7b4 | 18623 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 29339);
|
|
319
|
-
const _stateKeyDerivedSequence_5ac = (_inoculationInjectedIntegrity_bf0 | 3826 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 13526)) - _hkdfSaltRotation_7d6 | 16360 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 1484);
|
|
320
|
-
const _transformProof_c3d = [`; [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]`, `@.syferit.legal.attestation_${_hmacFrameAttestation_8c6} = private unnamed_addr constant [${_codeSequence_778} x i8] c"${_hmacFrameIntegrity_4d8}\\00", align 1`, `@llvm.compiler.used = appending global [1 x ptr] [ptr @.syferit.legal.attestation_${_hmacFrameAttestation_8c6}], section "llvm.metadata"`, ``, `declare void @llvm.trap() #0`, ``, `define internal i32 @${_transformedCountSequence_66b}(i32 %_tok) noinline optnone {`, `entry:`, ` %_att_byte = load volatile i8, ptr @.syferit.legal.attestation_${_hmacFrameAttestation_8c6}, align 1`, ` %_att_valid = icmp ne i8 %_att_byte, 0`, ` %_x0 = xor i32 %_tok, ${_tpmPcrBankSequence_7b4}`, ` %_key = add i32 %_x0, ${_stateKeyDerivedSequence_5ac}`, ` %_shr = lshr i32 %_key, 4`, ` %_nib = and i32 %_shr, 15`, ` %_nib_ok = icmp eq i32 %_nib, ${_ringBufferProof_67e}`, ` %_all_ok = and i1 %_att_valid, %_nib_ok`, ` br i1 %_all_ok, label %hash.ok, label %tamper.trap`, ``, `tamper.trap:`, ` call void @llvm.trap()`, ` unreachable`, ``, `hash.ok:`, ` ret i32 %_key`, `}`, ``].join('\n');
|
|
321
|
-
return (__ringBufferIntegrity_ccb0 & 255) === 36 ? {
|
|
322
|
-
code: `${_transformProof_c3d}\n${_constructorIntegrity_13e}`,
|
|
323
|
-
transformedCount: _monotonicNonceDrift_fd2,
|
|
324
|
-
seedUsed: this.seed,
|
|
325
|
-
inoculationInjected: true,
|
|
326
|
-
stateKeyDerived: _inoculationInjectedIntegrity_bf0 >>> (10774 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 4146))
|
|
327
|
-
} : (() => {
|
|
328
|
-
function rotateSeedUsed_63b4(_tok0, _tok1, _tok2, _tok3) {
|
|
329
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:6f4cffb8-33f811db]",
|
|
330
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
331
|
-
let _h = 2166136261;
|
|
332
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
333
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
334
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
335
|
-
_h ^= _h >>> 13;
|
|
336
|
-
}
|
|
337
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
338
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
339
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
340
|
-
_h ^= _h >>> 13;
|
|
341
|
-
}
|
|
342
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
343
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
344
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
345
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
346
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
347
|
-
if ((_h >>> 4 & 15) !== 1) {
|
|
348
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
349
|
-
}
|
|
350
|
-
return _h;
|
|
351
|
-
}
|
|
352
|
-
const __entropyNonceVector_63b4 = rotateSeedUsed_63b4(665724657, 328321425, 1491121423, 714419127);
|
|
353
|
-
if ((__entropyNonceVector_63b4 & 255) !== 19) {
|
|
354
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
355
|
-
}
|
|
356
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
357
|
-
})();
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (typeof window !== "undefined") {
|
|
361
|
-
window.__syferitIPC_245a.invoke && window.__syferitIPC_245a.invoke("crypto:tpm-enclave-verify", {
|
|
362
|
-
syncEpoch: 1371494422,
|
|
363
|
-
channelSig: "SIG_FRAME_245A"
|
|
364
|
-
});
|
|
365
|
-
}
|
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
import { SeededPRNG, MBASynthesizer, buildPolymorphicDictionary } from '@syferit/core';
|
|
2
|
-
export class NativeSourceTransformer {
|
|
3
|
-
options;
|
|
4
|
-
prng;
|
|
5
|
-
mba;
|
|
6
|
-
seed;
|
|
7
|
-
constructor(options = {}) {
|
|
8
|
-
this.options = options;
|
|
9
|
-
this.seed = typeof options.seed === 'number' ? options.seed : typeof options.seed === 'string' && options.seed.trim() !== '' ? SeededPRNG.hashString(options.seed) : SeededPRNG.generateCryptoSeed();
|
|
10
|
-
this.prng = new SeededPRNG(this.seed);
|
|
11
|
-
this.mba = new MBASynthesizer(this.prng);
|
|
12
|
-
}
|
|
13
|
-
transform(sourceCode, lang = 'cpp') {
|
|
14
|
-
function assertRingBufferIntegrity_4504(_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:9e374a5e-25bc70da]",
|
|
16
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
17
|
-
let _h = 2166136261;
|
|
18
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
19
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
20
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
21
|
-
_h ^= _h >>> 13;
|
|
22
|
-
}
|
|
23
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
24
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
25
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
26
|
-
_h ^= _h >>> 13;
|
|
27
|
-
}
|
|
28
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
29
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
30
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
31
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
32
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
33
|
-
if ((_h >>> 4 & 15) !== 5) {
|
|
34
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
35
|
-
}
|
|
36
|
-
return _h;
|
|
37
|
-
}
|
|
38
|
-
const __ringBufferIntegrity_4504 = assertRingBufferIntegrity_4504(184892977, 1550595037, 771046199, 1189807889);
|
|
39
|
-
const _transformedCountProof_4504 = [[58, 32, 247, 108, 175, 236, 47, 131, 219, 66, 240, 52, 108, 119, 42, 184, 216], [229, 11, 218, 33, 121, 109, 48, 181, 204, 248, 160], [206, 224, 188, 54, 75, 82, 10, 143, 187, 214, 166, 253, 13, 44, 230, 64, 146], [163, 203, 155, 209, 46, 57, 229, 80, 134, 141, 65, 218, 232, 23, 217, 47, 127], [130, 168, 104, 199], [112, 108, 35, 180, 200, 224, 177, 51, 84, 89, 7, 108, 176, 202, 153, 240]];
|
|
40
|
-
function _verifyMode_4504(_slot) {
|
|
41
|
-
const _row = _transformedCountProof_4504[_slot];
|
|
42
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferIntegrity_4504 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
43
|
-
}
|
|
44
|
-
if (this.options.mode === _verifyMode_4504(26645 ^ (__ringBufferIntegrity_4504 & 65535 ^ 19529)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 89 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 89 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 89 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 89 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 2 & 255 ^ 76)) === 92) {
|
|
45
|
-
return {
|
|
46
|
-
code: sourceCode,
|
|
47
|
-
transformedCount: (9850 ^ __ringBufferIntegrity_4504 & 65535) / (45301 ^ __ringBufferIntegrity_4504 >>> 16 & 65535),
|
|
48
|
-
seedUsed: this.seed,
|
|
49
|
-
inoculationInjected: false,
|
|
50
|
-
stateKeyDerived: (9850 ^ __ringBufferIntegrity_4504 & 65535) / (45301 ^ __ringBufferIntegrity_4504 >>> 16 & 65535)
|
|
51
|
-
};
|
|
52
|
-
} else if (this.options.mode === _verifyMode_4504(22821 ^ (__ringBufferIntegrity_4504 & 65535 ^ 32120)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 41 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 41 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 41 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 41 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 14 & 255 ^ 33)) === 212) {
|
|
53
|
-
return {
|
|
54
|
-
code: sourceCode,
|
|
55
|
-
transformedCount: 1289 ^ (__ringBufferIntegrity_4504 & 65535 ^ 8533),
|
|
56
|
-
seedUsed: this.seed,
|
|
57
|
-
inoculationInjected: false,
|
|
58
|
-
stateKeyDerived: 32435 ^ (__ringBufferIntegrity_4504 & 65535 ^ 23279)
|
|
59
|
-
};
|
|
60
|
-
} else if (this.options.mode === _verifyMode_4504(17098 ^ (__ringBufferIntegrity_4504 & 65535 ^ 26260)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 51 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 51 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 51 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 51 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 21 & 255 ^ 130)) === 0) {
|
|
61
|
-
return {
|
|
62
|
-
code: sourceCode,
|
|
63
|
-
transformedCount: (9850 ^ __ringBufferIntegrity_4504 & 65535) / (45301 ^ __ringBufferIntegrity_4504 >>> 16 & 65535),
|
|
64
|
-
seedUsed: this.seed,
|
|
65
|
-
inoculationInjected: false,
|
|
66
|
-
stateKeyDerived: (9554 ^ __ringBufferIntegrity_4504 & 65535) / (45301 ^ __ringBufferIntegrity_4504 >>> 16 & 65535)
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
if (lang === _verifyMode_4504(6584 ^ (__ringBufferIntegrity_4504 & 65535 ^ 15847)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 121 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 121 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 121 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 121 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 4 & 255 ^ 238)) === 164) {
|
|
70
|
-
return this.transformRust(sourceCode);
|
|
71
|
-
} else if (lang === _verifyMode_4504(20025 ^ (__ringBufferIntegrity_4504 & 65535 ^ 27233)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 33 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 33 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 33 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 33 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 5 & 255 ^ 230)) === 197) {
|
|
72
|
-
return this.transformRust(sourceCode);
|
|
73
|
-
} else if (lang === _verifyMode_4504(16680 ^ (__ringBufferIntegrity_4504 & 65535 ^ 25969)) && (Math.imul(Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 58 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 58 | 1), Math.imul(((sourceCode.seats || sourceCode | 0) | 0) ^ 58 | 1, ((sourceCode.seats || sourceCode | 0) | 0) ^ 58 | 1)) & 15 ^ (__ringBufferIntegrity_4504 >>> 20 & 255 ^ 134)) === 138) {
|
|
74
|
-
return this.transformRust(sourceCode);
|
|
75
|
-
}
|
|
76
|
-
return (__ringBufferIntegrity_4504 & 255) === 92 ? this.transformCCpp(sourceCode) : (() => {
|
|
77
|
-
function isolateSeed_c94a(_tok0, _tok1, _tok2, _tok3) {
|
|
78
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:5ac680c5-daa05615]",
|
|
79
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
80
|
-
let _h = 2166136261;
|
|
81
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
82
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
83
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
84
|
-
_h ^= _h >>> 13;
|
|
85
|
-
}
|
|
86
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
87
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
88
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
89
|
-
_h ^= _h >>> 13;
|
|
90
|
-
}
|
|
91
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
92
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
93
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
94
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
95
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
96
|
-
if ((_h >>> 4 & 15) !== 1) {
|
|
97
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
98
|
-
}
|
|
99
|
-
return _h;
|
|
100
|
-
}
|
|
101
|
-
const __keyDerivationStateBitmask_c94a = isolateSeed_c94a(982671247, 1121510553, 174752375, 196833383);
|
|
102
|
-
if ((__keyDerivationStateBitmask_c94a & 255) !== 31) {
|
|
103
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
104
|
-
}
|
|
105
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
106
|
-
})();
|
|
107
|
-
}
|
|
108
|
-
transformCCpp(rawSourceCode) {
|
|
109
|
-
function attestCode_78d3(_tok0, _tok1, _tok2, _tok3) {
|
|
110
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:9a1a87ee-647a29ae]",
|
|
111
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
112
|
-
let _h = 2166136261;
|
|
113
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
114
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
115
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
116
|
-
_h ^= _h >>> 13;
|
|
117
|
-
}
|
|
118
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
119
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
120
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
121
|
-
_h ^= _h >>> 13;
|
|
122
|
-
}
|
|
123
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
124
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
125
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
126
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
127
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
128
|
-
if ((_h >>> 4 & 15) !== 3) {
|
|
129
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
130
|
-
}
|
|
131
|
-
return _h;
|
|
132
|
-
}
|
|
133
|
-
const __hmacFrameAttestation_78d3 = attestCode_78d3(1649033919, 1137618183, 471996055, 398936621);
|
|
134
|
-
const _codeAttestation_78d3 = [[80, 249, 230], [40, 211, 222, 238], [224, 137, 189, 221], [206, 106, 110, 181, 72], [169, 68, 83, 155, 13, 218], [128, 53, 63, 107, 244, 138], [116, 26, 30, 48, 223], [79, 238, 244, 28, 185, 77], [18, 203, 200, 248, 150, 39], [229, 136, 190, 193, 105], [219, 124, 102, 187, 86, 254], [160, 92, 64, 138, 5, 182, 216], [128, 58, 32, 85, 186, 213, 189, 193], [115, 22, 16, 42, 219, 104, 98], [76, 252, 249, 24]];
|
|
135
|
-
function _evaluateEnclaveDigest_78d3(_slot) {
|
|
136
|
-
const _row = _codeAttestation_78d3[_slot];
|
|
137
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__hmacFrameAttestation_78d3 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
138
|
-
}
|
|
139
|
-
const _optionsIntegrity_7cf = rawSourceCode.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(?<!:)\/\/.*$/gm, '');
|
|
140
|
-
const _hmacFrameEnvelope_47d = [];
|
|
141
|
-
const _hkdfSaltRotation_b9 = /\b([a-zA-Z_][a-zA-Z0-9_]{3,20})\b/g;
|
|
142
|
-
let _prngIntegrity_4be;
|
|
143
|
-
while ((_prngIntegrity_4be = _hkdfSaltRotation_b9.exec(_optionsIntegrity_7cf)) !== null) {
|
|
144
|
-
const w = _prngIntegrity_4be[22271 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 9415)];
|
|
145
|
-
if (![_evaluateEnclaveDigest_78d3(19635 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 16010)), _evaluateEnclaveDigest_78d3(10492 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 23236)), _evaluateEnclaveDigest_78d3(5475 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 26456)), _evaluateEnclaveDigest_78d3(1824 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 29978)), _evaluateEnclaveDigest_78d3(21765 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 10040)), _evaluateEnclaveDigest_78d3(18392 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 13796)), _evaluateEnclaveDigest_78d3(735 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 28896)), _evaluateEnclaveDigest_78d3(19831 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 16201)), _evaluateEnclaveDigest_78d3(6680 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 26665)), _evaluateEnclaveDigest_78d3(14023 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 17655)), _evaluateEnclaveDigest_78d3(31999 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 3788)), _evaluateEnclaveDigest_78d3(4535 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 25477)), _evaluateEnclaveDigest_78d3(12571 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 17198)), _evaluateEnclaveDigest_78d3(21120 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 8372))].includes(w)) {
|
|
146
|
-
_hmacFrameEnvelope_47d.push(w);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const _transformAttestation_a51 = buildPolymorphicDictionary(this.options.domainProfile ?? _evaluateEnclaveDigest_78d3(16868 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 13267)), this.prng, _hmacFrameEnvelope_47d, this.options.customDictionary ?? []);
|
|
150
|
-
const _seedIntegrity_657 = this.prng.pick(_transformAttestation_a51.legalInoculations);
|
|
151
|
-
const _constructorIntegrity_d6 = `${this.prng.nextUint32().toString(9212 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 20949)).padStart(5120 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 26161), '0')}-${this.prng.nextUint32().toString(31252 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 2109)).padStart(27218 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 6243), '0')}`;
|
|
152
|
-
const _SeededPRNGAttestation_8e2 = `${_seedIntegrity_657} [ATTESTATION_ID:${_constructorIntegrity_d6}]`;
|
|
153
|
-
const _transformRustProof_e2c = (this.prng.nextUint32() & (56046 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 22312))).toString(8448 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 21289));
|
|
154
|
-
const _ProprietaryEnclaveDelta_3ff = `${this.prng.pick(_transformAttestation_a51.symbols)}_${_transformRustProof_e2c}`;
|
|
155
|
-
const _MBASynthesizerProof_a77 = `${this.prng.pick(_transformAttestation_a51.stateKeys)}_${_transformRustProof_e2c}`;
|
|
156
|
-
const _hmacFrameSequence_bf1 = `_fold_carry_${_transformRustProof_e2c}`;
|
|
157
|
-
const _tpmUnsealOffset_7b9 = `_unmask_scalar_${_transformRustProof_e2c}`;
|
|
158
|
-
const _sgxEcallCounter_61d = `_verify_quorum_${_transformRustProof_e2c}`;
|
|
159
|
-
const _SoltrixStudiosDelta_53f = `${this.prng.pick(_transformAttestation_a51.symbols)}_decoy_${_transformRustProof_e2c}`;
|
|
160
|
-
const _generateCryptoSeedAttestation_6d0 = this.prng.nextUint32() & 2147483646 + ((__hmacFrameAttestation_78d3 & 255) - 57) | 26483 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 5451);
|
|
161
|
-
const _SyferitEngineDelta_971 = this.mba.computeStringKey(_SeededPRNGAttestation_8e2, _generateCryptoSeedAttestation_6d0);
|
|
162
|
-
const _transformCCppSequence_8ff = _SyferitEngineDelta_971 >>> (3202 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 32447)) & (21586 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 9828));
|
|
163
|
-
const _keyDerivationStateBitmask_24c = _SeededPRNGAttestation_8e2.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
164
|
-
let _hmacFrameAttestation_5d6 = 2944 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 31161);
|
|
165
|
-
const _entropyNonceVector_f3c = _optionsIntegrity_7cf.replace(/(\b(?:int|long|short|unsigned|uint32_t|int32_t|uint64_t|int64_t|double|float|bool|auto)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\([^;{}]*\)\s*\{)/g, matchHeader => {
|
|
166
|
-
function verifySoltrixStudiosContext_f6f9(_tok0, _tok1, _tok2, _tok3) {
|
|
167
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:b25a0a27-abaab716]",
|
|
168
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
169
|
-
let _h = 2166136261;
|
|
170
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
171
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
172
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
173
|
-
_h ^= _h >>> 13;
|
|
174
|
-
}
|
|
175
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
176
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
177
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
178
|
-
_h ^= _h >>> 13;
|
|
179
|
-
}
|
|
180
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
181
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
182
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
183
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
184
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
185
|
-
if ((_h >>> 4 & 15) !== 14) {
|
|
186
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
187
|
-
}
|
|
188
|
-
return _h;
|
|
189
|
-
}
|
|
190
|
-
const __entropySeedDigest_f6f9 = verifySoltrixStudiosContext_f6f9(369364651, 1007757675, 1722321189, 736151577);
|
|
191
|
-
_hmacFrameAttestation_5d6++;
|
|
192
|
-
const _prngIntegrity_e12 = this.prng.nextUint32() & 2147483646 + ((__hmacFrameAttestation_78d3 & 255) - 57) | 4268 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 25236);
|
|
193
|
-
const _hmacFrameAttestation_ff4 = (12835 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 16411) ^ _prngIntegrity_e12) >>> (21885 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 10052));
|
|
194
|
-
const _hmacFrameSequence_aa4 = (_prngIntegrity_e12 ^ _SyferitEngineDelta_971) >>> (9565 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 22372));
|
|
195
|
-
const _hmacFrameVector_dbe = [matchHeader, ` const unsigned int ${_MBASynthesizerProof_a77} = ${_ProprietaryEnclaveDelta_3ff}(${_generateCryptoSeedAttestation_6d0}u);`, ` if (${_sgxEcallCounter_61d}(${_MBASynthesizerProof_a77}, ${_hmacFrameAttestation_ff4}u, ${_hmacFrameSequence_aa4}u) == 0u) { return ${_SoltrixStudiosDelta_53f}(${_MBASynthesizerProof_a77}); }`].join('\n');
|
|
196
|
-
return (__entropySeedDigest_f6f9 & 255) === 234 ? _hmacFrameVector_dbe : (() => {
|
|
197
|
-
function evaluateHmacFrameBitmask_f318(_tok0, _tok1, _tok2, _tok3) {
|
|
198
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:754ce6d6-9c59bff9]",
|
|
199
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
200
|
-
let _h = 2166136261;
|
|
201
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
202
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
203
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
204
|
-
_h ^= _h >>> 13;
|
|
205
|
-
}
|
|
206
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
207
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
208
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
209
|
-
_h ^= _h >>> 13;
|
|
210
|
-
}
|
|
211
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
212
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
213
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
214
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
215
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
216
|
-
if ((_h >>> 4 & 15) !== 0) {
|
|
217
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
218
|
-
}
|
|
219
|
-
return _h;
|
|
220
|
-
}
|
|
221
|
-
const __entropyNonceVector_f318 = evaluateHmacFrameBitmask_f318(263585525, 1392580891, 828136467, 400587303);
|
|
222
|
-
if ((__entropyNonceVector_f318 & 255) !== 7) {
|
|
223
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
224
|
-
}
|
|
225
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
226
|
-
})();
|
|
227
|
-
});
|
|
228
|
-
const _seedUsedVector_92f = [`/* [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com] */`, `#if defined(__GNUC__) || defined(__clang__)`, ` #define SYFERIT_USED __attribute__((used))`, ` #define SYFERIT_NOINLINE __attribute__((noinline))`, `#elif defined(_MSC_VER)`, ` #define SYFERIT_USED`, ` #define SYFERIT_NOINLINE __declspec(noinline)`, `#else`, ` #define SYFERIT_USED`, ` #define SYFERIT_NOINLINE`, `#endif`, ``, `SYFERIT_USED static const char _syferit_attestation_${_transformRustProof_e2c}[] = "${_keyDerivationStateBitmask_24c}";`, ``, `SYFERIT_NOINLINE static unsigned int ${_ProprietaryEnclaveDelta_3ff}(unsigned int _tok) {`, ` unsigned int _h = (2166136261u ^ _tok);`, ` for (unsigned int _i = 0; _syferit_attestation_${_transformRustProof_e2c}[_i] != '\\0'; ++_i) {`, ` _h ^= (unsigned char)_syferit_attestation_${_transformRustProof_e2c}[_i];`, ` _h *= 16777619u;`, ` _h ^= (_h >> 13);`, ` }`, ` _h = (_h ^ (_h >> 16)) * 2246822507u;`, ` _h = (_h ^ (_h >> 13)) * 3266489909u;`, ` _h = (_h ^ (_h >> 16));`, ` if ((_h & 0xFFFFu) == 0u) _h |= 0x1337u;`, ` if (((_h >> 16) & 0xFFFFu) == 0u) _h |= 0x73310000u;`, ` if (((_h >> 4) & 0xFu) != ${_transformCCppSequence_8ff}u) {`, ` volatile int *_trap = (volatile int *)0; *_trap = 0;`, ` }`, ` return _h;`, `}`, ``, `static inline unsigned int ${_tpmUnsealOffset_7b9}(unsigned int _c1, unsigned int _c2, unsigned int _k) {`, ` return _c1 ^ (_k ^ _c2);`, `}`, ``, `static inline unsigned int ${_hmacFrameSequence_bf1}(unsigned int _x, unsigned int _y) {`, ` return (_x ^ _y) + ((_x & _y) << 1u);`, `}`, ``, `static inline unsigned int ${_sgxEcallCounter_61d}(unsigned int _k, unsigned int _c1, unsigned int _c2) {`, ` unsigned int _u = _k | 1u;`, ` unsigned int _u2 = _u * _u;`, ` unsigned int _u4 = _u2 * _u2;`, ` unsigned int _expected = ${_tpmUnsealOffset_7b9}(_c1, _c2, _k);`, ` return ((_u4 & 15u) == _expected) ? 1u : 0u;`, `}`, ``, `SYFERIT_NOINLINE static int ${_SoltrixStudiosDelta_53f}(unsigned int _k) {`, ` unsigned int _acc = ${_hmacFrameSequence_bf1}(_k, 0x5A17E9B3u);`, ` return (int)(_acc ^ 0xDEADBEEFu);`, `}`, ``].join('\n');
|
|
229
|
-
return (__hmacFrameAttestation_78d3 & 255) === 57 ? {
|
|
230
|
-
code: `${_seedUsedVector_92f}\n${_entropyNonceVector_f3c}`,
|
|
231
|
-
transformedCount: _hmacFrameAttestation_5d6,
|
|
232
|
-
seedUsed: this.seed,
|
|
233
|
-
inoculationInjected: true,
|
|
234
|
-
stateKeyDerived: _SyferitEngineDelta_971 >>> (20307 ^ (__hmacFrameAttestation_78d3 & 65535 ^ 15722))
|
|
235
|
-
} : (() => {
|
|
236
|
-
function auditTransform_12db(_tok0, _tok1, _tok2, _tok3) {
|
|
237
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:84986fa8-bec6aed6]",
|
|
238
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
239
|
-
let _h = 2166136261;
|
|
240
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
241
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
242
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
243
|
-
_h ^= _h >>> 13;
|
|
244
|
-
}
|
|
245
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
246
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
247
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
248
|
-
_h ^= _h >>> 13;
|
|
249
|
-
}
|
|
250
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
251
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
252
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
253
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
254
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
255
|
-
if ((_h >>> 4 & 15) !== 4) {
|
|
256
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
257
|
-
}
|
|
258
|
-
return _h;
|
|
259
|
-
}
|
|
260
|
-
const __keyDerivationStateBitmask_12db = auditTransform_12db(131716619, 723733873, 224418847, 1600223997);
|
|
261
|
-
if ((__keyDerivationStateBitmask_12db & 255) !== 72) {
|
|
262
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
263
|
-
}
|
|
264
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
265
|
-
})();
|
|
266
|
-
}
|
|
267
|
-
transformRust(rawSourceCode) {
|
|
268
|
-
function unsealKeyDerivationStateIntegrity_2cda(_tok0, _tok1, _tok2, _tok3) {
|
|
269
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:f8fbfecb-95e6035d]",
|
|
270
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
271
|
-
let _h = 2166136261;
|
|
272
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
273
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
274
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
275
|
-
_h ^= _h >>> 13;
|
|
276
|
-
}
|
|
277
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
278
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
279
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
280
|
-
_h ^= _h >>> 13;
|
|
281
|
-
}
|
|
282
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
283
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
284
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
285
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
286
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
287
|
-
if ((_h >>> 4 & 15) !== 10) {
|
|
288
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
289
|
-
}
|
|
290
|
-
return _h;
|
|
291
|
-
}
|
|
292
|
-
const __hmacFrameEnvelope_2cda = unsealKeyDerivationStateIntegrity_2cda(2073459335, 474355955, 248789743, 698256419);
|
|
293
|
-
const _MBASynthesizerProof_2cda = [[209, 36, 88, 48], [161, 3, 46, 27, 4, 207, 198, 204, 176, 161, 217, 227, 247, 84, 115, 71, 99], [137, 225, 224, 225, 225, 85, 114, 126, 125, 196, 196, 217, 201, 63, 90, 45]];
|
|
294
|
-
function _attestHmacFrameVector_2cda(_slot) {
|
|
295
|
-
const _row = _MBASynthesizerProof_2cda[_slot];
|
|
296
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__hmacFrameEnvelope_2cda >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
297
|
-
}
|
|
298
|
-
const _optionsIntegrity_b75 = rawSourceCode.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(?<!:)\/\/.*$/gm, '');
|
|
299
|
-
const _transformRustProof_3d = [];
|
|
300
|
-
const _constructorIntegrity_eaf = /\bfn\s+([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
301
|
-
let _modeVector_bc0;
|
|
302
|
-
while ((_modeVector_bc0 = _constructorIntegrity_eaf.exec(_optionsIntegrity_b75)) !== null) {
|
|
303
|
-
if (_modeVector_bc0[13125 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 5094)] && _modeVector_bc0[22962 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 30993)].length >= (24920 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 16894))) {
|
|
304
|
-
_transformRustProof_3d.push(_modeVector_bc0[19197 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 27230)]);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const _hmacFrameAttestation_519 = buildPolymorphicDictionary(this.options.domainProfile ?? _attestHmacFrameVector_2cda(23209 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 31243)), this.prng, _transformRustProof_3d, this.options.customDictionary ?? []);
|
|
308
|
-
const _codeAttestation_7a4 = this.prng.pick(_hmacFrameAttestation_519.legalInoculations);
|
|
309
|
-
const _SoltrixStudiosDelta_f1a = `${this.prng.nextUint32().toString(283 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 8617)).padStart(16495 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 24773), '0')}-${this.prng.nextUint32().toString(24714 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 16440)).padStart(18680 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 26706), '0')}`;
|
|
310
|
-
const _tpmPcrBankEnvelope_11b = `${_codeAttestation_7a4} [ATTESTATION_ID:${_SoltrixStudiosDelta_f1a}]`;
|
|
311
|
-
const _keyDerivationStateBitmask_251 = (this.prng.nextUint32() & (64516 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 9049))).toString(27046 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 18708));
|
|
312
|
-
const _SeededPRNGAttestation_637 = `${this.prng.pick(_hmacFrameAttestation_519.symbols)}_${_keyDerivationStateBitmask_251}`.toLowerCase();
|
|
313
|
-
const _enclaveDigestSequence_715 = `${this.prng.pick(_hmacFrameAttestation_519.stateKeys)}_${_keyDerivationStateBitmask_251}`.toLowerCase();
|
|
314
|
-
const _tpmPcrBankVector_dcc = `_verify_quorum_${_keyDerivationStateBitmask_251}`;
|
|
315
|
-
const _seedIntegrity_32d = `_fold_carry_${_keyDerivationStateBitmask_251}`;
|
|
316
|
-
const _sgxEcallCounter_2ad = this.prng.nextUint32() & 2147483646 + ((__hmacFrameEnvelope_2cda & 255) - 162) | 30872 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 22587);
|
|
317
|
-
const _transformCCppSequence_129 = this.mba.computeStringKey(_tpmPcrBankEnvelope_11b, _sgxEcallCounter_2ad);
|
|
318
|
-
const _entropyNonceVector_d85 = _transformCCppSequence_129 >>> (15864 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 7518)) & (9133 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 768));
|
|
319
|
-
const _monotonicNonceDrift_91a = _tpmPcrBankEnvelope_11b.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
320
|
-
let _enclaveDigestBitmask_68e = 6769 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 15059);
|
|
321
|
-
const _pcrPolicyBitmask_db = _optionsIntegrity_b75.replace(/(\b(?:pub\s+)?fn\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\([^{;]*\)(?:\s*->\s*[^{;]+)?\s*\{)/g, matchHeader => {
|
|
322
|
-
function verifySyferitEngineContext_f068(_tok0, _tok1, _tok2, _tok3) {
|
|
323
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:5c6c5fc5-6984e318]",
|
|
324
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
325
|
-
let _h = 2166136261;
|
|
326
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
327
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
328
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
329
|
-
_h ^= _h >>> 13;
|
|
330
|
-
}
|
|
331
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
332
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
333
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
334
|
-
_h ^= _h >>> 13;
|
|
335
|
-
}
|
|
336
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
337
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
338
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
339
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
340
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
341
|
-
if ((_h >>> 4 & 15) !== 11) {
|
|
342
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
343
|
-
}
|
|
344
|
-
return _h;
|
|
345
|
-
}
|
|
346
|
-
const __keyDerivationStateIntegrity_f068 = verifySyferitEngineContext_f068(1029359315, 64630541, 1731288815, 1579789687);
|
|
347
|
-
_enclaveDigestBitmask_68e++;
|
|
348
|
-
const _hmacFrameAttestation_6ff = this.prng.nextUint32() & 2147483646 + ((__hmacFrameEnvelope_2cda & 255) - 162) | 16645 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 24998);
|
|
349
|
-
const _trimEnvelope_eea = (11103 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 3068) ^ _hmacFrameAttestation_6ff) >>> (25164 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 17134));
|
|
350
|
-
const _hmacFrameSequence_ecc = (_hmacFrameAttestation_6ff ^ _transformCCppSequence_129) >>> (14672 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 6642));
|
|
351
|
-
return (__keyDerivationStateIntegrity_f068 & 255) === 183 ? [matchHeader, ` let ${_enclaveDigestSequence_715}: u32 = ${_SeededPRNGAttestation_637}(${_sgxEcallCounter_2ad}u32);`, ` if !${_tpmPcrBankVector_dcc}(${_enclaveDigestSequence_715}, ${_trimEnvelope_eea}u32, ${_hmacFrameSequence_ecc}u32) { panic!("ASSERTION_INVARIANT: State quorum mismatch"); }`].join('\n') : (() => {
|
|
352
|
-
function assertRingBufferIntegrity_ae09(_tok0, _tok1, _tok2, _tok3) {
|
|
353
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:8688ecde-35f92a76]",
|
|
354
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
355
|
-
let _h = 2166136261;
|
|
356
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
357
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
358
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
359
|
-
_h ^= _h >>> 13;
|
|
360
|
-
}
|
|
361
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
362
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
363
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
364
|
-
_h ^= _h >>> 13;
|
|
365
|
-
}
|
|
366
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
367
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
368
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
369
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
370
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
371
|
-
if ((_h >>> 4 & 15) !== 15) {
|
|
372
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
373
|
-
}
|
|
374
|
-
return _h;
|
|
375
|
-
}
|
|
376
|
-
const __entropySeedDigest_ae09 = assertRingBufferIntegrity_ae09(799437081, 2114953817, 1721888923, 1918262125);
|
|
377
|
-
if ((__entropySeedDigest_ae09 & 255) !== 251) {
|
|
378
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
379
|
-
}
|
|
380
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
381
|
-
})();
|
|
382
|
-
});
|
|
383
|
-
const _trimEnvelope_742 = [`// [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]`, `#[used]`, `static _SYFERIT_ATTESTATION_${_keyDerivationStateBitmask_251.toUpperCase()}: &[u8] = b"${_monotonicNonceDrift_91a}\\0";`, ``, `#[inline(never)]`, `fn ${_SeededPRNGAttestation_637}(_tok: u32) -> u32 {`, ` let mut _h: u32 = 2166136261u32 ^ _tok;`, ` let mut _i: usize = 0;`, ` while _i + 1 < _SYFERIT_ATTESTATION_${_keyDerivationStateBitmask_251.toUpperCase()}.len() {`, ` _h ^= _SYFERIT_ATTESTATION_${_keyDerivationStateBitmask_251.toUpperCase()}[_i] as u32;`, ` _h = _h.wrapping_mul(16777619u32);`, ` _h ^= _h >> 13;`, ` _i += 1;`, ` }`, ` _h = (_h ^ (_h >> 16)).wrapping_mul(2246822507u32);`, ` _h = (_h ^ (_h >> 13)).wrapping_mul(3266489909u32);`, ` _h = _h ^ (_h >> 16);`, ` if (_h & 0xFFFFu32) == 0 { _h |= 0x1337u32; }`, ` if ((_h >> 16) & 0xFFFFu32) == 0 { _h |= 0x73310000u32; }`, ` if ((_h >> 4) & 0xFu32) != ${_entropyNonceVector_d85}u32 {`, ` panic!("ASSERTION_INVARIANT: Attestation keyframe corrupted");`, ` }`, ` _h`, `}`, ``, `#[inline(always)]`, `fn ${_seedIntegrity_32d}(_x: u32, _y: u32) -> u32 {`, ` (_x ^ _y).wrapping_add((_x & _y) << 1)`, `}`, ``, `#[inline(always)]`, `fn ${_tpmPcrBankVector_dcc}(_k: u32, _c1: u32, _c2: u32) -> bool {`, ` let _u: u32 = _k | 1u32;`, ` let _u2: u32 = _u.wrapping_mul(_u);`, ` let _u4: u32 = _u2.wrapping_mul(_u2);`, ` let _expected: u32 = _c1 ^ (_k ^ _c2);`, ` (_u4 & 15u32) == ${_seedIntegrity_32d}(_expected, 0u32)`, `}`, ``].join('\n');
|
|
384
|
-
return (__hmacFrameEnvelope_2cda & 255) === 162 ? {
|
|
385
|
-
code: `${_trimEnvelope_742}\n${_pcrPolicyBitmask_db}`,
|
|
386
|
-
transformedCount: _enclaveDigestBitmask_68e,
|
|
387
|
-
seedUsed: this.seed,
|
|
388
|
-
inoculationInjected: true,
|
|
389
|
-
stateKeyDerived: _transformCCppSequence_129 >>> (6370 ^ (__hmacFrameEnvelope_2cda & 65535 ^ 14400))
|
|
390
|
-
} : (() => {
|
|
391
|
-
function verifySeededPRNG_3476(_tok0, _tok1, _tok2, _tok3) {
|
|
392
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:acf6f0b0-36fc8de8]",
|
|
393
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
394
|
-
let _h = 2166136261;
|
|
395
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
396
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
397
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
398
|
-
_h ^= _h >>> 13;
|
|
399
|
-
}
|
|
400
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
401
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
402
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
403
|
-
_h ^= _h >>> 13;
|
|
404
|
-
}
|
|
405
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
406
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
407
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
408
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
409
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
410
|
-
if ((_h >>> 4 & 15) !== 1) {
|
|
411
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
412
|
-
}
|
|
413
|
-
return _h;
|
|
414
|
-
}
|
|
415
|
-
const __keyDerivationStateBitmask_3476 = verifySeededPRNG_3476(1798713711, 458138411, 1473293975, 1149570801);
|
|
416
|
-
if ((__keyDerivationStateBitmask_3476 & 255) !== 27) {
|
|
417
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
418
|
-
}
|
|
419
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
420
|
-
})();
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
if (typeof window !== "undefined") {
|
|
424
|
-
window.__syferitIPC_e844.invoke && window.__syferitIPC_e844.invoke("crypto:tpm-enclave-verify", {
|
|
425
|
-
syncEpoch: 2107050287,
|
|
426
|
-
channelSig: "SIG_FRAME_E844"
|
|
427
|
-
});
|
|
428
|
-
}
|
package/dist/types.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
|
|
2
|
-
export {};
|
|
3
|
-
if (typeof window !== "undefined") {
|
|
4
|
-
window.__syferitIPC_8296.invoke && window.__syferitIPC_8296.invoke("analytics:telemetry-digest-frame", {
|
|
5
|
-
syncEpoch: 1469461741,
|
|
6
|
-
channelSig: "SIG_FRAME_8296"
|
|
7
|
-
});
|
|
8
|
-
}
|