sweisdb opened a new pull request, #45425:
URL: https://github.com/apache/spark/pull/45425

   ### What changes were proposed in this pull request?
   
   This change adds an additional pass through a key derivation function (KDF) 
to the key exchange protocol in `AuthEngine`. Currently, it uses the shared 
secret from a bespoke key negotiation protocol directly. This is an encoded X 
coordinate on the X25519 curve. It is atypical and not recommended to use that 
coordinate directly as a key, but rather to pass it to an KDF.
   
   Note, Spark now supports TLS for RPC calls. It is preferable to use that 
rather than the bespoke AES RPC encryption implemented by `AuthEngine` and 
`TransportCipher`.
   
   ### Why are the changes needed?
   
   This follows best practices of key negotiation protocols. The encoded X 
coordinate is not guaranteed to be uniformly distributed over the 32-byte key 
space. Rather, we pass it through a HKDF function to map it uniformly to a 
16-byte key space.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Exiting tests under:
   `build/sbt "network-common/test:testOnly"`
   
   Specifically:
   `build/sbt "network-common/test:testOnly 
org.apache.spark.network.crypto.AuthEngineSuite"`
   `build/sbt "network-common/test:testOnly 
org.apache.spark.network.crypto.AuthIntegrationSuite"`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to