Check.sm4_cbc_big: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/check.bend as Check Lines 283-286 of bend-osdev-crypto@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/check.bend&start_line=283&end_line=286 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M import bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend as S import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr import bend-osdev-crypto@0.1.0.0/modes.bend as Md import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM import bend-osdev-crypto@0.1.0.0/inst_lc.bend as LC def sm4_cbc_big(+k: B.Octets, +iv: B.Octets, +m: B.Octets) -> String: +r = LC.CrLc.key(~S.LcSm4Key, ~S.LcSm4.key, k) +c = Result.bind(&2, &2, Cr.CrError, S.LcSm4Key, B.Octets, r, kk => Md.CrCbc.encrypt(~S.LcSm4Key, ~M.CmBlock, ~16n, ~S.LcSm4.encrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, ~CM.CrBlk128.to_octets, kk, iv, m)) round(m, c, Result.bind(&2, &2, Cr.CrError, S.LcSm4Key, B.Octets, r, kk => Result.bind(&2, &2, Cr.CrError, B.Octets, B.Octets, c, x => Md.CrCbc.decrypt(~S.LcSm4Key, ~M.CmBlock, ~16n, ~S.LcSm4.decrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, ~CM.CrBlk128.to_octets, kk, iv, x)))) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/check.bend&name=round https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/crypto.bend&name=CrError https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.of_octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.to_octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_lc.bend&name=CrLc.key https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrCbc.decrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrCbc.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4.decrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4.key https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4Key