additionalData method
Appends additional data to the transcript for the Merlin cryptographic protocol.
This method allows you to include additional data in the transcript, which is often used in cryptographic protocols to provide context or metadata for the protocol's operation. It appends a label and a message to the transcript.
Parameters:
label
: A list of integers representing the label for the additional data.message
: A list of integers representing the actual additional data message.
Usage:
MerlinTranscript transcript = MerlinTranscript("MyApp");
transcript.additionalData("user-id".codeUnits, "Alice".codeUnits);
// Include additional data in the transcript with the label "user-id" and the message "Alice."
This method ensures that the additional data is properly formatted and included in the transcript, making it available for cryptographic operations
Implementation
void additionalData(List<int> label, List<int> message) {
final size = List.filled(4, 0);
writeUint32LE(message.length, size);
final List<int> labelSize = [...label, ...size];
strobe.additionalData(true, labelSize);
strobe.additionalData(false, message);
}