@digitaldefiance/node-ecies-lib 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/LICENSE +21 -0
- package/dist/constants.d.ts +29 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +129 -0
- package/dist/constants.js.map +1 -0
- package/dist/enumerations/index.d.ts +2 -0
- package/dist/enumerations/index.d.ts.map +1 -0
- package/dist/enumerations/index.js +2 -0
- package/dist/enumerations/index.js.map +1 -0
- package/dist/enumerations/pbkdf2-profile.d.ts +8 -0
- package/dist/enumerations/pbkdf2-profile.d.ts.map +1 -0
- package/dist/enumerations/pbkdf2-profile.js +9 -0
- package/dist/enumerations/pbkdf2-profile.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/authenticated-cipher.d.ts +10 -0
- package/dist/interfaces/authenticated-cipher.d.ts.map +1 -0
- package/dist/interfaces/authenticated-cipher.js +2 -0
- package/dist/interfaces/authenticated-cipher.js.map +1 -0
- package/dist/interfaces/authenticated-decipher.d.ts +9 -0
- package/dist/interfaces/authenticated-decipher.d.ts.map +1 -0
- package/dist/interfaces/authenticated-decipher.js +2 -0
- package/dist/interfaces/authenticated-decipher.js.map +1 -0
- package/dist/interfaces/checksum-config.d.ts +5 -0
- package/dist/interfaces/checksum-config.d.ts.map +1 -0
- package/dist/interfaces/checksum-config.js +2 -0
- package/dist/interfaces/checksum-config.js.map +1 -0
- package/dist/interfaces/checksum-consts.d.ts +11 -0
- package/dist/interfaces/checksum-consts.d.ts.map +1 -0
- package/dist/interfaces/checksum-consts.js +2 -0
- package/dist/interfaces/checksum-consts.js.map +1 -0
- package/dist/interfaces/constants.d.ts +42 -0
- package/dist/interfaces/constants.d.ts.map +1 -0
- package/dist/interfaces/constants.js +2 -0
- package/dist/interfaces/constants.js.map +1 -0
- package/dist/interfaces/ecies-consts.d.ts +88 -0
- package/dist/interfaces/ecies-consts.d.ts.map +1 -0
- package/dist/interfaces/ecies-consts.js +2 -0
- package/dist/interfaces/ecies-consts.js.map +1 -0
- package/dist/interfaces/encryption-consts.d.ts +11 -0
- package/dist/interfaces/encryption-consts.d.ts.map +1 -0
- package/dist/interfaces/encryption-consts.js +2 -0
- package/dist/interfaces/encryption-consts.js.map +1 -0
- package/dist/interfaces/fec-consts.d.ts +5 -0
- package/dist/interfaces/fec-consts.d.ts.map +1 -0
- package/dist/interfaces/fec-consts.js +2 -0
- package/dist/interfaces/fec-consts.js.map +1 -0
- package/dist/interfaces/index.d.ts +18 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +18 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.d.ts +6 -0
- package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.d.ts.map +1 -0
- package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.js +2 -0
- package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.js.map +1 -0
- package/dist/interfaces/keyring-consts.d.ts +6 -0
- package/dist/interfaces/keyring-consts.d.ts.map +1 -0
- package/dist/interfaces/keyring-consts.js +2 -0
- package/dist/interfaces/keyring-consts.js.map +1 -0
- package/dist/interfaces/member-operational.d.ts +36 -0
- package/dist/interfaces/member-operational.d.ts.map +1 -0
- package/dist/interfaces/member-operational.js +2 -0
- package/dist/interfaces/member-operational.js.map +1 -0
- package/dist/interfaces/member-with-mnemonic.d.ts +7 -0
- package/dist/interfaces/member-with-mnemonic.d.ts.map +1 -0
- package/dist/interfaces/member-with-mnemonic.js +2 -0
- package/dist/interfaces/member-with-mnemonic.js.map +1 -0
- package/dist/interfaces/multi-encrypted-message.d.ts +8 -0
- package/dist/interfaces/multi-encrypted-message.d.ts.map +1 -0
- package/dist/interfaces/multi-encrypted-message.js +2 -0
- package/dist/interfaces/multi-encrypted-message.js.map +1 -0
- package/dist/interfaces/multi-encrypted-parsed-header.d.ts +24 -0
- package/dist/interfaces/multi-encrypted-parsed-header.d.ts.map +1 -0
- package/dist/interfaces/multi-encrypted-parsed-header.js +2 -0
- package/dist/interfaces/multi-encrypted-parsed-header.js.map +1 -0
- package/dist/interfaces/pbkdf-profiles.d.ts +6 -0
- package/dist/interfaces/pbkdf-profiles.d.ts.map +1 -0
- package/dist/interfaces/pbkdf-profiles.js +2 -0
- package/dist/interfaces/pbkdf-profiles.js.map +1 -0
- package/dist/interfaces/signing-key-private-key-info.d.ts +11 -0
- package/dist/interfaces/signing-key-private-key-info.d.ts.map +1 -0
- package/dist/interfaces/signing-key-private-key-info.js +2 -0
- package/dist/interfaces/signing-key-private-key-info.js.map +1 -0
- package/dist/interfaces/simple-keypair-buffer.d.ts +6 -0
- package/dist/interfaces/simple-keypair-buffer.d.ts.map +1 -0
- package/dist/interfaces/simple-keypair-buffer.js +2 -0
- package/dist/interfaces/simple-keypair-buffer.js.map +1 -0
- package/dist/interfaces/simple-keypair.d.ts +6 -0
- package/dist/interfaces/simple-keypair.d.ts.map +1 -0
- package/dist/interfaces/simple-keypair.js +2 -0
- package/dist/interfaces/simple-keypair.js.map +1 -0
- package/dist/interfaces/simple-public-key-only-buffer.d.ts +4 -0
- package/dist/interfaces/simple-public-key-only-buffer.d.ts.map +1 -0
- package/dist/interfaces/simple-public-key-only-buffer.js +2 -0
- package/dist/interfaces/simple-public-key-only-buffer.js.map +1 -0
- package/dist/interfaces/simple-public-key-only.d.ts +4 -0
- package/dist/interfaces/simple-public-key-only.d.ts.map +1 -0
- package/dist/interfaces/simple-public-key-only.js +2 -0
- package/dist/interfaces/simple-public-key-only.js.map +1 -0
- package/dist/interfaces/single-encrypted-parsed-header.d.ts +35 -0
- package/dist/interfaces/single-encrypted-parsed-header.d.ts.map +1 -0
- package/dist/interfaces/single-encrypted-parsed-header.js +2 -0
- package/dist/interfaces/single-encrypted-parsed-header.js.map +1 -0
- package/dist/interfaces/wallet-seed.d.ts +7 -0
- package/dist/interfaces/wallet-seed.d.ts.map +1 -0
- package/dist/interfaces/wallet-seed.js +2 -0
- package/dist/interfaces/wallet-seed.js.map +1 -0
- package/dist/interfaces/wrapped-key-consts.d.ts +7 -0
- package/dist/interfaces/wrapped-key-consts.d.ts.map +1 -0
- package/dist/interfaces/wrapped-key-consts.js +2 -0
- package/dist/interfaces/wrapped-key-consts.js.map +1 -0
- package/dist/member.d.ts +67 -0
- package/dist/member.d.ts.map +1 -0
- package/dist/member.js +256 -0
- package/dist/member.js.map +1 -0
- package/dist/services/ecies/crypto-core.d.ts +55 -0
- package/dist/services/ecies/crypto-core.d.ts.map +1 -0
- package/dist/services/ecies/crypto-core.debug.d.ts +13 -0
- package/dist/services/ecies/crypto-core.debug.d.ts.map +1 -0
- package/dist/services/ecies/crypto-core.debug.js +91 -0
- package/dist/services/ecies/crypto-core.debug.js.map +1 -0
- package/dist/services/ecies/crypto-core.js +115 -0
- package/dist/services/ecies/crypto-core.js.map +1 -0
- package/dist/services/ecies/debug-aes-gcm.d.ts +2 -0
- package/dist/services/ecies/debug-aes-gcm.d.ts.map +1 -0
- package/dist/services/ecies/debug-aes-gcm.js +106 -0
- package/dist/services/ecies/debug-aes-gcm.js.map +1 -0
- package/dist/services/ecies/debug-ecdh.d.ts +2 -0
- package/dist/services/ecies/debug-ecdh.d.ts.map +1 -0
- package/dist/services/ecies/debug-ecdh.js +123 -0
- package/dist/services/ecies/debug-ecdh.js.map +1 -0
- package/dist/services/ecies/debug-ecies-burnbag.d.ts +2 -0
- package/dist/services/ecies/debug-ecies-burnbag.d.ts.map +1 -0
- package/dist/services/ecies/debug-ecies-burnbag.js +134 -0
- package/dist/services/ecies/debug-ecies-burnbag.js.map +1 -0
- package/dist/services/ecies/debug-ecies.d.ts +2 -0
- package/dist/services/ecies/debug-ecies.d.ts.map +1 -0
- package/dist/services/ecies/debug-ecies.js +110 -0
- package/dist/services/ecies/debug-ecies.js.map +1 -0
- package/dist/services/ecies/debug-test.d.ts +2 -0
- package/dist/services/ecies/debug-test.d.ts.map +1 -0
- package/dist/services/ecies/debug-test.js +57 -0
- package/dist/services/ecies/debug-test.js.map +1 -0
- package/dist/services/ecies/file.d.ts +15 -0
- package/dist/services/ecies/file.d.ts.map +1 -0
- package/dist/services/ecies/file.js +104 -0
- package/dist/services/ecies/file.js.map +1 -0
- package/dist/services/ecies/index.d.ts +8 -0
- package/dist/services/ecies/index.d.ts.map +1 -0
- package/dist/services/ecies/index.js +8 -0
- package/dist/services/ecies/index.js.map +1 -0
- package/dist/services/ecies/multi-recipient.d.ts +83 -0
- package/dist/services/ecies/multi-recipient.d.ts.map +1 -0
- package/dist/services/ecies/multi-recipient.js +355 -0
- package/dist/services/ecies/multi-recipient.js.map +1 -0
- package/dist/services/ecies/service.d.ts +70 -0
- package/dist/services/ecies/service.d.ts.map +1 -0
- package/dist/services/ecies/service.js +145 -0
- package/dist/services/ecies/service.js.map +1 -0
- package/dist/services/ecies/signature.d.ts +38 -0
- package/dist/services/ecies/signature.d.ts.map +1 -0
- package/dist/services/ecies/signature.js +64 -0
- package/dist/services/ecies/signature.js.map +1 -0
- package/dist/services/ecies/single-recipient.d.ts +85 -0
- package/dist/services/ecies/single-recipient.d.ts.map +1 -0
- package/dist/services/ecies/single-recipient.js +390 -0
- package/dist/services/ecies/single-recipient.js.map +1 -0
- package/dist/services/ecies/utilities.d.ts +22 -0
- package/dist/services/ecies/utilities.d.ts.map +1 -0
- package/dist/services/ecies/utilities.js +65 -0
- package/dist/services/ecies/utilities.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Digital Defiance, Jessica Mulein, All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IPBkdf2Consts } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import { CipherGCMTypes } from 'crypto';
|
|
3
|
+
import { IChecksumConsts } from './interfaces/checksum-consts';
|
|
4
|
+
import { IConstants } from './interfaces/constants';
|
|
5
|
+
import { IEncryptionConsts } from './interfaces/encryption-consts';
|
|
6
|
+
import { IKeyringConsts } from './interfaces/keyring-consts';
|
|
7
|
+
import { PbkdfProfiles } from './interfaces/pbkdf-profiles';
|
|
8
|
+
import { IWrappedKeyConsts } from './interfaces/wrapped-key-consts';
|
|
9
|
+
/**
|
|
10
|
+
* Constants for checksum operations
|
|
11
|
+
* These values are critical for data integrity and MUST NOT be changed
|
|
12
|
+
* in an already established system as it will break all existing checksums.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CHECKSUM: IChecksumConsts;
|
|
15
|
+
export declare const KEYRING: IKeyringConsts;
|
|
16
|
+
export declare const PBKDF2: IPBkdf2Consts;
|
|
17
|
+
/**
|
|
18
|
+
* Predefined PBKDF2 configuration profiles for different use cases
|
|
19
|
+
* These profiles provide standardized, well-tested parameter combinations
|
|
20
|
+
*/
|
|
21
|
+
export declare const PBKDF2_PROFILES: PbkdfProfiles;
|
|
22
|
+
export declare const WRAPPED_KEY: IWrappedKeyConsts;
|
|
23
|
+
export declare const KEYRING_ALGORITHM_CONFIGURATION: CipherGCMTypes;
|
|
24
|
+
/**
|
|
25
|
+
* Constants for encrypted data
|
|
26
|
+
*/
|
|
27
|
+
export declare const ENCRYPTION: IEncryptionConsts;
|
|
28
|
+
export declare const Constants: IConstants;
|
|
29
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,eAYb,CAAC;AAEX,eAAO,MAAM,OAAO,EAAE,cAIZ,CAAC;AAEX,eAAO,MAAM,MAAM,EAAE,aAQX,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAoCpB,CAAC;AAEX,eAAO,MAAM,WAAW,EAAE,iBAKhB,CAAC;AAEX,eAAO,MAAM,+BAA+B,EACoB,cAAc,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,iBAGf,CAAC;AAGX,eAAO,MAAM,SAAS,EAAE,UAiCd,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { GUID_SIZE } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import { ObjectId } from 'mongodb';
|
|
3
|
+
/**
|
|
4
|
+
* Constants for checksum operations
|
|
5
|
+
* These values are critical for data integrity and MUST NOT be changed
|
|
6
|
+
* in an already established system as it will break all existing checksums.
|
|
7
|
+
*/
|
|
8
|
+
export const CHECKSUM = {
|
|
9
|
+
/** Default hash bits for SHA3 */
|
|
10
|
+
SHA3_DEFAULT_HASH_BITS: 512,
|
|
11
|
+
/** Length of a SHA3 checksum buffer in bytes */
|
|
12
|
+
SHA3_BUFFER_LENGTH: 64,
|
|
13
|
+
/** algorithm to use for checksum */
|
|
14
|
+
ALGORITHM: 'sha3-512',
|
|
15
|
+
/** encoding to use for checksum */
|
|
16
|
+
ENCODING: 'hex',
|
|
17
|
+
};
|
|
18
|
+
export const KEYRING = {
|
|
19
|
+
ALGORITHM: 'aes',
|
|
20
|
+
KEY_BITS: 256,
|
|
21
|
+
MODE: 'gcm',
|
|
22
|
+
};
|
|
23
|
+
export const PBKDF2 = {
|
|
24
|
+
ALGORITHM: 'sha256', // Changed from sha512 to match key-wrapping
|
|
25
|
+
SALT_BYTES: 32, // Changed from 16 to match key-wrapping and improve security
|
|
26
|
+
/**
|
|
27
|
+
* Number of pbkdf2 iterations per second when hashing a password.
|
|
28
|
+
* This is the high-security default for user login operations.
|
|
29
|
+
*/
|
|
30
|
+
ITERATIONS_PER_SECOND: 1304000,
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Predefined PBKDF2 configuration profiles for different use cases
|
|
34
|
+
* These profiles provide standardized, well-tested parameter combinations
|
|
35
|
+
*/
|
|
36
|
+
export const PBKDF2_PROFILES = {
|
|
37
|
+
/** High-security profile for user login operations */
|
|
38
|
+
USER_LOGIN: {
|
|
39
|
+
saltBytes: 32,
|
|
40
|
+
iterations: 1304000,
|
|
41
|
+
algorithm: 'sha256',
|
|
42
|
+
hashBytes: 32,
|
|
43
|
+
},
|
|
44
|
+
/** Optimized profile for key-wrapping operations */
|
|
45
|
+
KEY_WRAPPING: {
|
|
46
|
+
saltBytes: 32,
|
|
47
|
+
iterations: 100000,
|
|
48
|
+
algorithm: 'sha256',
|
|
49
|
+
hashBytes: 32,
|
|
50
|
+
},
|
|
51
|
+
/** Standard profile for backup codes and general use */
|
|
52
|
+
BACKUP_CODES: {
|
|
53
|
+
saltBytes: 32,
|
|
54
|
+
iterations: 1304000,
|
|
55
|
+
algorithm: 'sha256',
|
|
56
|
+
hashBytes: 32,
|
|
57
|
+
},
|
|
58
|
+
/** Ultra-high security profile for sensitive operations */
|
|
59
|
+
HIGH_SECURITY: {
|
|
60
|
+
saltBytes: 64,
|
|
61
|
+
iterations: 2000000,
|
|
62
|
+
algorithm: 'sha512',
|
|
63
|
+
hashBytes: 64,
|
|
64
|
+
},
|
|
65
|
+
/** Fast profile for testing and development */
|
|
66
|
+
FAST_TEST: {
|
|
67
|
+
saltBytes: 16,
|
|
68
|
+
iterations: 1000,
|
|
69
|
+
algorithm: 'sha256',
|
|
70
|
+
hashBytes: 32,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
export const WRAPPED_KEY = {
|
|
74
|
+
SALT_SIZE: PBKDF2.SALT_BYTES, // Use PBKDF2 standard salt size
|
|
75
|
+
IV_SIZE: 16,
|
|
76
|
+
MASTER_KEY_SIZE: 32,
|
|
77
|
+
MIN_ITERATIONS: 100000, // Keep lower for key-wrapping operations
|
|
78
|
+
};
|
|
79
|
+
export const KEYRING_ALGORITHM_CONFIGURATION = `${KEYRING.ALGORITHM}-${KEYRING.KEY_BITS}-${KEYRING.MODE}`;
|
|
80
|
+
/**
|
|
81
|
+
* Constants for encrypted data
|
|
82
|
+
*/
|
|
83
|
+
export const ENCRYPTION = {
|
|
84
|
+
ENCRYPTION_TYPE_SIZE: 1,
|
|
85
|
+
RECIPIENT_ID_SIZE: GUID_SIZE,
|
|
86
|
+
};
|
|
87
|
+
const objectIdLength = Buffer.from(new ObjectId().toHexString(), 'hex').length;
|
|
88
|
+
export const Constants = {
|
|
89
|
+
/**
|
|
90
|
+
* The length of a raw object ID (not the hex string representation)
|
|
91
|
+
*/
|
|
92
|
+
OBJECT_ID_LENGTH: objectIdLength,
|
|
93
|
+
/**
|
|
94
|
+
* PBKDF2 constants
|
|
95
|
+
*/
|
|
96
|
+
PBKDF2: PBKDF2,
|
|
97
|
+
/**
|
|
98
|
+
* PBKDF2 configuration profiles
|
|
99
|
+
*/
|
|
100
|
+
PBKDF2_PROFILES: PBKDF2_PROFILES,
|
|
101
|
+
/**
|
|
102
|
+
* Key Wrapping Service constants
|
|
103
|
+
*/
|
|
104
|
+
WRAPPED_KEY: WRAPPED_KEY,
|
|
105
|
+
/**
|
|
106
|
+
* Checksum constants used for data integrity
|
|
107
|
+
*/
|
|
108
|
+
CHECKSUM: CHECKSUM,
|
|
109
|
+
/**
|
|
110
|
+
* Keyring constants used for key management
|
|
111
|
+
*/
|
|
112
|
+
KEYRING: KEYRING,
|
|
113
|
+
/**
|
|
114
|
+
* Encryption constants used for encrypted data
|
|
115
|
+
*/
|
|
116
|
+
ENCRYPTION: ENCRYPTION,
|
|
117
|
+
/**
|
|
118
|
+
* Algorithm configuration string for keyring operations
|
|
119
|
+
*/
|
|
120
|
+
KEYRING_ALGORITHM_CONFIGURATION: KEYRING_ALGORITHM_CONFIGURATION,
|
|
121
|
+
};
|
|
122
|
+
if (CHECKSUM.SHA3_BUFFER_LENGTH !== CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8 ||
|
|
123
|
+
CHECKSUM.SHA3_BUFFER_LENGTH !== CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8) {
|
|
124
|
+
throw new Error('Invalid checksum constants');
|
|
125
|
+
}
|
|
126
|
+
if (objectIdLength !== 12) {
|
|
127
|
+
console.warn('ObjectID length may have changed, breaking encryption', objectIdLength);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enumerations/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enumerations/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pbkdf2-profile.d.ts","sourceRoot":"","sources":["../../src/enumerations/pbkdf2-profile.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var Pbkdf2ProfileEnum;
|
|
2
|
+
(function (Pbkdf2ProfileEnum) {
|
|
3
|
+
Pbkdf2ProfileEnum["USER_LOGIN"] = "USER_LOGIN";
|
|
4
|
+
Pbkdf2ProfileEnum["KEY_WRAPPING"] = "KEY_WRAPPING";
|
|
5
|
+
Pbkdf2ProfileEnum["BACKUP_CODES"] = "BACKUP_CODES";
|
|
6
|
+
Pbkdf2ProfileEnum["HIGH_SECURITY"] = "HIGH_SECURITY";
|
|
7
|
+
Pbkdf2ProfileEnum["FAST_TEST"] = "FAST_TEST";
|
|
8
|
+
})(Pbkdf2ProfileEnum || (Pbkdf2ProfileEnum = {}));
|
|
9
|
+
//# sourceMappingURL=pbkdf2-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pbkdf2-profile.js","sourceRoot":"","sources":["../../src/enumerations/pbkdf2-profile.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,8CAAyB,CAAA;IACzB,kDAA6B,CAAA;IAC7B,kDAA6B,CAAA;IAC7B,oDAA+B,CAAA;IAC/B,4CAAuB,CAAA;AACzB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extended Cipher type with auth tag support
|
|
3
|
+
*/
|
|
4
|
+
export interface AuthenticatedCipher {
|
|
5
|
+
update(data: Buffer): Buffer;
|
|
6
|
+
final(): Buffer;
|
|
7
|
+
getAuthTag(): Buffer;
|
|
8
|
+
setAutoPadding(autoPadding: boolean): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=authenticated-cipher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticated-cipher.d.ts","sourceRoot":"","sources":["../../src/interfaces/authenticated-cipher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,IAAI,MAAM,CAAC;IAChB,UAAU,IAAI,MAAM,CAAC;IACrB,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticated-cipher.js","sourceRoot":"","sources":["../../src/interfaces/authenticated-cipher.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticated-decipher.d.ts","sourceRoot":"","sources":["../../src/interfaces/authenticated-decipher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,IAAI,MAAM,CAAC;IAChB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticated-decipher.js","sourceRoot":"","sources":["../../src/interfaces/authenticated-decipher.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-config.d.ts","sourceRoot":"","sources":["../../src/interfaces/checksum-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-config.js","sourceRoot":"","sources":["../../src/interfaces/checksum-config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IChecksumConsts {
|
|
2
|
+
/** Default hash bits for SHA3 */
|
|
3
|
+
SHA3_DEFAULT_HASH_BITS: number;
|
|
4
|
+
/** Length of a SHA3 checksum buffer in bytes */
|
|
5
|
+
SHA3_BUFFER_LENGTH: number;
|
|
6
|
+
/** Algorithm name for checksums */
|
|
7
|
+
ALGORITHM: string;
|
|
8
|
+
/** Encoding for checksums */
|
|
9
|
+
ENCODING: 'hex' | 'base64';
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=checksum-consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-consts.d.ts","sourceRoot":"","sources":["../../src/interfaces/checksum-consts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,sBAAsB,EAAE,MAAM,CAAC;IAE/B,gDAAgD;IAChD,kBAAkB,EAAE,MAAM,CAAC;IAE3B,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAElB,6BAA6B;IAC7B,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-consts.js","sourceRoot":"","sources":["../../src/interfaces/checksum-consts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IPBkdf2Consts } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import { CipherGCMTypes } from 'crypto';
|
|
3
|
+
import { IChecksumConsts } from './checksum-consts';
|
|
4
|
+
import { IEncryptionConsts } from './encryption-consts';
|
|
5
|
+
import { IKeyringConsts } from './keyring-consts';
|
|
6
|
+
import { PbkdfProfiles } from './pbkdf-profiles';
|
|
7
|
+
import { IWrappedKeyConsts } from './wrapped-key-consts';
|
|
8
|
+
export interface IConstants {
|
|
9
|
+
/**
|
|
10
|
+
* The length of a raw object ID (not the hex string representation)
|
|
11
|
+
*/
|
|
12
|
+
OBJECT_ID_LENGTH: number;
|
|
13
|
+
/**
|
|
14
|
+
* PBKDF2 key derivation function constants
|
|
15
|
+
*/
|
|
16
|
+
PBKDF2: IPBkdf2Consts;
|
|
17
|
+
/**
|
|
18
|
+
* Predefined PBKDF2 configuration profiles for different use cases
|
|
19
|
+
*/
|
|
20
|
+
PBKDF2_PROFILES: PbkdfProfiles;
|
|
21
|
+
/**
|
|
22
|
+
* Checksum constants used for data integrity
|
|
23
|
+
*/
|
|
24
|
+
CHECKSUM: IChecksumConsts;
|
|
25
|
+
/**
|
|
26
|
+
* Wrapped Key constants used for the key wrapping service
|
|
27
|
+
*/
|
|
28
|
+
WRAPPED_KEY: IWrappedKeyConsts;
|
|
29
|
+
/**
|
|
30
|
+
* Keyring constants used for key management
|
|
31
|
+
*/
|
|
32
|
+
KEYRING: IKeyringConsts;
|
|
33
|
+
/**
|
|
34
|
+
* Encryption constants used for encrypted data
|
|
35
|
+
*/
|
|
36
|
+
ENCRYPTION: IEncryptionConsts;
|
|
37
|
+
/**
|
|
38
|
+
* Algorithm configuration string for keyring operations
|
|
39
|
+
*/
|
|
40
|
+
KEYRING_ALGORITHM_CONFIGURATION: CipherGCMTypes;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/interfaces/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC;IAC/B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;OAEG;IACH,+BAA+B,EAAE,cAAc,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/interfaces/constants.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface IECIESConsts {
|
|
2
|
+
/** The elliptic curve to use for all ECDSA operations */
|
|
3
|
+
CURVE_NAME: string;
|
|
4
|
+
/** The primary key derivation path for HD wallets */
|
|
5
|
+
PRIMARY_KEY_DERIVATION_PATH: string;
|
|
6
|
+
/** Length of ECDSA signatures in bytes */
|
|
7
|
+
SIGNATURE_SIZE: number;
|
|
8
|
+
/** Length of raw public keys in bytes (without 0x04 prefix) */
|
|
9
|
+
RAW_PUBLIC_KEY_LENGTH: number;
|
|
10
|
+
/** Length of public keys in bytes (with 0x04 prefix) */
|
|
11
|
+
PUBLIC_KEY_LENGTH: number;
|
|
12
|
+
PUBLIC_KEY_MAGIC: number;
|
|
13
|
+
/** Mnemonic strength in bits. This will produce a 32-bit key for ECDSA */
|
|
14
|
+
MNEMONIC_STRENGTH: number;
|
|
15
|
+
/** Symmetric encryption algorithm configuration */
|
|
16
|
+
SYMMETRIC: {
|
|
17
|
+
ALGORITHM: string;
|
|
18
|
+
KEY_BITS: number;
|
|
19
|
+
KEY_SIZE: number;
|
|
20
|
+
MODE: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Length of the initialization vector
|
|
24
|
+
*/
|
|
25
|
+
IV_SIZE: number;
|
|
26
|
+
/**
|
|
27
|
+
* Length of the authentication tag
|
|
28
|
+
*/
|
|
29
|
+
AUTH_TAG_SIZE: number;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum length of the data that can be encrypted
|
|
32
|
+
*/
|
|
33
|
+
MAX_RAW_DATA_SIZE: number;
|
|
34
|
+
SIMPLE: {
|
|
35
|
+
/**
|
|
36
|
+
* Length of the type (1) + public key (65) + IV (16) + auth tag (16)
|
|
37
|
+
*/
|
|
38
|
+
FIXED_OVERHEAD_SIZE: number;
|
|
39
|
+
/**
|
|
40
|
+
* Length of the data length (0 for simple encryption)
|
|
41
|
+
*/
|
|
42
|
+
DATA_LENGTH_SIZE: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* ECIES single recipient
|
|
46
|
+
*/
|
|
47
|
+
SINGLE: {
|
|
48
|
+
/**
|
|
49
|
+
* Length of the IV + auth tag + data length + crc16
|
|
50
|
+
*/
|
|
51
|
+
FIXED_OVERHEAD_SIZE: number;
|
|
52
|
+
/**
|
|
53
|
+
* Length of the data length
|
|
54
|
+
*/
|
|
55
|
+
DATA_LENGTH_SIZE: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* ECIES multiple recipient
|
|
59
|
+
*/
|
|
60
|
+
MULTIPLE: {
|
|
61
|
+
/**
|
|
62
|
+
* Length of the IV + auth tag + data length + recipient count for the overall message
|
|
63
|
+
*/
|
|
64
|
+
FIXED_OVERHEAD_SIZE: number;
|
|
65
|
+
/**
|
|
66
|
+
* Length of the encrypted key for each recipient
|
|
67
|
+
*/
|
|
68
|
+
ENCRYPTED_KEY_SIZE: number;
|
|
69
|
+
/**
|
|
70
|
+
* Maximum number of recipients for a single message
|
|
71
|
+
* This is limited by the size of the value used to store the recipient count in the header
|
|
72
|
+
*/
|
|
73
|
+
MAX_RECIPIENTS: number;
|
|
74
|
+
/**
|
|
75
|
+
* Length of the recipient ID
|
|
76
|
+
*/
|
|
77
|
+
RECIPIENT_ID_SIZE: number;
|
|
78
|
+
/**
|
|
79
|
+
* Length of the recipient count
|
|
80
|
+
*/
|
|
81
|
+
RECIPIENT_COUNT_SIZE: number;
|
|
82
|
+
/**
|
|
83
|
+
* Length of the data length
|
|
84
|
+
*/
|
|
85
|
+
DATA_LENGTH_SIZE: number;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=ecies-consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecies-consts.d.ts","sourceRoot":"","sources":["../../src/interfaces/ecies-consts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IAEnB,qDAAqD;IACrD,2BAA2B,EAAE,MAAM,CAAC;IAEpC,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IAEvB,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC;IAE9B,wDAAwD;IACxD,iBAAiB,EAAE,MAAM,CAAC;IAE1B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,0EAA0E;IAC1E,iBAAiB,EAAE,MAAM,CAAC;IAE1B,mDAAmD;IACnD,SAAS,EAAE;QACT,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B,MAAM,EAAE;QACN;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAC5B;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF;;OAEG;IACH,MAAM,EAAE;QACN;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAC5B;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF;;OAEG;IACH,QAAQ,EAAE;QACR;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAC5B;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;;WAGG;QACH,cAAc,EAAE,MAAM,CAAC;QACvB;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAC1B;;WAEG;QACH,oBAAoB,EAAE,MAAM,CAAC;QAC7B;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecies-consts.js","sourceRoot":"","sources":["../../src/interfaces/ecies-consts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IEncryptionConsts {
|
|
2
|
+
/**
|
|
3
|
+
* The size of the encryption type in bytes
|
|
4
|
+
*/
|
|
5
|
+
ENCRYPTION_TYPE_SIZE: number;
|
|
6
|
+
/**
|
|
7
|
+
* The size of the recipient ID in bytes
|
|
8
|
+
*/
|
|
9
|
+
RECIPIENT_ID_SIZE: number;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=encryption-consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encryption-consts.d.ts","sourceRoot":"","sources":["../../src/interfaces/encryption-consts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encryption-consts.js","sourceRoot":"","sources":["../../src/interfaces/encryption-consts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fec-consts.d.ts","sourceRoot":"","sources":["../../src/interfaces/fec-consts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fec-consts.js","sourceRoot":"","sources":["../../src/interfaces/fec-consts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './authenticated-cipher';
|
|
2
|
+
export * from './authenticated-decipher';
|
|
3
|
+
export * from './checksum-config';
|
|
4
|
+
export * from './checksum-consts';
|
|
5
|
+
export * from './fec-consts';
|
|
6
|
+
export * from './keypair-buffer-with-un-encrypted-private-key';
|
|
7
|
+
export * from './keyring-consts';
|
|
8
|
+
export * from './member-operational';
|
|
9
|
+
export * from './pbkdf-profiles';
|
|
10
|
+
export * from './signing-key-private-key-info';
|
|
11
|
+
export * from './simple-keypair';
|
|
12
|
+
export * from './simple-keypair-buffer';
|
|
13
|
+
export * from './simple-public-key-only';
|
|
14
|
+
export * from './simple-public-key-only-buffer';
|
|
15
|
+
export * from './single-encrypted-parsed-header';
|
|
16
|
+
export * from './wallet-seed';
|
|
17
|
+
export * from './wrapped-key-consts';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './authenticated-cipher';
|
|
2
|
+
export * from './authenticated-decipher';
|
|
3
|
+
export * from './checksum-config';
|
|
4
|
+
export * from './checksum-consts';
|
|
5
|
+
export * from './fec-consts';
|
|
6
|
+
export * from './keypair-buffer-with-un-encrypted-private-key';
|
|
7
|
+
export * from './keyring-consts';
|
|
8
|
+
export * from './member-operational';
|
|
9
|
+
export * from './pbkdf-profiles';
|
|
10
|
+
export * from './signing-key-private-key-info';
|
|
11
|
+
export * from './simple-keypair';
|
|
12
|
+
export * from './simple-keypair-buffer';
|
|
13
|
+
export * from './simple-public-key-only';
|
|
14
|
+
export * from './simple-public-key-only-buffer';
|
|
15
|
+
export * from './single-encrypted-parsed-header';
|
|
16
|
+
export * from './wallet-seed';
|
|
17
|
+
export * from './wrapped-key-consts';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ISimplePublicKeyOnlyBuffer } from './simple-public-key-only-buffer';
|
|
2
|
+
export interface IKeyPairBufferWithUnEncryptedPrivateKey extends ISimplePublicKeyOnlyBuffer {
|
|
3
|
+
publicKey: Buffer;
|
|
4
|
+
privateKey: Buffer;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=keypair-buffer-with-un-encrypted-private-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keypair-buffer-with-un-encrypted-private-key.d.ts","sourceRoot":"","sources":["../../src/interfaces/keypair-buffer-with-un-encrypted-private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,WAAW,uCACf,SAAQ,0BAA0B;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keypair-buffer-with-un-encrypted-private-key.js","sourceRoot":"","sources":["../../src/interfaces/keypair-buffer-with-un-encrypted-private-key.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyring-consts.d.ts","sourceRoot":"","sources":["../../src/interfaces/keyring-consts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
|