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

Drop 4096 bytes of the early keystream #1586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

loganaden
Copy link

It might be safer to drop 4096 bytes to be on the safe side.

See: https://twitter.com/nugxperience/status/1773906926503591970

RC4 implementation in xz-utils backdoor discards 4096 bytes.
@Coeur
Copy link
Contributor

Coeur commented May 5, 2024

It's 2024 and all the systems have arc4random natively. I feel we should just delete our arc4random.c instead of maintaining it.

@loganaden
Copy link
Author

I shall prepare a diff to do that then ?

@Coeur
Copy link
Contributor

Coeur commented May 5, 2024

No. I'm reading through the history. I see:

Add an arc4random implementation for use by evdns

Previously, evdns was at the mercy of the user for providing a good
entropy source; without one, it would be vulnerable to various
active attacks.

This patch adds a port of OpenBSD's arc4random() calls to Libevent
[port by Chris Davis], and wraps it up a little bit so we can use it
more safely.

So better, can we re-align our implementation with newer implementations based on Chacha instead of RC4?

@Coeur
Copy link
Contributor

Coeur commented May 6, 2024

I shall prepare a diff to do that then ?

On second thought, maybe yes, you can propose a pull request that removes "arc4random.c". I do not know what @azat or @nmathewson would think of it, but I would support that nowadays people should rely on their system's implementation of arc4random (or the one from GNU C Library if their system doesn't have arc4random natively) instead of having it poorly maintained by libevent: https://en.wikipedia.org/wiki/RC4#Security

As of 2015, there is speculation that some state cryptologic agencies may possess the capability to break RC4 when used in the TLS protocol. IETF has published RFC 7465 to prohibit the use of RC4 in TLS; Mozilla and Microsoft have issued similar recommendations.

That file should have moved to ChaCha many years ago otherwise. I believe OpenBSD moved to ChaCha in 2013.

@loganaden
Copy link
Author

loganaden commented May 6, 2024

Let's wait for others to weigh in and then I prepare the updated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants