diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2012-10-24 05:20:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-26 02:22:18 -0400 |
commit | 3c68198e75111a905ac2412be12bf7b29099729b (patch) | |
tree | 109b39430631746fd4266d5fdbf8351c6c2e20d1 /Documentation/networking/ip-sysctl.txt | |
parent | 342567ccf088a6c4777ef352f559fe46aaeb047e (diff) |
sctp: Make hmac algorithm selection for cookie generation dynamic
Currently sctp allows for the optional use of md5 of sha1 hmac algorithms to
generate cookie values when establishing new connections via two build time
config options. Theres no real reason to make this a static selection. We can
add a sysctl that allows for the dynamic selection of these algorithms at run
time, with the default value determined by the corresponding crypto library
availability.
This comes in handy when, for example running a system in FIPS mode, where use
of md5 is disallowed, but SHA1 is permitted.
Note: This new sysctl has no corresponding socket option to select the cookie
hmac algorithm. I chose not to implement that intentionally, as RFC 6458
contains no option for this value, and I opted not to pollute the socket option
namespace.
Change notes:
v2)
* Updated subject to have the proper sctp prefix as per Dave M.
* Replaced deafult selection options with new options that allow
developers to explicitly select available hmac algs at build time
as per suggestion by Vlad Y.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/ip-sysctl.txt')
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index c7fc10724948..98ac0d7552a1 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -1514,6 +1514,20 @@ cookie_preserve_enable - BOOLEAN | |||
1514 | 1514 | ||
1515 | Default: 1 | 1515 | Default: 1 |
1516 | 1516 | ||
1517 | cookie_hmac_alg - STRING | ||
1518 | Select the hmac algorithm used when generating the cookie value sent by | ||
1519 | a listening sctp socket to a connecting client in the INIT-ACK chunk. | ||
1520 | Valid values are: | ||
1521 | * md5 | ||
1522 | * sha1 | ||
1523 | * none | ||
1524 | Ability to assign md5 or sha1 as the selected alg is predicated on the | ||
1525 | configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and | ||
1526 | CONFIG_CRYPTO_SHA1). | ||
1527 | |||
1528 | Default: Dependent on configuration. MD5 if available, else SHA1 if | ||
1529 | available, else none. | ||
1530 | |||
1517 | rcvbuf_policy - INTEGER | 1531 | rcvbuf_policy - INTEGER |
1518 | Determines if the receive buffer is attributed to the socket or to | 1532 | Determines if the receive buffer is attributed to the socket or to |
1519 | association. SCTP supports the capability to create multiple | 1533 | association. SCTP supports the capability to create multiple |