@digitaldefiance/ecies-lib 4.17.1 → 4.17.2
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 +36 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ This library implements a modern, enterprise-grade ECIES protocol (v4.0) featuri
|
|
|
23
23
|
- **Curve**: `secp256k1` for ECDH key exchange and ECDSA signatures.
|
|
24
24
|
- **Symmetric**: `AES-256-GCM` for authenticated symmetric encryption.
|
|
25
25
|
- **Hashing**: `SHA-256` and `SHA-512`.
|
|
26
|
+
- **Key Derivation**: `PBKDF2` with configurable profiles (Fast, Standard, Secure, Maximum).
|
|
27
|
+
- **Checksums**: `CRC8`, `CRC16-CCITT`, `CRC32` for data integrity.
|
|
26
28
|
- **Modes**:
|
|
27
29
|
- **Basic**: Minimal overhead (no length prefix) - Use for fixed-size data or when size is known
|
|
28
30
|
- **WithLength**: Includes data length prefix - Use for variable-size data or streaming
|
|
@@ -53,7 +55,8 @@ This library implements a modern, enterprise-grade ECIES protocol (v4.0) featuri
|
|
|
53
55
|
|
|
54
56
|
### 🚀 Advanced Capabilities
|
|
55
57
|
|
|
56
|
-
- **Streaming Encryption**: Memory-efficient processing for large files (<10MB RAM usage for any file size)
|
|
58
|
+
- **Streaming Encryption**: Memory-efficient processing for large files (<10MB RAM usage for any file size) with Web Streams API transforms
|
|
59
|
+
- **Fluent Builders**: Type-safe configuration with `ECIESBuilder` and `MemberBuilder` for clean, chainable APIs
|
|
57
60
|
- **Internationalization (i18n)**: Automatic error translation in 8 languages (en-US, en-GB, fr, es, de, zh-CN, ja, uk)
|
|
58
61
|
- **Runtime Configuration**: Injectable configuration profiles via `ConstantsRegistry` for dependency injection and testing
|
|
59
62
|
- **Cross-Platform**: Fully compatible with Node.js 18+ and modern browsers (Chrome, Edge, Firefox, Safari)
|
|
@@ -1046,6 +1049,19 @@ class MemberService {
|
|
|
1046
1049
|
- **`EciesMultiRecipient`**: Specialized service for handling multi-recipient messages.
|
|
1047
1050
|
- **`EciesFileService`**: Helper for chunked file encryption.
|
|
1048
1051
|
- **`PasswordLoginService`**: Secure authentication using PBKDF2 and encrypted key bundles.
|
|
1052
|
+
- **`AESGCMService`**: Instance-based AES-256-GCM encryption with JSON support.
|
|
1053
|
+
- **Methods**: `encrypt()`, `decrypt()`, `encryptJson()`, `decryptJson()`, `combineEncryptedDataAndTag()`
|
|
1054
|
+
- Supports authenticated encryption with optional AAD
|
|
1055
|
+
- **`Pbkdf2Service`**: Password-based key derivation (PBKDF2).
|
|
1056
|
+
- **Methods**: `deriveKeyFromPasswordAsync()`, `deriveKeyFromPasswordWithProfileAsync()`, `getProfileConfig()`
|
|
1057
|
+
- **Profiles**: Fast, Standard, Secure, Maximum
|
|
1058
|
+
- **`CrcService`**: CRC checksum computation and verification.
|
|
1059
|
+
- **Algorithms**: CRC8, CRC16-CCITT, CRC32
|
|
1060
|
+
- **Methods**: `crc8()`, `crc16()`, `crc32()`, `verifyCrc8()`, `verifyCrc16()`, `verifyCrc32()`
|
|
1061
|
+
- Supports async stream processing with `crc8Async()`, `crc16Async()`, `crc32Async()`
|
|
1062
|
+
- **`XorService`**: Simple XOR cipher for memory obfuscation.
|
|
1063
|
+
- **Static Methods**: `xor()`, `generateKey()`, `stringToBytes()`, `bytesToString()`
|
|
1064
|
+
- Used internally by `SecureString` and `SecureBuffer`
|
|
1049
1065
|
|
|
1050
1066
|
### Voting System Services
|
|
1051
1067
|
|
|
@@ -1095,6 +1111,25 @@ class MemberService {
|
|
|
1095
1111
|
- `fromJson(json, eciesService)`: Deserialize from JSON (uses ID provider)
|
|
1096
1112
|
- `newMember(...)`: Static factory method
|
|
1097
1113
|
- `fromMnemonic(...)`: Create from BIP39 mnemonic
|
|
1114
|
+
- **`MemberBuilder`**: Fluent builder for creating Member instances
|
|
1115
|
+
- **Methods**: `withId()`, `withName()`, `withEmail()`, `withPhone()`, `withType()`, `withKeys()`, `build()`
|
|
1116
|
+
- Provides type-safe member construction with validation
|
|
1117
|
+
|
|
1118
|
+
### Builders
|
|
1119
|
+
|
|
1120
|
+
- **`ECIESBuilder`**: Fluent builder for ECIESService configuration
|
|
1121
|
+
- **Methods**: `create()`, `withServiceConfig()`, `withConstants()`, `withI18n()`, `build()`
|
|
1122
|
+
- Simplifies service initialization with method chaining
|
|
1123
|
+
|
|
1124
|
+
### Stream Transforms
|
|
1125
|
+
|
|
1126
|
+
- **`EciesEncryptTransform`**: Web Streams API transform for ECIES encryption
|
|
1127
|
+
- **`EciesDecryptTransform`**: Web Streams API transform for ECIES decryption
|
|
1128
|
+
- **`ChecksumTransform`**: Stream transform for CRC checksum computation
|
|
1129
|
+
- **`XorTransform`**: Stream transform for XOR cipher operations
|
|
1130
|
+
- **`XorMultipleTransform`**: Stream transform for multiple XOR operations
|
|
1131
|
+
|
|
1132
|
+
All transforms implement the standard `Transformer<I, O>` interface for use with `TransformStream`.
|
|
1098
1133
|
|
|
1099
1134
|
### Voting System Types & Enumerations
|
|
1100
1135
|
|