iscsi-scst: Add SHA256 and SHA3-256 support to CHAP #277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the moment SCST contains support for 2 CHAP algorithms: MD5 and SHA1. Linux LIO and open-iscsi both include these, as well as SHA256 and SHA3-256 (since 2019).
This PR adds SHA256 and SHA3-256 support to CHAP. Since in SCST CHAP negotiation is performed by the userspace
iscsi-scstd
daemon, the PR uses the kernel userspaceAL_ALG
API to access the additional hash functions.If configured for CHAP, on iSCSI login the client will present an ordered list of desired algorithms. During this negotiation, if the client requests SHA256 or SHA3-256 we verify that the kernel supports the algorithm before agreeing to use it.
Did some testing using
open-iscsi
with target settings modified from the default, e.g.And adding for Mutual Auth