Are you fan of TLS Extensions? We are here today to present the addition of Truncated HMAC on wolfSSL!
Currently defined TLS cipher suites use the HMAC to authenticate record-layer communications. In TLS, the entire output of the hash function is used as the MAC tag. However, it may be desirable in constrained environments to save bandwidth by truncating the output of the hash function to 80 bits when forming MAC tags. To enable the usage of Truncated HMAC at wolfSSL you can simply do:
Using Truncated HMAC on the client side requires an additional function call, which should be one of the following functions:
wolfSSL_CTX_UseTruncatedHMAC() is most recommended when the client would like to enable Truncated HMAC for all sessions. Setting the Truncated HMAC extension at context level will enable it in all SSL objects created from that same context from the moment of the call forward.
wolfSSL_UseTruncatedHMAC() will enable it for one SSL object only, so it`s recommended to use this function when there is no need for Truncated HMAC on all sessions.
On the server side no call is required. The server will automatically attend to the client`s request for Truncated HMAC.
All TLS extensions can also be enabled with:
If you have any questions about using TLS Extensions with wolfSSL please let us know at email@example.com.