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

Consider switching to crypto/Rand #34

Open
udf2457 opened this issue Feb 20, 2022 · 1 comment
Open

Consider switching to crypto/Rand #34

udf2457 opened this issue Feb 20, 2022 · 1 comment

Comments

@udf2457
Copy link

udf2457 commented Feb 20, 2022

Given that crypto/Rand uses /dev/urandom or its equivalent on on other platforms, are there any good reasons not to switch away from math/Rand to crypto/Rand.

Indeed, your own documentation seems to suggest this would be a good idea, because you state (in irtt-server man page) that:

Allowing non-random fills insecure on public servers

But then you're not really doing much to help secure public servers if you then go and use math/Rand.

At least if you are not willing to replace it, you should provide crypto/Rand as a config option, e.g. --fill=crypto.

@udf2457 udf2457 changed the title Switch to crypto/Rand Consider switching to crypto/Rand Feb 20, 2022
@heistp
Copy link
Owner

heistp commented Feb 21, 2022

The reason not to switch to crypto by default is the increased CPU needed.

The concern in the doc was not that someone would send pseudo-random data in the payload, but that someone could use the payload as a covert channel. I'm not sure how serious an issue that is, so I'm not sure that math/Rand is being used in an insecure way here.

If there's a need, I could add crypto/Rand as an additional option at some point, if the binary size doesn't inflate too much.

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

No branches or pull requests

2 participants