Description
The current implementation status of HKDF deriveBits operation in the 3 major browser shows a different behavior when passing zero in the 'length' argument:
chrome | safari | firefox |
---|---|---|
empty string | OperationError | OperationError |
This is also described by the WPT covering this case.
It's worth mentioning that the change in HKDF behavior has been introduced in the PR #275, which was defined to address the [issue #274], originally filed to report a bug in PBKDF2. For some reason we assumed both ,HKDF and PBKDF2 should have the same behavior in case of length is zero.
Both HKDF and PBKDF2 algorithms were shipped in the 3 browsers long time ago, so any change would imply a non-backwad compatible change. However, I'd like to see if we can solve this interop issue, now that we are discussing other interop issues that affect the deriveBits operation.