def Xts.encrypt.ref
import bend-osdev-cipher-modes@0.1.0.0/xts.bend as Xtsimport 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
264# Xts.encrypt and Xts.decrypt through the structural forms (the laws' proofs
265# reason about these; PROOF.bend proves them equal to the public defs)
266def Xts.encrypt.ref(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, +k1: K, +k2: K, i: B.Octets, p: B.Octets) -> Result<&2, &2, M.CmError, B.Octets>:
267 xts.e1(~K, ~enc, k1, xts.tweak(~K, ~enc, k2, i), B.Octets.to_list(p))