[@sounisi5011/encrypted-archive
]: Future updates, including breaking changes
#693
sounisi5011
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It has been a year and a half since I first released
@sounisi5011/encrypted-archive
. Due to the long time that has passed, I would like to make an update that includes breaking changes to the archive data binaries.Cannot add new fields to archive data that are required for decryption.
The archive data is the Protocol Buffers. So if we add a new field, the old
@sounisi5011/encrypted-archive
can parse the new archive data. However, if the new fields are metadata required for decryption, the old@sounisi5011/encrypted-archive
will throw the following error:This error is not helpful;
@sounisi5011/encrypted-archive
MUST throw an error like "This archive is not supported".To detect this, the archive data should contain a version number.
However, there is no such field in the current archive data.
I want to add additional binary data required for decryption
In
@sounisi5011/encrypted-archive
, counters are used to avoid IV reuse.However, to absolutely increment these counters requires synchronization between multi-threads, etc.
A way to reliably guarantee this would never be achievable within the Node.js library.
(Even if we provided an API for users to synchronize this counter, I doubt that users would use such a complex API correctly).
By the way, the condition under which IVs should not be reused is when the "key is the same value".
In other words, by providing additional input (e.g. current time, PID, MAC address, etc.) to the key derivation function, "IV reuse" will not occur, even with the same password and the same IV.
By adding a field containing such data,
@sounisi5011/encrypted-archive
would not require a complex implementation to synchronize IV counters.I want to remove the
compress_algorithm
fieldSee [
@sounisi5011/encrypted-archive
] Maybe thecompress
option should be deprecated #661If the
compress
option can be removed, then thecompress_algorithm
field is also unnecessary.Weak Argon2 option should not be allowed in archive format
If the format specifies minimum values for the
time_iterations
andmemory_kib
fields, we should never be able to use the weak Argon2 option.Something similar is already done for the
crypto_nonce_counter_add_or_reset
field in theSimpleHeader
message.See [
@sounisi5011/encrypted-archive
] Disallow weak Argon2 options #434Beta Was this translation helpful? Give feedback.
All reactions