@digitaldefiance/node-ecies-lib 1.1.4 → 1.1.6
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 +120 -251
- package/package.json +2 -2
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();
|
|
71
|
+
The main service class providing encryption, decryption, key management, and mnemonic generation:
|
|
115
72
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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.
|
|
119
76
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const multiEncrypted = service.encryptMultiple(
|
|
132
|
-
[member1, member2, member3],
|
|
133
|
-
Buffer.from('message')
|
|
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,108 +260,71 @@ 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
|
-
- Add more translation strings to errors and bump i18n/ecies libs
|
|
365
|
-
|
|
366
|
-
### Version 1.1.3
|
|
367
|
-
|
|
368
|
-
#### New Features:
|
|
369
|
-
|
|
370
|
-
- Added createTranslationAdapter utility in i18n-lib to bridge PluginI18nEngine and TranslationEngine interfaces
|
|
371
|
-
|
|
372
|
-
- Generic adapter pattern now standard across monorepo for translation engine compatibility
|
|
373
|
-
|
|
374
|
-
- Bug Fixes:
|
|
268
|
+
### Version 1.1.6
|
|
375
269
|
|
|
376
|
-
|
|
270
|
+
- Updated ecies lib
|
|
377
271
|
|
|
378
|
-
|
|
272
|
+
### Version 1.1.5
|
|
379
273
|
|
|
380
|
-
|
|
274
|
+
- Updated readme and ecies lib dependency
|
|
381
275
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
- Enhanced type safety with CoreLanguageCode instead of any for language parameters
|
|
385
|
-
|
|
386
|
-
- Improved error handling with fallback to key string in translation adapter
|
|
387
|
-
|
|
388
|
-
- Testing:
|
|
389
|
-
|
|
390
|
-
- Added 89 comprehensive tests (19 in i18n-lib, 70 in node-ecies-lib) with 100% pass rate
|
|
391
|
-
|
|
392
|
-
- Implemented withConsoleMocks helper to suppress expected console warnings in tests
|
|
393
|
-
|
|
394
|
-
- Cleaned up test output by muting intentional error scenarios
|
|
276
|
+
### Version 1.1.4
|
|
395
277
|
|
|
396
|
-
|
|
278
|
+
- Added more translation strings to errors and bumped i18n/ecies libs.
|
|
397
279
|
|
|
398
|
-
|
|
280
|
+
### Version 1.1.3
|
|
399
281
|
|
|
400
|
-
|
|
282
|
+
- Added createTranslationAdapter utility in i18n-lib to bridge PluginI18nEngine and TranslationEngine interfaces.
|
|
283
|
+
- Fixed multiple TypeScript compilation errors and improved type safety.
|
|
284
|
+
- Added comprehensive tests with 100% pass rate.
|
|
401
285
|
|
|
402
286
|
### Version 1.1.1
|
|
403
287
|
|
|
404
|
-
-
|
|
405
|
-
- Fix pbkdf2 service engine typing
|
|
288
|
+
- Fixed pbkdf2 service engine typing.
|
|
406
289
|
|
|
407
290
|
### Version 1.1.0
|
|
408
291
|
|
|
409
|
-
-
|
|
410
|
-
- Update i18n and ecies lib versions
|
|
292
|
+
- Updated i18n and ecies lib versions.
|
|
411
293
|
|
|
412
294
|
### Version 1.0.13
|
|
413
295
|
|
|
414
|
-
-
|
|
415
|
-
- Bump version of ecies lib
|
|
296
|
+
- Bumped version of ecies lib.
|
|
416
297
|
|
|
417
298
|
### Version 1.0.12
|
|
418
299
|
|
|
419
|
-
-
|
|
420
|
-
- Bump versions of i18n/ecies libs
|
|
300
|
+
- Bumped versions of i18n/ecies libs.
|
|
421
301
|
|
|
422
302
|
### Version 1.0.11
|
|
423
303
|
|
|
424
|
-
-
|
|
425
|
-
- Bump versions of i18n/ecies libs
|
|
304
|
+
- Bumped versions of i18n/ecies libs.
|
|
426
305
|
|
|
427
306
|
### Version 1.0.10
|
|
428
307
|
|
|
429
|
-
-
|
|
430
|
-
- Bump versions of i18n/ecies libs
|
|
308
|
+
- Bumped versions of i18n/ecies libs.
|
|
431
309
|
|
|
432
310
|
### Version 1.0.8
|
|
433
311
|
|
|
434
|
-
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
- Update @digitaldefiance/ecies-lib dependency to 1.0.26
|
|
438
|
-
- Implement runtime configuration system with node-specific defaults
|
|
439
|
-
- Add PBKDF2 profile enum alignment and configuration overrides
|
|
440
|
-
- Remove obsolete AES-GCM E2E test file
|
|
441
|
-
- Update changelog for version 1.0.8
|
|
312
|
+
- Upgraded to ecies-lib 1.0.26 with runtime configuration system.
|
|
313
|
+
- Implemented runtime configuration system with node-specific defaults.
|
|
314
|
+
- Added PBKDF2 profile enum alignment and configuration overrides.
|
|
442
315
|
|
|
443
316
|
### Version 1.0.6
|
|
444
317
|
|
|
445
|
-
-
|
|
446
|
-
- Improved constants inheritance and froze objects
|
|
318
|
+
- Improved constants inheritance and froze objects.
|
|
447
319
|
|
|
448
320
|
### Version 1.0.5
|
|
449
321
|
|
|
450
|
-
-
|
|
451
|
-
- Used latest cleanup code from i18n library and updated dependencies
|
|
322
|
+
- Used latest cleanup code from i18n library and updated dependencies.
|
|
452
323
|
|
|
453
324
|
### Version 1.0.4
|
|
454
325
|
|
|
455
|
-
-
|
|
456
|
-
- Added plugin-based internationalization architecture with `@digitaldefiance/i18n-lib`
|
|
326
|
+
- Added plugin-based internationalization architecture with `@digitaldefiance/i18n-lib`.
|
|
457
327
|
|
|
458
328
|
### Version 1.0.3
|
|
459
329
|
|
|
460
|
-
-
|
|
461
|
-
- Initial release
|
|
330
|
+
- Initial release.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/node-ecies-lib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Digital Defiance Node ECIES Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"type": "module",
|
|
54
54
|
"packageManager": "yarn@4.10.3",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@digitaldefiance/ecies-lib": "1.1.
|
|
56
|
+
"@digitaldefiance/ecies-lib": "1.1.8",
|
|
57
57
|
"@digitaldefiance/i18n-lib": "1.3.1",
|
|
58
58
|
"@ethereumjs/wallet": "^10.0.0",
|
|
59
59
|
"@noble/curves": "^2.0.1",
|