@darkbio/crypto 0.17.2 → 0.18.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/internal/bytes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cborg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cborg.d.ts","sourceRoot":"","sources":["../../src/internal/cborg.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/internal/init.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /** Largest 32 bit unsigned integer, the size type of the WASM module. */
2
+ export declare const U32_MAX = 4294967295;
3
+ /** Largest 64 bit unsigned integer. */
4
+ export declare const U64_MAX: bigint;
5
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/internal/limits.ts"],"names":[],"mappings":"AAMA,yEAAyE;AACzE,eAAO,MAAM,OAAO,aAAa,CAAC;AAElC,uCAAuC;AACvC,eAAO,MAAM,OAAO,QAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rand.d.ts","sourceRoot":"","sources":["../src/rand.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAGjE"}
1
+ {"version":3,"file":"rand.d.ts","sourceRoot":"","sources":["../src/rand.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAGjE"}
package/dist/xdsa.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XdsaSecretKey as WasmSecretKey, XdsaPublicKey as WasmPublicKey, XdsaSignature as WasmSignature, XdsaFingerprint as WasmFingerprint } from './wasm/darkbio_crypto_wasm.js';
1
+ import { Codec } from './cbor.js';
2
2
  /** Size of the secret key in bytes (64). */
3
3
  export declare const SECRET_KEY_SIZE = 64;
4
4
  /** Size of the public key in bytes (1984). */
@@ -21,24 +21,22 @@ export declare function sizes(): Promise<{
21
21
  * Backed by an opaque WASM handle.
22
22
  */
23
23
  export declare class Fingerprint {
24
- /** @internal */
25
- readonly _wasm: WasmFingerprint;
26
- /** @internal */
27
- constructor(inner: WasmFingerprint);
24
+ private constructor();
28
25
  /** Creates a fingerprint from a 32-byte array. */
29
26
  static fromBytes(bytes: Uint8Array): Promise<Fingerprint>;
30
27
  /** Converts a fingerprint into a 32-byte array. */
31
28
  toBytes(): Uint8Array;
29
+ /** Renders a fingerprint as lowercase hex. */
30
+ toHex(): string;
31
+ /** Reports whether another fingerprint is the same. */
32
+ equals(other: Fingerprint): boolean;
32
33
  }
33
34
  /**
34
35
  * Signature is a 3373-byte xDSA signature.
35
36
  * Backed by an opaque WASM handle.
36
37
  */
37
38
  export declare class Signature {
38
- /** @internal */
39
- readonly _wasm: WasmSignature;
40
- /** @internal */
41
- constructor(inner: WasmSignature);
39
+ private constructor();
42
40
  /** Creates a signature from a 3373-byte array. */
43
41
  static fromBytes(bytes: Uint8Array): Promise<Signature>;
44
42
  /** Converts a signature into a 3373-byte array. */
@@ -50,10 +48,7 @@ export declare class Signature {
50
48
  * Backed by an opaque WASM handle — key material stays in WASM memory.
51
49
  */
52
50
  export declare class PublicKey {
53
- /** @internal */
54
- readonly _wasm: WasmPublicKey;
55
- /** @internal */
56
- constructor(inner: WasmPublicKey);
51
+ private constructor();
57
52
  /** Creates a public key from a 1984-byte array. */
58
53
  static fromBytes(bytes: Uint8Array): Promise<PublicKey>;
59
54
  /** Parses a PEM string into a public key. */
@@ -62,6 +57,8 @@ export declare class PublicKey {
62
57
  toBytes(): Uint8Array;
63
58
  /** Serializes a public key into a PEM string. */
64
59
  toPem(): string;
60
+ /** Reports whether another public key is the same. */
61
+ equals(other: PublicKey): boolean;
65
62
  /** Returns a 256-bit unique identifier for this key. */
66
63
  fingerprint(): Fingerprint;
67
64
  /**
@@ -77,10 +74,7 @@ export declare class PublicKey {
77
74
  * Backed by an opaque WASM handle — key material stays in WASM memory.
78
75
  */
79
76
  export declare class SecretKey {
80
- /** @internal */
81
- readonly _wasm: WasmSecretKey;
82
- /** @internal */
83
- constructor(inner: WasmSecretKey);
77
+ private constructor();
84
78
  /** Creates a new, random private key. */
85
79
  static generate(): Promise<SecretKey>;
86
80
  /** Creates a private key from a 64-byte seed. */
@@ -98,4 +92,16 @@ export declare class SecretKey {
98
92
  /** Creates a digital signature of the message. */
99
93
  sign(message: Uint8Array): Signature;
100
94
  }
95
+ /** The COSE algorithm identifier of the key type. */
96
+ export declare const ALGORITHM_ID = -70000;
97
+ /**
98
+ * Codec of a public key as its bytes. Only the CBOR type is checked here, the
99
+ * size and the key material are the Rust key's call.
100
+ */
101
+ export declare const publicKey: Codec<PublicKey>;
102
+ /**
103
+ * Codec of a fingerprint as its bytes. Only the CBOR type is checked here,
104
+ * the size is the Rust fingerprint's call.
105
+ */
106
+ export declare const fingerprint: Codec<Fingerprint>;
101
107
  //# sourceMappingURL=xdsa.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xdsa.d.ts","sourceRoot":"","sources":["../src/xdsa.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,aAAa,IAAI,aAAa,EAC9B,aAAa,IAAI,aAAa,EAC9B,aAAa,IAAI,aAAa,EAC9B,eAAe,IAAI,eAAe,EACnC,MAAM,+BAA+B,CAAC;AAGvC,4CAA4C;AAC5C,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,8CAA8C;AAC9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,IAAI,UAAU;IAIrB,kDAAkD;IAClD,KAAK,IAAI,MAAM;IAIf,0DAA0D;IAC1D,SAAS,IAAI,SAAS;IAItB,wDAAwD;IACxD,WAAW,IAAI,WAAW;IAI1B,kDAAkD;IAClD,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS;CAGrC;AAED,qDAAqD;AACrD,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,SAAS,CAoBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAAW,CAoB1C,CAAC"}
package/dist/xhpke.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XhpkeSecretKey as WasmSecretKey, XhpkePublicKey as WasmPublicKey, XhpkeFingerprint as WasmFingerprint, XhpkeSender as WasmSender, XhpkeReceiver as WasmReceiver } from './wasm/darkbio_crypto_wasm.js';
1
+ import { Codec } from './cbor.js';
2
2
  /** Size of the secret key seed in bytes (32). */
3
3
  export declare const SECRET_KEY_SIZE = 32;
4
4
  /** Size of the public key in bytes (1216). */
@@ -21,24 +21,22 @@ export declare function sizes(): Promise<{
21
21
  * Backed by an opaque WASM handle.
22
22
  */
23
23
  export declare class Fingerprint {
24
- /** @internal */
25
- readonly _wasm: WasmFingerprint;
26
- /** @internal */
27
- constructor(inner: WasmFingerprint);
24
+ private constructor();
28
25
  /** Creates a fingerprint from a 32-byte array. */
29
26
  static fromBytes(bytes: Uint8Array): Promise<Fingerprint>;
30
27
  /** Converts a fingerprint into a 32-byte array. */
31
28
  toBytes(): Uint8Array;
29
+ /** Renders a fingerprint as lowercase hex. */
30
+ toHex(): string;
31
+ /** Reports whether another fingerprint is the same. */
32
+ equals(other: Fingerprint): boolean;
32
33
  }
33
34
  /**
34
35
  * PublicKey contains an X-Wing public key for hybrid post-quantum encryption.
35
36
  * Backed by an opaque WASM handle — key material stays in WASM memory.
36
37
  */
37
38
  export declare class PublicKey {
38
- /** @internal */
39
- readonly _wasm: WasmPublicKey;
40
- /** @internal */
41
- constructor(inner: WasmPublicKey);
39
+ private constructor();
42
40
  /** Creates a public key from a 1216-byte array. */
43
41
  static fromBytes(bytes: Uint8Array): Promise<PublicKey>;
44
42
  /** Parses a PEM string into a public key. */
@@ -47,6 +45,8 @@ export declare class PublicKey {
47
45
  toBytes(): Uint8Array;
48
46
  /** Serializes a public key into a PEM string. */
49
47
  toPem(): string;
48
+ /** Reports whether another public key is the same. */
49
+ equals(other: PublicKey): boolean;
50
50
  /** Returns a 256-bit unique identifier for this key (SHA256 of raw public key). */
51
51
  fingerprint(): Fingerprint;
52
52
  /**
@@ -73,10 +73,7 @@ export declare class PublicKey {
73
73
  * Backed by an opaque WASM handle — key material stays in WASM memory.
74
74
  */
75
75
  export declare class SecretKey {
76
- /** @internal */
77
- readonly _wasm: WasmSecretKey;
78
- /** @internal */
79
- constructor(inner: WasmSecretKey);
76
+ private constructor();
80
77
  /** Creates a new, random private key. */
81
78
  static generate(): Promise<SecretKey>;
82
79
  /** Creates a private key from a 32-byte seed. */
@@ -111,8 +108,7 @@ export declare class SecretKey {
111
108
  */
112
109
  export declare class Sender {
113
110
  private readonly inner;
114
- /** @internal */
115
- constructor(inner: WasmSender);
111
+ private constructor();
116
112
  /** Encrypts a message using the next nonce in the sequence. */
117
113
  seal(msgToSeal: Uint8Array, msgToAuth: Uint8Array): Uint8Array;
118
114
  }
@@ -122,9 +118,20 @@ export declare class Sender {
122
118
  */
123
119
  export declare class Receiver {
124
120
  private readonly inner;
125
- /** @internal */
126
- constructor(inner: WasmReceiver);
121
+ private constructor();
127
122
  /** Decrypts a message using the next nonce in the sequence. */
128
123
  open(msgToOpen: Uint8Array, msgToAuth: Uint8Array): Uint8Array;
129
124
  }
125
+ /** The COSE algorithm identifier of the key type. */
126
+ export declare const ALGORITHM_ID = -70001;
127
+ /**
128
+ * Codec of a public key as its bytes. Only the CBOR type is checked here, the
129
+ * size and the key material are the Rust key's call.
130
+ */
131
+ export declare const publicKey: Codec<PublicKey>;
132
+ /**
133
+ * Codec of a fingerprint as its bytes. Only the CBOR type is checked here,
134
+ * the size is the Rust fingerprint's call.
135
+ */
136
+ export declare const fingerprint: Codec<Fingerprint>;
130
137
  //# sourceMappingURL=xhpke.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xhpke.d.ts","sourceRoot":"","sources":["../src/xhpke.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,cAAc,IAAI,aAAa,EAC/B,cAAc,IAAI,aAAa,EAC/B,gBAAgB,IAAI,eAAe,EACnC,WAAW,IAAI,UAAU,EACzB,aAAa,IAAI,YAAY,EAC9B,MAAM,+BAA+B,CAAC;AAGvC,iDAAiD;AACjD,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,8CAA8C;AAC9C,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,oDAAoD;AACpD,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;GAEG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAQD;AAED;;;GAGG;AACH,qBAAa,WAAW;IACtB,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAEhC,gBAAgB;gBACJ,KAAK,EAAE,eAAe;IAIlC,kDAAkD;WACrC,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;IAK/D,mDAAmD;IACnD,OAAO,IAAI,UAAU;CAGtB;AAED;;;GAGG;AACH,qBAAa,SAAS;IACpB,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAE9B,gBAAgB;gBACJ,KAAK,EAAE,aAAa;I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U,EACrB,MAAM,EAAE,UAAU,GACjB,UAAU;CAGd;AAED;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IAEnC,OAAO;IASP,+DAA+D;IAC/D,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,GAAG,UAAU;CAG/D;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IAErC,OAAO;IASP,+DAA+D;IAC/D,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,GAAG,UAAU;CAG/D;AAED,qDAAqD;AACrD,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,SAAS,CAoBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAAW,CAoB1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkbio/crypto",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
4
4
  "author": "Péter Szilágyi <peter@dark.bio>",
5
5
  "description": "Cryptography primitives and wrappers",
6
6
  "repository": {
@@ -26,6 +26,7 @@
26
26
  "build": "npm run build:wasm && npm run build:ts",
27
27
  "test": "vitest",
28
28
  "test:browser": "vitest --browser.enabled --browser.name=chromium",
29
+ "test:types": "node node_modules/typescript/bin/tsc -p tests/types",
29
30
  "check": "node node_modules/typescript/bin/tsc --noEmit"
30
31
  },
31
32
  "dependencies": {
package/dist/init.d.ts DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Ensures the WASM module is instantiated exactly once. Concurrent callers
3
- * share the single in-flight initialization; a failed attempt is cleared so
4
- * the next call can retry.
5
- *
6
- * @internal
7
- */
8
- export declare function ensureInit(): Promise<unknown>;
9
- //# sourceMappingURL=init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAQ7C"}