Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609860

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

From Stephan Müller <smueller@chronox.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver
Date 2017-03-27 16:00 +0200
Message-ID <tpDlE-r8-25@gated-at.bofh.it> (permalink)
References <toWJH-3l4-3@gated-at.bofh.it> <tpnTz-5VE-9@gated-at.bofh.it> <tpus1-2iB-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Montag, 27. März 2017, 06:23:11 CEST schrieb PrasannaKumar Muralidharan:

Hi PrasannaKumar,

> > Oh my, if you are right with your first guess, this is a bad DRNG design.
> > 
> > Just out of curiousity: what happens if a caller invokes the seed function
> > twice or more times (each time with the sufficient amount of bits)? What
> > is
> > your guess here?
> 
> Should the second seed use the random data generated by the device?

A DRNG should be capable of processing an arbitrary amount of seed data. It 
may be the case that the seed data must be processed in chunks though.

That said, it may be the case that after injecting one chunk of seed the 
currently discussed RNG simply needs to generate a random number to process 
the input data before another seed can be added. But that is pure speculation.

But I guess that can be easily tested: inject a known seed into the DRNG, 
generate a random number, inject the same seed again and again generate a 
random number. If both are identical (which I do not hope), then the internal 
state is simply overwritten (strange DRNG design).

A similar test can be made to see whether a larger set of seed simply 
overwrites the state or is really processed.

1. seed
2. generate random data
3. reset
4. seed with anther seed
5. generate random data
6. reset
7. seed with same data from 1
8. seed with same data from 2
9. generate random data

If data from 9 is identical to 2, then additional seed data is discarded -> 
bad design. If data from 9 is identical to 5, then the additional data 
overwrites the initial data -> bad DRNG design. If data from 9 neither matches 
2 or 5, then all seed is taken -> good design.

Ciao
Stephan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-25 17:30 +0100
  [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-25 17:30 +0100
    Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> - 2017-03-26 17:40 +0200
      Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-26 18:10 +0200
        Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-26 18:20 +0200
        Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> - 2017-03-26 18:50 +0200
          Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-26 19:10 +0200
            Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-26 20:20 +0200
    Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-26 19:20 +0200
      Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-26 20:10 +0200
        Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-26 23:30 +0200
          Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> - 2017-03-27 06:30 +0200
            Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-27 16:00 +0200
              Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-28 19:00 +0200
                Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-28 19:50 +0200
                Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-28 19:50 +0200
  Re: [PATCH v3 0/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller <smueller@chronox.de> - 2017-03-25 17:40 +0100

csiph-web