]> git.ipfire.org Git - thirdparty/krb5.git/commit
Add SPAKE preauth support 741/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 25 Sep 2015 21:47:35 +0000 (17:47 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 27 Mar 2018 00:59:30 +0000 (20:59 -0400)
commit7447259401569c92b1fb2e31cb02edbbffd67d35
treed29e6008f3ec820f9c9047c715a0fbc5afdbcd27
parent9172599008f3a6790d4a9a67acff58049742dcb6
Add SPAKE preauth support

This is an implementation of draft-ietf-kitten-krb-spake-preauth-05.
SPAKE preauth authenticates using the client principal long-term key,
but protects against offline dictionary attacks.

SPAKE preauth negotiates a group for use by the SPAKE2 algorithm.  The
edwards25519 group is implemented using code adapted from BoringSSL.
The P-256, P-384, and P-521 groups are implemented against OpenSSL.
edwards25519 is enabled by default on the client; no groups are
enabled by default on the KDC.

SPAKE preauth can also include a second factor.  Second factor support
isn't included in this implementation; comments have been left to
indicate what should change when it is added in.

Integration tests (tests/t_spake.py) are included with good coverage
of the negotiation scenarios.

Test vectors from the draft are checked against the group's "result"
operation.  The "keygen" operation is inherently random and is
therefore not tested against the vectors, but is effectively exercised
by the integration tests.

KDC optimistic challenge is implemented.  In the future we should
implement client optimistic SPAKE as well; this will require changes
to the generic client preauth framework.

In the future we should add per-realm configuration to deny encrypted
timestamp and encrypted challenge on a per-realm basis.  This
configuration should stick across client realm referrals.

In the future we should avoid attempting encrypting timestamp or
encrypted challenge if the KDC replies to a single-factor
SPAKEResponse message with PREAUTH_FAILED.  This will require a change
to the generic client preauth framework.

In the future we should make SPAKE support apply to the Windows build,
either by adding support for building plugin DLLs or by moving the
edwards25519 and client code to libkrb5.

[npmccallum@redhat.com: split up internal headers; split out group
registry contents; implemented P-384 and P-521]

ticket: 8647 (new)
35 files changed:
NOTICE
doc/admin/conf_files/kdc_conf.rst
doc/admin/conf_files/krb5_conf.rst
doc/admin/index.rst
doc/admin/spake.rst [new file with mode: 0644]
doc/formats/cookie.rst
doc/notice.rst
src/Makefile.in
src/config/pre.in
src/configure.in
src/include/k5-int.h
src/include/krb5/krb5.hin
src/kdc/kdc_preauth.c
src/lib/krb5/krb/preauth2.c
src/lib/krb5/os/trace.c
src/plugins/preauth/spake/AUTHORS [new file with mode: 0644]
src/plugins/preauth/spake/Makefile.in [new file with mode: 0644]
src/plugins/preauth/spake/deps [new file with mode: 0644]
src/plugins/preauth/spake/edwards25519.c [new file with mode: 0644]
src/plugins/preauth/spake/edwards25519_tables.h [new file with mode: 0644]
src/plugins/preauth/spake/groups.c [new file with mode: 0644]
src/plugins/preauth/spake/groups.h [new file with mode: 0644]
src/plugins/preauth/spake/iana.c [new file with mode: 0644]
src/plugins/preauth/spake/iana.h [new file with mode: 0644]
src/plugins/preauth/spake/openssl.c [new file with mode: 0644]
src/plugins/preauth/spake/spake.exports [new file with mode: 0644]
src/plugins/preauth/spake/spake_client.c [new file with mode: 0644]
src/plugins/preauth/spake/spake_kdc.c [new file with mode: 0644]
src/plugins/preauth/spake/t_krb5.conf [new file with mode: 0644]
src/plugins/preauth/spake/t_vectors.c [new file with mode: 0644]
src/plugins/preauth/spake/trace.h [new file with mode: 0644]
src/plugins/preauth/spake/util.c [new file with mode: 0644]
src/plugins/preauth/spake/util.h [new file with mode: 0644]
src/tests/Makefile.in
src/tests/t_spake.py [new file with mode: 0644]