[dpdk-dev] [PATCH v1 1/1] examples/l2fwd-crypto: improve random key generator

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jun 7 22:30:31 CEST 2016


2016-05-25 15:34, Piotr Azarewicz:
> This patch improve generate_random_key() function by replacing rand()
> function with reading from /dev/urandom.
> 
> CID 120136 : Calling risky function (DC.WEAK_CRYPTO)
> dont_call: rand should not be used for security related applications, as
> linear congruential algorithms are too easy to break
> 
> Coverity issue: 120136
> 
> Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz at intel.com>
> ---
>  examples/l2fwd-crypto/main.c |   18 +++++++++++++-----

Is it relevant for this example?



More information about the dev mailing list