drbg: fix issue where DRBG_CTR fails if NO_DF is used (2nd attempt)
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 30 May 2019 16:37:29 +0000 (18:37 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Wed, 11 Sep 2019 09:22:18 +0000 (11:22 +0200)
commit0768b38b80d7636910c129ef8954d4f13a574ff6
tree73cb84196f8d84767680f5f5f19710af98d9cd7a
parent5562dbb39cbf9db41dad9b8d3ae643262e458c63
drbg: fix issue where DRBG_CTR fails if NO_DF is used (2nd attempt)

Since commit 7c226dfc434d a chained DRBG does not add additional
data anymore when reseeding from its parent. The reason is that
the size of the additional data exceeded the allowed size when
no derivation function was used.

This commit provides an alternative fix: instead of adding the
entire DRBG's complete state, we just add the DRBG's address
in memory, thereby providing some distinction between the different
DRBG instances.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9832)
crypto/rand/rand_lib.c