@f0rest8/metamorphic-crypto 0.3.5 → 0.3.7

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 CHANGED
@@ -151,6 +151,28 @@ Decryption always auto-detects the level from the ciphertext version tag.
151
151
  - OS CSPRNG via `getrandom` (no userspace PRNG)
152
152
  - Hybrid construction: both ML-KEM AND X25519 must be broken to compromise a sealed key
153
153
 
154
+ ## Network access
155
+
156
+ Security scanners (e.g. Socket) may flag this package for "network access."
157
+ This is the standard `wasm-bindgen` loader, which calls `fetch()` for a **single**
158
+ purpose: to load the package's own `.wasm` binary when you call the default
159
+ `init()` export. There are no other network calls — no telemetry, no remote
160
+ code, no install scripts.
161
+
162
+ The fetched URL is whatever **you** pass to `init()`. With no argument it
163
+ defaults to the `.wasm` file shipped alongside the JS (`new URL('metamorphic_crypto_bg.wasm', import.meta.url)`),
164
+ i.e. a same-origin asset you control.
165
+
166
+ If you want zero network capability, use the synchronous initializer with bytes
167
+ you load yourself — it never calls `fetch`:
168
+
169
+ ```js
170
+ import { initSync } from "@f0rest8/metamorphic-crypto";
171
+
172
+ // e.g. bytes from your bundler, a same-origin path, or an embedded buffer
173
+ initSync({ module: wasmBytes });
174
+ ```
175
+
154
176
  ## Integrity verification
155
177
 
156
178
  Every release includes SHA-512 checksums and [cosign](https://docs.sigstore.dev/cosign/overview/) signatures for supply chain verification:
@@ -144,10 +144,10 @@ export interface InitOutput {
144
144
  readonly generateRecoveryKey: (a: number) => void;
145
145
  readonly recoveryKeyToSecret: (a: number, b: number, c: number) => void;
146
146
  readonly parseSaltFromKeyHash: (a: number, b: number, c: number) => void;
147
- readonly decryptPrivateKeyWithRecovery: (a: number, b: number, c: number, d: number, e: number) => void;
148
147
  readonly decryptSecretboxToString: (a: number, b: number, c: number, d: number, e: number) => void;
149
- readonly encryptSecretboxString: (a: number, b: number, c: number, d: number, e: number) => void;
150
148
  readonly encryptPrivateKeyForRecovery: (a: number, b: number, c: number, d: number, e: number) => void;
149
+ readonly decryptPrivateKeyWithRecovery: (a: number, b: number, c: number, d: number, e: number) => void;
150
+ readonly encryptSecretboxString: (a: number, b: number, c: number, d: number, e: number) => void;
151
151
  readonly __wbindgen_export: (a: number, b: number) => number;
152
152
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
153
153
  readonly __wbindgen_export3: (a: number) => void;
@@ -680,34 +680,34 @@ export function unsealFromUser(ciphertext_b64, public_key_b64, private_key_b64,
680
680
  function __wbg_get_imports() {
681
681
  const import0 = {
682
682
  __proto__: null,
683
- __wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) {
683
+ __wbg___wbindgen_debug_string_56c147eb1a51f0c4: function(arg0, arg1) {
684
684
  const ret = debugString(getObject(arg1));
685
685
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
686
686
  const len1 = WASM_VECTOR_LEN;
687
687
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
688
688
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
689
689
  },
690
- __wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
690
+ __wbg___wbindgen_is_function_147961669f068cd4: function(arg0) {
691
691
  const ret = typeof(getObject(arg0)) === 'function';
692
692
  return ret;
693
693
  },
694
- __wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
694
+ __wbg___wbindgen_is_object_3a2c414391dbf751: function(arg0) {
695
695
  const val = getObject(arg0);
696
696
  const ret = typeof(val) === 'object' && val !== null;
697
697
  return ret;
698
698
  },
699
- __wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
699
+ __wbg___wbindgen_is_string_6541b0f6ecd4e8e5: function(arg0) {
700
700
  const ret = typeof(getObject(arg0)) === 'string';
701
701
  return ret;
702
702
  },
703
- __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
703
+ __wbg___wbindgen_is_undefined_4410e3c20a99fa97: function(arg0) {
704
704
  const ret = getObject(arg0) === undefined;
705
705
  return ret;
706
706
  },
707
- __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
707
+ __wbg___wbindgen_throw_bbadd78c1bac3a77: function(arg0, arg1) {
708
708
  throw new Error(getStringFromWasm0(arg0, arg1));
709
709
  },
710
- __wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) {
710
+ __wbg_call_ec09a4cf93377d3a: function() { return handleError(function (arg0, arg1, arg2) {
711
711
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
712
712
  return addHeapObject(ret);
713
713
  }, arguments); },
@@ -718,7 +718,7 @@ function __wbg_get_imports() {
718
718
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
719
719
  getObject(arg0).getRandomValues(getObject(arg1));
720
720
  }, arguments); },
721
- __wbg_length_4a591ecaa01354d9: function(arg0) {
721
+ __wbg_length_68a9d5278d084f4f: function(arg0) {
722
722
  const ret = getObject(arg0).length;
723
723
  return ret;
724
724
  },
@@ -726,11 +726,11 @@ function __wbg_get_imports() {
726
726
  const ret = getObject(arg0).msCrypto;
727
727
  return addHeapObject(ret);
728
728
  },
729
- __wbg_new_ce1ab61c1c2b300d: function() {
729
+ __wbg_new_20b778a4c5c691c3: function() {
730
730
  const ret = new Object();
731
731
  return addHeapObject(ret);
732
732
  },
733
- __wbg_new_with_length_36a4998e27b014c5: function(arg0) {
733
+ __wbg_new_with_length_4b57a7a5dc67221c: function(arg0) {
734
734
  const ret = new Uint8Array(arg0 >>> 0);
735
735
  return addHeapObject(ret);
736
736
  },
@@ -742,7 +742,7 @@ function __wbg_get_imports() {
742
742
  const ret = getObject(arg0).process;
743
743
  return addHeapObject(ret);
744
744
  },
745
- __wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
745
+ __wbg_prototypesetcall_956c7493c68e29b4: function(arg0, arg1, arg2) {
746
746
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
747
747
  },
748
748
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
@@ -752,27 +752,27 @@ function __wbg_get_imports() {
752
752
  const ret = module.require;
753
753
  return addHeapObject(ret);
754
754
  }, arguments); },
755
- __wbg_set_6e30c9374c26414c: function() { return handleError(function (arg0, arg1, arg2) {
755
+ __wbg_set_a6ba3ac0e634b822: function() { return handleError(function (arg0, arg1, arg2) {
756
756
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
757
757
  return ret;
758
758
  }, arguments); },
759
- __wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
759
+ __wbg_static_accessor_GLOBAL_60a4124bab7dcc9a: function() {
760
760
  const ret = typeof global === 'undefined' ? null : global;
761
761
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
762
762
  },
763
- __wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
763
+ __wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13: function() {
764
764
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
765
765
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
766
766
  },
767
- __wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
767
+ __wbg_static_accessor_SELF_4c95f759a91e9aae: function() {
768
768
  const ret = typeof self === 'undefined' ? null : self;
769
769
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
770
770
  },
771
- __wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
771
+ __wbg_static_accessor_WINDOW_44b435597f9e9ee7: function() {
772
772
  const ret = typeof window === 'undefined' ? null : window;
773
773
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
774
774
  },
775
- __wbg_subarray_4aa221f6a4f5ab22: function(arg0, arg1, arg2) {
775
+ __wbg_subarray_42216645a367cd7a: function(arg0, arg1, arg2) {
776
776
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
777
777
  return addHeapObject(ret);
778
778
  },
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@f0rest8/metamorphic-crypto",
3
3
  "type": "module",
4
4
  "description": "Zero-knowledge end-to-end encryption with post-quantum hybrid KEM (ML-KEM-768/1024 + X25519)",
5
- "version": "0.3.5",
5
+ "version": "0.3.7",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",