Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: salt recheck will cause duplicated iv/salt error #1082

Merged
merged 1 commit into from Jan 13, 2023

Conversation

chuxi
Copy link
Contributor

@chuxi chuxi commented Jan 13, 2023

in version 1.14.3

        // Check repeated salt after first successful decryption #442
        if self.salt.is_some() {
            let salt = self.salt.take().unwrap();
            context.check_nonce_replay(&salt)?;
        }

current master version

        // Check repeated salt after first successful decryption #442
        if let Some(ref salt) = self.salt {
            context.check_nonce_replay(self.method, salt)?;
        }

if enable feature security-replay-attack-detect, it causes error detected repeated nonce (iv/salt)

@chuxi
Copy link
Contributor Author

chuxi commented Jan 13, 2023

we need to revert the code, or aead can not work in current version if we set reject policy.

@zonyitoo zonyitoo merged commit 3948d6d into shadowsocks:master Jan 13, 2023
@chuxi chuxi deleted the aead-salt-check-fix branch January 13, 2023 07:44
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.

None yet

2 participants