mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-09 16:42:05 +02:00
Previously, we had HKDF-for-session-version-3, which matches RFC 5869, and HKDF-for-session-version-2, which produced slightly different results. However, nothing in the current versions of Signal uses anything but the RFC-compliant version. Therefore, this commit removes support for version 2 and deprecates the entry points that take a version: - Java: The HKDFv3 class is deprecated in favor of static methods on the HKDF class. - Swift: The hkdf function that takes a 'version' parameter is deprecated in favor of a new overload that does not. - TypeScript: The HKDF class is deprecated in favor of a top-level hkdf function. - Rust: The libsignal-protocol implementation of HKDF has been removed entirely in favor of the hkdf crate. There are no significant benchmark deltas from this change, and a minimal code size increase that's the cost for removing our own implementation of HKDF. The deprecations can be removed as a later breaking change.