@syferit/llvm 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/dist/index.js +18 -18
- package/dist/irTransformer.js +247 -246
- package/dist/nativeSourceTransformer.js +145 -145
- package/dist/types.js +3 -3
- package/package.json +2 -2
package/dist/irTransformer.js
CHANGED
|
@@ -11,8 +11,8 @@ export class LlvmIrTransformer {
|
|
|
11
11
|
this.mba = new MBASynthesizer(this.prng);
|
|
12
12
|
}
|
|
13
13
|
transform(rawIrCode) {
|
|
14
|
-
function
|
|
15
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
14
|
+
function 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
16
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
17
17
|
let _h = 2166136261;
|
|
18
18
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -30,96 +30,71 @@ 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) !==
|
|
34
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
33
|
+
if ((_h >>> 4 & 15) !== 2) {
|
|
34
|
+
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
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 __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
43
|
}
|
|
44
|
-
if (this.options.mode ===
|
|
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
45
|
return {
|
|
46
46
|
code: rawIrCode,
|
|
47
|
-
transformedCount: (
|
|
47
|
+
transformedCount: (15190 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535),
|
|
48
48
|
seedUsed: this.seed,
|
|
49
49
|
inoculationInjected: false,
|
|
50
|
-
stateKeyDerived: (
|
|
50
|
+
stateKeyDerived: (14418 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535)
|
|
51
51
|
};
|
|
52
|
-
} else if (this.options.mode ===
|
|
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
53
|
return {
|
|
54
54
|
code: rawIrCode,
|
|
55
|
-
transformedCount:
|
|
55
|
+
transformedCount: 20302 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 30058),
|
|
56
56
|
seedUsed: this.seed,
|
|
57
57
|
inoculationInjected: false,
|
|
58
|
-
stateKeyDerived:
|
|
58
|
+
stateKeyDerived: 24797 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 23289)
|
|
59
59
|
};
|
|
60
|
-
} else if (this.options.mode ===
|
|
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
61
|
return {
|
|
62
62
|
code: rawIrCode,
|
|
63
|
-
transformedCount: (
|
|
63
|
+
transformedCount: (15190 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535),
|
|
64
64
|
seedUsed: this.seed,
|
|
65
65
|
inoculationInjected: false,
|
|
66
|
-
stateKeyDerived: (
|
|
66
|
+
stateKeyDerived: (15014 ^ __ringBufferIntegrity_ccb0 & 65535) / (6164 ^ __ringBufferIntegrity_ccb0 >>> 16 & 65535)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
while ((
|
|
74
|
-
if (
|
|
75
|
-
|
|
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
76
|
}
|
|
77
77
|
}
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
let
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
_h ^= _h >>> 13;
|
|
99
|
-
}
|
|
100
|
-
for (let _i = 0; _i < _legalAttestation.length; _i++) {
|
|
101
|
-
_h ^= _legalAttestation.charCodeAt(_i);
|
|
102
|
-
_h = Math.imul(_h, 16777619) >>> 0;
|
|
103
|
-
_h ^= _h >>> 13;
|
|
104
|
-
}
|
|
105
|
-
_h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
|
|
106
|
-
_h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
|
|
107
|
-
_h = (_h ^ _h >>> 16) >>> 0;
|
|
108
|
-
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
109
|
-
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
110
|
-
if ((_h >>> 4 & 15) !== 11) {
|
|
111
|
-
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
112
|
-
}
|
|
113
|
-
return _h;
|
|
114
|
-
}
|
|
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]",
|
|
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]",
|
|
123
98
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
124
99
|
let _h = 2166136261;
|
|
125
100
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -137,195 +112,221 @@ export class LlvmIrTransformer {
|
|
|
137
112
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
138
113
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
139
114
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
140
|
-
if ((_h >>> 4 & 15) !==
|
|
141
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
115
|
+
if ((_h >>> 4 & 15) !== 1) {
|
|
116
|
+
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
142
117
|
}
|
|
143
118
|
return _h;
|
|
144
119
|
}
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
let
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
if (/^-?\d+$/.test(
|
|
151
|
-
const literalVal = parseInt(
|
|
152
|
-
const mask = this.prng.nextUint32() & 2147483646 + ((
|
|
153
|
-
const c1 = literalVal ^ mask |
|
|
154
|
-
const c2 = mask ^
|
|
155
|
-
const tMask1 = `%_m_kxor_${
|
|
156
|
-
const tMask2 = `%_m_const_${
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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;
|
|
160
135
|
}
|
|
161
|
-
if (op ===
|
|
162
|
-
const tXor = `%_m_axor_${
|
|
163
|
-
const tAnd = `%_m_aand_${
|
|
164
|
-
const tShl = `%_m_ashl_${
|
|
165
|
-
const tBase = `%_m_abase_${
|
|
166
|
-
const tU0 = `%_m_u0_${
|
|
167
|
-
const tU1 = `%_m_u1_${
|
|
168
|
-
const tU2 = `%_m_u2_${
|
|
169
|
-
const tU4 = `%_m_u4_${
|
|
170
|
-
const tQ1 = `%_m_q1_${
|
|
171
|
-
const tKOne1 = `%_m_ko1_${
|
|
172
|
-
const tKOne2 = `%_m_ko2_${
|
|
173
|
-
const tZero = `%_m_zinv_${
|
|
174
|
-
const oneMask = this.prng.nextUint32() & (
|
|
175
|
-
const oneC1 = (
|
|
176
|
-
const oneC2 = oneMask ^
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return
|
|
191
|
-
} else if (op ===
|
|
192
|
-
const tXor = `%_m_axor_${
|
|
193
|
-
const tAnd = `%_m_aand_${
|
|
194
|
-
const tShl = `%_m_ashl_${
|
|
195
|
-
const tBase = `%_m_abase_${
|
|
196
|
-
const tU0 = `%_m_u0_${
|
|
197
|
-
const tU1 = `%_m_u1_${
|
|
198
|
-
const tU2 = `%_m_u2_${
|
|
199
|
-
const tU4 = `%_m_u4_${
|
|
200
|
-
const tQ1 = `%_m_q1_${
|
|
201
|
-
const tKOne1 = `%_m_ko1_${
|
|
202
|
-
const tKOne2 = `%_m_ko2_${
|
|
203
|
-
const tZero = `%_m_zinv_${
|
|
204
|
-
const oneMask = this.prng.nextUint32() & 2147483646 + ((
|
|
205
|
-
const oneC1 =
|
|
206
|
-
const oneC2 = oneMask ^
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return
|
|
221
|
-
} else if (op ===
|
|
222
|
-
const tXor = `%_m_axor_${
|
|
223
|
-
const tAnd = `%_m_aand_${
|
|
224
|
-
const tShl = `%_m_ashl_${
|
|
225
|
-
const tBase = `%_m_abase_${
|
|
226
|
-
const tU0 = `%_m_u0_${
|
|
227
|
-
const tU1 = `%_m_u1_${
|
|
228
|
-
const tU2 = `%_m_u2_${
|
|
229
|
-
const tU4 = `%_m_u4_${
|
|
230
|
-
const tQ1 = `%_m_q1_${
|
|
231
|
-
const tKOne1 = `%_m_ko1_${
|
|
232
|
-
const tKOne2 = `%_m_ko2_${
|
|
233
|
-
const tZero = `%_m_zinv_${
|
|
234
|
-
const oneMask = this.prng.nextUint32() & (
|
|
235
|
-
const oneC1 = (
|
|
236
|
-
const oneC2 = oneMask ^
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return
|
|
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');
|
|
251
226
|
}
|
|
252
|
-
if (op ===
|
|
253
|
-
const tXor = `%_m_sxor_${
|
|
254
|
-
const tNot = `%_m_snot_${
|
|
255
|
-
const tAnd = `%_m_sand_${
|
|
256
|
-
const tShl = `%_m_sshl_${
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return
|
|
263
|
-
} else if (op ===
|
|
264
|
-
const tXor = `%_m_sxor_${
|
|
265
|
-
const tNot = `%_m_snot_${
|
|
266
|
-
const tAnd = `%_m_sand_${
|
|
267
|
-
const tShl = `%_m_sshl_${
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return
|
|
274
|
-
} else if (op ===
|
|
275
|
-
const tXor = `%_m_sxor_${
|
|
276
|
-
const tNot = `%_m_snot_${
|
|
277
|
-
const tAnd = `%_m_sand_${
|
|
278
|
-
const tShl = `%_m_sshl_${
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return
|
|
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');
|
|
285
260
|
}
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return (
|
|
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
|
+
}
|
|
292
295
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
293
296
|
})();
|
|
294
297
|
});
|
|
295
|
-
if (
|
|
296
|
-
const labelPart =
|
|
297
|
-
const rest =
|
|
298
|
-
return `${header}${labelPart}${
|
|
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}`;
|
|
299
302
|
}
|
|
300
|
-
return
|
|
301
|
-
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
302
|
-
})();
|
|
303
|
+
return `${header}${preamble}${rewrittenBody}${footer}`;
|
|
303
304
|
});
|
|
304
|
-
if (
|
|
305
|
+
if (_monotonicNonceDrift_fd2 === (20067 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 29767))) {
|
|
305
306
|
return {
|
|
306
307
|
code: rawIrCode,
|
|
307
|
-
transformedCount:
|
|
308
|
+
transformedCount: 26027 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 24463),
|
|
308
309
|
seedUsed: this.seed,
|
|
309
310
|
inoculationInjected: false,
|
|
310
|
-
stateKeyDerived:
|
|
311
|
+
stateKeyDerived: 30318 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 19530)
|
|
311
312
|
};
|
|
312
313
|
}
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
const
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
return (
|
|
321
|
-
code: `${
|
|
322
|
-
transformedCount:
|
|
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,
|
|
323
324
|
seedUsed: this.seed,
|
|
324
325
|
inoculationInjected: true,
|
|
325
|
-
stateKeyDerived:
|
|
326
|
+
stateKeyDerived: _inoculationInjectedIntegrity_bf0 >>> (10774 ^ (__ringBufferIntegrity_ccb0 & 65535 ^ 4146))
|
|
326
327
|
} : (() => {
|
|
327
|
-
function
|
|
328
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
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]",
|
|
329
330
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
330
331
|
let _h = 2166136261;
|
|
331
332
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -343,13 +344,13 @@ export class LlvmIrTransformer {
|
|
|
343
344
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
344
345
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
345
346
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
346
|
-
if ((_h >>> 4 & 15) !==
|
|
347
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
347
|
+
if ((_h >>> 4 & 15) !== 1) {
|
|
348
|
+
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
348
349
|
}
|
|
349
350
|
return _h;
|
|
350
351
|
}
|
|
351
|
-
const
|
|
352
|
-
if ((
|
|
352
|
+
const __entropyNonceVector_63b4 = rotateSeedUsed_63b4(665724657, 328321425, 1491121423, 714419127);
|
|
353
|
+
if ((__entropyNonceVector_63b4 & 255) !== 19) {
|
|
353
354
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
354
355
|
}
|
|
355
356
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
@@ -357,8 +358,8 @@ export class LlvmIrTransformer {
|
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
360
|
if (typeof window !== "undefined") {
|
|
360
|
-
window.
|
|
361
|
-
syncEpoch:
|
|
362
|
-
channelSig: "
|
|
361
|
+
window.__syferitIPC_245a.invoke && window.__syferitIPC_245a.invoke("crypto:tpm-enclave-verify", {
|
|
362
|
+
syncEpoch: 1371494422,
|
|
363
|
+
channelSig: "SIG_FRAME_245A"
|
|
363
364
|
});
|
|
364
365
|
}
|