Flipping the leading bit of a bit string #
Shared bit-string helper Cslib.Crypto.flipHeadBit, used across second-preimage resistance
separations (CslibFrontier/Crypto/Computational/SecondPreimageResistant/Relations.lean)
and unauthenticated-IV counterexamples
(CslibFrontier/Crypto/Computational/Encryption/EncryptThenMAC/PartialTag.lean).
Main definitions #
Cslib.Crypto.flipHeadBit: flip the first bit of a word, mapping[]to[true].
Main results #
Cslib.Crypto.flipHeadBit_ne_self: flipping the leading bit always produces a distinct word.Cslib.Crypto.computableInPolyTime_flipHeadBit: polynomial-time certificate forflipHeadBit.