@opentdf/sdk 0.9.0-beta.92 → 0.9.0-beta.94
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 +2 -2
- package/dist/cjs/src/access/access-fetch.js +1 -2
- package/dist/cjs/src/access/access-rpc.js +1 -3
- package/dist/cjs/src/access.js +1 -14
- package/dist/cjs/src/auth/auth.js +13 -10
- package/dist/cjs/src/auth/dpop.js +121 -0
- package/dist/cjs/src/auth/oidc-clientcredentials-provider.js +37 -3
- package/dist/cjs/src/auth/oidc-externaljwt-provider.js +37 -3
- package/dist/cjs/src/auth/oidc-refreshtoken-provider.js +37 -3
- package/dist/cjs/src/auth/oidc.js +10 -8
- package/dist/cjs/src/auth/providers.js +35 -12
- package/dist/cjs/src/crypto/index.js +16 -2
- package/dist/cjs/src/crypto/pemPublicToCrypto.js +17 -11
- package/dist/cjs/src/opentdf.js +50 -13
- package/dist/cjs/src/policy/discovery.js +2 -2
- package/dist/cjs/tdf3/index.js +4 -2
- package/dist/cjs/tdf3/src/assertions.js +71 -31
- package/dist/cjs/tdf3/src/ciphers/aes-gcm-cipher.js +1 -1
- package/dist/cjs/tdf3/src/ciphers/symmetric-cipher-base.js +4 -2
- package/dist/cjs/tdf3/src/client/index.js +23 -33
- package/dist/cjs/tdf3/src/crypto/crypto-utils.js +12 -5
- package/dist/cjs/tdf3/src/crypto/declarations.js +1 -1
- package/dist/cjs/tdf3/src/crypto/index.js +849 -88
- package/dist/cjs/tdf3/src/crypto/jose/jwt-claims-set.js +11 -0
- package/dist/cjs/tdf3/src/crypto/jose/validate-crit.js +8 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/buffer_utils.js +41 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/epoch.js +6 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/is_object.js +21 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.js +112 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/secs.js +60 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/lib/validate_crit.js +38 -0
- package/dist/cjs/tdf3/src/crypto/jose/vendor/util/errors.js +135 -0
- package/dist/cjs/tdf3/src/crypto/jwt.js +183 -0
- package/dist/cjs/tdf3/src/crypto/salt.js +14 -8
- package/dist/cjs/tdf3/src/models/encryption-information.js +17 -20
- package/dist/cjs/tdf3/src/models/key-access.js +43 -63
- package/dist/cjs/tdf3/src/tdf.js +75 -75
- package/dist/cjs/tdf3/src/utils/index.js +5 -39
- package/dist/types/src/access/access-fetch.d.ts.map +1 -1
- package/dist/types/src/access/access-rpc.d.ts.map +1 -1
- package/dist/types/src/access.d.ts +0 -5
- package/dist/types/src/access.d.ts.map +1 -1
- package/dist/types/src/auth/auth.d.ts +9 -6
- package/dist/types/src/auth/auth.d.ts.map +1 -1
- package/dist/types/src/auth/dpop.d.ts +60 -0
- package/dist/types/src/auth/dpop.d.ts.map +1 -0
- package/dist/types/src/auth/oidc-clientcredentials-provider.d.ts +3 -2
- package/dist/types/src/auth/oidc-clientcredentials-provider.d.ts.map +1 -1
- package/dist/types/src/auth/oidc-externaljwt-provider.d.ts +3 -2
- package/dist/types/src/auth/oidc-externaljwt-provider.d.ts.map +1 -1
- package/dist/types/src/auth/oidc-refreshtoken-provider.d.ts +3 -2
- package/dist/types/src/auth/oidc-refreshtoken-provider.d.ts.map +1 -1
- package/dist/types/src/auth/oidc.d.ts +6 -4
- package/dist/types/src/auth/oidc.d.ts.map +1 -1
- package/dist/types/src/auth/providers.d.ts +5 -4
- package/dist/types/src/auth/providers.d.ts.map +1 -1
- package/dist/types/src/crypto/index.d.ts +2 -1
- package/dist/types/src/crypto/index.d.ts.map +1 -1
- package/dist/types/src/crypto/pemPublicToCrypto.d.ts +18 -0
- package/dist/types/src/crypto/pemPublicToCrypto.d.ts.map +1 -1
- package/dist/types/src/opentdf.d.ts +26 -7
- package/dist/types/src/opentdf.d.ts.map +1 -1
- package/dist/types/src/policy/discovery.d.ts +2 -2
- package/dist/types/tdf3/index.d.ts +3 -3
- package/dist/types/tdf3/index.d.ts.map +1 -1
- package/dist/types/tdf3/src/assertions.d.ts +23 -8
- package/dist/types/tdf3/src/assertions.d.ts.map +1 -1
- package/dist/types/tdf3/src/ciphers/aes-gcm-cipher.d.ts +3 -3
- package/dist/types/tdf3/src/ciphers/aes-gcm-cipher.d.ts.map +1 -1
- package/dist/types/tdf3/src/ciphers/symmetric-cipher-base.d.ts +4 -4
- package/dist/types/tdf3/src/ciphers/symmetric-cipher-base.d.ts.map +1 -1
- package/dist/types/tdf3/src/client/builders.d.ts +2 -2
- package/dist/types/tdf3/src/client/builders.d.ts.map +1 -1
- package/dist/types/tdf3/src/client/index.d.ts +6 -5
- package/dist/types/tdf3/src/client/index.d.ts.map +1 -1
- package/dist/types/tdf3/src/crypto/crypto-utils.d.ts +14 -4
- package/dist/types/tdf3/src/crypto/crypto-utils.d.ts.map +1 -1
- package/dist/types/tdf3/src/crypto/declarations.d.ts +283 -18
- package/dist/types/tdf3/src/crypto/declarations.d.ts.map +1 -1
- package/dist/types/tdf3/src/crypto/index.d.ts +105 -28
- package/dist/types/tdf3/src/crypto/index.d.ts.map +1 -1
- package/dist/types/tdf3/src/crypto/jose/jwt-claims-set.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/jwt-claims-set.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/validate-crit.d.ts +5 -0
- package/dist/types/tdf3/src/crypto/jose/validate-crit.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/buffer_utils.d.ts +6 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/buffer_utils.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/epoch.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/epoch.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/is_object.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/is_object.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/secs.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/secs.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/validate_crit.d.ts +3 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/lib/validate_crit.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/util/errors.d.ts +76 -0
- package/dist/types/tdf3/src/crypto/jose/vendor/util/errors.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/jwt.d.ts +76 -0
- package/dist/types/tdf3/src/crypto/jwt.d.ts.map +1 -0
- package/dist/types/tdf3/src/crypto/salt.d.ts +6 -1
- package/dist/types/tdf3/src/crypto/salt.d.ts.map +1 -1
- package/dist/types/tdf3/src/models/encryption-information.d.ts +4 -4
- package/dist/types/tdf3/src/models/encryption-information.d.ts.map +1 -1
- package/dist/types/tdf3/src/models/key-access.d.ts +8 -5
- package/dist/types/tdf3/src/models/key-access.d.ts.map +1 -1
- package/dist/types/tdf3/src/tdf.d.ts +8 -8
- package/dist/types/tdf3/src/tdf.d.ts.map +1 -1
- package/dist/types/tdf3/src/utils/index.d.ts +4 -3
- package/dist/types/tdf3/src/utils/index.d.ts.map +1 -1
- package/dist/web/src/access/access-fetch.js +3 -4
- package/dist/web/src/access/access-rpc.js +3 -5
- package/dist/web/src/access.js +1 -13
- package/dist/web/src/auth/auth.js +13 -10
- package/dist/web/src/auth/dpop.js +118 -0
- package/dist/web/src/auth/oidc-clientcredentials-provider.js +4 -3
- package/dist/web/src/auth/oidc-externaljwt-provider.js +4 -3
- package/dist/web/src/auth/oidc-refreshtoken-provider.js +4 -3
- package/dist/web/src/auth/oidc.js +11 -9
- package/dist/web/src/auth/providers.js +13 -12
- package/dist/web/src/crypto/index.js +4 -2
- package/dist/web/src/crypto/pemPublicToCrypto.js +11 -9
- package/dist/web/src/opentdf.js +17 -13
- package/dist/web/src/policy/discovery.js +2 -2
- package/dist/web/tdf3/index.js +3 -2
- package/dist/web/tdf3/src/assertions.js +71 -31
- package/dist/web/tdf3/src/ciphers/aes-gcm-cipher.js +1 -1
- package/dist/web/tdf3/src/ciphers/symmetric-cipher-base.js +4 -2
- package/dist/web/tdf3/src/client/index.js +25 -35
- package/dist/web/tdf3/src/crypto/crypto-utils.js +12 -5
- package/dist/web/tdf3/src/crypto/declarations.js +1 -1
- package/dist/web/tdf3/src/crypto/index.js +830 -84
- package/dist/web/tdf3/src/crypto/jose/jwt-claims-set.js +5 -0
- package/dist/web/tdf3/src/crypto/jose/validate-crit.js +3 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/buffer_utils.js +35 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/epoch.js +4 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/is_object.js +19 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.js +107 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/secs.js +58 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/lib/validate_crit.js +36 -0
- package/dist/web/tdf3/src/crypto/jose/vendor/util/errors.js +117 -0
- package/dist/web/tdf3/src/crypto/jwt.js +174 -0
- package/dist/web/tdf3/src/crypto/salt.js +13 -7
- package/dist/web/tdf3/src/models/encryption-information.js +11 -14
- package/dist/web/tdf3/src/models/key-access.js +44 -31
- package/dist/web/tdf3/src/tdf.js +71 -71
- package/dist/web/tdf3/src/utils/index.js +5 -6
- package/package.json +11 -4
- package/src/access/access-fetch.ts +2 -8
- package/src/access/access-rpc.ts +0 -7
- package/src/access.ts +0 -17
- package/src/auth/auth.ts +21 -12
- package/src/auth/dpop.ts +222 -0
- package/src/auth/oidc-clientcredentials-provider.ts +23 -15
- package/src/auth/oidc-externaljwt-provider.ts +23 -15
- package/src/auth/oidc-refreshtoken-provider.ts +23 -15
- package/src/auth/oidc.ts +21 -10
- package/src/auth/providers.ts +46 -29
- package/src/crypto/index.ts +21 -1
- package/src/crypto/pemPublicToCrypto.ts +11 -9
- package/src/opentdf.ts +36 -17
- package/src/policy/discovery.ts +2 -2
- package/tdf3/index.ts +32 -5
- package/tdf3/src/assertions.ts +99 -30
- package/tdf3/src/ciphers/aes-gcm-cipher.ts +7 -2
- package/tdf3/src/ciphers/symmetric-cipher-base.ts +7 -4
- package/tdf3/src/client/builders.ts +2 -2
- package/tdf3/src/client/index.ts +60 -59
- package/tdf3/src/crypto/crypto-utils.ts +15 -8
- package/tdf3/src/crypto/declarations.ts +338 -22
- package/tdf3/src/crypto/index.ts +1021 -118
- package/tdf3/src/crypto/jose/jwt-claims-set.ts +10 -0
- package/tdf3/src/crypto/jose/validate-crit.ts +9 -0
- package/tdf3/src/crypto/jose/vendor/lib/buffer_utils.ts +34 -0
- package/tdf3/src/crypto/jose/vendor/lib/epoch.ts +3 -0
- package/tdf3/src/crypto/jose/vendor/lib/is_object.ts +18 -0
- package/tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.ts +106 -0
- package/tdf3/src/crypto/jose/vendor/lib/secs.ts +57 -0
- package/tdf3/src/crypto/jose/vendor/lib/validate_crit.ts +35 -0
- package/tdf3/src/crypto/jose/vendor/util/errors.ts +101 -0
- package/tdf3/src/crypto/jwt.ts +256 -0
- package/tdf3/src/crypto/salt.ts +16 -8
- package/tdf3/src/models/encryption-information.ts +14 -21
- package/tdf3/src/models/key-access.ts +57 -41
- package/tdf3/src/tdf.ts +110 -93
- package/tdf3/src/utils/index.ts +5 -6
|
@@ -11,50 +11,315 @@ export type DecryptResult = {
|
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* PEM formatted keypair.
|
|
14
|
+
* Used for import/export compatibility. Internal code should use KeyPair (opaque keys).
|
|
14
15
|
*/
|
|
15
16
|
export type PemKeyPair = {
|
|
16
17
|
publicKey: string;
|
|
17
18
|
privateKey: string;
|
|
18
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Key algorithm identifier combining key type and parameters.
|
|
22
|
+
*/
|
|
23
|
+
export type KeyAlgorithm = 'rsa:2048' | 'rsa:4096' | 'ec:secp256r1' | 'ec:secp384r1' | 'ec:secp521r1';
|
|
24
|
+
/**
|
|
25
|
+
* Options for key generation and import.
|
|
26
|
+
*/
|
|
27
|
+
export type KeyOptions = {
|
|
28
|
+
/**
|
|
29
|
+
* Key usage: 'encrypt' for RSA-OAEP, 'sign' for RSA/ECDSA signing, 'derive' for ECDH.
|
|
30
|
+
* If not specified, defaults based on the generation method or key type.
|
|
31
|
+
*/
|
|
32
|
+
usage?: 'encrypt' | 'sign' | 'derive';
|
|
33
|
+
/**
|
|
34
|
+
* Whether keys can be exported. Defaults to true.
|
|
35
|
+
* HSM-backed implementations may force false for private keys.
|
|
36
|
+
*/
|
|
37
|
+
extractable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Optional algorithm hint for import validation.
|
|
40
|
+
* Helps disambiguate or validate imported keys.
|
|
41
|
+
*/
|
|
42
|
+
algorithmHint?: KeyAlgorithm;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Opaque public key - internal representation hidden.
|
|
46
|
+
* Code outside CryptoService treats this as a token.
|
|
47
|
+
*
|
|
48
|
+
* Includes metadata for algorithm selection without needing CryptoService calls.
|
|
49
|
+
*/
|
|
50
|
+
export type PublicKey = {
|
|
51
|
+
readonly _brand: 'PublicKey';
|
|
52
|
+
/** Algorithm identifier (e.g., 'rsa:2048', 'ec:secp256r1') */
|
|
53
|
+
readonly algorithm: KeyAlgorithm;
|
|
54
|
+
/** RSA modulus bit length (only for RSA keys) */
|
|
55
|
+
readonly modulusBits?: number;
|
|
56
|
+
/** EC curve name (only for EC keys) */
|
|
57
|
+
readonly curve?: ECCurve;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Opaque private key - internal representation hidden.
|
|
61
|
+
* Code outside CryptoService treats this as a token.
|
|
62
|
+
*
|
|
63
|
+
* Includes metadata for algorithm selection without needing CryptoService calls.
|
|
64
|
+
*/
|
|
65
|
+
export type PrivateKey = {
|
|
66
|
+
readonly _brand: 'PrivateKey';
|
|
67
|
+
/** Algorithm identifier (e.g., 'rsa:2048', 'ec:secp256r1') */
|
|
68
|
+
readonly algorithm: KeyAlgorithm;
|
|
69
|
+
/** RSA modulus bit length (only for RSA keys) */
|
|
70
|
+
readonly modulusBits?: number;
|
|
71
|
+
/** EC curve name (only for EC keys) */
|
|
72
|
+
readonly curve?: ECCurve;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Opaque key pair with matching algorithms.
|
|
76
|
+
*/
|
|
77
|
+
export type KeyPair = {
|
|
78
|
+
readonly publicKey: PublicKey;
|
|
79
|
+
readonly privateKey: PrivateKey;
|
|
80
|
+
};
|
|
19
81
|
/**
|
|
20
82
|
* The minimum acceptable asymetric key size, currently 2^11.
|
|
21
83
|
*/
|
|
22
84
|
export declare const MIN_ASYMMETRIC_KEY_SIZE_BITS = 2048;
|
|
23
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Opaque symmetric key - internal representation hidden.
|
|
87
|
+
* Code outside CryptoService treats this as a token.
|
|
88
|
+
* Used for AES encryption/decryption.
|
|
89
|
+
*
|
|
90
|
+
* Includes metadata for key length without needing CryptoService calls.
|
|
91
|
+
*/
|
|
92
|
+
export type SymmetricKey = {
|
|
93
|
+
readonly _brand: 'SymmetricKey';
|
|
94
|
+
/** Key length in bits (e.g., 256 for AES-256) */
|
|
95
|
+
readonly length: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Elliptic curves supported for ECDH/ECDSA operations.
|
|
99
|
+
*/
|
|
100
|
+
export type ECCurve = 'P-256' | 'P-384' | 'P-521';
|
|
101
|
+
/**
|
|
102
|
+
* Asymmetric signing algorithms (require PEM keys).
|
|
103
|
+
*/
|
|
104
|
+
export type AsymmetricSigningAlgorithm = 'RS256' | 'ES256' | 'ES384' | 'ES512';
|
|
105
|
+
/**
|
|
106
|
+
* Symmetric signing algorithm (requires raw key bytes).
|
|
107
|
+
*/
|
|
108
|
+
export type SymmetricSigningAlgorithm = 'HS256';
|
|
109
|
+
/**
|
|
110
|
+
* All supported signing algorithms.
|
|
111
|
+
*/
|
|
112
|
+
export type SigningAlgorithm = AsymmetricSigningAlgorithm | SymmetricSigningAlgorithm;
|
|
113
|
+
/**
|
|
114
|
+
* Supported hash algorithms.
|
|
115
|
+
*/
|
|
116
|
+
export type HashAlgorithm = 'SHA-256' | 'SHA-384' | 'SHA-512';
|
|
117
|
+
/**
|
|
118
|
+
* Parameters for HKDF key derivation.
|
|
119
|
+
*/
|
|
120
|
+
export type HkdfParams = {
|
|
121
|
+
/** Hash algorithm to use for HKDF. */
|
|
122
|
+
hash: HashAlgorithm;
|
|
123
|
+
/** Salt for HKDF (can be empty Uint8Array). */
|
|
124
|
+
salt: Uint8Array;
|
|
125
|
+
/** Optional info/context for HKDF. */
|
|
126
|
+
info?: Uint8Array;
|
|
127
|
+
/** Desired key length in bits. Defaults to 256. */
|
|
128
|
+
keyLength?: number;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Public key information returned from parsePublicKeyPem.
|
|
132
|
+
*/
|
|
133
|
+
export type PublicKeyInfo = {
|
|
134
|
+
/** Detected algorithm of the key. */
|
|
135
|
+
algorithm: 'rsa:2048' | 'rsa:4096' | 'ec:secp256r1' | 'ec:secp384r1' | 'ec:secp521r1';
|
|
136
|
+
/** Normalized PEM string. */
|
|
137
|
+
pem: string;
|
|
138
|
+
};
|
|
24
139
|
export type CryptoService = {
|
|
25
140
|
/** Track which crypto implementation we are using */
|
|
26
141
|
name: string;
|
|
27
142
|
/** Default algorithm identifier. */
|
|
28
143
|
method: AlgorithmUrn;
|
|
29
|
-
/** Convert or narrow from AnyKeyPair to PemKeyPair */
|
|
30
|
-
cryptoToPemPair: (keys: AnyKeyPair) => Promise<PemKeyPair>;
|
|
31
144
|
/**
|
|
32
145
|
* Try to decrypt content with the default or handed algorithm. Throws on
|
|
33
146
|
* most failure, if auth tagging is implemented for example.
|
|
34
147
|
*/
|
|
35
|
-
decrypt: (payload: Binary, key:
|
|
36
|
-
decryptWithPrivateKey: (encryptedPayload: Binary, privateKey:
|
|
148
|
+
decrypt: (payload: Binary, key: SymmetricKey, iv: Binary, algorithm?: AlgorithmUrn, authTag?: Binary) => Promise<DecryptResult>;
|
|
149
|
+
decryptWithPrivateKey: (encryptedPayload: Binary, privateKey: PrivateKey) => Promise<Binary>;
|
|
37
150
|
/**
|
|
38
151
|
* Encrypt content with the default or handed algorithm.
|
|
152
|
+
* Accepts Binary or SymmetricKey as payload (for key wrapping with symmetric keys).
|
|
39
153
|
*/
|
|
40
|
-
encrypt: (payload: Binary, key:
|
|
41
|
-
encryptWithPublicKey: (payload: Binary, publicKey: string) => Promise<Binary>;
|
|
42
|
-
/** Get length random bytes as a hex-encoded string. */
|
|
43
|
-
generateInitializationVector: (length?: number) => Promise<string>;
|
|
44
|
-
/** Get length random bytes as a hex-encoded string. */
|
|
45
|
-
generateKey: (length?: number) => Promise<string>;
|
|
154
|
+
encrypt: (payload: Binary | SymmetricKey, key: SymmetricKey, iv: Binary, algorithm?: AlgorithmUrn) => Promise<EncryptResult>;
|
|
46
155
|
/**
|
|
47
|
-
*
|
|
156
|
+
* Encrypt with asymmetric public key (RSA-OAEP).
|
|
157
|
+
* Accepts Binary or SymmetricKey for key wrapping.
|
|
158
|
+
*/
|
|
159
|
+
encryptWithPublicKey: (payload: Binary | SymmetricKey, publicKey: PublicKey) => Promise<Binary>;
|
|
160
|
+
/** Generate symmetric AES key (opaque, never hex string). */
|
|
161
|
+
generateKey: (length?: number) => Promise<SymmetricKey>;
|
|
162
|
+
/**
|
|
163
|
+
* Generate an RSA key pair for encryption/decryption.
|
|
48
164
|
* @param size in bits, defaults to a reasonable size for the default method
|
|
165
|
+
* @returns Opaque key pair
|
|
49
166
|
*/
|
|
50
|
-
generateKeyPair: (size?: number) => Promise<
|
|
51
|
-
generateSigningKeyPair: () => Promise<AnyKeyPair>;
|
|
167
|
+
generateKeyPair: (size?: number) => Promise<KeyPair>;
|
|
52
168
|
/**
|
|
53
|
-
*
|
|
169
|
+
* Generate an RSA key pair for signing/verification.
|
|
170
|
+
* @returns Opaque key pair
|
|
54
171
|
*/
|
|
55
|
-
|
|
172
|
+
generateSigningKeyPair: () => Promise<KeyPair>;
|
|
56
173
|
randomBytes: (byteLength: number) => Promise<Uint8Array>;
|
|
57
|
-
/**
|
|
58
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Sign data with an asymmetric private key.
|
|
176
|
+
* @param data - Data to sign
|
|
177
|
+
* @param privateKey - Opaque private key
|
|
178
|
+
* @param algorithm - Signing algorithm (RS256, ES256, ES384, ES512)
|
|
179
|
+
*/
|
|
180
|
+
sign: (data: Uint8Array, privateKey: PrivateKey, algorithm: AsymmetricSigningAlgorithm) => Promise<Uint8Array>;
|
|
181
|
+
/**
|
|
182
|
+
* Verify signature with an asymmetric public key.
|
|
183
|
+
* @param data - Original data that was signed
|
|
184
|
+
* @param signature - Signature to verify
|
|
185
|
+
* @param publicKey - Opaque public key
|
|
186
|
+
* @param algorithm - Must match algorithm used for signing
|
|
187
|
+
*/
|
|
188
|
+
verify: (data: Uint8Array, signature: Uint8Array, publicKey: PublicKey, algorithm: AsymmetricSigningAlgorithm) => Promise<boolean>;
|
|
189
|
+
/**
|
|
190
|
+
* Compute HMAC-SHA256 of data with a symmetric key.
|
|
191
|
+
* @param data - Data to authenticate
|
|
192
|
+
* @param key - Opaque symmetric key
|
|
193
|
+
* @returns Raw HMAC bytes
|
|
194
|
+
*/
|
|
195
|
+
hmac: (data: Uint8Array, key: SymmetricKey) => Promise<Uint8Array>;
|
|
196
|
+
/**
|
|
197
|
+
* Verify HMAC-SHA256.
|
|
198
|
+
* @param data - Original data that was authenticated
|
|
199
|
+
* @param signature - HMAC to verify
|
|
200
|
+
* @param key - Opaque symmetric key
|
|
201
|
+
*/
|
|
202
|
+
verifyHmac: (data: Uint8Array, signature: Uint8Array, key: SymmetricKey) => Promise<boolean>;
|
|
203
|
+
/**
|
|
204
|
+
* Compute hash digest.
|
|
205
|
+
* @param algorithm - Hash algorithm to use (SHA-256, SHA-384, SHA-512)
|
|
206
|
+
* @param data - Data to hash
|
|
207
|
+
*/
|
|
208
|
+
digest: (algorithm: HashAlgorithm, data: Uint8Array) => Promise<Uint8Array>;
|
|
209
|
+
/**
|
|
210
|
+
* Generate an EC key pair for ECDH key agreement.
|
|
211
|
+
* @param curve - Elliptic curve to use (defaults to P-256)
|
|
212
|
+
* @throws ConfigurationError if EC operations not supported
|
|
213
|
+
*/
|
|
214
|
+
generateECKeyPair: (curve?: ECCurve) => Promise<KeyPair>;
|
|
215
|
+
/**
|
|
216
|
+
* Perform ECDH key agreement followed by HKDF key derivation.
|
|
217
|
+
* Returns opaque symmetric key suitable for symmetric encryption.
|
|
218
|
+
*
|
|
219
|
+
* @param privateKey - Opaque EC private key
|
|
220
|
+
* @param publicKey - Opaque EC public key of other party
|
|
221
|
+
* @param hkdfParams - Parameters for HKDF derivation
|
|
222
|
+
* @returns Opaque symmetric key
|
|
223
|
+
* @throws ConfigurationError if EC operations not supported
|
|
224
|
+
*/
|
|
225
|
+
deriveKeyFromECDH: (privateKey: PrivateKey, publicKey: PublicKey, hkdfParams: HkdfParams) => Promise<SymmetricKey>;
|
|
226
|
+
/**
|
|
227
|
+
* Import a PEM public key as an opaque key.
|
|
228
|
+
* @param pem - PEM-encoded public key
|
|
229
|
+
* @param options - Import options (usage required for RSA keys to disambiguate encrypt vs sign)
|
|
230
|
+
* @returns Opaque public key with metadata
|
|
231
|
+
*/
|
|
232
|
+
importPublicKey: (pem: string, options: KeyOptions) => Promise<PublicKey>;
|
|
233
|
+
/**
|
|
234
|
+
* Import a PEM private key as an opaque key.
|
|
235
|
+
* Optional - intended for use in tests or by downstream integrators who need to bring
|
|
236
|
+
* their own PEM key material. Main SDK code should use opaque PrivateKey objects directly.
|
|
237
|
+
* @param pem - PEM-encoded private key
|
|
238
|
+
* @param options - Import options (usage required for RSA keys to disambiguate encrypt vs sign)
|
|
239
|
+
* @returns Opaque private key with metadata
|
|
240
|
+
*/
|
|
241
|
+
importPrivateKey?: (pem: string, options: KeyOptions) => Promise<PrivateKey>;
|
|
242
|
+
/**
|
|
243
|
+
* Parse and validate a PEM public key, returning algorithm info.
|
|
244
|
+
*
|
|
245
|
+
* @param pem - PEM-encoded public key or X.509 certificate
|
|
246
|
+
* @returns Validated PEM and detected algorithm
|
|
247
|
+
* @throws ConfigurationError if key format invalid or algorithm not supported
|
|
248
|
+
*/
|
|
249
|
+
parsePublicKeyPem: (pem: string) => Promise<PublicKeyInfo>;
|
|
250
|
+
/**
|
|
251
|
+
* Export an opaque public key to PEM format.
|
|
252
|
+
* @param key - Opaque public key
|
|
253
|
+
* @returns PEM-encoded public key (SPKI format)
|
|
254
|
+
*/
|
|
255
|
+
exportPublicKeyPem: (key: PublicKey) => Promise<string>;
|
|
256
|
+
/**
|
|
257
|
+
* OPTIONAL -- ONLY USE FOR TESTING/DEVELOPMENT. Private keys should NOT be exportable in secure environments.
|
|
258
|
+
* Export an opaque private key to PEM format.
|
|
259
|
+
* @param key - Opaque private key
|
|
260
|
+
* @returns PEM-encoded private key (PKCS8 format)
|
|
261
|
+
*/
|
|
262
|
+
exportPrivateKeyPem?: (key: PrivateKey) => Promise<string>;
|
|
263
|
+
/**
|
|
264
|
+
* Export an opaque public key to JWK format.
|
|
265
|
+
* @param key - Opaque public key
|
|
266
|
+
* @returns JWK representation
|
|
267
|
+
*/
|
|
268
|
+
exportPublicKeyJwk: (key: PublicKey) => Promise<JsonWebKey>;
|
|
269
|
+
/**
|
|
270
|
+
* Extract PEM public key from X.509 certificate or return PEM key as-is.
|
|
271
|
+
*
|
|
272
|
+
* Used to normalize KAS public keys which may be provided as either:
|
|
273
|
+
* - X.509 certificates (-----BEGIN CERTIFICATE-----)
|
|
274
|
+
* - Raw PEM public keys (-----BEGIN PUBLIC KEY-----)
|
|
275
|
+
*
|
|
276
|
+
* For certificates, jwaAlgorithm must be provided to correctly parse the key
|
|
277
|
+
* (e.g., 'RS256', 'RS512', 'ES256', 'ES384', 'ES512'). For raw PEM keys,
|
|
278
|
+
* the algorithm parameter is ignored.
|
|
279
|
+
*
|
|
280
|
+
* @param certOrPem - PEM-encoded public key or X.509 certificate
|
|
281
|
+
* @param jwaAlgorithm - JWA algorithm for certificate parsing (required for certificates)
|
|
282
|
+
* @returns PEM-encoded public key (SPKI format)
|
|
283
|
+
* @throws Error if input is not valid PEM or certificate
|
|
284
|
+
*/
|
|
285
|
+
extractPublicKeyPem: (certOrPem: string, jwaAlgorithm?: string) => Promise<string>;
|
|
286
|
+
/**
|
|
287
|
+
* Convert a JWK (JSON Web Key) public key to PEM format.
|
|
288
|
+
* Supports both RSA and EC keys.
|
|
289
|
+
*
|
|
290
|
+
* @param jwk - JSON Web Key object
|
|
291
|
+
* @returns PEM-encoded public key
|
|
292
|
+
* @throws ConfigurationError if JWK format invalid
|
|
293
|
+
*/
|
|
294
|
+
jwkToPublicKeyPem: (jwk: JsonWebKey) => Promise<string>;
|
|
295
|
+
/**
|
|
296
|
+
* Import raw key bytes as an opaque symmetric key.
|
|
297
|
+
* Used for external keys (e.g., unwrapped from KAS).
|
|
298
|
+
* @param keyBytes - Raw key bytes
|
|
299
|
+
* @returns Opaque symmetric key
|
|
300
|
+
*/
|
|
301
|
+
importSymmetricKey: (keyBytes: Uint8Array) => Promise<SymmetricKey>;
|
|
302
|
+
/**
|
|
303
|
+
* Split a symmetric key into N shares using XOR secret sharing.
|
|
304
|
+
*
|
|
305
|
+
* DefaultCryptoService: Uses keySplit() utility (extracts bytes internally)
|
|
306
|
+
* HSM implementations: Must use native splitting OR throw ConfigurationError
|
|
307
|
+
*
|
|
308
|
+
* @param key - Symmetric key to split
|
|
309
|
+
* @param numShares - Number of shares to create
|
|
310
|
+
* @returns Array of opaque key shares
|
|
311
|
+
* @throws ConfigurationError if not supported by the implementation
|
|
312
|
+
*
|
|
313
|
+
* Note: Multi-KAS may not be available in all secure environments (single KAS only)
|
|
314
|
+
*/
|
|
315
|
+
splitSymmetricKey: (key: SymmetricKey, numShares: number) => Promise<SymmetricKey[]>;
|
|
316
|
+
/**
|
|
317
|
+
* Merge symmetric key shares back into the original key using XOR.
|
|
318
|
+
*
|
|
319
|
+
* @param shares - Array of key shares (from splitSymmetricKey)
|
|
320
|
+
* @returns Merged symmetric key
|
|
321
|
+
* @throws ConfigurationError if not supported by the implementation
|
|
322
|
+
*/
|
|
323
|
+
mergeSymmetricKeys: (shares: SymmetricKey[]) => Promise<SymmetricKey>;
|
|
59
324
|
};
|
|
60
325
|
//# sourceMappingURL=declarations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../../../../tdf3/src/crypto/declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG;IAC1B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../../../../tdf3/src/crypto/declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,MAAM,aAAa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,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5D;;;;;;;;;;;;;;;OAeG;IACH,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnF;;;;;;;OAOG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAIxD;;;;;OAKG;IACH,kBAAkB,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAEpE;;;;;;;;;;;;OAYG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAErF;;;;;;OAMG;IACH,kBAAkB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CACvE,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @private
|
|
5
5
|
*/
|
|
6
6
|
import { Binary } from '../binary.js';
|
|
7
|
-
import { CryptoService, DecryptResult, EncryptResult,
|
|
7
|
+
import { type AsymmetricSigningAlgorithm, type CryptoService, type DecryptResult, type ECCurve, type EncryptResult, type HashAlgorithm, type HkdfParams, type KeyOptions, type KeyPair, type PrivateKey, type PublicKey, type PublicKeyInfo, type SymmetricKey } from './declarations.js';
|
|
8
8
|
import { AlgorithmUrn } from '../ciphers/algorithms.js';
|
|
9
9
|
export declare const isSupported: boolean;
|
|
10
10
|
export declare const method = "http://www.w3.org/2001/04/xmlenc#aes256-cbc";
|
|
@@ -16,33 +16,30 @@ export declare const name = "BrowserNativeCryptoService";
|
|
|
16
16
|
export declare function rsaOaepSha1(modulusLength?: number): RsaHashedKeyGenParams;
|
|
17
17
|
export declare function rsaPkcs1Sha256(modulusLength?: number): RsaHashedKeyGenParams;
|
|
18
18
|
/**
|
|
19
|
-
* Generate a random
|
|
20
|
-
* @
|
|
19
|
+
* Generate a random symmetric key (opaque).
|
|
20
|
+
* @param length - Key length in bytes (default 32 for AES-256)
|
|
21
|
+
* @return Opaque symmetric key
|
|
21
22
|
*/
|
|
22
|
-
export declare function generateKey(length?: number): Promise<
|
|
23
|
+
export declare function generateKey(length?: number): Promise<SymmetricKey>;
|
|
23
24
|
/**
|
|
24
25
|
* Generate an RSA key pair
|
|
25
26
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey}
|
|
26
27
|
* @param size in bits
|
|
27
28
|
*/
|
|
28
|
-
export declare function generateKeyPair(size?: number): Promise<
|
|
29
|
+
export declare function generateKeyPair(size?: number): Promise<KeyPair>;
|
|
29
30
|
/**
|
|
30
31
|
* Generate an RSA key pair suitable for signatures
|
|
31
32
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey}
|
|
32
33
|
*/
|
|
33
|
-
export declare function generateSigningKeyPair(): Promise<
|
|
34
|
-
export declare function cryptoToPemPair(keysMaybe: unknown): Promise<PemKeyPair>;
|
|
34
|
+
export declare function generateSigningKeyPair(): Promise<KeyPair>;
|
|
35
35
|
/**
|
|
36
|
-
* Encrypt using a public key
|
|
37
|
-
*
|
|
38
|
-
* @param
|
|
36
|
+
* Encrypt using a public key (RSA-OAEP).
|
|
37
|
+
* Accepts Binary or SymmetricKey for key wrapping.
|
|
38
|
+
* @param payload Payload to encrypt (Binary) or symmetric key to wrap (SymmetricKey)
|
|
39
|
+
* @param publicKey Opaque public key
|
|
39
40
|
* @return Encrypted payload
|
|
40
41
|
*/
|
|
41
|
-
export declare function encryptWithPublicKey(payload: Binary, publicKey:
|
|
42
|
-
/**
|
|
43
|
-
* Generate a 16-byte initialization vector
|
|
44
|
-
*/
|
|
45
|
-
export declare function generateInitializationVector(length?: number): Promise<string>;
|
|
42
|
+
export declare function encryptWithPublicKey(payload: Binary | SymmetricKey, publicKey: PublicKey): Promise<Binary>;
|
|
46
43
|
export declare function randomBytes(byteLength: number): Promise<Uint8Array>;
|
|
47
44
|
/**
|
|
48
45
|
* Returns a promise to the encryption key as a binary string.
|
|
@@ -58,19 +55,19 @@ export declare function randomBytesAsHex(length: number): Promise<string>;
|
|
|
58
55
|
/**
|
|
59
56
|
* Decrypt a public-key encrypted payload with a private key
|
|
60
57
|
* @param encryptedPayload Payload to decrypt
|
|
61
|
-
* @param privateKey
|
|
58
|
+
* @param privateKey Opaque private key
|
|
62
59
|
* @return Decrypted payload
|
|
63
60
|
*/
|
|
64
|
-
export declare function decryptWithPrivateKey(encryptedPayload: Binary, privateKey:
|
|
61
|
+
export declare function decryptWithPrivateKey(encryptedPayload: Binary, privateKey: PrivateKey): Promise<Binary>;
|
|
65
62
|
/**
|
|
66
63
|
* Decrypt content synchronously
|
|
67
64
|
* @param payload The payload to decrypt
|
|
68
|
-
* @param key The encryption key
|
|
65
|
+
* @param key The symmetric encryption key (opaque)
|
|
69
66
|
* @param iv The initialization vector
|
|
70
67
|
* @param algorithm The algorithm to use for encryption
|
|
71
68
|
* @param authTag The authentication tag for authenticated crypto.
|
|
72
69
|
*/
|
|
73
|
-
export declare function decrypt(payload: Binary, key:
|
|
70
|
+
export declare function decrypt(payload: Binary, key: SymmetricKey, iv: Binary, algorithm?: AlgorithmUrn, authTag?: Binary): Promise<DecryptResult>;
|
|
74
71
|
/**
|
|
75
72
|
* Encrypt content synchronously
|
|
76
73
|
* @param payload The payload to encrypt
|
|
@@ -78,26 +75,106 @@ export declare function decrypt(payload: Binary, key: Binary, iv: Binary, algori
|
|
|
78
75
|
* @param iv The initialization vector
|
|
79
76
|
* @param algorithm The algorithm to use for encryption
|
|
80
77
|
*/
|
|
81
|
-
export declare function encrypt(payload: Binary, key:
|
|
78
|
+
export declare function encrypt(payload: Binary | SymmetricKey, key: SymmetricKey, iv: Binary, algorithm?: AlgorithmUrn): Promise<EncryptResult>;
|
|
82
79
|
/**
|
|
83
80
|
* Create a SHA256 hash. Code refrenced from MDN:
|
|
84
81
|
* https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
|
|
85
82
|
* @param content String content
|
|
86
83
|
* @return Hex hash
|
|
87
84
|
*/
|
|
88
|
-
export declare function sha256(content: string): Promise<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Create an HMAC SHA256 hash
|
|
91
|
-
* @param key Key string
|
|
92
|
-
* @param content Content string
|
|
93
|
-
* @return Hex hash
|
|
94
|
-
*/
|
|
95
|
-
export declare function hmac(key: string, content: string): Promise<string>;
|
|
96
85
|
/**
|
|
97
86
|
* Create an ArrayBuffer from a hex string.
|
|
98
87
|
* https://developers.google.com/web/updates/2012/06/How-to-convert-ArrayBuffer-to-and-from-String?hl=en
|
|
99
88
|
* @param hex - Hex string
|
|
100
89
|
*/
|
|
101
90
|
export declare function hex2Ab(hex: string): ArrayBuffer;
|
|
91
|
+
/**
|
|
92
|
+
* Sign data with an asymmetric private key.
|
|
93
|
+
*/
|
|
94
|
+
export declare function sign(data: Uint8Array, privateKey: PrivateKey, algorithm: AsymmetricSigningAlgorithm): Promise<Uint8Array>;
|
|
95
|
+
/**
|
|
96
|
+
* Verify signature with an asymmetric public key.
|
|
97
|
+
*/
|
|
98
|
+
export declare function verify(data: Uint8Array, signature: Uint8Array, publicKey: PublicKey, algorithm: AsymmetricSigningAlgorithm): Promise<boolean>;
|
|
99
|
+
/**
|
|
100
|
+
* Compute hash digest.
|
|
101
|
+
*/
|
|
102
|
+
export declare function digest(algorithm: HashAlgorithm, data: Uint8Array): Promise<Uint8Array>;
|
|
103
|
+
/**
|
|
104
|
+
* Extract PEM public key from X.509 certificate or return PEM key as-is.
|
|
105
|
+
*
|
|
106
|
+
* @param certOrPem - A PEM-encoded X.509 certificate or public key
|
|
107
|
+
* @param jwaAlgorithm - JWA algorithm hint for certificate parsing (RS256, RS512, ES256, ES384, ES512).
|
|
108
|
+
* If not provided for a certificate, will attempt to auto-detect from OIDs.
|
|
109
|
+
*/
|
|
110
|
+
export declare function extractPublicKeyPem(certOrPem: string, jwaAlgorithm?: string): Promise<string>;
|
|
111
|
+
/**
|
|
112
|
+
* Generate an EC key pair for ECDH key agreement.
|
|
113
|
+
*/
|
|
114
|
+
export declare function generateECKeyPair(curve?: ECCurve): Promise<KeyPair>;
|
|
115
|
+
/**
|
|
116
|
+
* Perform ECDH key agreement followed by HKDF key derivation.
|
|
117
|
+
* Returns opaque symmetric key for symmetric encryption.
|
|
118
|
+
*/
|
|
119
|
+
export declare function deriveKeyFromECDH(privateKey: PrivateKey, publicKey: PublicKey, hkdfParams: HkdfParams): Promise<SymmetricKey>;
|
|
120
|
+
/**
|
|
121
|
+
* Compute HMAC-SHA256 of data with a symmetric key.
|
|
122
|
+
*/
|
|
123
|
+
export declare function hmac(data: Uint8Array, key: SymmetricKey): Promise<Uint8Array>;
|
|
124
|
+
/**
|
|
125
|
+
* Verify HMAC-SHA256. Standalone utility — not part of CryptoService interface.
|
|
126
|
+
*/
|
|
127
|
+
export declare function verifyHmac(data: Uint8Array, signature: Uint8Array, key: SymmetricKey): Promise<boolean>;
|
|
128
|
+
/**
|
|
129
|
+
* Import and validate a PEM public key, returning algorithm info.
|
|
130
|
+
* Uses JWK export for robust key parameter detection.
|
|
131
|
+
*/
|
|
132
|
+
export declare function parsePublicKeyPem(pem: string): Promise<PublicKeyInfo>;
|
|
133
|
+
/**
|
|
134
|
+
* Convert a JWK (JSON Web Key) to PEM format.
|
|
135
|
+
*/
|
|
136
|
+
export declare function jwkToPublicKeyPem(jwk: JsonWebKey): Promise<string>;
|
|
137
|
+
/**
|
|
138
|
+
* Convert a PEM public key to JWK format.
|
|
139
|
+
* Returns only public key components (no private key data).
|
|
140
|
+
*/
|
|
141
|
+
export declare function publicKeyPemToJwk(publicKeyPem: string): Promise<JsonWebKey>;
|
|
142
|
+
/**
|
|
143
|
+
* Import a PEM public key as an opaque key.
|
|
144
|
+
*/
|
|
145
|
+
export declare function importPublicKey(pem: string, options: KeyOptions): Promise<PublicKey>;
|
|
146
|
+
/**
|
|
147
|
+
* Import a PEM private key as an opaque key.
|
|
148
|
+
*/
|
|
149
|
+
export declare function importPrivateKey(pem: string, options: KeyOptions): Promise<PrivateKey>;
|
|
150
|
+
/**
|
|
151
|
+
* Export an opaque public key to PEM format.
|
|
152
|
+
*/
|
|
153
|
+
export declare function exportPublicKeyPem(key: PublicKey): Promise<string>;
|
|
154
|
+
/**
|
|
155
|
+
* Export an opaque private key to PEM format.
|
|
156
|
+
* ONLY USE FOR TESTING/DEVELOPMENT. Private keys should NOT be exportable in secure environments.
|
|
157
|
+
*/
|
|
158
|
+
export declare function exportPrivateKeyPem(key: PrivateKey): Promise<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Export an opaque public key to JWK format.
|
|
161
|
+
*/
|
|
162
|
+
export declare function exportPublicKeyJwk(key: PublicKey): Promise<JsonWebKey>;
|
|
163
|
+
/**
|
|
164
|
+
* Import raw key bytes as an opaque symmetric key.
|
|
165
|
+
* Used for external keys (e.g., unwrapped from KAS).
|
|
166
|
+
*/
|
|
167
|
+
export declare function importSymmetricKey(keyBytes: Uint8Array): Promise<SymmetricKey>;
|
|
168
|
+
/**
|
|
169
|
+
* Split a symmetric key into N shares using XOR secret sharing.
|
|
170
|
+
* Key bytes are extracted internally for splitting.
|
|
171
|
+
* HSM implementations cannot extract bytes and should throw ConfigurationError.
|
|
172
|
+
*/
|
|
173
|
+
export declare function splitSymmetricKey(key: SymmetricKey, numShares: number): Promise<SymmetricKey[]>;
|
|
174
|
+
/**
|
|
175
|
+
* Merge symmetric key shares back into the original key using XOR.
|
|
176
|
+
* Key bytes are extracted internally for merging.
|
|
177
|
+
*/
|
|
178
|
+
export declare function mergeSymmetricKeys(shares: SymmetricKey[]): Promise<SymmetricKey>;
|
|
102
179
|
export declare const DefaultCryptoService: CryptoService;
|
|
103
180
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../tdf3/src/crypto/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../tdf3/src/crypto/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,KAAK,UAAU,EACf,KAAK,OAAO,EAEZ,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYxD,eAAO,MAAM,WAAW,SAA4C,CAAC;AAErE,eAAO,MAAM,MAAM,gDAAgD,CAAC;AACpE,eAAO,MAAM,IAAI,+BAA+B,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,WAAW,CACzB,aAAa,GAAE,MAAqC,GACnD,qBAAqB,CAYvB;AAED,wBAAgB,cAAc,CAC5B,aAAa,GAAE,MAAqC,GACnD,qBAAqB,CAYvB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAGxE;AAsFD;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBrE;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,IAAI,OA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BAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAqG5F;AAMD;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAIxE;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAI1E;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAG5E;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAEpF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,EAAE,CAAC,CAIzB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAItF;AAED,eAAO,MAAM,oBAAoB,EAAE,aA6BlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-claims-set.d.ts","sourceRoot":"","sources":["../../../../../../tdf3/src/crypto/jose/jwt-claims-set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAG9E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,eAAe,EAAE,mBAAmB,EACpC,cAAc,EAAE,UAAU,EAC1B,OAAO,CAAC,EAAE,gBAAgB,GACzB,UAAU,CAEZ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: (Err: new (message?: string, options?: {
|
|
2
|
+
cause?: unknown;
|
|
3
|
+
}) => Error, recognizedDefault: Map<string, boolean>, recognizedOption: Record<string, boolean> | undefined, protectedHeader: Record<string, unknown> | undefined, joseHeader: Record<string, unknown>) => Set<string>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=validate-crit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-crit.d.ts","sourceRoot":"","sources":["../../../../../../tdf3/src/crypto/jose/validate-crit.ts"],"names":[],"mappings":"wBAE+B,CAC7B,GAAG,EAAE,KAAK,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK,KAAK,EACnE,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACrD,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,GAAG,CAAC,MAAM,CAAC;AANhB,wBAMiB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const encoder: TextEncoder;
|
|
2
|
+
export declare const decoder: TextDecoder;
|
|
3
|
+
export declare function concat(...buffers: any[]): Uint8Array<any>;
|
|
4
|
+
export declare function uint64be(value: any): Uint8Array<ArrayBuffer>;
|
|
5
|
+
export declare function uint32be(value: any): Uint8Array<ArrayBuffer>;
|
|
6
|
+
//# sourceMappingURL=buffer_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer_utils.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/buffer_utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,aAAoB,CAAC;AACzC,eAAO,MAAM,OAAO,aAAoB,CAAC;AAEzC,wBAAgB,MAAM,CAAC,GAAG,OAAO,OAAA,mBAShC;AAOD,wBAAgB,QAAQ,CAAC,KAAK,KAAA,2BAO7B;AACD,wBAAgB,QAAQ,CAAC,KAAK,KAAA,2BAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epoch.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/epoch.ts"],"names":[],"mappings":"yBAEgB,SAAI;AAApB,wBAA2D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is_object.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/is_object.ts"],"names":[],"mappings":"yBAKgB,UAAK;AAArB,wBAYE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt_claims_set.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/jwt_claims_set.ts"],"names":[],"mappings":"yBAiBgB,oBAAe,EAAE,mBAAc,EAAE,YAAY;AAA7D,wBAwFE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secs.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/secs.ts"],"names":[],"mappings":"yBAQgB,QAAG;AAAnB,wBAgDE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate_crit.d.ts","sourceRoot":"","sources":["../../../../../../../../tdf3/src/crypto/jose/vendor/lib/validate_crit.ts"],"names":[],"mappings":"yBAGgB,QAAG,EAAE,sBAAiB,EAAE,qBAAgB,EAAE,oBAAe,EAAE,eAAU;AAArF,wBA+BE"}
|