AESNistObservationProof.checked_encrypt: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/proof/AES_NistObservationProof.bend as AESNistObservationProof Lines 78-103 of qasim-bend-kit@0.1.0.2/proof/AES_NistObservationProof.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_NistObservationProof.bend&start_line=78&end_line=103 import Base import qasim-bend-kit@0.1.0.2/LAWS.bend as L import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as Core def checked_encrypt(+key: AES.SecretKey, +nonce: AES.Nonce, +aad: List<&2, U32>, +plaintext: List<&2, U32>, aad_ok: {AES.aad_valid(aad) == True{} : Bool}, plaintext_ok: {AES.plaintext_valid(plaintext) == True{} : Bool}) -> {L.aes256gcm_nist_encrypt_observation(AES.encrypt(key, nonce, aad, plaintext)) == expanded(Core.aes256_expand(AES.secret_key_bytes(key)), nonce, aad, plaintext) : List<&2, U32>}: Equal.trans(List<&2, U32>, L.aes256gcm_nist_encrypt_observation(AES.encrypt(key, nonce, aad, plaintext)), L.aes256gcm_nist_encrypt_observation(AES.encrypt_valid(key, nonce, aad, plaintext)), expanded(Core.aes256_expand(AES.secret_key_bytes(key)), nonce, aad, plaintext), Equal.trans(List<&2, U32>, L.aes256gcm_nist_encrypt_observation(AES.encrypt_checked(key, nonce, aad, plaintext, AES.aad_valid(aad), AES.plaintext_valid(plaintext))), L.aes256gcm_nist_encrypt_observation(AES.encrypt_checked(key, nonce, aad, plaintext, True{}, AES.plaintext_valid(plaintext))), L.aes256gcm_nist_encrypt_observation(AES.encrypt_checked(key, nonce, aad, plaintext, True{}, True{})), Equal.cong(Bool, List<&2, U32>, flag => L.aes256gcm_nist_encrypt_observation(AES.encrypt_checked(key, nonce, aad, plaintext, flag, AES.plaintext_valid(plaintext))), AES.aad_valid(aad), True{}, aad_ok), Equal.cong(Bool, List<&2, U32>, flag => L.aes256gcm_nist_encrypt_observation(AES.encrypt_checked(key, nonce, aad, plaintext, True{}, flag)), AES.plaintext_valid(plaintext), True{}, plaintext_ok)), valid_encrypt(key, nonce, aad, plaintext)) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/LAWS.bend&name=aes256gcm_nist_encrypt_observation https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=Nonce https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=SecretKey https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=aad_valid https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=encrypt https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=encrypt_checked https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=encrypt_valid https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=plaintext_valid https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=secret_key_bytes https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&name=aes256_expand https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_NistObservationProof.bend&name=expanded https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_NistObservationProof.bend&name=valid_encrypt