Re: generating keys by using only part of longer random number

Hash: SHA1

Kim Schulz wrote:
On Jun 10, 11:59 am, David Eather <eat...@xxxxxxxxxx> wrote:
Kristian Gjøsteen wrote:
Kim Schulz <kimu...@xxxxxxxxx> wrote:
If I have a random number generator that e.g. generates 512bit long
keys but I only need 160bits of them. Would the quality of the
randomness then be compromised if I always just uses the first 160bits
of the key?
If the generator samples 512 bit strings from the uniform distribution
(or something that looks like the uniform distribution), then it is
ok. Otherwise, it depends on the exact distribution.
The OP might want to look for BBS stream generator
Which may be useful for the job

Thanks for the input guys! appreciate it. The BBS seems to be
something I can actually use for another project I have so thanks for
that input too.
You can't lose any more entropy than the data you remove. If you have
512 bits of high-entropy random data, for example, then sample anything
from it and have your sample be high-entropy too. The only danger is if
your prng gives 512 bits of input and some ranges are more random than

In general, many prngs will not output very high entropy at first, so
most applications discard the first several bits of data. I would
actually recommend using the last 160 bits instead of the first 160
bits, although whether that actually matters depends on the algorithm.

Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Relevant Pages

  • Re: Question about bit strength
    ... Keyspace is the total number of useable keys. ... the rest are defined via a prng. ... several keys of 64-4096 characters, only the first 8-64 characters are ...
  • Re: Beginner Question:Gnupg Decryption
    ... I would need to specify both, the private keys passphrase and the key- ... id in order to decrypt ... In the binary file produced by a gnupg encryption, ...
  • Re: Problem with GnuPG
    ... installed GnuPG on my system. ... I have numerous keys listed that I have no knowledge of. ... longer works with my MUA either.I have tried deleting GnuPG in its ... Specifically, I'm talking about GPA. ...
  • Re: WEP Keys
    ... David Lopez schrieb: ... > use randomfunction with the seed but i read that the PRNG is a RC4 ... but I wont to take WEP correct keys. ...
  • Re: Problem with GnuPG
    ... installed GnuPG on my system. ... This URL shows the keys: ... GnuPG no longer works with my MUA either.I have tried deleting ... Specifically, I'm talking about GPA. ...