Files
linux/crypto
Stephan Mueller 72f3e00dd6 crypto: drbg - replace int2byte with cpu_to_be
The DRBG requires the conversion of an integer into a string
representation of that integer. The previous implementation converted
the given integer byte-wise. However, the kernel offers the cpu_to_be
function which already re-arranges the memory representation of an
integer such that it applies when interpreting the same memory as
character string.

The change therefore uses an integer-cast / union of the target
character array together with the cpu_to_be function to convert an
integer into its string representation.

Tests show that the Hash and CTR DRBG implementations (the HMAC DRBG
does not require such conversion) is about 10% faster (or requires less
computing power, respectively).

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-08-25 20:34:07 +08:00
..
2014-04-18 14:20:48 +02:00
2013-04-25 21:01:47 +08:00
2014-08-01 22:35:55 +08:00
2013-02-04 21:16:53 +08:00
2010-02-16 20:33:49 +08:00
2014-08-01 22:35:55 +08:00
2008-08-29 15:50:02 +10:00
2014-08-01 22:35:55 +08:00
2013-07-09 10:33:30 -07:00
2013-07-09 10:33:30 -07:00
2014-06-25 21:51:53 +08:00
2011-08-06 18:32:45 -07:00
2014-08-01 22:35:55 +08:00
2014-08-01 22:35:55 +08:00