Skip to content

message_formatting_function: ASCII length to binary length

This PR fixes the message formatting function message_formatting_function to use binary lengths instead of ASCII string lengths.

Problem

The message_formatting_function currently prepends the ASCII string length of each element (Label, ECDH public key, and/or MLKEM public key) instead of the binary length value.

Solution

This PR fixes the length by replacing ASCII string length with the equivalent binary length (number of octets) value for proper message formatting.

Changes

  • Updated length in message_formatting_function

Testing

Based on the change, the test vectors values are updated accordingly.

make compile && make run

Merge request reports

Loading