@darkbio/crypto 0.3.0 → 0.17.1
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/argon2.d.ts +1 -1
- package/dist/argon2.d.ts.map +1 -1
- package/dist/cbor.d.ts +14 -0
- package/dist/cbor.d.ts.map +1 -0
- package/dist/cose.d.ts +8 -0
- package/dist/cose.d.ts.map +1 -1
- package/dist/cwt.d.ts.map +1 -1
- package/dist/hkdf.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1102 -1505
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +9 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/rand.d.ts +1 -1
- package/dist/rand.d.ts.map +1 -1
- package/dist/xdsa.d.ts +10 -33
- package/dist/xdsa.d.ts.map +1 -1
- package/dist/xhpke.d.ts +12 -42
- package/dist/xhpke.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/x509.d.ts +0 -18
- package/dist/x509.d.ts.map +0 -1
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/rand.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generate cryptographically secure random bytes.
|
|
3
3
|
*
|
|
4
|
-
* @param bytes - Number of random bytes to generate
|
|
4
|
+
* @param bytes - Number of random bytes to generate (max 64 MiB)
|
|
5
5
|
* @returns A Uint8Array containing the random bytes
|
|
6
6
|
*/
|
|
7
7
|
export declare function generate(bytes: number): Promise<Uint8Array>;
|
package/dist/rand.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rand.d.ts","sourceRoot":"","sources":["../src/rand.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/xdsa.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { XdsaSecretKey as WasmSecretKey, XdsaPublicKey as WasmPublicKey, XdsaSignature as WasmSignature, XdsaFingerprint as WasmFingerprint } from './wasm/darkbio_crypto_wasm.js';
|
|
2
|
-
import { Params } from './x509.js';
|
|
3
2
|
/** Size of the secret key in bytes (64). */
|
|
4
3
|
export declare const SECRET_KEY_SIZE = 64;
|
|
5
4
|
/** Size of the public key in bytes (1984). */
|
|
@@ -59,40 +58,18 @@ export declare class PublicKey {
|
|
|
59
58
|
static fromBytes(bytes: Uint8Array): Promise<PublicKey>;
|
|
60
59
|
/** Parses a PEM string into a public key. */
|
|
61
60
|
static fromPem(pem: string): Promise<PublicKey>;
|
|
62
|
-
/**
|
|
63
|
-
* Parses a public key from a PEM-encoded X.509 certificate.
|
|
64
|
-
* Verifies the certificate signature against the provided signer.
|
|
65
|
-
*/
|
|
66
|
-
static fromCertPem(pem: string, signer: PublicKey): Promise<{
|
|
67
|
-
key: PublicKey;
|
|
68
|
-
notBefore: bigint;
|
|
69
|
-
notAfter: bigint;
|
|
70
|
-
}>;
|
|
71
|
-
/**
|
|
72
|
-
* Parses a public key from a DER-encoded X.509 certificate.
|
|
73
|
-
* Verifies the certificate signature against the provided signer.
|
|
74
|
-
*/
|
|
75
|
-
static fromCertDer(der: Uint8Array, signer: PublicKey): Promise<{
|
|
76
|
-
key: PublicKey;
|
|
77
|
-
notBefore: bigint;
|
|
78
|
-
notAfter: bigint;
|
|
79
|
-
}>;
|
|
80
61
|
/** Converts a public key into a 1984-byte array. */
|
|
81
62
|
toBytes(): Uint8Array;
|
|
82
63
|
/** Serializes a public key into a PEM string. */
|
|
83
|
-
toPem():
|
|
64
|
+
toPem(): string;
|
|
84
65
|
/** Returns a 256-bit unique identifier for this key. */
|
|
85
|
-
fingerprint():
|
|
86
|
-
/** Verifies a digital signature of the message. */
|
|
87
|
-
verify(message: Uint8Array, signature: Signature): Promise<boolean>;
|
|
88
|
-
/**
|
|
89
|
-
* Generates a PEM-encoded X.509 certificate for this public key.
|
|
90
|
-
*/
|
|
91
|
-
toCertPem(signer: SecretKey, params: Params): Promise<string>;
|
|
66
|
+
fingerprint(): Fingerprint;
|
|
92
67
|
/**
|
|
93
|
-
*
|
|
68
|
+
* Verifies a digital signature of the message.
|
|
69
|
+
*
|
|
70
|
+
* @returns true if the signature is valid, false otherwise (never throws)
|
|
94
71
|
*/
|
|
95
|
-
|
|
72
|
+
verify(message: Uint8Array, signature: Signature): boolean;
|
|
96
73
|
}
|
|
97
74
|
/**
|
|
98
75
|
* SecretKey contains a composite ML-DSA-65 + Ed25519 private key for
|
|
@@ -113,12 +90,12 @@ export declare class SecretKey {
|
|
|
113
90
|
/** Converts a secret key into a 64-byte array. */
|
|
114
91
|
toBytes(): Uint8Array;
|
|
115
92
|
/** Serializes a private key into a PEM string. */
|
|
116
|
-
toPem():
|
|
93
|
+
toPem(): string;
|
|
117
94
|
/** Retrieves the public counterpart of the secret key. */
|
|
118
|
-
publicKey():
|
|
95
|
+
publicKey(): PublicKey;
|
|
119
96
|
/** Returns a 256-bit unique identifier for this key. */
|
|
120
|
-
fingerprint():
|
|
97
|
+
fingerprint(): Fingerprint;
|
|
121
98
|
/** Creates a digital signature of the message. */
|
|
122
|
-
sign(message: Uint8Array):
|
|
99
|
+
sign(message: Uint8Array): Signature;
|
|
123
100
|
}
|
|
124
101
|
//# sourceMappingURL=xdsa.d.ts.map
|
package/dist/xdsa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xdsa.d.ts","sourceRoot":"","sources":["../src/xdsa.ts"],"names":[],"mappings":"AAMA,
|
|
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;AAC9C,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,2CAA2C;AAC3C,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,SAAS,EAAE,MAAM,CAAC;IAClB,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,aA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,OAAO,EAAE,UAAU,GAAG,SAAS;CAGrC"}
|
package/dist/xhpke.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { XhpkeSecretKey as WasmSecretKey, XhpkePublicKey as WasmPublicKey, XhpkeFingerprint as WasmFingerprint, XhpkeSender as WasmSender, XhpkeReceiver as WasmReceiver } from './wasm/darkbio_crypto_wasm.js';
|
|
2
|
-
import { PublicKey as XdsaPublicKey, SecretKey as XdsaSecretKey } from './xdsa.js';
|
|
3
|
-
import { Params } from './x509.js';
|
|
4
2
|
/** Size of the secret key seed in bytes (32). */
|
|
5
3
|
export declare const SECRET_KEY_SIZE = 32;
|
|
6
4
|
/** Size of the public key in bytes (1216). */
|
|
@@ -45,39 +43,21 @@ export declare class PublicKey {
|
|
|
45
43
|
static fromBytes(bytes: Uint8Array): Promise<PublicKey>;
|
|
46
44
|
/** Parses a PEM string into a public key. */
|
|
47
45
|
static fromPem(pem: string): Promise<PublicKey>;
|
|
48
|
-
/**
|
|
49
|
-
* Parses a public key from a PEM-encoded X.509 certificate.
|
|
50
|
-
* Verifies the certificate signature against the provided xDSA signer.
|
|
51
|
-
*/
|
|
52
|
-
static fromCertPem(pem: string, signer: XdsaPublicKey): Promise<{
|
|
53
|
-
key: PublicKey;
|
|
54
|
-
notBefore: bigint;
|
|
55
|
-
notAfter: bigint;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* Parses a public key from a DER-encoded X.509 certificate.
|
|
59
|
-
* Verifies the certificate signature against the provided xDSA signer.
|
|
60
|
-
*/
|
|
61
|
-
static fromCertDer(der: Uint8Array, signer: XdsaPublicKey): Promise<{
|
|
62
|
-
key: PublicKey;
|
|
63
|
-
notBefore: bigint;
|
|
64
|
-
notAfter: bigint;
|
|
65
|
-
}>;
|
|
66
46
|
/** Converts a public key into a 1216-byte array. */
|
|
67
47
|
toBytes(): Uint8Array;
|
|
68
48
|
/** Serializes a public key into a PEM string. */
|
|
69
|
-
toPem():
|
|
49
|
+
toPem(): string;
|
|
70
50
|
/** Returns a 256-bit unique identifier for this key (SHA256 of raw public key). */
|
|
71
|
-
fingerprint():
|
|
51
|
+
fingerprint(): Fingerprint;
|
|
72
52
|
/**
|
|
73
53
|
* Creates an HPKE sender context for multi-message encryption to this
|
|
74
54
|
* public key. Returns a stateful Sender and the 1120-byte encapsulated
|
|
75
55
|
* key that must be transmitted to the recipient.
|
|
76
56
|
*/
|
|
77
|
-
newSender(domain: Uint8Array):
|
|
57
|
+
newSender(domain: Uint8Array): {
|
|
78
58
|
sender: Sender;
|
|
79
59
|
encapKey: Uint8Array;
|
|
80
|
-
}
|
|
60
|
+
};
|
|
81
61
|
/**
|
|
82
62
|
* Seal (encrypt) a message to this public key.
|
|
83
63
|
*
|
|
@@ -86,17 +66,7 @@ export declare class PublicKey {
|
|
|
86
66
|
* @param domain - Application domain for context separation
|
|
87
67
|
* @returns Sealed data (encapsulated key + ciphertext)
|
|
88
68
|
*/
|
|
89
|
-
seal(msgToSeal: Uint8Array, msgToAuth: Uint8Array, domain: Uint8Array):
|
|
90
|
-
/**
|
|
91
|
-
* Generates a PEM-encoded X.509 certificate for this public key.
|
|
92
|
-
* Note: HPKE certificates are always end-entity certificates.
|
|
93
|
-
*/
|
|
94
|
-
toCertPem(signer: XdsaSecretKey, params: Params): Promise<string>;
|
|
95
|
-
/**
|
|
96
|
-
* Generates a DER-encoded X.509 certificate for this public key.
|
|
97
|
-
* Note: HPKE certificates are always end-entity certificates.
|
|
98
|
-
*/
|
|
99
|
-
toCertDer(signer: XdsaSecretKey, params: Params): Promise<Uint8Array>;
|
|
69
|
+
seal(msgToSeal: Uint8Array, msgToAuth: Uint8Array, domain: Uint8Array): Uint8Array;
|
|
100
70
|
}
|
|
101
71
|
/**
|
|
102
72
|
* SecretKey contains an X-Wing private key for hybrid post-quantum encryption.
|
|
@@ -116,15 +86,15 @@ export declare class SecretKey {
|
|
|
116
86
|
/** Converts a private key into a 32-byte seed. */
|
|
117
87
|
toBytes(): Uint8Array;
|
|
118
88
|
/** Serializes a private key into a PEM string. */
|
|
119
|
-
toPem():
|
|
89
|
+
toPem(): string;
|
|
120
90
|
/** Retrieves the public counterpart of the secret key. */
|
|
121
|
-
publicKey():
|
|
91
|
+
publicKey(): PublicKey;
|
|
122
92
|
/** Returns a 256-bit unique identifier for this key (SHA256 of raw public key). */
|
|
123
|
-
fingerprint():
|
|
93
|
+
fingerprint(): Fingerprint;
|
|
124
94
|
/**
|
|
125
95
|
* Creates an HPKE receiver context for multi-message decryption.
|
|
126
96
|
*/
|
|
127
|
-
newReceiver(encapKey: Uint8Array, domain: Uint8Array):
|
|
97
|
+
newReceiver(encapKey: Uint8Array, domain: Uint8Array): Receiver;
|
|
128
98
|
/**
|
|
129
99
|
* Open (decrypt) a sealed message with this secret key.
|
|
130
100
|
*
|
|
@@ -133,7 +103,7 @@ export declare class SecretKey {
|
|
|
133
103
|
* @param domain - The same application domain used during sealing
|
|
134
104
|
* @returns The decrypted message
|
|
135
105
|
*/
|
|
136
|
-
open(sealed: Uint8Array, msgToAuth: Uint8Array, domain: Uint8Array):
|
|
106
|
+
open(sealed: Uint8Array, msgToAuth: Uint8Array, domain: Uint8Array): Uint8Array;
|
|
137
107
|
}
|
|
138
108
|
/**
|
|
139
109
|
* Sender is a stateful HPKE encryption context for multi-message
|
|
@@ -144,7 +114,7 @@ export declare class Sender {
|
|
|
144
114
|
/** @internal */
|
|
145
115
|
constructor(inner: WasmSender);
|
|
146
116
|
/** Encrypts a message using the next nonce in the sequence. */
|
|
147
|
-
seal(msgToSeal: Uint8Array, msgToAuth: Uint8Array):
|
|
117
|
+
seal(msgToSeal: Uint8Array, msgToAuth: Uint8Array): Uint8Array;
|
|
148
118
|
}
|
|
149
119
|
/**
|
|
150
120
|
* Receiver is a stateful HPKE decryption context for multi-message
|
|
@@ -155,6 +125,6 @@ export declare class Receiver {
|
|
|
155
125
|
/** @internal */
|
|
156
126
|
constructor(inner: WasmReceiver);
|
|
157
127
|
/** Decrypts a message using the next nonce in the sequence. */
|
|
158
|
-
open(msgToOpen: Uint8Array, msgToAuth: Uint8Array):
|
|
128
|
+
open(msgToOpen: Uint8Array, msgToAuth: Uint8Array): Uint8Array;
|
|
159
129
|
}
|
|
160
130
|
//# sourceMappingURL=xhpke.d.ts.map
|
package/dist/xhpke.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhpke.d.ts","sourceRoot":"","sources":["../src/xhpke.ts"],"names":[],"mappings":"AAMA,
|
|
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;;;G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U,GAAG,QAAQ;IAI/D;;;;;;;OAOG;IACH,IAAI,CACF,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,UAAU,GACjB,UAAU;CAGd;AAED;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IAEnC,gBAAgB;gBACJ,KAAK,EAAE,UAAU;IAI7B,+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,gBAAgB;gBACJ,KAAK,EAAE,YAAY;IAI/B,+DAA+D;IAC/D,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,GAAG,UAAU;CAG/D"}
|
package/package.json
CHANGED
package/dist/x509.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parameters for X.509 certificate generation.
|
|
3
|
-
*/
|
|
4
|
-
export interface Params {
|
|
5
|
-
/** The subject's common name (CN) in the certificate. */
|
|
6
|
-
subjectName: string;
|
|
7
|
-
/** The issuer's common name (CN) in the certificate. */
|
|
8
|
-
issuerName: string;
|
|
9
|
-
/** The certificate validity start time (Unix timestamp in seconds). */
|
|
10
|
-
notBefore: bigint;
|
|
11
|
-
/** The certificate validity end time (Unix timestamp in seconds). */
|
|
12
|
-
notAfter: bigint;
|
|
13
|
-
/** Whether this certificate is a CA certificate (ignored for xHPKE). */
|
|
14
|
-
isCa?: boolean;
|
|
15
|
-
/** Maximum number of intermediate CAs allowed below this one (only if isCa is true, ignored for xHPKE). */
|
|
16
|
-
pathLen?: number;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=x509.d.ts.map
|
package/dist/x509.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x509.d.ts","sourceRoot":"","sources":["../src/x509.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2GAA2G;IAC3G,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|