Skip to content

Add XChaCha20/XChaCha20-Poly1305/cascaded algorithm, using a 64-bit counter to support large files.#215

Open
fzxx wants to merge 17 commits into
ip7z:mainfrom
fzxx:main
Open

Add XChaCha20/XChaCha20-Poly1305/cascaded algorithm, using a 64-bit counter to support large files.#215
fzxx wants to merge 17 commits into
ip7z:mainfrom
fzxx:main

Conversation

@fzxx

@fzxx fzxx commented May 11, 2026

Copy link
Copy Markdown
  • The key derivation method is consistent with AES-256.
  • The registry records the XChaCha20/XChaCha20-Poly1305 option.
  • Use a 64-bit counter to support very large files.
  • Add cascaded key derivation, cascaded encryption algorithm.
# AES-256
7z a archive.7z -ppassword -mhe=on
7z a archive.7z -ppassword -mhe=on -mem=aes256
7z a archive.7z -ppassword -mhe=on -mem=aes-256

# XChaCha20
7z a archive.7z -ppassword -mhe=on -mem=xchacha20

# XChaCha20-Poly1305
7z a archive.7z -ppassword -mhe=on -mem=xchacha20poly1305
7z a archive.7z -ppassword -mhe=on -mem=xchacha20-poly1305

# AES+XChaCha20-Poly1305
7z a archive.7z -ppassword -mhe=on -mem=axp
7z a archive.7z -ppassword -mhe=on -mem=aesxchacha20poly1305
7z a archive.7z -ppassword -mhe=on -mem=aes+xchacha20-poly1305

# AES+XChaCha20+Ascon
7z a archive.7z -ppassword -mhe=on -mem=axa
7z a archive.7z -ppassword -mhe=on -mem=aesxchacha20ascon
7z a archive.7z -ppassword -mhe=on -mem=aes+xchacha20+ascon

@fzxx

fzxx commented May 11, 2026

Copy link
Copy Markdown
Author

I noticed that the 7z password derivation does not use a random salt. This is a security issue, and I wonder why. If it's because of speed, I suggest using the standard PBKDF2, which also makes it easy to add a salt. If anyone has a need for MAC, I can also add XChaCha20-Poly1305. @ip7z

@fzxx

fzxx commented May 27, 2026

Copy link
Copy Markdown
Author

Add XChaCha20-Poly1305. Feature fully implemented. If this PR/branch doesn't get merged, I will start a separate project for everyone to use.

@fzxx fzxx changed the title Add XChaCha20 algorithm, using a 64-bit counter to support large files. Add XChaCha20/XChaCha20-Poly1305 algorithm, using a 64-bit counter to support large files. May 27, 2026
@fzxx fzxx changed the title Add XChaCha20/XChaCha20-Poly1305 algorithm, using a 64-bit counter to support large files. Add XChaCha20/XChaCha20-Poly1305/cascaded algorithm, using a 64-bit counter to support large files. Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant