LAWS.essiv_aead_round_trip_if: law of bend-osdev-aead@0.1.0.0 Import: import bend-osdev-aead@0.1.0.0/LAWS.bend as LAWS Lines 113-128 of bend-osdev-aead@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-aead@0.1.0.0/LAWS.bend&start_line=113&end_line=128 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr import bend-osdev-aead@0.1.0.0/essiv.bend as Es law essiv_aead_round_trip_if: for ~KD: Data for ~KS: Data for ~Blk: Data for ~enc: KS -> Blk -> Blk for ~blk_of: B.Octets -> Maybe<&2, Blk> for ~blk_to: Blk -> B.Octets for ~seal: KD -> B.Octets -> B.Octets -> B.Octets -> Result<&2, &2, Cr.CrError, B.Octets> for ~open: KD -> B.Octets -> B.Octets -> B.Octets -> Result<&2, &2, Cr.CrError, B.Octets> for +kd: KD for +ks: KS for +iv: B.Octets for +aad: B.Octets for +p: B.Octets for h: {Result.bind(&2, &2, Cr.CrError, B.Octets, B.Octets, seal(kd, Es.AdEssiv.iv(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, Es.AdEssivKey{kd, ks}, iv), aad, p), c => open(kd, Es.AdEssiv.iv(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, Es.AdEssivKey{kd, ks}, iv), aad, c)) == Result.map(&2, &2, Cr.CrError, B.Octets, B.Octets, c => p, seal(kd, Es.AdEssiv.iv(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, Es.AdEssivKey{kd, ks}, iv), aad, p)) : Result<&2, &2, Cr.CrError, B.Octets>} {Result.bind(&2, &2, Cr.CrError, B.Octets, B.Octets, Es.AdEssiv.seal(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, ~seal, Es.AdEssivKey{kd, ks}, iv, aad, p), c => Es.AdEssiv.open(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, ~open, Es.AdEssivKey{kd, ks}, iv, aad, c)) == Result.map(&2, &2, Cr.CrError, B.Octets, B.Octets, c => p, Es.AdEssiv.seal(~KD, ~KS, ~Blk, ~enc, ~blk_of, ~blk_to, ~seal, Es.AdEssivKey{kd, ks}, iv, aad, p)) : Result<&2, &2, Cr.CrError, B.Octets>} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.map https://jend.leeeet.dev/definition.txt?path=bend-osdev-aead@0.1.0.0/essiv.bend&name=AdEssiv.iv https://jend.leeeet.dev/definition.txt?path=bend-osdev-aead@0.1.0.0/essiv.bend&name=AdEssiv.open https://jend.leeeet.dev/definition.txt?path=bend-osdev-aead@0.1.0.0/essiv.bend&name=AdEssiv.seal https://jend.leeeet.dev/definition.txt?path=bend-osdev-aead@0.1.0.0/essiv.bend&name=AdEssivKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/crypto.bend&name=CrError