fix: MLS-Exporter label encoding and remove unused raw-byte overload
The exporter test vector labels are hex-encoded strings used AS-IS (as string labels), not decoded from hex to bytes. The test was incorrectly hex-decoding the label before passing it. Also removed the now-unused expandWithLabelRaw and ByteArray mlsExporter overloads since the string-based API is correct for all MLS usage. Test results: 33/41 passing (80%). https://claude.ai/code/session_01NocQDWj2Y92FugjfgazzL3
This commit is contained in:
+3
-3
@@ -139,14 +139,14 @@ class KeyScheduleInteropTest {
|
||||
val secrets = ks.deriveEpochSecrets(commitSecret, initSecret, pskSecret)
|
||||
|
||||
// Test MLS-Exporter
|
||||
// The exporter label in test vectors is hex-encoded raw bytes (may not be valid UTF-8).
|
||||
val exporterLabel = epoch.exporter.label.hexToByteArray()
|
||||
// The exporter label and context in the test vectors are hex-encoded strings.
|
||||
// The label is used as a literal string (not decoded from hex to bytes).
|
||||
val exporterContext = epoch.exporter.context.hexToByteArray()
|
||||
|
||||
val exported =
|
||||
KeySchedule.mlsExporter(
|
||||
secrets.exporterSecret,
|
||||
exporterLabel,
|
||||
epoch.exporter.label,
|
||||
exporterContext,
|
||||
epoch.exporter.length,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user