Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2018 19:45:00 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339479 - head/sys/dev/random
Message-ID:  <201810201945.w9KJj0OF082304@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Sat Oct 20 19:44:59 2018
New Revision: 339479
URL: https://svnweb.freebsd.org/changeset/base/339479

Log:
  Fortuna: Clean up reseeding key material to closer match FS&K
  
  When reseeding, only incorporate actual key material.  Do not include e.g.
  the derived key schedules or other AES context.
  
  I don't think the extra material was harmful here, just not beneficial.
  
  Reviewed by:	delphij, markm
  Approved by:	secteam (delphij)
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D16934

Modified:
  head/sys/dev/random/fortuna.c

Modified: head/sys/dev/random/fortuna.c
==============================================================================
--- head/sys/dev/random/fortuna.c	Sat Oct 20 19:42:38 2018	(r339478)
+++ head/sys/dev/random/fortuna.c	Sat Oct 20 19:44:59 2018	(r339479)
@@ -285,7 +285,8 @@ random_fortuna_reseed_internal(uint32_t *entropy_data,
 	 */
 	randomdev_hash_init(&context);
 	randomdev_hash_iterate(&context, zero_region, RANDOM_ZERO_BLOCKSIZE);
-	randomdev_hash_iterate(&context, &fortuna_state.fs_key, sizeof(fortuna_state.fs_key));
+	randomdev_hash_iterate(&context, &fortuna_state.fs_key.key.keyMaterial,
+	    fortuna_state.fs_key.key.keyLen / 8);
 	randomdev_hash_iterate(&context, entropy_data, RANDOM_KEYSIZE*blockcount);
 	randomdev_hash_finish(&context, hash);
 	randomdev_hash_init(&context);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810201945.w9KJj0OF082304>