Fixed byte pairs #
This module supplies the two-block convenience wrapper used by hash functions with a 2n-byte
input. General indexed block concatenation is already provided, for every carrier, by
Cslib.BitString.blocksEquiv.symm.
Main definitions #
Cslib.Crypto.FixedBytes.pairBlocks: concatenate two blocks of the same width.
Main results #
Cslib.Crypto.FixedBytes.pairBlocks_left,pairBlocks_right: the two-block specialization agrees with its left and right inputs.
References #
This is general byte-string infrastructure rather than a formalization of an external result.
def Cslib.Crypto.FixedBytes.pairBlocks {width : ℕ} (left right : FixedBytes width) :
FixedBytes (2 * width)
Concatenate two equal-width byte strings as consecutive blocks, using Fin.append.
@[simp]
theorem Cslib.Crypto.FixedBytes.pairBlocks_left {width : ℕ} (left right : FixedBytes width) (offset : Fin width) :
The first block of a two-block concatenation is its left input.
@[simp]
theorem Cslib.Crypto.FixedBytes.pairBlocks_right {width : ℕ} (left right : FixedBytes width) (offset : Fin width) :
The second block of a two-block concatenation is its right input.