@digitaldefiance/node-ecies-lib 1.1.3 → 1.1.5
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 +118 -249
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/i18n/ecies-i18n-factory.d.ts +16 -3
- package/dist/i18n/ecies-i18n-factory.d.ts.map +1 -1
- package/dist/i18n/ecies-i18n-factory.js +177 -60
- package/dist/i18n/ecies-i18n-factory.js.map +1 -1
- package/dist/member.d.ts +1 -1
- package/dist/member.d.ts.map +1 -1
- package/dist/member.js +2 -2
- package/dist/member.js.map +1 -1
- package/dist/services/aes-gcm.d.ts.map +1 -1
- package/dist/services/aes-gcm.js +5 -3
- package/dist/services/aes-gcm.js.map +1 -1
- package/dist/services/ecies/crypto-core.d.ts.map +1 -1
- package/dist/services/ecies/crypto-core.js +9 -5
- package/dist/services/ecies/crypto-core.js.map +1 -1
- package/dist/services/ecies/service.d.ts.map +1 -1
- package/dist/services/ecies/service.js +4 -3
- package/dist/services/ecies/service.js.map +1 -1
- package/dist/services/ecies/single-recipient.d.ts.map +1 -1
- package/dist/services/ecies/single-recipient.js +9 -5
- package/dist/services/ecies/single-recipient.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +6 -5
- package/dist/utils.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,55 +1,24 @@
|
|
|
1
1
|
# @digitaldefiance/node-ecies-lib
|
|
2
2
|
|
|
3
|
-
A Node.js-specific implementation of the Digital Defiance ECIES (Elliptic Curve Integrated Encryption Scheme) library, providing secure encryption, decryption, and key management capabilities using Node.js crypto primitives.
|
|
3
|
+
A Node.js-specific implementation of the Digital Defiance ECIES (Elliptic Curve Integrated Encryption Scheme) library, providing secure encryption, decryption, and key management capabilities using Node.js crypto primitives. This package is designed to be binary compatible with the browser-based `@digitaldefiance/ecies-lib`, enabling seamless cross-platform cryptographic operations.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **ECIES Encryption/Decryption**: Secure elliptic curve integrated encryption scheme
|
|
8
|
-
- **Multi-recipient Encryption**: Encrypt data for multiple recipients simultaneously
|
|
9
|
-
- **PBKDF2 Key Derivation**: Password-based key derivation with configurable profiles
|
|
10
|
-
- **Digital Signatures**: Sign and verify data using elliptic curve cryptography
|
|
7
|
+
- **ECIES Encryption/Decryption**: Secure elliptic curve integrated encryption scheme using Node.js crypto primitives.
|
|
8
|
+
- **Multi-recipient Encryption**: Encrypt data for multiple recipients simultaneously with efficient handling.
|
|
9
|
+
- **PBKDF2 Key Derivation**: Password-based key derivation with multiple configurable security profiles.
|
|
10
|
+
- **Digital Signatures**: Sign and verify data using elliptic curve cryptography.
|
|
11
|
+
- **Secure Memory Management**: Uses `SecureBuffer` and `SecureString` for sensitive data to ensure zeroization and protection.
|
|
12
|
+
- **Runtime Configuration Registry**: Centralized, immutable constants with runtime override capabilities for advanced customization.
|
|
13
|
+
- **Plugin-Based Internationalization (i18n)**: Full support for multi-language translations with type-safe, plugin-based architecture.
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## Binary Compatibility
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
This package is intended to be fully binary compatible with the browser-based `@digitaldefiance/ecies-lib`. This means:
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
- **Multi-Language Support**: Built-in translations for English, French, Spanish, German, Chinese, Japanese, and Ukrainian
|
|
20
|
-
- **Type-Safe Translation Calls**: Full TypeScript support with compile-time validation
|
|
21
|
-
- **Automatic Fallback**: Intelligent fallback to default language for missing translations
|
|
22
|
-
- **Custom Engine Support**: Use your own plugin engine instance or let the library manage it automatically
|
|
23
|
-
|
|
24
|
-
### Advanced Usage
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
import {
|
|
28
|
-
getEciesPluginI18nEngine,
|
|
29
|
-
getNodeEciesTranslation,
|
|
30
|
-
NodeEciesStringKey
|
|
31
|
-
} from '@digitaldefiance/node-ecies-lib';
|
|
32
|
-
import { CoreLanguage } from '@digitaldefiance/i18n-lib';
|
|
33
|
-
|
|
34
|
-
// Get the plugin engine instance
|
|
35
|
-
const engine = getEciesPluginI18nEngine();
|
|
36
|
-
|
|
37
|
-
// Use component-based translations
|
|
38
|
-
const errorMessage = getNodeEciesTranslation(
|
|
39
|
-
NodeEciesStringKey.Error_LengthError_LengthIsInvalidType,
|
|
40
|
-
{},
|
|
41
|
-
CoreLanguage.Spanish
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
// Switch languages globally
|
|
45
|
-
engine.setLanguage(CoreLanguage.French);
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Member
|
|
49
|
-
|
|
50
|
-
Member management with wallet integration:
|
|
51
|
-
|
|
52
|
-
- **Cross-platform Compatibility**: Works seamlessly with the browser-based `@digitaldefiance/ecies-lib`
|
|
19
|
+
- Data encrypted in the browser can be decrypted in Node.js and vice versa.
|
|
20
|
+
- Cryptographic primitives and data formats are consistent across environments.
|
|
21
|
+
- Enables cross-platform secure communication and data handling.
|
|
53
22
|
|
|
54
23
|
## Installation
|
|
55
24
|
|
|
@@ -59,20 +28,14 @@ npm install @digitaldefiance/node-ecies-lib
|
|
|
59
28
|
|
|
60
29
|
## Quick Start
|
|
61
30
|
|
|
62
|
-
###
|
|
31
|
+
### Plugin-Based Architecture (Recommended)
|
|
63
32
|
|
|
64
33
|
```typescript
|
|
65
34
|
import { ECIESService, Member, MemberType, EmailString } from '@digitaldefiance/node-ecies-lib';
|
|
66
35
|
|
|
67
|
-
// Initialize the service
|
|
36
|
+
// Initialize the ECIES service (automatic i18n setup)
|
|
68
37
|
const eciesService = new ECIESService();
|
|
69
38
|
|
|
70
|
-
// Or with configuration
|
|
71
|
-
const eciesServiceWithConfig = new ECIESService({
|
|
72
|
-
curveName: 'secp256k1',
|
|
73
|
-
symmetricAlgorithm: 'aes-256-gcm'
|
|
74
|
-
});
|
|
75
|
-
|
|
76
39
|
// Create a new member
|
|
77
40
|
const { member, mnemonic } = Member.newMember(
|
|
78
41
|
eciesService,
|
|
@@ -85,7 +48,7 @@ const { member, mnemonic } = Member.newMember(
|
|
|
85
48
|
const message = 'Hello, secure world!';
|
|
86
49
|
const encrypted = member.encryptData(message);
|
|
87
50
|
|
|
88
|
-
// Decrypt data
|
|
51
|
+
// Decrypt data
|
|
89
52
|
const decrypted = member.decryptData(encrypted);
|
|
90
53
|
console.log(decrypted.toString()); // "Hello, secure world!"
|
|
91
54
|
```
|
|
@@ -98,149 +61,99 @@ import { ECIESService, Member, MemberType, EmailString, getEciesPluginI18nEngine
|
|
|
98
61
|
// Initialize the service with explicit i18n engine
|
|
99
62
|
const eciesService = new ECIESService(getEciesPluginI18nEngine());
|
|
100
63
|
|
|
101
|
-
//
|
|
64
|
+
// Usage remains the same...
|
|
102
65
|
```
|
|
103
66
|
|
|
104
67
|
## Core Components
|
|
105
68
|
|
|
106
69
|
### ECIESService
|
|
107
70
|
|
|
108
|
-
The main service class providing encryption, decryption, and
|
|
109
|
-
|
|
110
|
-
```typescript
|
|
111
|
-
import { ECIESService } from '@digitaldefiance/node-ecies-lib';
|
|
112
|
-
|
|
113
|
-
// 🆕 Plugin-based architecture - automatic i18n setup
|
|
114
|
-
const service = new ECIESService();
|
|
115
|
-
|
|
116
|
-
// Or with explicit plugin engine (advanced usage)
|
|
117
|
-
import { getEciesPluginI18nEngine } from '@digitaldefiance/node-ecies-lib';
|
|
118
|
-
const serviceWithExplicitEngine = new ECIESService(getEciesPluginI18nEngine());
|
|
71
|
+
The main service class providing encryption, decryption, key management, and mnemonic generation:
|
|
119
72
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// Single recipient encryption
|
|
124
|
-
const encrypted = service.encryptSimpleOrSingle(
|
|
125
|
-
false, // use single mode (not simple)
|
|
126
|
-
recipientPublicKey,
|
|
127
|
-
Buffer.from('message')
|
|
128
|
-
);
|
|
73
|
+
- Supports single and multi-recipient encryption modes.
|
|
74
|
+
- Provides signing and verification of data.
|
|
75
|
+
- Integrates with plugin-based i18n for error messages and logs.
|
|
129
76
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
)
|
|
135
|
-
|
|
77
|
+
Detailed API:
|
|
78
|
+
- `constructor(engine?: PluginI18nEngine)`: Initializes the service; if no engine is provided, an internal plugin-based i18n engine is used.
|
|
79
|
+
- `generateNewMnemonic(): SecureString`: Generates a new mnemonic phrase compliant with BIP39 for secure key generation.
|
|
80
|
+
- `walletAndSeedFromMnemonic(mnemonic: SecureString): { wallet: Wallet; seed: Buffer }`: Derives an Ethereum wallet instance and raw seed buffer from a mnemonic.
|
|
81
|
+
- `encryptSimpleOrSingle(simple: boolean, publicKey: Buffer, data: Buffer): Buffer`: Encrypts data in simple (headerless) or single-recipient (with header) ECIES mode.
|
|
82
|
+
- `encryptMultiple(members: Member[], data: Buffer): Buffer`: Encrypts the same payload for multiple recipients efficiently, producing a combined ciphertext.
|
|
83
|
+
- `decryptSimpleOrSingleWithHeader(simple: boolean, privateKey: Buffer, encryptedData: Buffer): Buffer`: Decrypts data encrypted by `encryptSimpleOrSingle` in either mode, returning the original plaintext.
|
|
84
|
+
- `signMessage(privateKey: Buffer, data: Buffer): SignatureBuffer`: Creates a deterministic signature over a message using the provided private key.
|
|
85
|
+
- `verifyMessage(publicKey: Buffer, data: Buffer, signature: SignatureBuffer): boolean`: Validates a signature against the original data and signer’s public key.
|
|
86
|
+
- `deriveKeyFromPassword(password: Buffer, salt: Buffer, iterations: number, saltBytes: number, hashBytes: number, algorithm: string): ChecksumBuffer`: Delegates to PBKDF2 service for synchronous key derivation.
|
|
87
|
+
- `deriveKeyFromPasswordAsync(password: Buffer, salt: Buffer, iterations: number, saltBytes: number, hashBytes: number, algorithm: string): Promise<ChecksumBuffer>`: Async version of key derivation to avoid blocking the event loop.
|
|
136
88
|
|
|
137
89
|
### Member Class
|
|
138
90
|
|
|
139
|
-
Represents a
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
91
|
+
Represents a cryptographic member with capabilities to:
|
|
92
|
+
|
|
93
|
+
- Manage keys and wallets securely.
|
|
94
|
+
- Sign and verify data.
|
|
95
|
+
- Encrypt and decrypt data for self or other members.
|
|
96
|
+
- Serialize and deserialize member data to/from JSON.
|
|
97
|
+
- Create new members from mnemonics or generate new ones.
|
|
98
|
+
|
|
99
|
+
Core methods and behaviors:
|
|
100
|
+
- `new Member(...)`: Constructs with injected `ECIESService`, type, name, email, public key, and optional private key, wallet, IDs, and timestamps.
|
|
101
|
+
- `loadWallet(mnemonic: SecureString)`: Loads wallet and private key from mnemonic; verifies public key integrity.
|
|
102
|
+
- `loadPrivateKey(privateKey: SecureBuffer)`: Imports a raw private key into the member instance.
|
|
103
|
+
- `sign(data: Buffer): SignatureBuffer`: Signs arbitrary data buffer; throws if private key is missing.
|
|
104
|
+
- `verify(signature: SignatureBuffer, data: Buffer): boolean`: Verifies a signature against the member’s public key.
|
|
105
|
+
- `encryptData(data: string | Buffer, recipientPublicKey?: Buffer): Buffer`: Encrypts data for the specified public key or self.
|
|
106
|
+
- `decryptData(encryptedData: Buffer): Buffer`: Decrypts ciphertext using the member’s private key.
|
|
107
|
+
- `toJson(): string`: Serializes member operational data (IDs, keys, timestamps) into a JSON string.
|
|
108
|
+
- `dispose(): void`: Securely zeroizes and unloads private key and wallet from memory.
|
|
109
|
+
- Static factory methods:
|
|
110
|
+
- `Member.fromJson(json: string, eciesService: ECIESService)`: Recreates a member from stored JSON.
|
|
111
|
+
- `Member.fromMnemonic(mnemonic: SecureString, eciesService: ECIESService, memberType?, name?, email?)`: Builds a member directly from a mnemonic.
|
|
112
|
+
- `Member.newMember(eciesService: ECIESService, type, name, email, forceMnemonic?, createdBy?)`: Generates a new random member with mnemonic and returns both.
|
|
156
113
|
|
|
157
114
|
### PBKDF2 Service
|
|
158
115
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { Pbkdf2Service, Pbkdf2ProfileEnum } from '@digitaldefiance/node-ecies-lib';
|
|
163
|
-
|
|
164
|
-
// Use predefined profile
|
|
165
|
-
const result = Pbkdf2Service.deriveKeyFromPasswordWithProfile(
|
|
166
|
-
Buffer.from('password'),
|
|
167
|
-
Pbkdf2ProfileEnum.USER_LOGIN
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
// Custom parameters
|
|
171
|
-
const customResult = Pbkdf2Service.deriveKeyFromPassword(
|
|
172
|
-
Buffer.from('password'),
|
|
173
|
-
salt,
|
|
174
|
-
100000, // iterations
|
|
175
|
-
32, // salt bytes
|
|
176
|
-
32, // key bytes
|
|
177
|
-
'sha256' // algorithm
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
// Async version
|
|
181
|
-
const asyncResult = await Pbkdf2Service.deriveKeyFromPasswordAsync(
|
|
182
|
-
Buffer.from('password')
|
|
183
|
-
);
|
|
184
|
-
```
|
|
116
|
+
Provides password-based key derivation with multiple predefined profiles optimized for different security and performance needs:
|
|
185
117
|
|
|
186
|
-
|
|
118
|
+
| Profile | Salt Size | Iterations | Algorithm | Hash Size | Use Case |
|
|
119
|
+
|---------------|-----------|------------|-----------|-----------|---------------------|
|
|
120
|
+
| USER_LOGIN | 32 bytes | 1,304,000 | SHA-256 | 32 bytes | User authentication |
|
|
121
|
+
| KEY_WRAPPING | 32 bytes | 100,000 | SHA-256 | 32 bytes | Key encryption |
|
|
122
|
+
| BACKUP_CODES | 32 bytes | 1,304,000 | SHA-256 | 32 bytes | Backup codes |
|
|
123
|
+
| HIGH_SECURITY | 64 bytes | 2,000,000 | SHA-512 | 64 bytes | Sensitive operations|
|
|
124
|
+
| TEST_FAST | 16 bytes | 500 | SHA-256 | 32 bytes | Testing/development |
|
|
187
125
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
| `HIGH_SECURITY` | 64 bytes | 2,000,000 | SHA-512 | 64 bytes | Sensitive operations |
|
|
196
|
-
| `TEST_FAST` | 16 bytes | 1,000 | SHA-256 | 32 bytes | Testing/development |
|
|
126
|
+
Detailed API:
|
|
127
|
+
- `deriveKeyFromPassword(password: Buffer, salt: Buffer, iterations: number, saltBytes: number, hashBytes: number, algorithm: string): ChecksumBuffer`: Synchronously derives a key using PBKDF2 with specified parameters.
|
|
128
|
+
- `deriveKeyFromPasswordAsync(password: Buffer, salt: Buffer, iterations: number, saltBytes: number, hashBytes: number, algorithm: string): Promise<ChecksumBuffer>`: Async implementation of PBKDF2 for non-blocking operation.
|
|
129
|
+
- `deriveKeyFromPasswordWithProfile(password: Buffer, profile: Pbkdf2ProfileEnum): ChecksumBuffer`: Convenience method to derive a key using a predefined profile.
|
|
130
|
+
- `deriveKeyFromPasswordWithProfileAsync(password: Buffer, profile: Pbkdf2ProfileEnum): Promise<ChecksumBuffer>`: Async version of profile-based derivation.
|
|
131
|
+
- `generateSalt(bytes: number = 32): Buffer`: Utility to generate cryptographically secure random salt of specified length.
|
|
132
|
+
- `getDefaultProfile(profile: Pbkdf2ProfileEnum): IPbkdf2Consts`: Retrieves constant parameters for a given profile.
|
|
197
133
|
|
|
198
134
|
## Encryption Types
|
|
199
135
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- **Simple**: Basic ECIES encryption for single recipients
|
|
203
|
-
- **Single**: Enhanced ECIES with additional metadata
|
|
204
|
-
- **Multiple**: Efficient encryption for multiple recipients
|
|
136
|
+
Supports multiple encryption modes:
|
|
205
137
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
false, // single mode
|
|
210
|
-
recipientPublicKey,
|
|
211
|
-
message
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
// Multiple recipients
|
|
215
|
-
const multiEncrypted = service.encryptMultiple(
|
|
216
|
-
[member1, member2, member3],
|
|
217
|
-
message
|
|
218
|
-
);
|
|
219
|
-
```
|
|
138
|
+
- **Simple**: Basic ECIES encryption for single recipients.
|
|
139
|
+
- **Single**: Enhanced ECIES with additional metadata.
|
|
140
|
+
- **Multiple**: Efficient encryption for multiple recipients.
|
|
220
141
|
|
|
221
142
|
## Cross-Platform Compatibility
|
|
222
143
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
```typescript
|
|
226
|
-
// Data encrypted in browser can be decrypted in Node.js
|
|
227
|
-
const browserEncrypted = /* data from browser */;
|
|
228
|
-
const nodeDecrypted = nodeMember.decryptData(browserEncrypted);
|
|
144
|
+
Designed to work seamlessly with the browser-based `@digitaldefiance/ecies-lib`:
|
|
229
145
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
// Send nodeEncrypted to browser for decryption
|
|
233
|
-
```
|
|
146
|
+
- Data encrypted in the browser can be decrypted in Node.js.
|
|
147
|
+
- Data encrypted in Node.js can be decrypted in the browser.
|
|
234
148
|
|
|
235
149
|
## Security Features
|
|
236
150
|
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
- **Error Handling**: Detailed error types for debugging and security analysis
|
|
151
|
+
- Secure memory management with zeroization of sensitive data.
|
|
152
|
+
- Configurable security levels via PBKDF2 profiles.
|
|
153
|
+
- Comprehensive input validation and error handling.
|
|
154
|
+
- Detailed error types with plugin-based i18n support for localization.
|
|
242
155
|
|
|
243
|
-
##
|
|
156
|
+
## Runtime Configuration Registry
|
|
244
157
|
|
|
245
158
|
This package uses a runtime configuration registry for all constants and cryptographic parameters. You can override defaults at runtime for advanced use cases:
|
|
246
159
|
|
|
@@ -260,14 +173,7 @@ registerNodeRuntimeConfiguration(customKey, { PBKDF2: { ALGORITHM: 'sha512' } })
|
|
|
260
173
|
const customConfig = getNodeRuntimeConfiguration(customKey);
|
|
261
174
|
```
|
|
262
175
|
|
|
263
|
-
All constants are immutable and accessible via the registry/config API. See `src/constants.ts`
|
|
264
|
-
|
|
265
|
-
## 🏛️ Architectural Conventions
|
|
266
|
-
|
|
267
|
-
- Centralized constants file
|
|
268
|
-
- Immutability via Object.freeze
|
|
269
|
-
- Registry/config pattern for runtime overrides
|
|
270
|
-
- Type-safe interfaces for all config objects
|
|
176
|
+
All constants are immutable and accessible via the registry/config API. See `src/constants.ts` for details.
|
|
271
177
|
|
|
272
178
|
## API Reference
|
|
273
179
|
|
|
@@ -284,12 +190,12 @@ const keyWrappingProfile = Constants.PBKDF2_PROFILES.KEY_WRAPPING;
|
|
|
284
190
|
|
|
285
191
|
### Interfaces
|
|
286
192
|
|
|
287
|
-
Key interfaces for type safety:
|
|
193
|
+
Key interfaces for type safety include:
|
|
288
194
|
|
|
289
|
-
- `IPbkdf2Result`: Result of key derivation operations
|
|
290
|
-
- `IMultiEncryptedMessage`: Multi-recipient encrypted data structure
|
|
291
|
-
- `IMemberOperational`: Member interface with operational methods
|
|
292
|
-
- `IWalletSeed`: Wallet and seed information
|
|
195
|
+
- `IPbkdf2Result`: Result of key derivation operations.
|
|
196
|
+
- `IMultiEncryptedMessage`: Multi-recipient encrypted data structure.
|
|
197
|
+
- `IMemberOperational`: Member interface with operational methods.
|
|
198
|
+
- `IWalletSeed`: Wallet and seed information.
|
|
293
199
|
|
|
294
200
|
## Testing
|
|
295
201
|
|
|
@@ -306,14 +212,14 @@ npm test -- ecies-compatibility.e2e.spec.ts
|
|
|
306
212
|
|
|
307
213
|
Test categories:
|
|
308
214
|
|
|
309
|
-
- Unit tests for individual components
|
|
310
|
-
- Integration tests for cross-component functionality
|
|
311
|
-
- End-to-end tests for complete workflows
|
|
312
|
-
- Cross-platform compatibility tests
|
|
215
|
+
- Unit tests for individual components.
|
|
216
|
+
- Integration tests for cross-component functionality.
|
|
217
|
+
- End-to-end tests for complete workflows.
|
|
218
|
+
- Cross-platform compatibility tests.
|
|
313
219
|
|
|
314
220
|
## Error Handling
|
|
315
221
|
|
|
316
|
-
|
|
222
|
+
Detailed error types for different failure scenarios with localization support:
|
|
317
223
|
|
|
318
224
|
```typescript
|
|
319
225
|
import { Pbkdf2Error, Pbkdf2ErrorType, MemberError, MemberErrorType } from '@digitaldefiance/node-ecies-lib';
|
|
@@ -331,9 +237,9 @@ try {
|
|
|
331
237
|
|
|
332
238
|
## Performance Considerations
|
|
333
239
|
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
240
|
+
- Use async PBKDF2 operations to avoid blocking the event loop.
|
|
241
|
+
- Dispose of members and secure buffers when no longer needed.
|
|
242
|
+
- Select appropriate PBKDF2 profiles based on security vs. performance requirements.
|
|
337
243
|
|
|
338
244
|
```typescript
|
|
339
245
|
// Use async for better performance
|
|
@@ -354,104 +260,67 @@ Please read the contributing guidelines in the main repository.
|
|
|
354
260
|
|
|
355
261
|
## Related Packages
|
|
356
262
|
|
|
357
|
-
- `@digitaldefiance/ecies-lib`: Browser-compatible ECIES library
|
|
358
|
-
- `@digitaldefiance/i18n-lib`: Internationalization support
|
|
263
|
+
- `@digitaldefiance/ecies-lib`: Browser-compatible ECIES library.
|
|
264
|
+
- `@digitaldefiance/i18n-lib`: Internationalization support.
|
|
359
265
|
|
|
360
266
|
## ChangeLog
|
|
361
267
|
|
|
362
|
-
### Version 1.1.
|
|
363
|
-
|
|
364
|
-
#### New Features:
|
|
365
|
-
|
|
366
|
-
- Added createTranslationAdapter utility in i18n-lib to bridge PluginI18nEngine and TranslationEngine interfaces
|
|
367
|
-
|
|
368
|
-
- Generic adapter pattern now standard across monorepo for translation engine compatibility
|
|
369
|
-
|
|
370
|
-
- Bug Fixes:
|
|
371
|
-
|
|
372
|
-
- Resolved 53 TypeScript compilation errors in node-ecies-lib caused by interface type mismatches
|
|
268
|
+
### Version 1.1.5
|
|
373
269
|
|
|
374
|
-
|
|
270
|
+
- Updated readme and ecies lib dependency
|
|
375
271
|
|
|
376
|
-
|
|
272
|
+
### Version 1.1.4
|
|
377
273
|
|
|
378
|
-
|
|
274
|
+
- Added more translation strings to errors and bumped i18n/ecies libs.
|
|
379
275
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
- Improved error handling with fallback to key string in translation adapter
|
|
383
|
-
|
|
384
|
-
- Testing:
|
|
385
|
-
|
|
386
|
-
- Added 89 comprehensive tests (19 in i18n-lib, 70 in node-ecies-lib) with 100% pass rate
|
|
387
|
-
|
|
388
|
-
- Implemented withConsoleMocks helper to suppress expected console warnings in tests
|
|
389
|
-
|
|
390
|
-
- Cleaned up test output by muting intentional error scenarios
|
|
391
|
-
|
|
392
|
-
- Internal:
|
|
393
|
-
|
|
394
|
-
- Refactored ecies-i18n-factory to leverage new adapter pattern
|
|
276
|
+
### Version 1.1.3
|
|
395
277
|
|
|
396
|
-
|
|
278
|
+
- Added createTranslationAdapter utility in i18n-lib to bridge PluginI18nEngine and TranslationEngine interfaces.
|
|
279
|
+
- Fixed multiple TypeScript compilation errors and improved type safety.
|
|
280
|
+
- Added comprehensive tests with 100% pass rate.
|
|
397
281
|
|
|
398
282
|
### Version 1.1.1
|
|
399
283
|
|
|
400
|
-
-
|
|
401
|
-
- Fix pbkdf2 service engine typing
|
|
284
|
+
- Fixed pbkdf2 service engine typing.
|
|
402
285
|
|
|
403
286
|
### Version 1.1.0
|
|
404
287
|
|
|
405
|
-
-
|
|
406
|
-
- Update i18n and ecies lib versions
|
|
288
|
+
- Updated i18n and ecies lib versions.
|
|
407
289
|
|
|
408
290
|
### Version 1.0.13
|
|
409
291
|
|
|
410
|
-
-
|
|
411
|
-
- Bump version of ecies lib
|
|
292
|
+
- Bumped version of ecies lib.
|
|
412
293
|
|
|
413
294
|
### Version 1.0.12
|
|
414
295
|
|
|
415
|
-
-
|
|
416
|
-
- Bump versions of i18n/ecies libs
|
|
296
|
+
- Bumped versions of i18n/ecies libs.
|
|
417
297
|
|
|
418
298
|
### Version 1.0.11
|
|
419
299
|
|
|
420
|
-
-
|
|
421
|
-
- Bump versions of i18n/ecies libs
|
|
300
|
+
- Bumped versions of i18n/ecies libs.
|
|
422
301
|
|
|
423
302
|
### Version 1.0.10
|
|
424
303
|
|
|
425
|
-
-
|
|
426
|
-
- Bump versions of i18n/ecies libs
|
|
304
|
+
- Bumped versions of i18n/ecies libs.
|
|
427
305
|
|
|
428
306
|
### Version 1.0.8
|
|
429
307
|
|
|
430
|
-
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
- Update @digitaldefiance/ecies-lib dependency to 1.0.26
|
|
434
|
-
- Implement runtime configuration system with node-specific defaults
|
|
435
|
-
- Add PBKDF2 profile enum alignment and configuration overrides
|
|
436
|
-
- Remove obsolete AES-GCM E2E test file
|
|
437
|
-
- Update changelog for version 1.0.8
|
|
308
|
+
- Upgraded to ecies-lib 1.0.26 with runtime configuration system.
|
|
309
|
+
- Implemented runtime configuration system with node-specific defaults.
|
|
310
|
+
- Added PBKDF2 profile enum alignment and configuration overrides.
|
|
438
311
|
|
|
439
312
|
### Version 1.0.6
|
|
440
313
|
|
|
441
|
-
-
|
|
442
|
-
- Improved constants inheritance and froze objects
|
|
314
|
+
- Improved constants inheritance and froze objects.
|
|
443
315
|
|
|
444
316
|
### Version 1.0.5
|
|
445
317
|
|
|
446
|
-
-
|
|
447
|
-
- Used latest cleanup code from i18n library and updated dependencies
|
|
318
|
+
- Used latest cleanup code from i18n library and updated dependencies.
|
|
448
319
|
|
|
449
320
|
### Version 1.0.4
|
|
450
321
|
|
|
451
|
-
-
|
|
452
|
-
- Added plugin-based internationalization architecture with `@digitaldefiance/i18n-lib`
|
|
322
|
+
- Added plugin-based internationalization architecture with `@digitaldefiance/i18n-lib`.
|
|
453
323
|
|
|
454
324
|
### Version 1.0.3
|
|
455
325
|
|
|
456
|
-
-
|
|
457
|
-
- Initial release
|
|
326
|
+
- Initial release.
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,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;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,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;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,eAE1C,CAAC;AAEF,KAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC3E,KAAK,oBAAoB,GAAG,UAAU,CACpC,OAAO,4BAA4B,CACpC,CAAC,CAAC,CAAC,CAAC;AAEL,eAAO,MAAM,uBAAuB,EAAE,oBAIpC,CAAC;AAOH,wBAAgB,2BAA2B,IAAI,wBAAwB,CAEtE;AAED,wBAAgB,gCAAgC,CAC9C,iBAAiB,CAAC,EAAE,oBAAoB,GAAG,wBAAwB,EACnE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,GAC3D,wBAAwB,CAO1B;AAED,eAAO,MAAM,QAAQ,EAAE,eAA0C,CAAC;AAElE,eAAO,MAAM,OAAO,EAAE,cAIX,CAAC;AAEZ,eAAO,MAAM,MAAM,EAAE,aAAsC,CAAC;AAQ5D,eAAO,MAAM,eAAe,EAAE,aAwCnB,CAAC;AAEZ,eAAO,MAAM,WAAW,EAAE,iBAKf,CAAC;AAEZ,eAAO,MAAM,+BAA+B,EACoB,cAAc,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,iBAGd,CAAC;AAGZ,eAAO,MAAM,SAAS,EAAE,UAoCb,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Constants as BaseConstants, GUID_SIZE, registerRuntimeConfiguration, } from '@digitaldefiance/ecies-lib';
|
|
2
2
|
import { ObjectId } from 'mongodb';
|
|
3
3
|
import { Pbkdf2ProfileEnum as NodePbkdf2ProfileEnum } from './enumerations/pbkdf2-profile';
|
|
4
|
+
import { getEciesPluginI18nEngine, NodeEciesStringKey } from './i18n';
|
|
4
5
|
/**
|
|
5
6
|
* Constants for checksum operations
|
|
6
7
|
* These values are critical for data integrity and MUST NOT be changed
|
|
@@ -127,7 +128,8 @@ export const Constants = Object.freeze({
|
|
|
127
128
|
});
|
|
128
129
|
if (CHECKSUM.SHA3_BUFFER_LENGTH !== CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8 ||
|
|
129
130
|
CHECKSUM.SHA3_BUFFER_LENGTH !== CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8) {
|
|
130
|
-
|
|
131
|
+
const pluginEngine = getEciesPluginI18nEngine();
|
|
132
|
+
throw new Error(pluginEngine.translate('node-engine', NodeEciesStringKey.Error_InvalidChecksumConstants));
|
|
131
133
|
}
|
|
132
134
|
if (objectIdLength !== 12) {
|
|
133
135
|
console.warn('ObjectID length may have changed, breaking encryption', objectIdLength);
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,SAAS,EAGT,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOnC,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,SAAS,EAGT,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOnC,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,GAAG,CACtD,qCAAqC,CACtC,CAAC;AAOF,MAAM,CAAC,MAAM,uBAAuB,GAAyB,MAAM,CAAC,MAAM,CAAC;IACzE,MAAM,EAAE;QACN,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,IAAI,eAAe,GAA6B,4BAA4B,CAC1E,8BAA8B,EAC9B,uBAAuB,CACxB,CAAC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,gBAAgB,EAAE,cAAc;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM;IACd;;OAEG;IACH,eAAe,EAAE,eAAe;IAChC;;OAEG;IACH,WAAW,EAAE,WAAW;IACxB;;OAEG;IACH,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,OAAO,EAAE,OAAO;IAChB;;OAEG;IACH,UAAU,EAAE,UAAU;IACtB;;OAEG;IACH,+BAA+B,EAAE,+BAA+B;IAChE,aAAa,EAAE,eAAe,CAAC,aAAa;IAC5C,aAAa,EAAE,eAAe,CAAC,aAAa;CACpC,CAAC,CAAC;AAEZ,IACE,QAAQ,CAAC,kBAAkB,KAAK,QAAQ,CAAC,sBAAsB,GAAG,CAAC;IACnE,QAAQ,CAAC,kBAAkB,KAAK,QAAQ,CAAC,sBAAsB,GAAG,CAAC,EACnE,CAAC;IACD,MAAM,YAAY,GAAG,wBAAwB,EAAE,CAAC;IAChD,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,aAAa,EAAE,kBAAkB,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC5G,CAAC;AAED,IAAI,cAAc,KAAK,EAAE,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,CACV,uDAAuD,EACvD,cAAc,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluginI18nEngine, TranslationEngine } from '@digitaldefiance/i18n-lib';
|
|
2
2
|
import { EciesStringKey } from '@digitaldefiance/ecies-lib';
|
|
3
3
|
/**
|
|
4
4
|
* ECIES-specific string keys for the node ECIES library
|
|
@@ -15,6 +15,19 @@ declare enum NodeEciesStringKey {
|
|
|
15
15
|
Error_Member_EncryptionDataTooLarge = "error_member_encryption_data_too_large",
|
|
16
16
|
Error_Member_MissingEmail = "error_member_missing_email",
|
|
17
17
|
Error_Member_InvalidEmailWhitespace = "error_member_invalid_email_whitespace",
|
|
18
|
+
Error_InvalidPublicKey = "error_invalidPublicKey",
|
|
19
|
+
Error_InvalidPublicKeyFormat = "error_invalidPublicKeyFormat",
|
|
20
|
+
Error_MessageLengthExceedsMaximumAllowedSize = "error_messageLengthExceedsMaximumAllowedSize",
|
|
21
|
+
Error_InvalidEncryptionTypeOrNumberOfRecipients = "error_invalidEncryptionTypeOrNumberOfRecipients",
|
|
22
|
+
Error_EncryptedDataLengthMismatch = "error_encryptedDataLengthMismatch",
|
|
23
|
+
Error_EphemeralPublicKeyLengthMismatch = "error_ephemeralPublicKeyLengthMismatch",
|
|
24
|
+
Error_EncryptedDataIsEmpty = "error_encryptedDataIsEmpty",
|
|
25
|
+
Error_CombinedDataTooShort = "error_combinedDataTooShort",
|
|
26
|
+
Error_BufferIsTooShort = "error_bufferIsTooShort",
|
|
27
|
+
Error_BufferIsTooShortToReadFullLengthValue = "error_bufferIsTooShortToReadFullLengthValue",
|
|
28
|
+
Error_LengthExceedsMaximumSafeInteger = "error_lengthExceedsMaximumSafeInteger",
|
|
29
|
+
Error_BufferIsTooShortForDeclaredDataLength = "error_bufferIsTooShortForDeclaredDataLength",
|
|
30
|
+
Error_InvalidChecksumConstants = "error_invalidChecksumConstants",
|
|
18
31
|
Error_Pbkdf2_InvalidSaltLength = "error_pbkdf2_invalid_salt_length",
|
|
19
32
|
Error_Pbkdf2_InvalidHashLength = "error_pbkdf2_invalid_hash_length"
|
|
20
33
|
}
|
|
@@ -22,7 +35,7 @@ declare enum NodeEciesStringKey {
|
|
|
22
35
|
* Create or get the ECIES I18n engine with proper component registration
|
|
23
36
|
* This replaces the legacy getEciesI18nEngine() function
|
|
24
37
|
*/
|
|
25
|
-
export declare function getEciesPluginI18nEngine(): PluginI18nEngine<
|
|
38
|
+
export declare function getEciesPluginI18nEngine(): PluginI18nEngine<string>;
|
|
26
39
|
/**
|
|
27
40
|
* Reset the engine instance (useful for testing)
|
|
28
41
|
*/
|
|
@@ -30,7 +43,7 @@ export declare function resetEciesPluginI18nEngine(): void;
|
|
|
30
43
|
/**
|
|
31
44
|
* Get a translation from the Node ECIES component
|
|
32
45
|
*/
|
|
33
|
-
export declare function getNodeEciesTranslation(key: NodeEciesStringKey, variables?: Record<string, string | number>, language?:
|
|
46
|
+
export declare function getNodeEciesTranslation(key: NodeEciesStringKey, variables?: Record<string, string | number>, language?: string): string;
|
|
34
47
|
/**
|
|
35
48
|
* Create a TranslationEngine adapter for ECIES errors
|
|
36
49
|
* Uses the base ecies-lib's compatible engine which has all EciesStringKey translations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecies-i18n-factory.d.ts","sourceRoot":"","sources":["../../src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ecies-i18n-factory.d.ts","sourceRoot":"","sources":["../../src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,gBAAgB,EAEhB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAA4B,MAAM,4BAA4B,CAAC;AAEtF;;GAEG;AACH,aAAK,kBAAkB;IACrB,qCAAqC,8CAA8C;IAGnF,8BAA8B,qCAAqC;IACnE,wCAAwC,gDAAgD;IACxF,qBAAqB,2BAA2B;IAChD,gCAAgC,uCAAuC;IACvE,4BAA4B,kCAAkC;IAC9D,8BAA8B,qCAAqC;IACnE,kCAAkC,yCAAyC;IAC3E,mCAAmC,2CAA2C;IAC9E,yBAAyB,+BAA+B;IACxD,mCAAmC,0CAA0C;IAC7E,sBAAsB,2BAA2B;IACjD,4BAA4B,iCAAiC;IAC7D,4CAA4C,iDAAiD;IAC7F,+CAA+C,oDAAoD;IACnG,iCAAiC,sCAAsC;IACvE,sCAAsC,2CAA2C;IACjF,0BAA0B,+BAA+B;IACzD,0BAA0B,+BAA+B;IACzD,sBAAsB,2BAA2B;IACjD,2CAA2C,gDAAgD;IAC3F,qCAAqC,0CAA0C;IAC/E,2CAA2C,gDAAgD;IAC3F,8BAA8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