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

regenerate_ssh_host_keys doesn't generate Ed25519 key #6

Closed
oittaa opened this Issue Nov 11, 2015 · 9 comments

Comments

Projects
None yet
7 participants
@oittaa

oittaa commented Nov 11, 2015

/etc/init.d/regenerate_ssh_host_keys doesn't generate Ed25519 key. This could be fixed by adding the following line:

      yes | ssh-keygen -q -N '' -t ed25519 -f /etc/ssh/ssh_host_ed25519_key && \

after

      yes | ssh-keygen -q -N '' -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key && \
@oittaa

This comment has been minimized.

Show comment
Hide comment
@oittaa

oittaa Nov 22, 2015

Another good idea might be to reseed /dev/urandom from hardware RNG to get more entropy for the key generation.

Adding this before the nohup line would implement it:

modprobe -q bcm2708-rng && dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 2>/dev/null

oittaa commented Nov 22, 2015

Another good idea might be to reseed /dev/urandom from hardware RNG to get more entropy for the key generation.

Adding this before the nohup line would implement it:

modprobe -q bcm2708-rng && dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 2>/dev/null
@dev-tty

This comment has been minimized.

Show comment
Hide comment
@dev-tty

dev-tty Nov 25, 2015

Someone should really, really pay attention to this... This is a very, very big deal to device security!

dev-tty commented Nov 25, 2015

Someone should really, really pay attention to this... This is a very, very big deal to device security!

@xcasex

This comment has been minimized.

Show comment
Hide comment
@xcasex

xcasex Nov 26, 2015

why is this report not handled? this is critical.

xcasex commented Nov 26, 2015

why is this report not handled? this is critical.

@XECDesign

This comment has been minimized.

Show comment
Hide comment
@XECDesign

XECDesign Nov 26, 2015

Contributor

It is. The key is generated in the new image. The entropy concern is not related to the original issue and needs to be reported separately with proof, not assertions. As I understand it, ssh-keygen will not generate any keys until it has enough entropy.

Contributor

XECDesign commented Nov 26, 2015

It is. The key is generated in the new image. The entropy concern is not related to the original issue and needs to be reported separately with proof, not assertions. As I understand it, ssh-keygen will not generate any keys until it has enough entropy.

@XECDesign XECDesign closed this Nov 26, 2015

@cryptax

This comment has been minimized.

Show comment
Hide comment
@cryptax

cryptax Nov 27, 2015

I don't think ssh-keygen will wait until it has enough entropy (if I am correct?) :
ssh-keygen is using /dev/urandom (see strace provided here), and /dev/urandom is a non-blocking random source.
So, the issue oittaa reports looks quite valid to me, and the suggestion to use bcm2708-rng nice too.
Sure, it would be better to have a proof of how much entropy is available at boot time, but it's not a reason not to patch/secure the code...

cryptax commented Nov 27, 2015

I don't think ssh-keygen will wait until it has enough entropy (if I am correct?) :
ssh-keygen is using /dev/urandom (see strace provided here), and /dev/urandom is a non-blocking random source.
So, the issue oittaa reports looks quite valid to me, and the suggestion to use bcm2708-rng nice too.
Sure, it would be better to have a proof of how much entropy is available at boot time, but it's not a reason not to patch/secure the code...

@vladionescu

This comment has been minimized.

Show comment
Hide comment
@vladionescu

vladionescu Nov 27, 2015

The discussion here and on the RPi forums has been childish and, worse, dismissive of a contributor trying to solve a significant security problem.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=126892

Raspbian's reaction to this bug and contributor does not inspire confidence in the project.

Please reconsider patching the code.

vladionescu commented Nov 27, 2015

The discussion here and on the RPi forums has been childish and, worse, dismissive of a contributor trying to solve a significant security problem.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=126892

Raspbian's reaction to this bug and contributor does not inspire confidence in the project.

Please reconsider patching the code.

@XECDesign

This comment has been minimized.

Show comment
Hide comment
@XECDesign

XECDesign Nov 27, 2015

Contributor

To be clear, the entropy issue IS being looked at internally by multiple people and WILL be addressed. This particular issue wasn't closed because the entropy issue isn't important or is being ignored, but because it's not the original issue that was reported. And of course oittaa's contribution is appreciated.

Contributor

XECDesign commented Nov 27, 2015

To be clear, the entropy issue IS being looked at internally by multiple people and WILL be addressed. This particular issue wasn't closed because the entropy issue isn't important or is being ignored, but because it's not the original issue that was reported. And of course oittaa's contribution is appreciated.

@cryptax

This comment has been minimized.

Show comment
Hide comment
@cryptax

cryptax Nov 27, 2015

Oh right. Nice precision then, thanks. Is there a link to the issue is being addressed then?

cryptax commented Nov 27, 2015

Oh right. Nice precision then, thanks. Is there a link to the issue is being addressed then?

@Harvester57

This comment has been minimized.

Show comment
Hide comment
@Harvester57

Harvester57 Dec 2, 2015

Internally ? what does that even mean ? Too difficult to open a new bug report for us to comment ?

Harvester57 commented Dec 2, 2015

Internally ? what does that even mean ? Too difficult to open a new bug report for us to comment ?

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