PruteanuVlad opened a new pull request, #3376:
URL: https://github.com/apache/nuttx-apps/pull/3376

   ## Summary
   
   This adds 2 cases to the HMAC driver test. They are taken from [RFC4231 - 
Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and 
HMAC-SHA-512](https://datatracker.ietf.org/doc/html/rfc4231), test cases number 
6 and 7.
   Results for MD5 and SHA1, which aren't included in the RFC were generated 
using [this online calculator](https://cryptii.com/pipes/hmac), which was 
validated by checking it's SHA256 against the expected RFC result.
   
   ## Impact
   
   This update improves the test by covering an additional edge-case. 
   
   ## Testing
   
   
   Development was done using ESP32 DevkitC.
   Building was done on Ubuntu 24.04 VM.
   Testing using current nuttx master branch, bug describe in []() present:
   ```
   nsh> hmac
   hmac md5 success
   hmac md5 success
   hmac md5 success
   syshamc md5 failed
   bfecaf4efff90a3a668f3922fec3762d
   56be34521d144c88dbb8c733f0e8b3f6
   match md5 failed
   syshamc md5 failed
   09b8ae7b15adbbb243aca3491b51512b
   56be34521d144c88dbb8c733f0e8b3f6
   match md5 failed
   hmac sha1 success
   hmac sha1 success
   hmac sha1 success
   syshamc sha1 failed
   CIOCGSESSIONhmac mismatchCIOCGSESSIONhmac 
mismatchCIOCGSESSIONhm90d0dace1c1bdc957339307803160335bde6df2b
   d730594d167e35d5956fd8003d0db3d3f46dc7bb
   match sha1 failed
   syshamc sha1 failed
   217e44bb08b6e06a2d6c30f3cb9f537f97c63356
   d730594d167e35d5956fd8003d0db3d3f46dc7bb
   match sha1 failed
   hmac sha256 success
   hmac sha256 success
   hmac sha256 success
   syshamc sha256 failed
   60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54
   7dda3cc169743a6484649f94f0eda0f9f2ff496a9733fb796ed5adb40a44c3c1
   match sha256 failed
   ac mismatchCIOCGSESSIONhmac mismatchCIOCGSESSIONhmac mismatchCIOsyshamc 
sha256 failed
   9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2
   7dda3cc169743a6484649f94f0eda0f9f2ff496a9733fb796ed5adb40a44c3c1
   match sha256 failed
   ```
   
   Testing using the above mentioned PR fix:
   ```
   nsh> hmac
   hmac md5 success
   hmac md5 success
   hmac md5 success
   hmac md5 success
   hmac md5 success
   hmac sha1 success
   hmac sha1 success
   hmac sha1 success
   hmac sha1 success
   hmac sha1 success
   hmac sha256 success
   hmac sha256 success
   hmac sha256 success
   hmac sha256 success
   hmac sha256 success
   ```


-- 
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]

Reply via email to