Skip to content

Predictive seed #1804

@magdalenaszumny

Description

@magdalenaszumny

The libcoap library automatically always calls coap_prng_init() during initialization, which has two problematic behaviors:

  1. It always uses the coap ticks as the PRNG seed. Coap ticks is uptime, which is on most cases the same value.
  2. It calls system-wide PRNG seeding functions (srandom()/srand()), affecting the entire application's random number generation, not just libcoap

Would it be ok to make coap_prng_init() call optional therefore configurable?
What would you think about passing seed as parameter during coap startup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions