|
| 1 | +# Changes implemented in response to the audit |
| 2 | + |
| 3 | +This documents contains a list of the changes that have been implemented as a result of [the audit report](./Trail_of_Bits_audit_report.pdf). |
| 4 | + |
| 5 | +## TOB-NOMIC-001: AES modes of operation |
| 6 | + |
| 7 | +### Changes |
| 8 | +* Set aes-ctr-128 as default operation mode and recommend using that. |
| 9 | +* Update readme to mention that only aes-128-ctr, aes-128-cbc, and aes-256-cbc are supported. |
| 10 | +* Print a warning if an unsupported mode is used. |
| 11 | +* Recommend using aes-128-cbc and aes-256-cbc only to decrypt already encrypted data. |
| 12 | +* Add an explanation about IVs having to be unique, and instructing the users to use the random module to get them. |
| 13 | +* Add a warning about error messages and recommend using generic errors messages if the encryption/decryption fails. |
| 14 | + |
| 15 | +### Commits |
| 16 | +* deb0844ae816d241c1c5930b13e3ea0b84eab933 |
| 17 | + |
| 18 | + |
| 19 | +## TOB-NOMIC-002: secp256k1 interface for key generation |
| 20 | + |
| 21 | +### Changes |
| 22 | +* Added two functions to the module to create private keys. These use the random module get random values and use secp256k1's private key validation function. |
| 23 | + |
| 24 | +### Commits |
| 25 | +* 56c9edf58b123f2d4c62d625980abcc558770c8e |
| 26 | + |
| 27 | + |
| 28 | +## TOB-NOMIC-003: Strong types for security |
| 29 | + |
| 30 | +No action was taken yet. This change requires more discussion with potential consumers of the library. |
| 31 | + |
| 32 | + |
| 33 | +## TOB-NOMIC-004: Duplicated code |
| 34 | + |
| 35 | +### Changes |
| 36 | +* Removal of duplicated code in aes, random, pbkdf2 and hashing modules. |
| 37 | + |
| 38 | +### Commits |
| 39 | +* 03f8b75cd40d106847a53834531ee7c85894b5f6 |
| 40 | +* 8c669d6ac0d759289de9be96dbd9c456ccbeb0cc |
| 41 | +* fb998dec7cb1ade2de8079fe8db115f3cf15fdcf |
| 42 | +* 434478c611f052b3d8201a34d100ae79bb2fcca3 |
| 43 | +* 6c27cc4404c0975401dd97140eb03cde83b29db9 |
| 44 | +* 373fcb331e361bf78de4574a33e5b316ec4f95d4 |
| 45 | + |
| 46 | + |
| 47 | +## TOB-NOMIC-005: Dependency management |
| 48 | + |
| 49 | +### Changes |
| 50 | +* Updated secp256k1 to v4. |
| 51 | +* Replace js-sha3 with keccack v3. |
| 52 | +* Run npm audit and fixed all non-dev-dependencies warnings. |
| 53 | + |
| 54 | +## Commits |
| 55 | +* 063ba25c152abbb5005150ac9aad4b828245560d |
| 56 | +* b6e244093fc1ddcf0c2f1874509c0ad3f302d67b |
| 57 | +* 9a097accb1c5d1fed8eaa9ae60db3bc19b7faede |
| 58 | +* 373fcb331e361bf78de4574a33e5b316ec4f95d4 |
| 59 | + |
| 60 | + |
| 61 | +## TOB-NOMIC-006: Submodule management |
| 62 | + |
| 63 | +### Changes |
| 64 | +* Update hdkey submodule. |
| 65 | +* Update bip39 submodule. |
| 66 | +* Replace scriptsy with scrypt-js and remove its submodule. |
| 67 | +* Remove secp256k1 submodule, as secp256k1 v4 uses N-API and already meets the goals of this project. |
| 68 | + |
| 69 | +### Commits |
| 70 | +* a1402f9701eb4b324e5940b06f80d35eb8ce1b9e |
| 71 | +* d5d4859257ebf3be0c0dcbef24e05647b28ca02b |
| 72 | +* 3cfa5516fba6b850461f2d3c8a1ff66550461012 |
| 73 | +* b6e244093fc1ddcf0c2f1874509c0ad3f302d67b |
| 74 | +* 9a097accb1c5d1fed8eaa9ae60db3bc19b7faede |
| 75 | + |
| 76 | +## OTHER CHANGES: Remove ethreum-cryptography-native package |
| 77 | + |
| 78 | +By updating kecack and secp256k1 to their N-API versions, there were little performance gains to obtain by using the native version of the package. We removed it to simplify the project. |
| 79 | + |
| 80 | +### Commits |
| 81 | +* d5d4859257ebf3be0c0dcbef24e05647b28ca02b |
| 82 | +* 05576f9a349352178c37cc0cc458766887bd2b9e |
0 commit comments