All of lore.kernel.org
 help / color / mirror / Atom feed
* ATH9K RNG
@ 2016-05-23 10:26 Stephan Mueller
  2016-05-23 10:39   ` Valo, Kalle
  0 siblings, 1 reply; 3+ messages in thread
From: Stephan Mueller @ 2016-05-23 10:26 UTC (permalink / raw)
  To: miaoqing, kvalo; +Cc: linux-crypto

Hi Miaoqing, Kalle,

considering the patch ed14dc0af7ccea867b479feb88efdfe43ca2a0f9 which adds the 
invocation of add_hwgenerator_randomness to the ATH9K driver, may I ask about 
more details about how you concluded that the data from the ATH chip is 
entropic?

In addition, can you please elaborate on the ATH9K_RNG_ENTROPY macro? I am 
wondering about the multiplication of 320. If I understand the code right, the 
return code of ath9k_rng_data_read returns the number of u32 values read from 
the device, i.e. at most 320. With the ATH9K_RNG_ENTROPY macro, that return 
value is multiplied by 320 (bytes?) converted into bits. I.e. it sounds to be 
that the macro returns 320 u32 values times 320 bytes converted into bits. I 
am wondering whether the macro should rather read  (((x) * 8 * 32) >> 10) -- 
i.e. at most the entire array size holding the data in bits divided by 1024?

Ciao
Stephan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ATH9K RNG
@ 2016-05-23 10:39   ` Valo, Kalle
  0 siblings, 0 replies; 3+ messages in thread
From: Valo, Kalle @ 2016-05-23 10:39 UTC (permalink / raw)
  To: Stephan Mueller; +Cc: miaoqing, linux-crypto, linux-wireless

Stephan Mueller <smueller@chronox.de> writes:

> considering the patch ed14dc0af7ccea867b479feb88efdfe43ca2a0f9 which adds the 
> invocation of add_hwgenerator_randomness to the ATH9K driver, may I ask about 
> more details about how you concluded that the data from the ATH chip is 
> entropic?
>
> In addition, can you please elaborate on the ATH9K_RNG_ENTROPY macro? I am 
> wondering about the multiplication of 320. If I understand the code right, the 
> return code of ath9k_rng_data_read returns the number of u32 values read from 
> the device, i.e. at most 320. With the ATH9K_RNG_ENTROPY macro, that return 
> value is multiplied by 320 (bytes?) converted into bits. I.e. it sounds to be 
> that the macro returns 320 u32 values times 320 bytes converted into bits. I 
> am wondering whether the macro should rather read  (((x) * 8 * 32) >> 10) -- 
> i.e. at most the entire array size holding the data in bits divided by 1024?

Please include linux-wireless (Cced) in the discussion. I don't remember
the details (and can't check right now) but there were discussions in
linux-wireless mailing list.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ATH9K RNG
@ 2016-05-23 10:39   ` Valo, Kalle
  0 siblings, 0 replies; 3+ messages in thread
From: Valo, Kalle @ 2016-05-23 10:39 UTC (permalink / raw)
  To: Stephan Mueller
  Cc: miaoqing-sgV2jX0FEOL9JmXXK+q4OQ,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Stephan Mueller <smueller-T9tCv8IpfcWELgA04lAiVw@public.gmane.org> writes:

> considering the patch ed14dc0af7ccea867b479feb88efdfe43ca2a0f9 which adds the 
> invocation of add_hwgenerator_randomness to the ATH9K driver, may I ask about 
> more details about how you concluded that the data from the ATH chip is 
> entropic?
>
> In addition, can you please elaborate on the ATH9K_RNG_ENTROPY macro? I am 
> wondering about the multiplication of 320. If I understand the code right, the 
> return code of ath9k_rng_data_read returns the number of u32 values read from 
> the device, i.e. at most 320. With the ATH9K_RNG_ENTROPY macro, that return 
> value is multiplied by 320 (bytes?) converted into bits. I.e. it sounds to be 
> that the macro returns 320 u32 values times 320 bytes converted into bits. I 
> am wondering whether the macro should rather read  (((x) * 8 * 32) >> 10) -- 
> i.e. at most the entire array size holding the data in bits divided by 1024?

Please include linux-wireless (Cced) in the discussion. I don't remember
the details (and can't check right now) but there were discussions in
linux-wireless mailing list.

-- 
Kalle Valo--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-23 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 10:26 ATH9K RNG Stephan Mueller
2016-05-23 10:39 ` Valo, Kalle
2016-05-23 10:39   ` Valo, Kalle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.