LAWS.bend open laws/TODOs
raw source on the hub · import bend-osdev-legacy-ciphers@0.1.0.0/LAWS.bend as LAWS
Laws about the public interface of every cipher in the package.
Properties, for every input: each block cipher's decryption undoes its encryption, and its encryption undoes its decryption, for every key and every block (so each is a permutation of the blocks), for the 128-bit ciphers (SM4, Camellia, Serpent, Twofish, ARIA, CAST-256) and the 64-bit ones (DES, 3DES, Blowfish, CAST-128, TEA, XTEA, FCrypt); the 64-bit modes undo themselves for DES and 3DES; RC4 applied twice from one state gives the data back, and RC4 in pieces is RC4 of the whole; 64-bit blocks survive their byte form.
Vectors: the specifications' own test values, proved by computation (see the end of the file).
19 imports
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 ./legacy_ciphers.bend as L import ./des.bend as D import ./tdes.bend as T import ./sm4.bend as S import ./camellia.bend as C import ./serpent.bend as P import ./twofish.bend as F import ./rc4.bend as R import ./modes64.bend as X import ./aria.bend as A import ./cast6.bend as C6 import ./blowfish.bend as BF import ./cast5.bend as C5 import ./tea.bend as TE import ./xtea.bend as XT import ./fcrypt.bend as FC
Laws
law des_round_trip provedin PROOF.bendsource · line 36 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law des_round_trip_dual provedin PROOF.bendsource · line 41 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law tdes_round_trip provedin PROOF.bendsource · line 48 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law tdes_round_trip_dual provedin PROOF.bendsource · line 53 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law sm4_round_trip provedin PROOF.bendsource · line 60 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4Key -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law sm4_round_trip_dual provedin PROOF.bendsource · line 65 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4Key -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law camellia_round_trip provedin PROOF.bendsource · line 72 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamelliaKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law camellia_round_trip_dual provedin PROOF.bendsource · line 77 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamelliaKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law serpent_round_trip provedin PROOF.bendsource · line 84 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpentKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law serpent_round_trip_dual provedin PROOF.bendsource · line 89 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpentKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law twofish_round_trip provedin PROOF.bendsource · line 96 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofishKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofish.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofish.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law twofish_round_trip_dual provedin PROOF.bendsource · line 101 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofishKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofish.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/twofish.LcTwofish.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law aria_round_trip provedin PROOF.bendsource · line 108 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/aria.LcAriaKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law aria_round_trip_dual provedin PROOF.bendsource · line 113 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/aria.LcAriaKey -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law cast6_round_trip provedin PROOF.bendsource · line 120 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6Key -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6.encrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law cast6_round_trip_dual provedin PROOF.bendsource · line 125 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6Key -> @+b:0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock -> {0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6.decrypt(k, b)) == b : 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock}
law blowfish_round_trip provedin PROOF.bendsource · line 132 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfishKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfish.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfish.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law blowfish_round_trip_dual provedin PROOF.bendsource · line 137 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfishKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfish.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfish.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law cast5_round_trip provedin PROOF.bendsource · line 144 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5Key -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law cast5_round_trip_dual provedin PROOF.bendsource · line 149 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5Key -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law tea_round_trip provedin PROOF.bendsource · line 156 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/tea.LcTeaKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/tea.LcTea.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/tea.LcTea.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law tea_round_trip_dual provedin PROOF.bendsource · line 161 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/tea.LcTeaKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/tea.LcTea.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/tea.LcTea.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law xtea_round_trip provedin PROOF.bendsource · line 168 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXteaKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXtea.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXtea.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law xtea_round_trip_dual provedin PROOF.bendsource · line 173 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXteaKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXtea.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXtea.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law fcrypt_round_trip provedin PROOF.bendsource · line 180 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcryptKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.decrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.encrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law fcrypt_round_trip_dual provedin PROOF.bendsource · line 185 · raw
@k:0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcryptKey -> @+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.decrypt(k, b)) == b : 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64}
law rc4_involution provedin PROOF.bendsource · line 194 · raw
@+st:0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4State -> @+m:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> {0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_data(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, 0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_data(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, m)))) == m : 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets}the cipher is its own inverse: from one state, applied twice, the data comes back
law rc4_streaming_data provedin PROOF.bendsource · line 202 · raw
@+st:0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4State -> @+a:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @+b:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> {0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_data(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.append(a, b))) == 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.append(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_data(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, a)), 0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_data(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_state(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, a)), b))) : 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets}data in pieces: the output of a ++ b is the output of a, then the output of b from the state after a; and the state after a ++ b is the state after a, then b
law rc4_streaming_state provedin PROOF.bendsource · line 208 · raw
@+st:0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4State -> @+a:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @+b:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> {0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_state(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.append(a, b))) == 0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_state(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.out_state(0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.update(st, a)), b)) : 0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4State}
law block64_octets_round_trip provedin PROOF.bendsource · line 216 · raw
@+b:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> {0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.of_octets(0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.to_octets(b)) == Some{b} : Maybe<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}64-bit blocks as bytes: a block read back from its 8 bytes is itself, and a list of blocks read back from its bytes is itself
law blocks64_octets_round_trip provedin PROOF.bendsource · line 220 · raw
@+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.blocks_of(0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)) == Done{bs} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>>}
law des_ecb_round_trip provedin PROOF.bendsource · line 228 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_decrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_encrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt, k, bs)) == bs : List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}
law des_cbc_round_trip provedin PROOF.bendsource · line 233 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+iv:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_decrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt, k, iv, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_encrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt, k, iv, bs)) == bs : List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}
law tdes_ecb_round_trip provedin PROOF.bendsource · line 239 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_decrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_encrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt, k, bs)) == bs : List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}
law tdes_cbc_round_trip provedin PROOF.bendsource · line 244 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+iv:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_decrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt, k, iv, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_encrypt_blocks(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt, k, iv, bs)) == bs : List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}
law des_cbc_octets_round_trip provedin PROOF.bendsource · line 250 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+iv:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {Result.bind(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_encrypt(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.to_octets(iv), 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)), c => 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_decrypt(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.to_octets(iv), c)) == Done{0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets>}
law tdes_cbc_octets_round_trip provedin PROOF.bendsource · line 256 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+iv:0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64 -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {Result.bind(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_encrypt(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.to_octets(iv), 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)), c => 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.cbc_decrypt(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64.to_octets(iv), c)) == Done{0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets>}
law des_ecb_octets_round_trip provedin PROOF.bendsource · line 262 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {Result.bind(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_encrypt(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.encrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)), c => 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_decrypt(0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.decrypt, k, c)) == Done{0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets>}
law tdes_ecb_octets_round_trip provedin PROOF.bendsource · line 267 · raw
@+k:0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey -> @+bs:List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64> -> {Result.bind(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_encrypt(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.encrypt, k, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)), c => 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.ecb_decrypt(0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.decrypt, k, c)) == Done{0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.octets_of(bs)} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets>}
law sm4_gbt32907 provedin PROOF.bendsource · line 281 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4Key, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock, k => 0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.encrypt(k, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{19088743, 2309737967, 4275878552, 1985229328}), 0x7d16ec09f99b830428c8e2852af315f6/sm4.LcSm4.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) == Done{0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{1746853684, 3523647070, 2259937615, 1399734854}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock>}BEGIN GENERATED by gen/vectors.py: vectors GB/T 32907-2016, Appendix A, example 1: key = plaintext = 0123456789ABCDEFFEDCBA9876543210, ciphertext 681EDF34D206965E86B3E94F536E4246
law camellia_rfc3713 provedin PROOF.bendsource · line 286 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamelliaKey, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock, k => 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.encrypt(k, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{19088743, 2309737967, 4275878552, 1985229328}), 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) == Done{0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{1734816056, 1419143539, 139920982, 1223343683}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock>}RFC 3713, Appendix A: Camellia-128, key = plaintext = 0123456789ABCDEFFEDCBA9876543210, ciphertext 67673138549669730857065648EABE43
law serpent_nessie provedin PROOF.bendsource · line 291 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpentKey, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock, k => 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.encrypt(k, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{0, 0, 0, 0}), 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Done{0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{908112250, 3869873104, 2518202486, 2187770601}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock>}NESSIE Serpent-128 test vectors, set 3 vector 0: the zero key and the zero block, ciphertext 3620B17AE6A993D09618B8768266BAE9
law des_bad_key_length provedin PROOF.bendsource · line 295 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDesKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/des.LcDes.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{7n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a DES key of 7 bytes is refused
law tdes_bad_key_length provedin PROOF.bendsource · line 299 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdesKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/tdes.LcTdes.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{8n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a TDEA key bundle of 8 bytes is refused (keying option 3 is not allowed)
law camellia_bad_key_length provedin PROOF.bendsource · line 303 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamelliaKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/camellia.LcCamellia.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{20n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a Camellia key of 20 bytes is refused
law serpent_bad_key_length provedin PROOF.bendsource · line 307 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpentKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/serpent.LcSerpent.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{33n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a Serpent key longer than 256 bits is refused
law aria_rfc5794 provedin PROOF.bendsource · line 313 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAriaKey, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock, k => 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.encrypt(k, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{1122867, 1146447479, 2291772091, 3437096703}), 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))) == Done{0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock{3608738774, 2875477107, 2645122875, 3863287672}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0xf4b936e0e6b2608080d2f02bb3ce9abe/cipher_modes.CmBlock>}RFC 5794, Appendix A.1: ARIA-128, key 000102030405060708090A0B0C0D0E0F, plaintext 00112233445566778899AABBCCDDEEFF, ciphertext D718FBD6AB644C739DA95F3BE6451778
law cast5_rfc2144 provedin PROOF.bendsource · line 319 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5Key, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64, k => 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64{19088743, 2309737967}), 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([1, 35, 69, 103, 18, 52, 86, 120, 35, 69, 103, 137, 52, 86, 120, 154]))) == Done{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64{596332517, 2222867634}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}RFC 2144, Appendix B.1: CAST-128 with the 128-bit key 0123456712345678234567893456789A, plaintext 0123456789ABCDEF, ciphertext 238B4FE5847E44B2
law fcrypt_spec provedin PROOF.bendsource · line 324 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcryptKey, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64, k => 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.encrypt(k, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64{305419896, 2596069104}), 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([17, 68, 119, 170, 221, 0, 51, 102]))) == Done{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64{3639441524, 2011956864}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>}the FCrypt specification's second vector: key 114477AADD003366, plaintext 123456789ABCDEF0, ciphertext D8ED787477EC0680
law aria_bad_key_length provedin PROOF.bendsource · line 328 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAriaKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/aria.LcAria.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{20n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}an ARIA key of 20 bytes is refused
law cast6_bad_key_length provedin PROOF.bendsource · line 332 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6Key, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/cast6.LcCast6.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{18n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a CAST-256 key of 18 bytes is refused
law blowfish_bad_key_length provedin PROOF.bendsource · line 336 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfishKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/blowfish.LcBlowfish.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{3n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a Blowfish key of 3 bytes is refused (32 bits at least)
law cast5_bad_key_length provedin PROOF.bendsource · line 340 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5Key, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/cast5.LcCast5.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{4n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a CAST-128 key of 4 bytes is refused (40 bits at least)
law tea_bad_key_length provedin PROOF.bendsource · line 344 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/tea.LcTeaKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/tea.LcTea.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{15n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}a TEA key of 15 bytes is refused
law xtea_bad_key_length provedin PROOF.bendsource · line 348 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXteaKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/xtea.LcXtea.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{17n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}an XTEA key of 17 bytes is refused
law fcrypt_bad_key_length provedin PROOF.bendsource · line 352 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcryptKey, Unit, k => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/fcrypt.LcFcrypt.key(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.of_list([0, 0, 0, 0, 0, 0, 0]))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{7n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}an FCrypt key of 7 bytes is refused
law rc4_empty_key provedin PROOF.bendsource · line 356 · raw
{0x7d16ec09f99b830428c8e2852af315f6/rc4.LcRc4.crypt(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.empty, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.zeros(4n)) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBadKeyLength{0n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets>}an empty RC4 key is refused
law modes64_not_whole_blocks provedin PROOF.bendsource · line 360 · raw
{Result.map(&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, List<&2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcBlock64>, Unit, bs => Unit{}, 0x7d16ec09f99b830428c8e2852af315f6/modes64.Lc64.blocks_of(0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets.zeros(12n))) == Fail{0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcNotBlockMultiple{12n}} : Result<&2, &2, 0x7d16ec09f99b830428c8e2852af315f6/legacy_ciphers.LcError, Unit>}the 64-bit modes refuse a message that is not whole blocks