java.lang.Object
io.github.mahmoudimus.quic.internal.verifiedhkdf.HkdfBridge

public final class HkdfBridge extends Object
Handwritten value/error boundary between Hkdf and the Dafny-generated RFC 5869/8446 implementation in VerifiedHkdf.

The generated kernel decides every functional result; this class only copies octets, preserves UTF-16 label units for ASCII validation, and maps the kernel's failure data to the historical Java exception types and messages of quic.Hkdf. Java array/sequence copying, allocation, the Dafny compiler/runtime and JCE remain trusted; this is not a refinement proof of the adapter, and it makes no constant-time claim.

  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    expand(int hashLength, byte[] prk, byte[] info, int length)
    HKDF-Expand; the generated kernel validates length and key before its loop.
    static byte[]
    extract(int hashLength, byte[] salt, byte[] ikm)
    HKDF-Extract; an empty salt is normalized by the generated kernel.
    static byte[]
    labelInfo(String label, byte[] context, int length)
    RFC 8446 HkdfLabel serialization; the generated kernel validates ASCII and bounds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • extract

      public static byte[] extract(int hashLength, byte[] salt, byte[] ikm)
      HKDF-Extract; an empty salt is normalized by the generated kernel.
    • expand

      public static byte[] expand(int hashLength, byte[] prk, byte[] info, int length)
      HKDF-Expand; the generated kernel validates length and key before its loop.
    • labelInfo

      public static byte[] labelInfo(String label, byte[] context, int length)
      RFC 8446 HkdfLabel serialization; the generated kernel validates ASCII and bounds.