@digitaldefiance/node-ecies-lib 1.1.20 → 1.1.22

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.
Files changed (211) hide show
  1. package/README.md +8 -0
  2. package/package.json +14 -35
  3. package/src/constants.ts +182 -0
  4. package/src/enumerations/index.ts +1 -0
  5. package/src/enumerations/pbkdf2-profile.ts +8 -0
  6. package/src/i18n/ecies-i18n-factory.ts +435 -0
  7. package/{dist/i18n/index.d.ts → src/i18n/index.ts} +0 -1
  8. package/{dist/index.d.ts → src/index.ts} +0 -1
  9. package/src/interfaces/authenticated-cipher.ts +9 -0
  10. package/src/interfaces/authenticated-decipher.ts +8 -0
  11. package/src/interfaces/checksum-config.ts +4 -0
  12. package/src/interfaces/checksum-consts.ts +13 -0
  13. package/src/interfaces/constants.ts +43 -0
  14. package/src/interfaces/ecies-consts.ts +99 -0
  15. package/src/interfaces/encryption-consts.ts +10 -0
  16. package/{dist/interfaces/index.d.ts → src/interfaces/index.ts} +0 -1
  17. package/src/interfaces/keypair-buffer-with-un-encrypted-private-key.ts +7 -0
  18. package/src/interfaces/keyring-consts.ts +5 -0
  19. package/src/interfaces/member-operational.ts +52 -0
  20. package/{dist/interfaces/member-with-mnemonic.d.ts → src/interfaces/member-with-mnemonic.ts} +3 -3
  21. package/{dist/interfaces/multi-encrypted-message.d.ts → src/interfaces/multi-encrypted-message.ts} +5 -5
  22. package/src/interfaces/multi-encrypted-parsed-header.ts +24 -0
  23. package/{dist/interfaces/pbkdf-profiles.d.ts → src/interfaces/pbkdf-profiles.ts} +2 -2
  24. package/src/interfaces/pbkdf2-result.ts +5 -0
  25. package/src/interfaces/signing-key-private-key-info.ts +12 -0
  26. package/{dist/interfaces/simple-keypair-buffer.d.ts → src/interfaces/simple-keypair-buffer.ts} +3 -3
  27. package/{dist/interfaces/simple-keypair.d.ts → src/interfaces/simple-keypair.ts} +3 -3
  28. package/src/interfaces/simple-public-key-only-buffer.ts +3 -0
  29. package/src/interfaces/simple-public-key-only.ts +3 -0
  30. package/src/interfaces/single-encrypted-parsed-header.ts +35 -0
  31. package/{dist/interfaces/wallet-seed.d.ts → src/interfaces/wallet-seed.ts} +3 -3
  32. package/src/interfaces/wrapped-key-consts.ts +6 -0
  33. package/src/member.ts +463 -0
  34. package/src/services/aes-gcm.ts +160 -0
  35. package/src/services/ecies/crypto-core.ts +213 -0
  36. package/src/services/ecies/file.ts +174 -0
  37. package/{dist/services/ecies/index.d.ts → src/services/ecies/index.ts} +0 -1
  38. package/src/services/ecies/multi-recipient.ts +583 -0
  39. package/src/services/ecies/service.ts +351 -0
  40. package/src/services/ecies/signature.ts +91 -0
  41. package/src/services/ecies/single-recipient.ts +676 -0
  42. package/src/services/ecies/utilities.ts +111 -0
  43. package/src/services/index.ts +3 -0
  44. package/src/services/pbkdf2.ts +307 -0
  45. package/{dist/types.d.ts → src/types.ts} +26 -9
  46. package/src/utils.ts +104 -0
  47. package/dist/constants.d.ts +0 -32
  48. package/dist/constants.d.ts.map +0 -1
  49. package/dist/constants.js +0 -137
  50. package/dist/constants.js.map +0 -1
  51. package/dist/enumerations/index.d.ts +0 -2
  52. package/dist/enumerations/index.d.ts.map +0 -1
  53. package/dist/enumerations/index.js +0 -18
  54. package/dist/enumerations/index.js.map +0 -1
  55. package/dist/enumerations/pbkdf2-profile.d.ts +0 -9
  56. package/dist/enumerations/pbkdf2-profile.d.ts.map +0 -1
  57. package/dist/enumerations/pbkdf2-profile.js +0 -13
  58. package/dist/enumerations/pbkdf2-profile.js.map +0 -1
  59. package/dist/i18n/ecies-i18n-factory.d.ts +0 -54
  60. package/dist/i18n/ecies-i18n-factory.d.ts.map +0 -1
  61. package/dist/i18n/ecies-i18n-factory.js +0 -332
  62. package/dist/i18n/ecies-i18n-factory.js.map +0 -1
  63. package/dist/i18n/index.d.ts.map +0 -1
  64. package/dist/i18n/index.js +0 -18
  65. package/dist/i18n/index.js.map +0 -1
  66. package/dist/index.d.ts.map +0 -1
  67. package/dist/index.js +0 -24
  68. package/dist/index.js.map +0 -1
  69. package/dist/interfaces/authenticated-cipher.d.ts +0 -10
  70. package/dist/interfaces/authenticated-cipher.d.ts.map +0 -1
  71. package/dist/interfaces/authenticated-cipher.js +0 -3
  72. package/dist/interfaces/authenticated-cipher.js.map +0 -1
  73. package/dist/interfaces/authenticated-decipher.d.ts +0 -9
  74. package/dist/interfaces/authenticated-decipher.d.ts.map +0 -1
  75. package/dist/interfaces/authenticated-decipher.js +0 -3
  76. package/dist/interfaces/authenticated-decipher.js.map +0 -1
  77. package/dist/interfaces/checksum-config.d.ts +0 -5
  78. package/dist/interfaces/checksum-config.d.ts.map +0 -1
  79. package/dist/interfaces/checksum-config.js +0 -3
  80. package/dist/interfaces/checksum-config.js.map +0 -1
  81. package/dist/interfaces/checksum-consts.d.ts +0 -11
  82. package/dist/interfaces/checksum-consts.d.ts.map +0 -1
  83. package/dist/interfaces/checksum-consts.js +0 -3
  84. package/dist/interfaces/checksum-consts.js.map +0 -1
  85. package/dist/interfaces/constants.d.ts +0 -43
  86. package/dist/interfaces/constants.d.ts.map +0 -1
  87. package/dist/interfaces/constants.js +0 -3
  88. package/dist/interfaces/constants.js.map +0 -1
  89. package/dist/interfaces/ecies-consts.d.ts +0 -88
  90. package/dist/interfaces/ecies-consts.d.ts.map +0 -1
  91. package/dist/interfaces/ecies-consts.js +0 -3
  92. package/dist/interfaces/ecies-consts.js.map +0 -1
  93. package/dist/interfaces/encryption-consts.d.ts +0 -11
  94. package/dist/interfaces/encryption-consts.d.ts.map +0 -1
  95. package/dist/interfaces/encryption-consts.js +0 -3
  96. package/dist/interfaces/encryption-consts.js.map +0 -1
  97. package/dist/interfaces/index.d.ts.map +0 -1
  98. package/dist/interfaces/index.js +0 -34
  99. package/dist/interfaces/index.js.map +0 -1
  100. package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.d.ts +0 -6
  101. package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.d.ts.map +0 -1
  102. package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.js +0 -3
  103. package/dist/interfaces/keypair-buffer-with-un-encrypted-private-key.js.map +0 -1
  104. package/dist/interfaces/keyring-consts.d.ts +0 -6
  105. package/dist/interfaces/keyring-consts.d.ts.map +0 -1
  106. package/dist/interfaces/keyring-consts.js +0 -3
  107. package/dist/interfaces/keyring-consts.js.map +0 -1
  108. package/dist/interfaces/member-operational.d.ts +0 -36
  109. package/dist/interfaces/member-operational.d.ts.map +0 -1
  110. package/dist/interfaces/member-operational.js +0 -3
  111. package/dist/interfaces/member-operational.js.map +0 -1
  112. package/dist/interfaces/member-with-mnemonic.d.ts.map +0 -1
  113. package/dist/interfaces/member-with-mnemonic.js +0 -3
  114. package/dist/interfaces/member-with-mnemonic.js.map +0 -1
  115. package/dist/interfaces/multi-encrypted-message.d.ts.map +0 -1
  116. package/dist/interfaces/multi-encrypted-message.js +0 -3
  117. package/dist/interfaces/multi-encrypted-message.js.map +0 -1
  118. package/dist/interfaces/multi-encrypted-parsed-header.d.ts +0 -24
  119. package/dist/interfaces/multi-encrypted-parsed-header.d.ts.map +0 -1
  120. package/dist/interfaces/multi-encrypted-parsed-header.js +0 -3
  121. package/dist/interfaces/multi-encrypted-parsed-header.js.map +0 -1
  122. package/dist/interfaces/pbkdf-profiles.d.ts.map +0 -1
  123. package/dist/interfaces/pbkdf-profiles.js +0 -3
  124. package/dist/interfaces/pbkdf-profiles.js.map +0 -1
  125. package/dist/interfaces/pbkdf2-result.d.ts +0 -6
  126. package/dist/interfaces/pbkdf2-result.d.ts.map +0 -1
  127. package/dist/interfaces/pbkdf2-result.js +0 -3
  128. package/dist/interfaces/pbkdf2-result.js.map +0 -1
  129. package/dist/interfaces/signing-key-private-key-info.d.ts +0 -11
  130. package/dist/interfaces/signing-key-private-key-info.d.ts.map +0 -1
  131. package/dist/interfaces/signing-key-private-key-info.js +0 -3
  132. package/dist/interfaces/signing-key-private-key-info.js.map +0 -1
  133. package/dist/interfaces/simple-keypair-buffer.d.ts.map +0 -1
  134. package/dist/interfaces/simple-keypair-buffer.js +0 -3
  135. package/dist/interfaces/simple-keypair-buffer.js.map +0 -1
  136. package/dist/interfaces/simple-keypair.d.ts.map +0 -1
  137. package/dist/interfaces/simple-keypair.js +0 -3
  138. package/dist/interfaces/simple-keypair.js.map +0 -1
  139. package/dist/interfaces/simple-public-key-only-buffer.d.ts +0 -4
  140. package/dist/interfaces/simple-public-key-only-buffer.d.ts.map +0 -1
  141. package/dist/interfaces/simple-public-key-only-buffer.js +0 -3
  142. package/dist/interfaces/simple-public-key-only-buffer.js.map +0 -1
  143. package/dist/interfaces/simple-public-key-only.d.ts +0 -4
  144. package/dist/interfaces/simple-public-key-only.d.ts.map +0 -1
  145. package/dist/interfaces/simple-public-key-only.js +0 -3
  146. package/dist/interfaces/simple-public-key-only.js.map +0 -1
  147. package/dist/interfaces/single-encrypted-parsed-header.d.ts +0 -35
  148. package/dist/interfaces/single-encrypted-parsed-header.d.ts.map +0 -1
  149. package/dist/interfaces/single-encrypted-parsed-header.js +0 -3
  150. package/dist/interfaces/single-encrypted-parsed-header.js.map +0 -1
  151. package/dist/interfaces/wallet-seed.d.ts.map +0 -1
  152. package/dist/interfaces/wallet-seed.js +0 -3
  153. package/dist/interfaces/wallet-seed.js.map +0 -1
  154. package/dist/interfaces/wrapped-key-consts.d.ts +0 -7
  155. package/dist/interfaces/wrapped-key-consts.d.ts.map +0 -1
  156. package/dist/interfaces/wrapped-key-consts.js +0 -3
  157. package/dist/interfaces/wrapped-key-consts.js.map +0 -1
  158. package/dist/member.d.ts +0 -74
  159. package/dist/member.d.ts.map +0 -1
  160. package/dist/member.js +0 -273
  161. package/dist/member.js.map +0 -1
  162. package/dist/services/aes-gcm.d.ts +0 -66
  163. package/dist/services/aes-gcm.d.ts.map +0 -1
  164. package/dist/services/aes-gcm.js +0 -115
  165. package/dist/services/aes-gcm.js.map +0 -1
  166. package/dist/services/ecies/crypto-core.d.ts +0 -83
  167. package/dist/services/ecies/crypto-core.d.ts.map +0 -1
  168. package/dist/services/ecies/crypto-core.js +0 -166
  169. package/dist/services/ecies/crypto-core.js.map +0 -1
  170. package/dist/services/ecies/file.d.ts +0 -30
  171. package/dist/services/ecies/file.d.ts.map +0 -1
  172. package/dist/services/ecies/file.js +0 -144
  173. package/dist/services/ecies/file.js.map +0 -1
  174. package/dist/services/ecies/index.d.ts.map +0 -1
  175. package/dist/services/ecies/index.js +0 -24
  176. package/dist/services/ecies/index.js.map +0 -1
  177. package/dist/services/ecies/multi-recipient.d.ts +0 -83
  178. package/dist/services/ecies/multi-recipient.d.ts.map +0 -1
  179. package/dist/services/ecies/multi-recipient.js +0 -360
  180. package/dist/services/ecies/multi-recipient.js.map +0 -1
  181. package/dist/services/ecies/service.d.ts +0 -71
  182. package/dist/services/ecies/service.d.ts.map +0 -1
  183. package/dist/services/ecies/service.js +0 -167
  184. package/dist/services/ecies/service.js.map +0 -1
  185. package/dist/services/ecies/signature.d.ts +0 -38
  186. package/dist/services/ecies/signature.d.ts.map +0 -1
  187. package/dist/services/ecies/signature.js +0 -69
  188. package/dist/services/ecies/signature.js.map +0 -1
  189. package/dist/services/ecies/single-recipient.d.ts +0 -86
  190. package/dist/services/ecies/single-recipient.d.ts.map +0 -1
  191. package/dist/services/ecies/single-recipient.js +0 -399
  192. package/dist/services/ecies/single-recipient.js.map +0 -1
  193. package/dist/services/ecies/utilities.d.ts +0 -22
  194. package/dist/services/ecies/utilities.d.ts.map +0 -1
  195. package/dist/services/ecies/utilities.js +0 -75
  196. package/dist/services/ecies/utilities.js.map +0 -1
  197. package/dist/services/index.d.ts +0 -4
  198. package/dist/services/index.d.ts.map +0 -1
  199. package/dist/services/index.js +0 -20
  200. package/dist/services/index.js.map +0 -1
  201. package/dist/services/pbkdf2.d.ts +0 -107
  202. package/dist/services/pbkdf2.d.ts.map +0 -1
  203. package/dist/services/pbkdf2.js +0 -195
  204. package/dist/services/pbkdf2.js.map +0 -1
  205. package/dist/types.d.ts.map +0 -1
  206. package/dist/types.js +0 -3
  207. package/dist/types.js.map +0 -1
  208. package/dist/utils.d.ts +0 -11
  209. package/dist/utils.d.ts.map +0 -1
  210. package/dist/utils.js +0 -82
  211. package/dist/utils.js.map +0 -1
@@ -1,167 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ECIESService = void 0;
4
- const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
5
- const ecies_i18n_factory_1 = require("../../i18n/ecies-i18n-factory");
6
- const crypto_core_1 = require("./crypto-core");
7
- const multi_recipient_1 = require("./multi-recipient");
8
- const signature_1 = require("./signature");
9
- const single_recipient_1 = require("./single-recipient");
10
- const utilities_1 = require("./utilities");
11
- const constants_1 = require("../../constants");
12
- /**
13
- * Unified ECIES service that integrates all the modular components
14
- */
15
- class ECIESService {
16
- _config;
17
- cryptoCore;
18
- signature;
19
- singleRecipient;
20
- multiRecipient;
21
- utilities;
22
- engine;
23
- constructor(engineOrConfig, config, eciesParams = constants_1.Constants.ECIES) {
24
- // Determine if first parameter is engine or config
25
- let engine;
26
- let actualConfig;
27
- if (engineOrConfig && 'translate' in engineOrConfig) {
28
- // First parameter is an engine
29
- engine = engineOrConfig;
30
- actualConfig = config || {};
31
- }
32
- else {
33
- // First parameter is config or undefined
34
- engine = (0, ecies_i18n_factory_1.createEciesTranslationEngine)();
35
- actualConfig = engineOrConfig || {};
36
- }
37
- const eciesConsts = eciesParams;
38
- this._config = {
39
- ...config,
40
- curveName: eciesConsts.CURVE_NAME,
41
- primaryKeyDerivationPath: eciesConsts.PRIMARY_KEY_DERIVATION_PATH,
42
- mnemonicStrength: eciesConsts.MNEMONIC_STRENGTH,
43
- symmetricAlgorithm: eciesConsts.SYMMETRIC.ALGORITHM,
44
- symmetricKeyBits: eciesConsts.SYMMETRIC.KEY_BITS,
45
- symmetricKeyMode: eciesConsts.SYMMETRIC.MODE,
46
- ...actualConfig,
47
- };
48
- // Initialize all components
49
- this.engine = engine;
50
- this.cryptoCore = new crypto_core_1.EciesCryptoCore(this._config, eciesParams);
51
- this.signature = new signature_1.EciesSignature(this.cryptoCore);
52
- this.singleRecipient = new single_recipient_1.EciesSingleRecipientCore(this._config, engine);
53
- this.multiRecipient = new multi_recipient_1.EciesMultiRecipient(this.cryptoCore, engine);
54
- this.utilities = new utilities_1.EciesUtilities();
55
- }
56
- get core() {
57
- return this.cryptoCore;
58
- }
59
- get config() {
60
- return this._config;
61
- }
62
- /**
63
- * The name of the elliptic curve used for ECIES encryption/decryption
64
- */
65
- get curveName() {
66
- return this._config.curveName;
67
- }
68
- // === Key Management Methods ===
69
- generateNewMnemonic() {
70
- return this.cryptoCore.generateNewMnemonic();
71
- }
72
- walletFromSeed(seed) {
73
- return this.cryptoCore.walletFromSeed(seed);
74
- }
75
- walletAndSeedFromMnemonic(mnemonic) {
76
- return this.cryptoCore.walletAndSeedFromMnemonic(mnemonic);
77
- }
78
- walletToSimpleKeyPairBuffer(wallet) {
79
- return this.cryptoCore.walletToSimpleKeyPairBuffer(wallet);
80
- }
81
- seedToSimpleKeyPairBuffer(seed) {
82
- return this.cryptoCore.seedToSimpleKeyPairBuffer(seed);
83
- }
84
- mnemonicToSimpleKeyPairBuffer(mnemonic) {
85
- return this.cryptoCore.mnemonicToSimpleKeyPairBuffer(mnemonic);
86
- }
87
- // === Core Encryption/Decryption Methods ===
88
- encryptSimpleOrSingle(encryptSimple, receiverPublicKey, message, preamble = Buffer.alloc(0)) {
89
- return this.singleRecipient.encrypt(encryptSimple, receiverPublicKey, message, preamble);
90
- }
91
- parseSingleEncryptedHeader(encryptionType, data, preambleSize = 0, options) {
92
- const { header } = this.singleRecipient.parseEncryptedMessage(encryptionType, data, preambleSize, options);
93
- return header;
94
- }
95
- decryptSimpleOrSingleWithHeader(decryptSimple, privateKey, encryptedData, preambleSize = 0, options) {
96
- return this.singleRecipient.decryptWithHeader(decryptSimple
97
- ? ecies_lib_1.EciesEncryptionTypeEnum.Simple
98
- : ecies_lib_1.EciesEncryptionTypeEnum.Single, privateKey, encryptedData, preambleSize, options);
99
- }
100
- decryptSimpleOrSingleWithHeaderEx(encryptionType, privateKey, encryptedData, preambleSize = 0, options) {
101
- return this.singleRecipient.decryptWithHeaderEx(encryptionType, privateKey, encryptedData, preambleSize, options);
102
- }
103
- decryptSingleWithComponents(privateKey, ephemeralPublicKey, iv, authTag, encrypted) {
104
- const decrypted = this.singleRecipient.decryptWithComponents(privateKey, ephemeralPublicKey, iv, authTag, encrypted);
105
- // Return an object with a 'decrypted' property for compatibility with existing code
106
- return { decrypted, ciphertextLength: encrypted.length };
107
- }
108
- // === Signature Methods ===
109
- signMessage(privateKey, data) {
110
- return this.signature.signMessage(privateKey, data);
111
- }
112
- verifyMessage(publicKey, data, signature) {
113
- return this.signature.verifyMessage(publicKey, data, signature);
114
- }
115
- signatureStringToSignatureBuffer(signatureString) {
116
- return this.signature.signatureStringToSignatureBuffer(signatureString);
117
- }
118
- signatureBufferToSignatureString(signatureBuffer) {
119
- return this.signature.signatureBufferToSignatureString(signatureBuffer);
120
- }
121
- // === Multi-Recipient Methods ===
122
- encryptMultiple(recipients, message) {
123
- return this.multiRecipient.encryptMultiple(recipients, message);
124
- }
125
- decryptMultipleECIEForRecipient(encryptedData, recipient) {
126
- return this.multiRecipient.decryptMultipleECIEForRecipient(encryptedData, recipient);
127
- }
128
- calculateECIESMultipleRecipientOverhead(recipientCount, includeMessageOverhead) {
129
- return this.multiRecipient.calculateECIESMultipleRecipientOverhead(recipientCount, includeMessageOverhead);
130
- }
131
- buildECIESMultipleRecipientHeader(data) {
132
- return this.multiRecipient.buildECIESMultipleRecipientHeader(data);
133
- }
134
- parseMultiEncryptedHeader(data) {
135
- return this.multiRecipient.parseMultiEncryptedHeader(data);
136
- }
137
- parseMultiEncryptedBuffer(data) {
138
- return this.multiRecipient.parseMultiEncryptedBuffer(data);
139
- }
140
- // === Utility Methods ===
141
- computeEncryptedLengthFromDataLength(dataLength, encryptionMode, recipientCount) {
142
- return this.utilities.computeEncryptedLengthFromDataLength(dataLength, encryptionMode, recipientCount);
143
- }
144
- computeDecryptedLengthFromEncryptedDataLength(encryptedDataLength, padding) {
145
- return this.utilities.computeDecryptedLengthFromEncryptedDataLength(encryptedDataLength, padding);
146
- }
147
- encrypt(encryptionType, recipients, message, preamble) {
148
- if ((encryptionType === 'simple' || encryptionType === 'single') &&
149
- recipients.length === 1) {
150
- return this.singleRecipient.encrypt(encryptionType === 'simple', recipients[0].publicKey, message, preamble);
151
- }
152
- else if (encryptionType === 'multiple' && recipients.length > 1) {
153
- const result = this.multiRecipient.encryptMultiple(recipients, message, preamble);
154
- return result.encryptedMessage;
155
- }
156
- else {
157
- const pluginEngine = (0, ecies_i18n_factory_1.getEciesPluginI18nEngine)();
158
- throw new ecies_lib_1.ECIESError(ecies_lib_1.ECIESErrorTypeEnum.InvalidEncryptionType, this.engine, undefined, undefined, {
159
- error: pluginEngine.translate(ecies_i18n_factory_1.NodeEciesComponentId, ecies_i18n_factory_1.NodeEciesStringKey.Error_InvalidEncryptionTypeOrNumberOfRecipients),
160
- encryptionType: encryptionType,
161
- recipients: String(recipients.length),
162
- });
163
- }
164
- }
165
- }
166
- exports.ECIESService = ECIESService;
167
- //# sourceMappingURL=service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/ecies/service.ts"],"names":[],"mappings":";;;AAAA,0DASoC;AAEpC,sEAAiJ;AAWjJ,+CAAgD;AAChD,uDAAwD;AACxD,2CAA6C;AAC7C,yDAA8D;AAC9D,2CAA6C;AAC7C,+CAA4C;AAE5C;;GAEG;AACH,MAAa,YAAY;IACJ,OAAO,CAAe;IACtB,UAAU,CAAkB;IAC5B,SAAS,CAAiB;IAC1B,eAAe,CAA2B;IAC1C,cAAc,CAAsB;IACpC,SAAS,CAAiB;IAC1B,MAAM,CAAoC;IAE7D,YACE,cAA0E,EAC1E,MAA8B,EAC9B,cAA+B,qBAAS,CAAC,KAAK;QAE9C,mDAAmD;QACnD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EACpB,OAAe,EACf,QAAiB;QAEjB,IACE,CAAC,cAAc,KAAK,QAAQ,IAAI,cAAc,KAAK,QAAQ,CAAC;YAC5D,UAAU,CAAC,MAAM,KAAK,CAAC,EACvB,CAAC;YACD,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CACjC,cAAc,KAAK,QAAQ,EAC3B,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,EACvB,OAAO,EACP,QAAQ,CACT,CAAC;QACJ,CAAC;aAAM,IAAI,cAAc,KAAK,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAChD,UAAU,EACV,OAAO,EACP,QAAQ,CACT,CAAC;YACF,OAAO,MAAM,CAAC,gBAAgB,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,YAAY,GAAG,IAAA,6CAAwB,GAAE,CAAC;YAChD,MAAM,IAAI,sBAAU,CAClB,8BAAkB,CAAC,qBAAqB,EACxC,IAAI,CAAC,MAAM,EACX,SAAS,EACT,SAAS,EACT;gBACE,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,yCAAoB,EAAE,uCAAkB,CAAC,+CAA+C,CAAC;gBACvH,cAAc,EACd,cAAc;gBACd,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;aACtC,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAxTD,oCAwTC"}
@@ -1,38 +0,0 @@
1
- import { HexString } from '@digitaldefiance/ecies-lib';
2
- import { SignatureBuffer, SignatureString } from '../../types';
3
- import { EciesCryptoCore } from './crypto-core';
4
- /**
5
- * Signature-related functions for ECIES
6
- */
7
- export declare class EciesSignature {
8
- private readonly cryptoCore;
9
- constructor(cryptoCore: EciesCryptoCore);
10
- /**
11
- * Signs arbitrary binary data with the given private key.
12
- * @param privateKey The private key to sign the message with.
13
- * @param data The data to sign.
14
- * @returns The signature (64 bytes: r + s).
15
- */
16
- signMessage(privateKey: Buffer, data: Buffer): SignatureBuffer;
17
- /**
18
- * Verifies arbitrary binary data with the given public key.
19
- * @param publicKey The public key to verify the message with.
20
- * @param data The data to verify.
21
- * @param signature The signature to verify (64 bytes: r + s).
22
- * @returns True if the signature is valid, false otherwise.
23
- */
24
- verifyMessage(publicKey: Buffer, data: Buffer, signature: SignatureBuffer): boolean;
25
- /**
26
- * Converts a signature string to a signature buffer.
27
- * @param signatureString - The signature string to convert.
28
- * @returns The signature buffer.
29
- */
30
- signatureStringToSignatureBuffer(signatureString: HexString): SignatureBuffer;
31
- /**
32
- * Converts a signature buffer to a signature string.
33
- * @param signatureBuffer - The signature buffer to convert.
34
- * @returns The signature string.
35
- */
36
- signatureBufferToSignatureString(signatureBuffer: SignatureBuffer): SignatureString;
37
- }
38
- //# sourceMappingURL=signature.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../../src/services/ecies/signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;gBAEjC,UAAU,EAAE,eAAe;IAIvC;;;;;OAKG;IACI,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe;IASrE;;;;;;OAMG;IACI,aAAa,CAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,eAAe,GACzB,OAAO;IAsBV;;;;OAIG;IACI,gCAAgC,CACrC,eAAe,EAAE,SAAS,GACzB,eAAe;IAIlB;;;;OAIG;IACI,gCAAgC,CACrC,eAAe,EAAE,eAAe,GAC/B,eAAe;CAGnB"}
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EciesSignature = void 0;
4
- const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
5
- const secp256k1_js_1 = require("@noble/curves/secp256k1.js");
6
- const sha2_js_1 = require("@noble/hashes/sha2.js");
7
- const ecies_i18n_factory_1 = require("../../i18n/ecies-i18n-factory");
8
- /**
9
- * Signature-related functions for ECIES
10
- */
11
- class EciesSignature {
12
- cryptoCore;
13
- constructor(cryptoCore) {
14
- this.cryptoCore = cryptoCore;
15
- }
16
- /**
17
- * Signs arbitrary binary data with the given private key.
18
- * @param privateKey The private key to sign the message with.
19
- * @param data The data to sign.
20
- * @returns The signature (64 bytes: r + s).
21
- */
22
- signMessage(privateKey, data) {
23
- const hash = (0, sha2_js_1.sha256)(data);
24
- const signature = secp256k1_js_1.secp256k1.sign(hash, privateKey, {
25
- format: 'compact',
26
- extraEntropy: false,
27
- });
28
- return Buffer.from(signature);
29
- }
30
- /**
31
- * Verifies arbitrary binary data with the given public key.
32
- * @param publicKey The public key to verify the message with.
33
- * @param data The data to verify.
34
- * @param signature The signature to verify (64 bytes: r + s).
35
- * @returns True if the signature is valid, false otherwise.
36
- */
37
- verifyMessage(publicKey, data, signature) {
38
- if (signature.length !== 64) {
39
- throw new ecies_lib_1.ECIESError(ecies_lib_1.ECIESErrorTypeEnum.InvalidSignature, (0, ecies_i18n_factory_1.createEciesTranslationEngine)());
40
- }
41
- // Normalize and validate the public key
42
- try {
43
- publicKey = this.cryptoCore.normalizePublicKey(publicKey);
44
- }
45
- catch {
46
- throw new ecies_lib_1.ECIESError(ecies_lib_1.ECIESErrorTypeEnum.InvalidSenderPublicKey, (0, ecies_i18n_factory_1.createEciesTranslationEngine)());
47
- }
48
- const hash = (0, sha2_js_1.sha256)(data);
49
- return secp256k1_js_1.secp256k1.verify(signature, hash, publicKey);
50
- }
51
- /**
52
- * Converts a signature string to a signature buffer.
53
- * @param signatureString - The signature string to convert.
54
- * @returns The signature buffer.
55
- */
56
- signatureStringToSignatureBuffer(signatureString) {
57
- return Buffer.from(signatureString, 'hex');
58
- }
59
- /**
60
- * Converts a signature buffer to a signature string.
61
- * @param signatureBuffer - The signature buffer to convert.
62
- * @returns The signature string.
63
- */
64
- signatureBufferToSignatureString(signatureBuffer) {
65
- return signatureBuffer.toString('hex');
66
- }
67
- }
68
- exports.EciesSignature = EciesSignature;
69
- //# sourceMappingURL=signature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../src/services/ecies/signature.ts"],"names":[],"mappings":";;;AAAA,0DAIoC;AACpC,6DAAuD;AACvD,mDAA+C;AAC/C,sEAA6E;AAI7E;;GAEG;AACH,MAAa,cAAc;IACR,UAAU,CAAkB;IAE7C,YAAY,UAA2B;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACI,WAAW,CAAC,UAAkB,EAAE,IAAY;QACjD,MAAM,IAAI,GAAG,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,SAAS,GAAG,wBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE;YACjD,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAC;IACnD,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,SAAiB,EACjB,IAAY,EACZ,SAA0B;QAE1B,IAAI,SAAS,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,sBAAU,CAClB,8BAAkB,CAAC,gBAAgB,EACnC,IAAA,iDAA4B,GAAE,CAC/B,CAAC;QACJ,CAAC;QAED,wCAAwC;QACxC,IAAI,CAAC;YACH,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,sBAAU,CAClB,8BAAkB,CAAC,sBAAsB,EACzC,IAAA,iDAA4B,GAAE,CAC/B,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,wBAAS,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACI,gCAAgC,CACrC,eAA0B;QAE1B,OAAO,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,CAAoB,CAAC;IAChE,CAAC;IAED;;;;OAIG;IACI,gCAAgC,CACrC,eAAgC;QAEhC,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAoB,CAAC;IAC5D,CAAC;CACF;AA5ED,wCA4EC"}
@@ -1,86 +0,0 @@
1
- import { EciesEncryptionType, EciesEncryptionTypeEnum, IECIESConfig } from '@digitaldefiance/ecies-lib';
2
- import { TranslationEngine } from '@digitaldefiance/i18n-lib';
3
- import { EciesStringKey } from '@digitaldefiance/ecies-lib';
4
- import { ISingleEncryptedParsedHeader } from '../../interfaces/single-encrypted-parsed-header';
5
- import { EciesCryptoCore } from './crypto-core';
6
- export declare class EciesSingleRecipientCore {
7
- protected readonly cryptoCore: EciesCryptoCore;
8
- protected readonly config: IECIESConfig;
9
- protected readonly engine: TranslationEngine<EciesStringKey>;
10
- constructor(config: IECIESConfig, engine?: TranslationEngine<EciesStringKey>);
11
- /**
12
- * Get the size of the header for a given encryption type
13
- * @param encryptionType The encryption type (single, simple, etc.)
14
- * @returns
15
- */
16
- getHeaderSize(encryptionType: EciesEncryptionType): number;
17
- /**
18
- * Encrypt a message with a public key
19
- * @param encryptSimple Whether to simple encrypt (without crc, length)
20
- * @param receiverPublicKey The public key of the receiver
21
- * @param message The message to encrypt
22
- * @param preamble Optional preamble to prepend to the encrypted message
23
- * @param options Optional encryption options
24
- * @param options.recipientCount The number of recipients for multiple encryption mode
25
- * @returns The encrypted message
26
- */
27
- encrypt(encryptSimple: boolean, receiverPublicKey: Buffer, message: Buffer, preamble?: Buffer): Buffer;
28
- /**
29
- * Parse the header from encrypted data
30
- * @param encryptionType The type of encryption (single, simple, etc.) or undefined if not known
31
- * @param data The encrypted data
32
- * @param preambleSize The size of the preamble, if any
33
- * @param options Optional parsing options
34
- * @param options.dataLength The expected length of the data
35
- * @returns The parsed header components
36
- */
37
- parseEncryptedMessage(encryptionType: EciesEncryptionTypeEnum | undefined, data: Buffer, preambleSize?: number, options?: {
38
- dataLength?: number;
39
- }): {
40
- header: ISingleEncryptedParsedHeader;
41
- data: Buffer;
42
- remainder: Buffer;
43
- };
44
- /**
45
- * Decrypts data encrypted with ECIES using a header
46
- * This method maintains backward compatibility with the original implementation
47
- * by returning just the Buffer. For detailed information, use decryptSingleWithHeaderEx
48
- * @param encryptionType The type of encryption (single, simple, etc.)
49
- * @param privateKey The private key to decrypt the data
50
- * @param encryptedData The data to decrypt
51
- * @param preambleSize The size of the preamble, if any
52
- * @param options Optional decryption options
53
- * @param options.dataLength The expected length of the data
54
- * @returns The decrypted data buffer
55
- */
56
- decryptWithHeader(encryptionType: EciesEncryptionTypeEnum | undefined, privateKey: Buffer, encryptedData: Buffer, preambleSize?: number, options?: {
57
- dataLength?: number;
58
- }): Buffer;
59
- /**
60
- * Extended version of decryptSingleWithHeader that provides more detailed information
61
- * @param encryptionType The type of encryption (single, simple, etc.)
62
- * @param privateKey The private key to decrypt the data
63
- * @param encryptedData The data to decrypt
64
- * @param preambleSize The size of the preamble, if any
65
- * @param options Optional decryption options
66
- * @param options.dataLength The expected length of the data
67
- * @returns The decrypted data and the number of bytes consumed from the input buffer
68
- */
69
- decryptWithHeaderEx(encryptionType: EciesEncryptionTypeEnum | undefined, privateKey: Buffer, encryptedData: Buffer, preambleSize?: number, options?: {
70
- dataLength?: number;
71
- }): {
72
- decrypted: Buffer;
73
- consumedBytes: number;
74
- };
75
- /**
76
- * Decrypts data encrypted with ECIES using components
77
- * @param privateKey The private key to decrypt the data
78
- * @param ephemeralPublicKey The ephemeral public key used to encrypt the data
79
- * @param iv The initialization vector used to encrypt the data
80
- * @param authTag The authentication tag used to encrypt the data
81
- * @param encrypted The encrypted data
82
- * @returns The decrypted data
83
- */
84
- decryptWithComponents(privateKey: Buffer, ephemeralPublicKey: Buffer, iv: Buffer, authTag: Buffer, encrypted: Buffer): Buffer;
85
- }
86
- //# sourceMappingURL=single-recipient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-recipient.d.ts","sourceRoot":"","sources":["../../../src/services/ecies/single-recipient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,uBAAuB,EAOvB,YAAY,EAGb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAU5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,wBAAwB;IACnC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IAC/C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IACxC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;gBAEjD,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC;IAM5E;;;;OAIG;IACI,aAAa,CAAC,cAAc,EAAE,mBAAmB,GAAG,MAAM;IAcjE;;;;;;;;;OASG;IACI,OAAO,CACZ,aAAa,EAAE,OAAO,EACtB,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,MAAwB,GACjC,MAAM;IA0HT;;;;;;;;OAQG;IACI,qBA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