SVNews r327856

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-01-12 00:31:07 - r327856 by asomers (asomers)

Complete list of files affected by revision r327856:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

   Contents     MODIFY   /stable/11  
  History   Contents   Diff   MODIFY   /stable/11/sys/boot/geli/Makefile  
  History   Contents   Diff   MODIFY   /stable/11/sys/geom/eli/g_eli.h  
  History   Contents   Diff   MODIFY   /stable/11/sys/geom/eli/g_eli_hmac.c  
  History   Contents   Diff   MODIFY   /stable/11/sys/geom/eli/pkcs5v2.c  
  History   Contents   Diff   MODIFY   /stable/11/tests/sys/geom/class/eli/Makefile  
  History   Contents     ADD   /stable/11/tests/sys/geom/class/eli/  
  History   Contents     ADD   /stable/11/tests/sys/geom/class/eli/hmac_test.c  
  History   Contents     ADD   /stable/11/tests/sys/geom/class/eli/testvect.h  

Commit message:

MFC r313962, r313972-r313973, r315230

r313962 by allanjude:
improve PBKDF2 performance

The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it could be

GELI's PBKDF2 uses a simple benchmark to determine a number of iterations
that will takes approximately 2 seconds. The security provided is actually
half what is expected, because an attacker could use the optimized
algorithm to brute force the key in half the expected time.

With this change, all newly generated GELI keys will be approximately 2x
as strong. Previously generated keys will talk half as long to calculate,
resulting in faster mounting of encrypted volumes. Users may choose to
rekey, to generate a new key with the larger default number of iterations
using the geli(8) setkey command.

Security of existing data is not compromised, as ~1 second per brute force
attempt is still a very high threshold.

PR: 202365
Original Research:
Submitted by: Joe Pixton <> (Original Version), jmg (Later
Reviewed by: ed, pjd, delphij
Approved by: secteam, pjd (maintainer)
Differential Revision:

r313972 by ngie:
Unbreak the build when "make obj" is executed beforehand

Using relative paths imply working directory (in this case .OBJDIR), whereas the
sources live in the .CURDIR-relative path.

X-MFC with: r313962
Pointyhat to: allanjude
Sponsored by: Dell EMC Isilon

r313973 by ngie:
A forced commit to note other portion of the Makefile change accidentally
committed in r313972

The code committed in r313962 implicitly relies on python 2.x to generate
testvect.h . There are a handful of issues with this approach:

- python is not an explicit build dependency for FreeBSD
- python 2.x is deprecated and will be removed sometime in the future
  (potentially before 11.x's EOL), and the script does not function with
  python 3.5 (it uses deprecated idioms and incompatible function calls).
- python(1) (by default) lives in /usr/local/bin (${LOCALBASE}/bin) and is a dependency of testvect.h (prior to r313972) which
  means that if the mtime of the generator script was newer than the
  mtime of the test vector, it could cause a spurious build failure in
  build time or at install time.

A better solution using C/C++ should be devised.

Discussed with: allanjude
X-MFC with: r313962, r313972
Sponsored by: Dell EMC Isilon

r315230 by ngie:
Move .../sys/geom/eli/pbkdf2... to .../sys/geom/class/eli/...

This change moves the tests added in r313962 to an existing directory
structure used by the geli TAP tests. It also, renames the test from
pbkdf2 to pbkdf2_test .

The changes to are being committed separately as they
aren't needed for the MFC to ^/stable/11, etc, if the MFC for the tests
is done all in one commit.

X-MFC with: r313962, r313972-r313973
Reviewed by: allanjude
Sponsored by: Dell EMC Isilon
Differential Revision: D9985


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 10 ms, 9 files printed. Current time is 2018-01-17 20:13:03. All times are in UTC/GMT.