@syferit/next 0.4.6 → 1.0.0

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.js CHANGED
@@ -1,8 +1,8 @@
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 } from '@syferit/webpack-plugin';
3
3
  export function withSyferit(nextConfig = {}, syferitOptions = {}) {
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]",
4
+ function auditTpmState_3ada(_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:c36b73fb-f42d0ed4]",
6
6
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
7
7
  let _h = 2166136261;
8
8
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -20,22 +20,22 @@ export function withSyferit(nextConfig = {}, syferitOptions = {}) {
20
20
  _h = (_h ^ _h >>> 16) >>> 0;
21
21
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
22
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");
23
+ if ((_h >>> 4 & 15) !== 9) {
24
+ throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
25
25
  }
26
26
  return _h;
27
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));
28
+ const __SoltrixStudiosQuorum_3ada = auditTpmState_3ada(896065305, 1007121955, 684539513, 1139213743);
29
+ const _nextConfigVector_3ada = [[227, 76, 10, 164, 82, 177, 141, 61, 212, 8], [200, 17, 229, 129, 57, 148, 106, 16, 143, 229], [174, 233, 206, 121], [101, 194, 162, 112, 245, 45, 7, 182, 78], [65, 167, 151, 55, 207, 15, 226, 134], [41, 153, 106, 28, 146, 251, 192, 100, 7, 122]];
30
+ function _isolateShouldRun_3ada(_slot) {
31
+ const _row = _nextConfigVector_3ada[_slot];
32
+ return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__SoltrixStudiosQuorum_3ada >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
33
33
  }
34
- return (__hmacFrameProof_2666 & 255) === 220 ? {
34
+ return (__SoltrixStudiosQuorum_3ada & 255) === 147 ? {
35
35
  ...nextConfig,
36
36
  webpack(config, context) {
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]",
37
+ function attestExclude_71a2(_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:ac328389-a2cd3dcc]",
39
39
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
40
40
  let _h = 2166136261;
41
41
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -53,40 +53,40 @@ export function withSyferit(nextConfig = {}, syferitOptions = {}) {
53
53
  _h = (_h ^ _h >>> 16) >>> 0;
54
54
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
55
55
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
56
- if ((_h >>> 4 & 15) !== 1) {
57
- throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
56
+ if ((_h >>> 4 & 15) !== 11) {
57
+ throw new Error("ASSERTION_INVARIANT: Client clock skew exceeded monotonic buffer bounds");
58
58
  }
59
59
  return _h;
60
60
  }
61
- const __entropySeedDigest_7ba = assertIsServer_7ba(358122899, 1874115689, 307231601, 824345261);
61
+ const __modeState_71a2 = attestExclude_71a2(1512105555, 2042789669, 223617247, 1419521973);
62
62
  const {
63
- isServer: _configAttestation_ab7,
64
- dev: _syferitOptionsEnvelope_a0d
63
+ isServer: _tpmProof_e44,
64
+ dev: _signatureProof_abe
65
65
  } = context;
66
- const _entropyNonceIntegrity_c3d = syferitOptions.mode === _verifySyferitOptions_2666(54004 ^ (__hmacFrameProof_2666 & 65535 ^ 13096)) || !_syferitOptionsEnvelope_a0d && (syferitOptions.protectServer || !_configAttestation_ab7);
67
- if (_entropyNonceIntegrity_c3d) {
66
+ const _tpmAttestation_70a = syferitOptions.mode === _isolateShouldRun_3ada(229462345 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 31602, 9065)) || !_signatureProof_abe && (syferitOptions.protectServer || !_tpmProof_e44);
67
+ if (_tpmAttestation_70a) {
68
68
  config.plugins = config.plugins || [];
69
69
  config.plugins.push(new SyferitWebpackPlugin({
70
- mode: _verifySyferitOptions_2666(39421 ^ (__hmacFrameProof_2666 & 65535 ^ 30752)),
71
- domainProfile: syferitOptions.domainProfile ?? _verifySyferitOptions_2666(47348 ^ (__hmacFrameProof_2666 & 65535 ^ 22826)),
70
+ mode: _isolateShouldRun_3ada(403205690 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 25604, 12541)),
71
+ domainProfile: syferitOptions.domainProfile ?? _isolateShouldRun_3ada(12673080 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 6197, 30031)),
72
72
  seed: syferitOptions.seed ?? null,
73
- entanglementIntensity: syferitOptions.entanglementIntensity ?? 57499 ^ (__hmacFrameProof_2666 & 65535 ^ 326),
73
+ entanglementIntensity: syferitOptions.entanglementIntensity ?? 735214859 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 27361, 24877),
74
74
  architecturalGaslighting: syferitOptions.architecturalGaslighting ?? true,
75
75
  dynamicDispatch: syferitOptions.dynamicDispatch ?? true,
76
76
  exclude: syferitOptions.exclude,
77
77
  test: syferitOptions.test
78
78
  }));
79
79
  }
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) {
80
+ if (typeof nextConfig.webpack === _isolateShouldRun_3ada(64333649 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 2289, 14457)) && (Math.imul(Math.imul((896065305 | 0) ^ 62 | 1, (896065305 | 0) ^ 62 | 1), Math.imul((896065305 | 0) ^ 62 | 1, (896065305 | 0) ^ 62 | 1)) & 15 ^ (__SoltrixStudiosQuorum_3ada >>> 23 & 255 ^ 114)) === 219) {
81
81
  return nextConfig.webpack(config, context);
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) {
82
+ } else if (typeof nextConfig.webpack === _isolateShouldRun_3ada(87519095 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 11770, 6523)) && (Math.imul(Math.imul((896065305 | 0) ^ 127 | 1, (896065305 | 0) ^ 127 | 1), Math.imul((896065305 | 0) ^ 127 | 1, (896065305 | 0) ^ 127 | 1)) & 15 ^ (__SoltrixStudiosQuorum_3ada >>> 1 & 255 ^ 123)) === 179) {
83
83
  return nextConfig.webpack(config, context);
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) {
84
+ } else if (typeof nextConfig.webpack === _isolateShouldRun_3ada(61292388 ^ Math.imul(__SoltrixStudiosQuorum_3ada & 65535 ^ 1038, 8085)) && (Math.imul(Math.imul((896065305 | 0) ^ 44 | 1, (896065305 | 0) ^ 44 | 1), Math.imul((896065305 | 0) ^ 44 | 1, (896065305 | 0) ^ 44 | 1)) & 15 ^ (__SoltrixStudiosQuorum_3ada >>> 14 & 255 ^ 58)) === 91) {
85
85
  return nextConfig.webpack(config, context);
86
86
  }
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]",
87
+ return (__modeState_71a2 & 255) === 177 ? config : (() => {
88
+ function rotateTpmEnvelope_cbab(_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:f1ed3d64-569ff033]",
90
90
  _tokVec = [_tok0, _tok1, _tok2, _tok3];
91
91
  let _h = 2166136261;
92
92
  for (let _s = 0; _s < _tokVec.length; _s++) {
@@ -104,26 +104,54 @@ export function withSyferit(nextConfig = {}, syferitOptions = {}) {
104
104
  _h = (_h ^ _h >>> 16) >>> 0;
105
105
  if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
106
106
  if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
107
- if ((_h >>> 4 & 15) !== 14) {
107
+ if ((_h >>> 4 & 15) !== 13) {
108
108
  throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
109
109
  }
110
110
  return _h;
111
111
  }
112
- const __hmacFrameProof_6718 = evaluateEnclaveDigest_6718(730629211, 1194615811, 1398253053, 1794523397);
113
- if ((__hmacFrameProof_6718 & 255) !== 236) {
112
+ const __modeState_cbab = rotateTpmEnvelope_cbab(1293952577, 1228702797, 1038458345, 1038275977);
113
+ if ((__modeState_cbab & 255) !== 221) {
114
114
  throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
115
115
  }
116
116
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
117
117
  })();
118
118
  }
119
119
  } : (() => {
120
+ function isolateShouldRun_9c(_tok0, _tok1, _tok2, _tok3) {
121
+ const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:9bb07641-c86c6f10]",
122
+ _tokVec = [_tok0, _tok1, _tok2, _tok3];
123
+ let _h = 2166136261;
124
+ for (let _s = 0; _s < _tokVec.length; _s++) {
125
+ _h = (_h ^ _tokVec[_s] >>> 0) >>> 0;
126
+ _h = Math.imul(_h, 16777619) >>> 0;
127
+ _h ^= _h >>> 13;
128
+ }
129
+ for (let _i = 0; _i < _legalAttestation.length; _i++) {
130
+ _h ^= _legalAttestation.charCodeAt(_i);
131
+ _h = Math.imul(_h, 16777619) >>> 0;
132
+ _h ^= _h >>> 13;
133
+ }
134
+ _h = Math.imul(_h ^ _h >>> 16, 2246822507) >>> 0;
135
+ _h = Math.imul(_h ^ _h >>> 13, 3266489909) >>> 0;
136
+ _h = (_h ^ _h >>> 16) >>> 0;
137
+ if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
138
+ if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
139
+ if ((_h >>> 4 & 15) !== 12) {
140
+ throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
141
+ }
142
+ return _h;
143
+ }
144
+ const __webpackState_9c = isolateShouldRun_9c(1280407851, 806118549, 17250377, 938102965);
145
+ if ((__webpackState_9c & 255) !== 207) {
146
+ throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
147
+ }
120
148
  throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
121
149
  })();
122
150
  }
123
151
  export default withSyferit;
124
152
  if (typeof window !== "undefined") {
125
- window.__syferitIPC_199d && window.__syferitIPC_199d.invoke && window.__syferitIPC_199d.invoke("hardware:monotonic-clock-sync", {
126
- syncEpoch: 1971882944,
127
- channelSig: "SIG_FRAME_199D"
153
+ window.__syferitIPC_deab && window.__syferitIPC_deab.invoke && window.__syferitIPC_deab.invoke("hardware:monotonic-clock-sync", {
154
+ syncEpoch: 1981953147,
155
+ channelSig: "SIG_FRAME_DEAB"
128
156
  });
129
157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syferit/next",
3
- "version": "0.4.6",
3
+ "version": "1.0.0",
4
4
  "description": "Zero-friction Next.js adapter for Syferit adversarial code protection",
5
5
  "author": "Soltrix Studios",
6
6
  "license": "Apache-2.0",
@@ -10,7 +10,8 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js"
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
14
15
  }
15
16
  },
16
17
  "scripts": {
@@ -18,8 +19,8 @@
18
19
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
19
20
  },
20
21
  "dependencies": {
21
- "@syferit/core": "^0.4.6",
22
- "@syferit/webpack-plugin": "^0.4.6"
22
+ "@syferit/core": "^1.0.0",
23
+ "@syferit/webpack-plugin": "^1.0.0"
23
24
  },
24
25
  "peerDependencies": {
25
26
  "next": ">=13.0.0"
@@ -34,5 +35,9 @@
34
35
  "url": "git+https://github.com/soltrix-studios/syferit.git",
35
36
  "directory": "packages/next"
36
37
  },
37
- "homepage": "https://syferit.soltrixstudios.com"
38
+ "homepage": "https://syferit.soltrixstudios.com",
39
+ "files": [
40
+ "dist",
41
+ "README.md"
42
+ ]
38
43
  }
package/src/index.ts DELETED
@@ -1,46 +0,0 @@
1
- // [Protected by Soltrix Studios | Syferit Code Defense Engine | https://syferit.soltrixstudios.com]
2
- import { SyferitWebpackPlugin, type SyferitWebpackPluginOptions } from '@syferit/webpack-plugin';
3
-
4
- export interface SyferitNextOptions extends SyferitWebpackPluginOptions {
5
- protectServer?: boolean;
6
- }
7
-
8
-
9
- export function withSyferit(
10
- nextConfig: any = {},
11
- syferitOptions: SyferitNextOptions = {}
12
- ): any {
13
- return {
14
- ...nextConfig,
15
- webpack(config: any, context: any) {
16
- const { isServer, dev } = context;
17
-
18
- const shouldRun =
19
- syferitOptions.mode === 'production' || (!dev && (syferitOptions.protectServer || !isServer));
20
-
21
- if (shouldRun) {
22
- config.plugins = config.plugins || [];
23
- config.plugins.push(
24
- new SyferitWebpackPlugin({
25
- mode: 'production',
26
- domainProfile: syferitOptions.domainProfile ?? 'saas',
27
- seed: syferitOptions.seed ?? null,
28
- entanglementIntensity: syferitOptions.entanglementIntensity ?? 1.0,
29
- architecturalGaslighting: syferitOptions.architecturalGaslighting ?? true,
30
- dynamicDispatch: syferitOptions.dynamicDispatch ?? true,
31
- exclude: syferitOptions.exclude,
32
- test: syferitOptions.test
33
- })
34
- );
35
- }
36
-
37
- if (typeof nextConfig.webpack === 'function') {
38
- return nextConfig.webpack(config, context);
39
- }
40
-
41
- return config;
42
- }
43
- };
44
- }
45
-
46
- export default withSyferit;
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*"]
8
- }