Class JdkHmac
VerifiedHkdf.Mac). This class performs no cryptographic construction of its own: it
selects the standard HmacSHA256/384/512 provider operation, copies values at the Dafny
boundary, and checks the provider's output length.
Trust: JCE provider selection, provider correctness, key/input handling inside Mac,
its doFinal reset semantics, and JVM timing are outside the Dafny proof. Each call
creates a fresh Mac, so no provider state is shared. Secret-bearing Dafny sequences and
temporary arrays are not guaranteed to be erased.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Copies a production byte sequence through DafnyRuntime's primitive bulk-copy path.static dafny.DafnySequence<? extends Byte> compute(BigInteger hashLen, dafny.DafnySequence<? extends Byte> key, dafny.DafnySequence<? extends Byte> input)
-
Method Details
-
compute
public static dafny.DafnySequence<? extends Byte> compute(BigInteger hashLen, dafny.DafnySequence<? extends Byte> key, dafny.DafnySequence<? extends Byte> input) -
bytes
Copies a production byte sequence through DafnyRuntime's primitive bulk-copy path.Pinned DafnyRuntime 4.9.1
DafnySequence.toRawArray()callstoArray().unwrap(). For anArrayDafnySequencebacked by a primitivebyte[],toArray()clones the primitive array; for a forcedConcatDafnySequence, the copier uses theArrayDafnySequencefast path withSystem.arraycopyand thentoArray()clones again. The returned array is a fresh primitive copy and noselect/Byte.valueOfoccurs. Other representations fail closed rather than silently unboxing.
-