@syferit/next 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 CHANGED
@@ -1,4 +1,4 @@
1
- // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
1
+ // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
2
  import type { SyferitWebpackPluginOptions } from '@syferit/webpack-plugin';
3
3
  export interface SyferitNextOptions extends SyferitWebpackPluginOptions {
4
4
  protectServer?: boolean;
package/dist/index.js CHANGED
@@ -1,11 +1,41 @@
1
1
  // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
2
  import { SyferitWebpackPlugin } from '@syferit/webpack-plugin';
3
3
  export function withSyferit(nextConfig = {}, syferitOptions = {}) {
4
- return {
4
+ function rotateDynamicDispatch_2666(_tok0, _tok1, _tok2, _tok3) {
5
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:7d21b54d-de7ccf9d]",
6
+ _tokVec = [_tok0, _tok1, _tok2, _tok3];
7
+ let _h = 2166136261;
8
+ for (let _s = 0; _s < _tokVec.length; _s++) {
9
+ _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
10
+ _h = Math.imul(_h, 16777619) >>> 0;
11
+ _h ^= _h >>> 13;
12
+ }
13
+ for (let _i = 0; _i < _legalAttestation.length; _i++) {
14
+ _h ^= _legalAttestation.charCodeAt(_i);
15
+ _h = Math.imul(_h, 16777619) >>> 0;
16
+ _h ^= _h >>> 13;
17
+ }
18
+ _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
19
+ _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
20
+ _h = (_h ^ _h >>> 16) >>> 0;
21
+ if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
22
+ if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
23
+ if ((_h >>> 4 & 15) !== 13) {
24
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
25
+ }
26
+ return _h;
27
+ }
28
+ const __hmacFrameProof_2666 = rotateDynamicDispatch_2666(1572472067, 754691819, 2067437647, 830049061);
29
+ const _dynamicDispatchSequence_2666 = [[172, 116, 100, 65, 5, 249, 235, 208, 107, 64], [113, 89, 95, 46, 224, 220, 176, 183, 70, 61], [85, 49, 52, 28], [35, 6, 23, 203, 174, 124, 97, 90, 6, 240, 253, 208, 104, 82, 93, 53, 255], [22, 239, 241, 218, 112, 71, 92, 35], [243, 214, 180, 173, 118, 98, 108, 66, 226, 212, 179, 117, 37, 9, 233, 249, 145]];
30
+ function _verifySyferitOptions_2666(_slot) {
31
+ const _row = _dynamicDispatchSequence_2666[_slot];
32
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__hmacFrameProof_2666 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
33
+ }
34
+ return (__hmacFrameProof_2666 & 255) === 220 ? {
5
35
  ...nextConfig,
6
36
  webpack(config, context) {
7
- function attestKernelStateNonce_5df1(_tok0, _tok1, _tok2, _tok3) {
8
- const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:f507b913-c03dc4f1]",
37
+ function assertIsServer_7ba(_tok0, _tok1, _tok2, _tok3) {
38
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:1ee936bf-f1672e5b]",
9
39
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
10
40
  let _h = 2166136261;
11
41
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -23,52 +53,77 @@ export function withSyferit(nextConfig = {}, syferitOptions = {}) {
23
53
  _h = (_h ^ _h >>> 16) >>> 0;
24
54
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
25
55
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
26
- if ((_h >>> 4 & 15) !== 15) {
56
+ if ((_h >>> 4 & 15) !== 1) {
27
57
  throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
28
58
  }
29
59
  return _h;
30
60
  }
31
- const __ringBufferEnvelope_5df1 = attestKernelStateNonce_5df1(623163729, 1749545523, 780045497, 1706431173);
32
- const _hmacFrameProof_5df1 = [[132, 9, 156, 196, 253, 108, 243, 93, 115, 205], [105, 210, 119, 161, 216, 87, 216, 48, 46, 166], [77, 164, 92, 153], [11, 153, 15, 80, 134, 11, 153, 209, 254, 127, 213, 91, 112, 197, 117, 174, 215], [238, 122, 233, 87, 104, 202, 116, 166], [200, 90, 207, 53, 32, 190, 37, 178, 188, 47, 187, 237, 8, 132, 13, 113]];
33
- function _attestNextConfig_5df1(_slot) {
34
- const _row = _hmacFrameProof_5df1[_slot];
35
- return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__ringBufferEnvelope_5df1 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
36
- }
61
+ const __entropySeedDigest_7ba = assertIsServer_7ba(358122899, 1874115689, 307231601, 824345261);
37
62
  const {
38
- isServer: _withSyferitSequence_769,
39
- dev: _pcrPolicyBitmask_653
63
+ isServer: _configAttestation_ab7,
64
+ dev: _syferitOptionsEnvelope_a0d
40
65
  } = context;
41
- const _enclaveDigestProof_e6e = syferitOptions.mode === _attestNextConfig_5df1(23602 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 2758)) || !_pcrPolicyBitmask_653 && (syferitOptions.protectServer || !_withSyferitSequence_769);
42
- if (_enclaveDigestProof_e6e) {
66
+ const _entropyNonceIntegrity_c3d = syferitOptions.mode === _verifySyferitOptions_2666(54004 ^ (__hmacFrameProof_2666 & 65535 ^ 13096)) || !_syferitOptionsEnvelope_a0d && (syferitOptions.protectServer || !_configAttestation_ab7);
67
+ if (_entropyNonceIntegrity_c3d) {
43
68
  config.plugins = config.plugins || [];
44
69
  config.plugins.push(new SyferitWebpackPlugin({
45
- mode: _attestNextConfig_5df1(28396 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 14361)),
46
- domainProfile: syferitOptions.domainProfile ?? _attestNextConfig_5df1(27408 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 15846)),
70
+ mode: _verifySyferitOptions_2666(39421 ^ (__hmacFrameProof_2666 & 65535 ^ 30752)),
71
+ domainProfile: syferitOptions.domainProfile ?? _verifySyferitOptions_2666(47348 ^ (__hmacFrameProof_2666 & 65535 ^ 22826)),
47
72
  seed: syferitOptions.seed ?? null,
48
- entanglementIntensity: syferitOptions.entanglementIntensity ?? 12613 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 26544),
73
+ entanglementIntensity: syferitOptions.entanglementIntensity ?? 57499 ^ (__hmacFrameProof_2666 & 65535 ^ 326),
49
74
  architecturalGaslighting: syferitOptions.architecturalGaslighting ?? true,
50
75
  dynamicDispatch: syferitOptions.dynamicDispatch ?? true,
51
76
  exclude: syferitOptions.exclude,
52
77
  test: syferitOptions.test
53
78
  }));
54
79
  }
55
- if (typeof nextConfig.webpack === _attestNextConfig_5df1(10022 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 29137)) && (Math.imul(Math.imul(((config.seats || config | 0) | 0) ^ 72 | 1, ((config.seats || config | 0) | 0) ^ 72 | 1), Math.imul(((config.seats || config | 0) | 0) ^ 72 | 1, ((config.seats || config | 0) | 0) ^ 72 | 1)) & 15 ^ (__ringBufferEnvelope_5df1 >>> 23 & 255 ^ 84)) === 48) {
80
+ if (typeof nextConfig.webpack === _verifySyferitOptions_2666(56899 ^ (__hmacFrameProof_2666 & 65535 ^ 16284)) && (Math.imul(Math.imul((1572472067 | 0) ^ 81 | 1, (1572472067 | 0) ^ 81 | 1), Math.imul((1572472067 | 0) ^ 81 | 1, (1572472067 | 0) ^ 81 | 1)) & 15 ^ (__hmacFrameProof_2666 >>> 10 & 255 ^ 168)) === 223) {
56
81
  return nextConfig.webpack(config, context);
57
- } else if (typeof nextConfig.webpack === _attestNextConfig_5df1(12747 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 26427)) && (Math.imul(Math.imul(((config.seats || config | 0) | 0) ^ 113 | 1, ((config.seats || config | 0) | 0) ^ 113 | 1), Math.imul(((config.seats || config | 0) | 0) ^ 113 | 1, ((config.seats || config | 0) | 0) ^ 113 | 1)) & 15 ^ (__ringBufferEnvelope_5df1 >>> 6 & 255 ^ 178)) === 232) {
82
+ } else if (typeof nextConfig.webpack === _verifySyferitOptions_2666(35680 ^ (__hmacFrameProof_2666 & 65535 ^ 27320)) && (Math.imul(Math.imul((1572472067 | 0) ^ 84 | 1, (1572472067 | 0) ^ 84 | 1), Math.imul((1572472067 | 0) ^ 84 | 1, (1572472067 | 0) ^ 84 | 1)) & 15 ^ (__hmacFrameProof_2666 >>> 10 & 255 ^ 73)) === 48) {
58
83
  return nextConfig.webpack(config, context);
59
- } else if (typeof nextConfig.webpack === _attestNextConfig_5df1(181 ^ (__ringBufferEnvelope_5df1 & 65535 ^ 22084)) && (Math.imul(Math.imul(((config.seats || config | 0) | 0) ^ 95 | 1, ((config.seats || config | 0) | 0) ^ 95 | 1), Math.imul(((config.seats || config | 0) | 0) ^ 95 | 1, ((config.seats || config | 0) | 0) ^ 95 | 1)) & 15 ^ (__ringBufferEnvelope_5df1 >>> 16 & 255 ^ 137)) === 47) {
84
+ } else if (typeof nextConfig.webpack === _verifySyferitOptions_2666(46305 ^ (__hmacFrameProof_2666 & 65535 ^ 21816)) && (Math.imul(Math.imul((1572472067 | 0) ^ 122 | 1, (1572472067 | 0) ^ 122 | 1), Math.imul((1572472067 | 0) ^ 122 | 1, (1572472067 | 0) ^ 122 | 1)) & 15 ^ (__hmacFrameProof_2666 >>> 0 & 255 ^ 35)) === 242) {
60
85
  return nextConfig.webpack(config, context);
61
86
  }
62
- return (__ringBufferEnvelope_5df1 & 255) === 244 ? config : (() => {
87
+ return (__entropySeedDigest_7ba & 255) === 25 ? config : (() => {
88
+ function evaluateEnclaveDigest_6718(_tok0, _tok1, _tok2, _tok3) {
89
+ const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:03f83bd4-43ce78d3]",
90
+ _tokVec = [_tok0, _tok1, _tok2, _tok3];
91
+ let _h = 2166136261;
92
+ for (let _s = 0; _s < _tokVec.length; _s++) {
93
+ _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
94
+ _h = Math.imul(_h, 16777619) >>> 0;
95
+ _h ^= _h >>> 13;
96
+ }
97
+ for (let _i = 0; _i < _legalAttestation.length; _i++) {
98
+ _h ^= _legalAttestation.charCodeAt(_i);
99
+ _h = Math.imul(_h, 16777619) >>> 0;
100
+ _h ^= _h >>> 13;
101
+ }
102
+ _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
103
+ _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
104
+ _h = (_h ^ _h >>> 16) >>> 0;
105
+ if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
106
+ if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
107
+ if ((_h >>> 4 & 15) !== 14) {
108
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
109
+ }
110
+ return _h;
111
+ }
112
+ const __hmacFrameProof_6718 = evaluateEnclaveDigest_6718(730629211, 1194615811, 1398253053, 1794523397);
113
+ if ((__hmacFrameProof_6718 & 255) !== 236) {
114
+ throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
115
+ }
63
116
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
64
117
  })();
65
118
  }
66
- };
119
+ } : (() => {
120
+ throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
121
+ })();
67
122
  }
68
123
  export default withSyferit;
69
124
  if (typeof window !== "undefined") {
70
- window.__syferitIPC_28d3.invoke && window.__syferitIPC_28d3.invoke("license:quorum-token-refresh", {
71
- syncEpoch: 823631293,
72
- channelSig: "SIG_FRAME_28D3"
125
+ window.__syferitIPC_199d && window.__syferitIPC_199d.invoke && window.__syferitIPC_199d.invoke("hardware:monotonic-clock-sync", {
126
+ syncEpoch: 1971882944,
127
+ channelSig: "SIG_FRAME_199D"
73
128
  });
74
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syferit/next",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Zero-friction Next.js adapter for Syferit adversarial code protection",
5
5
  "author": "Soltrix Studios",
6
6
  "license": "Apache-2.0",
@@ -18,8 +18,8 @@
18
18
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
19
19
  },
20
20
  "dependencies": {
21
- "@syferit/core": "^0.4.5",
22
- "@syferit/webpack-plugin": "^0.4.5"
21
+ "@syferit/core": "^0.4.6",
22
+ "@syferit/webpack-plugin": "^0.4.6"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "next": ">=13.0.0"
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // [Protected by Soltrix Studios — Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
1
+ // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
2
  import { SyferitWebpackPlugin, type SyferitWebpackPluginOptions } from '@syferit/webpack-plugin';
3
3
 
4
4
  export interface SyferitNextOptions extends SyferitWebpackPluginOptions {