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

entropy subsystem #2793

Closed
zephyrbot opened this issue Nov 21, 2016 · 5 comments
Closed

entropy subsystem #2793

zephyrbot opened this issue Nov 21, 2016 · 5 comments
Assignees
Labels
area: Security Security Enhancement Changes/Updates/Additions to existing features priority: high High impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 21, 2016

Reported by Inaky Perez-Gonzalez:

As a developer, I need a consistent way to generate crypto-grade entropy that can be used to seed pseudo-random-number-generators for crypto, secure storage and hashing.

The subsystem shall support:

  • binding HW sources of entropy to the subsystem
  • harvesting entropy from said sources:
    -- the entropy sources that can generate entropy as part of their normal operation shall be able to push entropy to the subsystem when enough is generated
    -- the entropy sources that can supply entropy on demand shall support being polled by the subsystem
  • means for the user to query the subssystem for N bytes of entropy
    -- to be resolved: support source hoping? or will be adding from multiple SW and HW sources enough?
  • sources
    -- HW sources from SoC, drivers for entropy/crypto specific modules
    -- SW sources:
    --- drivers that have soft/random timings
    --- IRQ handler timings
    --- network noise

The current subsystem implementation (drivers/random) is not sufficient as it allows only a single source of entropy to be used. More solid entropy could be achieved by adding push points, reinforced with HW generated one.

(Imported from Jira ZEP-1314)

@zephyrbot
Copy link
Collaborator Author

by Leandro Pereira:

Took a stab at implementing this. It's currently in code review.

#742

@zephyrbot
Copy link
Collaborator Author

by Ruud Derwig:

A security researcher signaled the lack of a good OS built-in solution for random numbers as well. He looked at several embedded OSes. A good summary of his findings was presented at CCC: https://media.ccc.de/v/33c3-7949-wheel_of_fortune
Main issues with small embedded systems are the lack of good entropy sources (the main source of entropy in GP OS CSPRNGS is human interaction (and device complexity), often lacking in small, deeply embedded systems), and PRNGs that are not lightweight.
I'll invite him to review and contribute - as part part of his research he developed a solution matching his criteria.

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-1313

@zephyrbot zephyrbot added priority: high High impact/importance bug area: Security Security Enhancement Changes/Updates/Additions to existing features labels Sep 23, 2017
@zephyrbot zephyrbot added this to the v1.10.0 milestone Sep 23, 2017
@nashif
Copy link
Member

nashif commented Nov 14, 2017

@lpereira is this done for 1.10?

@lpereira
Copy link
Collaborator

lpereira commented Nov 14, 2017

Part of it is done, yes: the only thing that is missing is a software-only thing to gather entropy from various sources where a hardware number generator isn't available. What has been merged is mostly a cleanup, separating drivers from the random number generator themselves, and adding a simple generator that does not draw that much entropy from the device.

I'll close this as done and open another ticket for the software entropy gathering thing, targeting 1.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Security Security Enhancement Changes/Updates/Additions to existing features priority: high High impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants