@syferit/llvm 0.4.2 → 0.4.3
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 +21 -11
- package/dist/index.js +24 -96
- package/dist/irTransformer.js +227 -276
- package/dist/nativeSourceTransformer.js +149 -141
- package/dist/types.js +8 -1
- package/package.json +2 -2
- package/dist/irTransformer.d.ts +0 -21
- package/dist/nativeSourceTransformer.d.ts +0 -26
- package/dist/types.d.ts +0 -16
package/dist/irTransformer.js
CHANGED
|
@@ -10,9 +10,9 @@ export class LlvmIrTransformer {
|
|
|
10
10
|
this.prng = new SeededPRNG(this.seed);
|
|
11
11
|
this.mba = new MBASynthesizer(this.prng);
|
|
12
12
|
}
|
|
13
|
-
transform(
|
|
14
|
-
function
|
|
15
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
13
|
+
transform(rawIrCode) {
|
|
14
|
+
function evaluateEnclaveDigest_6497(_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:ae4c7d4c-ed1bc7cb]",
|
|
16
16
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
17
17
|
let _h = 2166136261;
|
|
18
18
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -30,65 +30,66 @@ export class LlvmIrTransformer {
|
|
|
30
30
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
31
31
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
32
32
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
33
|
-
if ((_h >>> 4 & 15) !==
|
|
33
|
+
if ((_h >>> 4 & 15) !== 10) {
|
|
34
34
|
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
35
35
|
}
|
|
36
36
|
return _h;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
function
|
|
41
|
-
const _row =
|
|
42
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
38
|
+
const __tpmPcrBankEnvelope_6497 = evaluateEnclaveDigest_6497(132741429, 1455672425, 1599495117, 886492631);
|
|
39
|
+
const _ProprietaryEnclaveDelta_6497 = [[193, 130, 125, 195, 89, 246, 215, 28, 165, 103, 41, 187, 1, 220, 191, 15], [173, 116, 53, 177, 49, 202, 167, 5, 148, 87, 31], [136, 95, 24, 138, 221, 251, 200, 189, 73, 109, 207, 82, 222, 128, 77, 214, 74], [96, 58, 236, 109], [94, 233, 194, 48, 147, 37, 114, 231, 63, 155, 133, 24, 128, 78, 7, 156, 252], [60, 193, 179], [234, 185, 145, 210, 103, 43, 255, 83, 223, 159, 123, 217, 81, 229, 211, 44, 182], [207, 156, 76, 237, 74, 246, 218, 52, 186, 122, 22, 182, 12, 200, 182, 11, 147], [191, 97, 36], [148, 87, 8, 144, 228, 187, 154, 207, 112, 18, 252, 72, 204, 129, 66, 220], [99, 42, 246, 12, 146], [103, 177, 135]];
|
|
40
|
+
function _attestKernelStateNonce_6497(_slot) {
|
|
41
|
+
const _row = _ProprietaryEnclaveDelta_6497[_slot];
|
|
42
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__tpmPcrBankEnvelope_6497 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
43
43
|
}
|
|
44
|
-
if (this.options.mode ===
|
|
44
|
+
if (this.options.mode === _attestKernelStateNonce_6497(59114 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 8526)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 24 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 24 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 24 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 24 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 13 & 255 ^ 166)) === 5) {
|
|
45
45
|
return {
|
|
46
|
-
code:
|
|
47
|
-
transformedCount: (
|
|
46
|
+
code: rawIrCode,
|
|
47
|
+
transformedCount: (50858 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535),
|
|
48
48
|
seedUsed: this.seed,
|
|
49
49
|
inoculationInjected: false,
|
|
50
|
-
stateKeyDerived: (
|
|
50
|
+
stateKeyDerived: (50902 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535)
|
|
51
51
|
};
|
|
52
|
-
} else if (this.options.mode ===
|
|
52
|
+
} else if (this.options.mode === _attestKernelStateNonce_6497(42771 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 24758)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 93 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 93 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 93 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 93 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 8 & 255 ^ 233)) === 47) {
|
|
53
53
|
return {
|
|
54
|
-
code:
|
|
55
|
-
transformedCount:
|
|
54
|
+
code: rawIrCode,
|
|
55
|
+
transformedCount: 54938 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 4414),
|
|
56
56
|
seedUsed: this.seed,
|
|
57
57
|
inoculationInjected: false,
|
|
58
|
-
stateKeyDerived:
|
|
58
|
+
stateKeyDerived: 64905 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 14893)
|
|
59
59
|
};
|
|
60
|
-
} else if (this.options.mode ===
|
|
60
|
+
} else if (this.options.mode === _attestKernelStateNonce_6497(56692 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 6866)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 23 & 255 ^ 58)) === 188) {
|
|
61
61
|
return {
|
|
62
|
-
code:
|
|
63
|
-
transformedCount: (
|
|
62
|
+
code: rawIrCode,
|
|
63
|
+
transformedCount: (50996 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535),
|
|
64
64
|
seedUsed: this.seed,
|
|
65
65
|
inoculationInjected: false,
|
|
66
|
-
stateKeyDerived: (
|
|
66
|
+
stateKeyDerived: (50996 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const _enclaveDigestIntegrity_3a = rawIrCode.replace(/^\s*;.*$/gm, '');
|
|
70
|
+
const _tpmPcrBankBitmask_2b2 = [];
|
|
71
|
+
const _SyferitEngineDelta_881 = /define\s+[^@]*@([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g;
|
|
72
|
+
let _generateCryptoSeedAttestation_fb;
|
|
73
|
+
while ((_generateCryptoSeedAttestation_fb = _SyferitEngineDelta_881.exec(_enclaveDigestIntegrity_3a)) !== null) {
|
|
74
|
+
if (_generateCryptoSeedAttestation_fb[54444 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 4873)] && _generateCryptoSeedAttestation_fb[52306 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 3063)].length >= (59556 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 12036))) {
|
|
75
|
+
_tpmPcrBankBitmask_2b2.push(_generateCryptoSeedAttestation_fb[53354 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 6095)]);
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
let
|
|
88
|
-
let
|
|
89
|
-
const
|
|
90
|
-
function
|
|
91
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
78
|
+
const _tpmUnsealOffset_777 = buildPolymorphicDictionary(this.options.domainProfile ?? _attestKernelStateNonce_6497(52303 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 3048)), this.prng, _tpmPcrBankBitmask_2b2, this.options.customDictionary ?? []);
|
|
79
|
+
const _ringBufferEnvelope_80d = this.prng.pick(_tpmUnsealOffset_777.legalInoculations);
|
|
80
|
+
const _monotonicNonceDrift_719 = `${this.prng.nextUint32().toString(62298 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 13550)).padStart(34325 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 16825), '0')}-${this.prng.nextUint32().toString(39441 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 23973)).padStart(36049 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 19325), '0')}`;
|
|
81
|
+
const _keyDerivationStateVector_72 = `${_ringBufferEnvelope_80d} [ATTESTATION_ID:${_monotonicNonceDrift_719}]`;
|
|
82
|
+
const _sgxEcallCounter_73 = (this.prng.nextUint32() & (2359 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 12652))).toString(62149 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 13681));
|
|
83
|
+
const _entropyNonceEnvelope_21e = `${this.prng.pick(_tpmUnsealOffset_777.symbols)}_${_sgxEcallCounter_73}`;
|
|
84
|
+
const _modeEnvelope_605 = `${this.prng.pick(_tpmUnsealOffset_777.stateKeys)}_${_sgxEcallCounter_73}`;
|
|
85
|
+
const _hmacFrameEnvelope_218 = this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_6497 & 255) - 164) | 60613 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 11104);
|
|
86
|
+
const _hkdfSaltRotation_711 = this.mba.computeStringKey(_keyDerivationStateVector_72, _hmacFrameEnvelope_218);
|
|
87
|
+
const _sgxBoundaryBitmask_2b3 = _hkdfSaltRotation_711 >>> (63670 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 16150)) & (37209 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 22258));
|
|
88
|
+
let _seedUsedEnvelope_c1a = 34893 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 20457);
|
|
89
|
+
let _seedVector_570 = 53507 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 5798);
|
|
90
|
+
const _hashStringVector_747 = _enclaveDigestIntegrity_3a.replace(/(define\s+[^@{]+@[a-zA-Z0-9_$.]+\s*\([^)]*\)[^{]*\{)([\s\S]*?)(\n\})/g, (_fullMatch, header, body, footer) => {
|
|
91
|
+
function auditTpmPcrBankAttestation_70bc(_tok0, _tok1, _tok2, _tok3) {
|
|
92
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:a15fde2b-43fdda73]",
|
|
92
93
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
93
94
|
let _h = 2166136261;
|
|
94
95
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -106,19 +107,19 @@ export class LlvmIrTransformer {
|
|
|
106
107
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
107
108
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
108
109
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
109
|
-
if ((_h >>> 4 & 15) !==
|
|
110
|
+
if ((_h >>> 4 & 15) !== 11) {
|
|
110
111
|
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
111
112
|
}
|
|
112
113
|
return _h;
|
|
113
114
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
let
|
|
119
|
-
const
|
|
120
|
-
function
|
|
121
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
115
|
+
const __keyDerivationStateSequence_70bc = auditTpmPcrBankAttestation_70bc(1074604361, 798108009, 1751976279, 637900653);
|
|
116
|
+
_seedUsedEnvelope_c1a++;
|
|
117
|
+
const _monotonicNonceDrift_ded = `%${_modeEnvelope_605}_k${_seedUsedEnvelope_c1a}`;
|
|
118
|
+
const _seedVector_ed6 = body.match(/^(\s*[a-zA-Z0-9_$.]+:\s*\n)/);
|
|
119
|
+
let _inoculationInjectedEnvelope_8fa = `\n ${_monotonicNonceDrift_ded} = call i32 @${_entropyNonceEnvelope_21e}(i32 ${_hmacFrameEnvelope_218})\n`;
|
|
120
|
+
const _LlvmIrTransformerVector_c0f = 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) => {
|
|
121
|
+
function unsealConstructor_c474(_tok0, _tok1, _tok2, _tok3) {
|
|
122
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:bfc2aba9-0fbe0d11]",
|
|
122
123
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
123
124
|
let _h = 2166136261;
|
|
124
125
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -136,251 +137,195 @@ export class LlvmIrTransformer {
|
|
|
136
137
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
137
138
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
138
139
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
139
|
-
if ((_h >>> 4 & 15) !==
|
|
140
|
+
if ((_h >>> 4 & 15) !== 2) {
|
|
140
141
|
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
141
142
|
}
|
|
142
143
|
return _h;
|
|
143
144
|
}
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
let
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
if (/^-?\d+$/.test(
|
|
150
|
-
const literalVal = parseInt(
|
|
151
|
-
const mask = this.prng.nextUint32() & 2147483646 + ((
|
|
152
|
-
const c1 = literalVal ^ mask |
|
|
153
|
-
const c2 = mask ^
|
|
154
|
-
const tMask1 = `%_m_kxor_${
|
|
155
|
-
const tMask2 = `%_m_const_${
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
145
|
+
const __sgxBoundaryBitmask_c474 = unsealConstructor_c474(1461080963, 1439296461, 521030233, 479881705);
|
|
146
|
+
const _trimBitmask_6c4 = lhsRaw.trim();
|
|
147
|
+
let _generateCryptoSeedAttestation_6be = rhsRaw.trim();
|
|
148
|
+
const _irCodeAttestation_4d3 = _seedVector_570++;
|
|
149
|
+
const _tpmPcrBankProof_36d = [];
|
|
150
|
+
if (/^-?\d+$/.test(_generateCryptoSeedAttestation_6be)) {
|
|
151
|
+
const literalVal = parseInt(_generateCryptoSeedAttestation_6be, 64360 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 15558)) | 37649 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 21685);
|
|
152
|
+
const mask = this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_6497 & 255) - 164) | 50713 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 444);
|
|
153
|
+
const c1 = literalVal ^ mask | 38284 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 21032);
|
|
154
|
+
const c2 = mask ^ _hkdfSaltRotation_711 | 61750 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 13970);
|
|
155
|
+
const tMask1 = `%_m_kxor_${_irCodeAttestation_4d3}`;
|
|
156
|
+
const tMask2 = `%_m_const_${_irCodeAttestation_4d3}`;
|
|
157
|
+
_tpmPcrBankProof_36d.push(`${indent}${tMask1} = xor i32 ${_monotonicNonceDrift_ded}, ${c2}`);
|
|
158
|
+
_tpmPcrBankProof_36d.push(`${indent}${tMask2} = xor i32 ${c1}, ${tMask1}`);
|
|
159
|
+
_generateCryptoSeedAttestation_6be = tMask2;
|
|
159
160
|
}
|
|
160
|
-
if (op ===
|
|
161
|
-
const tXor = `%_m_axor_${
|
|
162
|
-
const tAnd = `%_m_aand_${
|
|
163
|
-
const tShl = `%_m_ashl_${
|
|
164
|
-
const tBase = `%_m_abase_${
|
|
165
|
-
const tU0 = `%_m_u0_${
|
|
166
|
-
const tU1 = `%_m_u1_${
|
|
167
|
-
const tU2 = `%_m_u2_${
|
|
168
|
-
const tU4 = `%_m_u4_${
|
|
169
|
-
const tQ1 = `%_m_q1_${
|
|
170
|
-
const tKOne1 = `%_m_ko1_${
|
|
171
|
-
const tKOne2 = `%_m_ko2_${
|
|
172
|
-
const tZero = `%_m_zinv_${
|
|
173
|
-
const oneMask = this.prng.nextUint32() & (
|
|
174
|
-
const oneC1 = (
|
|
175
|
-
const oneC2 = oneMask ^
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return
|
|
190
|
-
} else if (op ===
|
|
191
|
-
const tXor = `%_m_axor_${
|
|
192
|
-
const tAnd = `%_m_aand_${
|
|
193
|
-
const tShl = `%_m_ashl_${
|
|
194
|
-
const tBase = `%_m_abase_${
|
|
195
|
-
const tU0 = `%_m_u0_${
|
|
196
|
-
const tU1 = `%_m_u1_${
|
|
197
|
-
const tU2 = `%_m_u2_${
|
|
198
|
-
const tU4 = `%_m_u4_${
|
|
199
|
-
const tQ1 = `%_m_q1_${
|
|
200
|
-
const tKOne1 = `%_m_ko1_${
|
|
201
|
-
const tKOne2 = `%_m_ko2_${
|
|
202
|
-
const tZero = `%_m_zinv_${
|
|
203
|
-
const oneMask = this.prng.nextUint32() & 2147483646 + ((
|
|
204
|
-
const oneC1 =
|
|
205
|
-
const oneC2 = oneMask ^
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return
|
|
220
|
-
} else if (op ===
|
|
221
|
-
const tXor = `%_m_axor_${
|
|
222
|
-
const tAnd = `%_m_aand_${
|
|
223
|
-
const tShl = `%_m_ashl_${
|
|
224
|
-
const tBase = `%_m_abase_${
|
|
225
|
-
const tU0 = `%_m_u0_${
|
|
226
|
-
const tU1 = `%_m_u1_${
|
|
227
|
-
const tU2 = `%_m_u2_${
|
|
228
|
-
const tU4 = `%_m_u4_${
|
|
229
|
-
const tQ1 = `%_m_q1_${
|
|
230
|
-
const tKOne1 = `%_m_ko1_${
|
|
231
|
-
const tKOne2 = `%_m_ko2_${
|
|
232
|
-
const tZero = `%_m_zinv_${
|
|
233
|
-
const oneMask = this.prng.nextUint32() & (
|
|
234
|
-
const oneC1 = (
|
|
235
|
-
const oneC2 = oneMask ^
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return
|
|
161
|
+
if (op === _attestKernelStateNonce_6497(33867 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 17387)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 124 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 124 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 124 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 124 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 1 & 255 ^ 235)) === 50) {
|
|
162
|
+
const tXor = `%_m_axor_${_irCodeAttestation_4d3}`;
|
|
163
|
+
const tAnd = `%_m_aand_${_irCodeAttestation_4d3}`;
|
|
164
|
+
const tShl = `%_m_ashl_${_irCodeAttestation_4d3}`;
|
|
165
|
+
const tBase = `%_m_abase_${_irCodeAttestation_4d3}`;
|
|
166
|
+
const tU0 = `%_m_u0_${_irCodeAttestation_4d3}`;
|
|
167
|
+
const tU1 = `%_m_u1_${_irCodeAttestation_4d3}`;
|
|
168
|
+
const tU2 = `%_m_u2_${_irCodeAttestation_4d3}`;
|
|
169
|
+
const tU4 = `%_m_u4_${_irCodeAttestation_4d3}`;
|
|
170
|
+
const tQ1 = `%_m_q1_${_irCodeAttestation_4d3}`;
|
|
171
|
+
const tKOne1 = `%_m_ko1_${_irCodeAttestation_4d3}`;
|
|
172
|
+
const tKOne2 = `%_m_ko2_${_irCodeAttestation_4d3}`;
|
|
173
|
+
const tZero = `%_m_zinv_${_irCodeAttestation_4d3}`;
|
|
174
|
+
const oneMask = this.prng.nextUint32() & (50996 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535) | (50562 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
175
|
+
const oneC1 = (50982 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535) ^ oneMask | (50562 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
176
|
+
const oneC2 = oneMask ^ _hkdfSaltRotation_711 | (50858 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
177
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
178
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
179
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
180
|
+
_tpmPcrBankProof_36d.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
181
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU0} = xor i32 ${_trimBitmask_6c4}, ${_monotonicNonceDrift_ded}`);
|
|
182
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
183
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
184
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
185
|
+
_tpmPcrBankProof_36d.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
186
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne1} = xor i32 ${_monotonicNonceDrift_ded}, ${oneC2}`);
|
|
187
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
188
|
+
_tpmPcrBankProof_36d.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
189
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
190
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
191
|
+
} else if (op === _attestKernelStateNonce_6497(57829 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 9796)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 110 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 110 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 110 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 110 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 9 & 255 ^ 93)) === 63) {
|
|
192
|
+
const tXor = `%_m_axor_${_irCodeAttestation_4d3}`;
|
|
193
|
+
const tAnd = `%_m_aand_${_irCodeAttestation_4d3}`;
|
|
194
|
+
const tShl = `%_m_ashl_${_irCodeAttestation_4d3}`;
|
|
195
|
+
const tBase = `%_m_abase_${_irCodeAttestation_4d3}`;
|
|
196
|
+
const tU0 = `%_m_u0_${_irCodeAttestation_4d3}`;
|
|
197
|
+
const tU1 = `%_m_u1_${_irCodeAttestation_4d3}`;
|
|
198
|
+
const tU2 = `%_m_u2_${_irCodeAttestation_4d3}`;
|
|
199
|
+
const tU4 = `%_m_u4_${_irCodeAttestation_4d3}`;
|
|
200
|
+
const tQ1 = `%_m_q1_${_irCodeAttestation_4d3}`;
|
|
201
|
+
const tKOne1 = `%_m_ko1_${_irCodeAttestation_4d3}`;
|
|
202
|
+
const tKOne2 = `%_m_ko2_${_irCodeAttestation_4d3}`;
|
|
203
|
+
const tZero = `%_m_zinv_${_irCodeAttestation_4d3}`;
|
|
204
|
+
const oneMask = this.prng.nextUint32() & 2147483646 + ((__tpmPcrBankEnvelope_6497 & 255) - 164) | 55969 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 7428);
|
|
205
|
+
const oneC1 = 55822 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 7595) ^ oneMask | 45598 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 30138);
|
|
206
|
+
const oneC2 = oneMask ^ _hkdfSaltRotation_711 | 33581 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 17545);
|
|
207
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
208
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
209
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
210
|
+
_tpmPcrBankProof_36d.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
211
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU0} = xor i32 ${_trimBitmask_6c4}, ${_monotonicNonceDrift_ded}`);
|
|
212
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
213
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
214
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
215
|
+
_tpmPcrBankProof_36d.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
216
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne1} = xor i32 ${_monotonicNonceDrift_ded}, ${oneC2}`);
|
|
217
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
218
|
+
_tpmPcrBankProof_36d.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
219
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
220
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
221
|
+
} else if (op === _attestKernelStateNonce_6497(42337 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 25283)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 44 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 0 & 255 ^ 198)) === 97) {
|
|
222
|
+
const tXor = `%_m_axor_${_irCodeAttestation_4d3}`;
|
|
223
|
+
const tAnd = `%_m_aand_${_irCodeAttestation_4d3}`;
|
|
224
|
+
const tShl = `%_m_ashl_${_irCodeAttestation_4d3}`;
|
|
225
|
+
const tBase = `%_m_abase_${_irCodeAttestation_4d3}`;
|
|
226
|
+
const tU0 = `%_m_u0_${_irCodeAttestation_4d3}`;
|
|
227
|
+
const tU1 = `%_m_u1_${_irCodeAttestation_4d3}`;
|
|
228
|
+
const tU2 = `%_m_u2_${_irCodeAttestation_4d3}`;
|
|
229
|
+
const tU4 = `%_m_u4_${_irCodeAttestation_4d3}`;
|
|
230
|
+
const tQ1 = `%_m_q1_${_irCodeAttestation_4d3}`;
|
|
231
|
+
const tKOne1 = `%_m_ko1_${_irCodeAttestation_4d3}`;
|
|
232
|
+
const tKOne2 = `%_m_ko2_${_irCodeAttestation_4d3}`;
|
|
233
|
+
const tZero = `%_m_zinv_${_irCodeAttestation_4d3}`;
|
|
234
|
+
const oneMask = this.prng.nextUint32() & (50562 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535) | (50858 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
235
|
+
const oneC1 = (50858 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535) ^ oneMask | (50982 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
236
|
+
const oneC2 = oneMask ^ _hkdfSaltRotation_711 | (50902 ^ __tpmPcrBankEnvelope_6497 & 65535) / (16412 ^ __tpmPcrBankEnvelope_6497 >>> 16 & 65535);
|
|
237
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
238
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
239
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
240
|
+
_tpmPcrBankProof_36d.push(`${indent}${tBase} = add i32 ${tXor}, ${tShl}`);
|
|
241
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU0} = xor i32 ${_trimBitmask_6c4}, ${_monotonicNonceDrift_ded}`);
|
|
242
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU1} = or i32 ${tU0}, 1`);
|
|
243
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU2} = mul i32 ${tU1}, ${tU1}`);
|
|
244
|
+
_tpmPcrBankProof_36d.push(`${indent}${tU4} = mul i32 ${tU2}, ${tU2}`);
|
|
245
|
+
_tpmPcrBankProof_36d.push(`${indent}${tQ1} = and i32 ${tU4}, 15`);
|
|
246
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne1} = xor i32 ${_monotonicNonceDrift_ded}, ${oneC2}`);
|
|
247
|
+
_tpmPcrBankProof_36d.push(`${indent}${tKOne2} = xor i32 ${oneC1}, ${tKOne1}`);
|
|
248
|
+
_tpmPcrBankProof_36d.push(`${indent}${tZero} = xor i32 ${tQ1}, ${tKOne2}`);
|
|
249
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = add i32 ${tBase}, ${tZero}`);
|
|
250
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
250
251
|
}
|
|
251
|
-
if (op ===
|
|
252
|
-
const tXor = `%_m_sxor_${
|
|
253
|
-
const tNot = `%_m_snot_${
|
|
254
|
-
const tAnd = `%_m_sand_${
|
|
255
|
-
const tShl = `%_m_sshl_${
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
return
|
|
262
|
-
} else if (op ===
|
|
263
|
-
const tXor = `%_m_sxor_${
|
|
264
|
-
const tNot = `%_m_snot_${
|
|
265
|
-
const tAnd = `%_m_sand_${
|
|
266
|
-
const tShl = `%_m_sshl_${
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return
|
|
273
|
-
} else if (op ===
|
|
274
|
-
const tXor = `%_m_sxor_${
|
|
275
|
-
const tNot = `%_m_snot_${
|
|
276
|
-
const tAnd = `%_m_sand_${
|
|
277
|
-
const tShl = `%_m_sshl_${
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
return
|
|
252
|
+
if (op === _attestKernelStateNonce_6497(56584 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 6827)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 85 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 85 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 85 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 85 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 10 & 255 ^ 91)) === 99) {
|
|
253
|
+
const tXor = `%_m_sxor_${_irCodeAttestation_4d3}`;
|
|
254
|
+
const tNot = `%_m_snot_${_irCodeAttestation_4d3}`;
|
|
255
|
+
const tAnd = `%_m_sand_${_irCodeAttestation_4d3}`;
|
|
256
|
+
const tShl = `%_m_sshl_${_irCodeAttestation_4d3}`;
|
|
257
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
258
|
+
_tpmPcrBankProof_36d.push(`${indent}${tNot} = xor i32 ${_trimBitmask_6c4}, -1`);
|
|
259
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${tNot}, ${_generateCryptoSeedAttestation_6be}`);
|
|
260
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
261
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
262
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
263
|
+
} else if (op === _attestKernelStateNonce_6497(55150 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 4290)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 50 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 50 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 50 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 50 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 11 & 255 ^ 215)) === 78) {
|
|
264
|
+
const tXor = `%_m_sxor_${_irCodeAttestation_4d3}`;
|
|
265
|
+
const tNot = `%_m_snot_${_irCodeAttestation_4d3}`;
|
|
266
|
+
const tAnd = `%_m_sand_${_irCodeAttestation_4d3}`;
|
|
267
|
+
const tShl = `%_m_sshl_${_irCodeAttestation_4d3}`;
|
|
268
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
269
|
+
_tpmPcrBankProof_36d.push(`${indent}${tNot} = xor i32 ${_trimBitmask_6c4}, -1`);
|
|
270
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${tNot}, ${_generateCryptoSeedAttestation_6be}`);
|
|
271
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
272
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
273
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
274
|
+
} else if (op === _attestKernelStateNonce_6497(51836 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 3537)) && (Math.imul(Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 72 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 72 | 1), Math.imul(((rawIrCode.seats || rawIrCode | 0) | 0) ^ 72 | 1, ((rawIrCode.seats || rawIrCode | 0) | 0) ^ 72 | 1)) & 15 ^ (__tpmPcrBankEnvelope_6497 >>> 11 & 255 ^ 122)) === 231) {
|
|
275
|
+
const tXor = `%_m_sxor_${_irCodeAttestation_4d3}`;
|
|
276
|
+
const tNot = `%_m_snot_${_irCodeAttestation_4d3}`;
|
|
277
|
+
const tAnd = `%_m_sand_${_irCodeAttestation_4d3}`;
|
|
278
|
+
const tShl = `%_m_sshl_${_irCodeAttestation_4d3}`;
|
|
279
|
+
_tpmPcrBankProof_36d.push(`${indent}${tXor} = xor i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
280
|
+
_tpmPcrBankProof_36d.push(`${indent}${tNot} = xor i32 ${_trimBitmask_6c4}, -1`);
|
|
281
|
+
_tpmPcrBankProof_36d.push(`${indent}${tAnd} = and i32 ${tNot}, ${_generateCryptoSeedAttestation_6be}`);
|
|
282
|
+
_tpmPcrBankProof_36d.push(`${indent}${tShl} = shl i32 ${tAnd}, 1`);
|
|
283
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = sub i32 ${tXor}, ${tShl}`);
|
|
284
|
+
return _tpmPcrBankProof_36d.join('\n');
|
|
284
285
|
}
|
|
285
|
-
const
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return (
|
|
291
|
-
function assertOptions_da0f(_tok0, _tok1, _tok2, _tok3) {
|
|
292
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:5a823152-26da528f]",
|
|
293
|
-
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
294
|
-
let _h = 2166136261;
|
|
295
|
-
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
296
|
-
_h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
|
|
297
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
298
|
-
_h ^= _h >>> 13;
|
|
299
|
-
}
|
|
300
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
301
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
302
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
303
|
-
_h ^= _h >>> 13;
|
|
304
|
-
}
|
|
305
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
306
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
307
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
308
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
309
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
310
|
-
if ((_h >>> 4 & 15) !== 6) {
|
|
311
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
312
|
-
}
|
|
313
|
-
return _h;
|
|
314
|
-
}
|
|
315
|
-
const __keyDerivationStateEnvelope_da0f = assertOptions_da0f(485994023, 1128791731, 903096603, 462521279);
|
|
316
|
-
if ((__keyDerivationStateEnvelope_da0f & 255) !== 111) {
|
|
317
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
318
|
-
}
|
|
286
|
+
const _MBASynthesizerSequence_181 = `%_m_xor_or_${_irCodeAttestation_4d3}`;
|
|
287
|
+
const _ringBufferEnvelope_ad3 = `%_m_xor_and_${_irCodeAttestation_4d3}`;
|
|
288
|
+
_tpmPcrBankProof_36d.push(`${indent}${_MBASynthesizerSequence_181} = or i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
289
|
+
_tpmPcrBankProof_36d.push(`${indent}${_ringBufferEnvelope_ad3} = and i32 ${_trimBitmask_6c4}, ${_generateCryptoSeedAttestation_6be}`);
|
|
290
|
+
_tpmPcrBankProof_36d.push(`${indent}${destReg} = sub i32 ${_MBASynthesizerSequence_181}, ${_ringBufferEnvelope_ad3}`);
|
|
291
|
+
return (__sgxBoundaryBitmask_c474 & 255) === 32 ? _tpmPcrBankProof_36d.join('\n') : (() => {
|
|
319
292
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
320
293
|
})();
|
|
321
294
|
});
|
|
322
|
-
if (
|
|
323
|
-
const labelPart =
|
|
324
|
-
const rest =
|
|
325
|
-
return `${header}${labelPart}${
|
|
295
|
+
if (_seedVector_ed6) {
|
|
296
|
+
const labelPart = _seedVector_ed6[51712 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 3493)];
|
|
297
|
+
const rest = _LlvmIrTransformerVector_c0f.slice(labelPart.length);
|
|
298
|
+
return `${header}${labelPart}${_inoculationInjectedEnvelope_8fa}${rest}${footer}`;
|
|
326
299
|
}
|
|
327
|
-
return (
|
|
328
|
-
function assertIrCode_56e1(_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:a79765c6-61d2f259]",
|
|
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) !== 7) {
|
|
348
|
-
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
349
|
-
}
|
|
350
|
-
return _h;
|
|
351
|
-
}
|
|
352
|
-
const __enclaveDigestAttestation_56e1 = assertIrCode_56e1(29599175, 558731259, 1549070629, 1254665517);
|
|
353
|
-
if ((__enclaveDigestAttestation_56e1 & 255) !== 116) {
|
|
354
|
-
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
355
|
-
}
|
|
300
|
+
return (__keyDerivationStateSequence_70bc & 255) === 189 ? `${header}${_inoculationInjectedEnvelope_8fa}${_LlvmIrTransformerVector_c0f}${footer}` : (() => {
|
|
356
301
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
357
302
|
})();
|
|
358
303
|
});
|
|
359
|
-
if (
|
|
304
|
+
if (_seedUsedEnvelope_c1a === (62348 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 13352))) {
|
|
360
305
|
return {
|
|
361
|
-
code:
|
|
362
|
-
transformedCount:
|
|
306
|
+
code: rawIrCode,
|
|
307
|
+
transformedCount: 43377 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 28373),
|
|
363
308
|
seedUsed: this.seed,
|
|
364
309
|
inoculationInjected: false,
|
|
365
|
-
stateKeyDerived:
|
|
310
|
+
stateKeyDerived: 49783 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 1491)
|
|
366
311
|
};
|
|
367
312
|
}
|
|
368
|
-
const
|
|
369
|
-
const
|
|
370
|
-
const
|
|
371
|
-
const
|
|
372
|
-
const
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
return (
|
|
376
|
-
code: `${
|
|
377
|
-
transformedCount:
|
|
313
|
+
const _transformedCountVector_752 = Buffer.from(_keyDerivationStateVector_72, _attestKernelStateNonce_6497(42809 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 24727)));
|
|
314
|
+
const _codeVector_e09 = _transformedCountVector_752.length + (63552 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 16357));
|
|
315
|
+
const _irCodeAttestation_21 = _keyDerivationStateVector_72.replace(/\\/g, '\\\\').replace(/"/g, _attestKernelStateNonce_6497(34178 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 16941)));
|
|
316
|
+
const _replaceEnvelope_4e4 = 1511516595 + ((__tpmPcrBankEnvelope_6497 & 255) - 164);
|
|
317
|
+
const _hmacFrameVector_9b9 = _hmacFrameEnvelope_218 ^ _replaceEnvelope_4e4 | 56167 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 7363);
|
|
318
|
+
const _SeededPRNGEnvelope_491 = (_hkdfSaltRotation_711 | 58085 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 9537)) - _hmacFrameVector_9b9 | 58217 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 9421);
|
|
319
|
+
const _MBASynthesizerSequence_361 = [`; [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]`, `@.syferit.legal.attestation_${_sgxEcallCounter_73} = private unnamed_addr constant [${_codeVector_e09} x i8] c"${_irCodeAttestation_21}\\00", align 1`, `@llvm.compiler.used = appending global [1 x ptr] [ptr @.syferit.legal.attestation_${_sgxEcallCounter_73}], section "llvm.metadata"`, ``, `declare void @llvm.trap() #0`, ``, `define internal i32 @${_entropyNonceEnvelope_21e}(i32 %_tok) noinline optnone {`, `entry:`, ` %_att_byte = load volatile i8, ptr @.syferit.legal.attestation_${_sgxEcallCounter_73}, align 1`, ` %_att_valid = icmp ne i8 %_att_byte, 0`, ` %_x0 = xor i32 %_tok, ${_replaceEnvelope_4e4}`, ` %_key = add i32 %_x0, ${_SeededPRNGEnvelope_491}`, ` %_shr = lshr i32 %_key, 4`, ` %_nib = and i32 %_shr, 15`, ` %_nib_ok = icmp eq i32 %_nib, ${_sgxBoundaryBitmask_2b3}`, ` %_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');
|
|
320
|
+
return (__tpmPcrBankEnvelope_6497 & 255) === 164 ? {
|
|
321
|
+
code: `${_MBASynthesizerSequence_361}\n${_hashStringVector_747}`,
|
|
322
|
+
transformedCount: _seedUsedEnvelope_c1a,
|
|
378
323
|
seedUsed: this.seed,
|
|
379
324
|
inoculationInjected: true,
|
|
380
|
-
stateKeyDerived:
|
|
325
|
+
stateKeyDerived: _hkdfSaltRotation_711 >>> (64998 ^ (__tpmPcrBankEnvelope_6497 & 65535 ^ 14914))
|
|
381
326
|
} : (() => {
|
|
382
|
-
function
|
|
383
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
327
|
+
function assertStateKeyDerived_e40f(_tok0, _tok1, _tok2, _tok3) {
|
|
328
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:2bfb9602-fe56ac6e]",
|
|
384
329
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
385
330
|
let _h = 2166136261;
|
|
386
331
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -403,11 +348,17 @@ export class LlvmIrTransformer {
|
|
|
403
348
|
}
|
|
404
349
|
return _h;
|
|
405
350
|
}
|
|
406
|
-
const
|
|
407
|
-
if ((
|
|
351
|
+
const __hmacFrameEnvelope_e40f = assertStateKeyDerived_e40f(1407469755, 623711103, 1104173225, 688502689);
|
|
352
|
+
if ((__hmacFrameEnvelope_e40f & 255) !== 144) {
|
|
408
353
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
409
354
|
}
|
|
410
355
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
411
356
|
})();
|
|
412
357
|
}
|
|
358
|
+
}
|
|
359
|
+
if (typeof window !== "undefined") {
|
|
360
|
+
window.__syferitIPC_9c90.invoke && window.__syferitIPC_9c90.invoke("license:quorum-token-refresh", {
|
|
361
|
+
syncEpoch: 1231738798,
|
|
362
|
+
channelSig: "SIG_FRAME_9C90"
|
|
363
|
+
});
|
|
413
364
|
}
|