• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
          • R1cs
          • Interfaces
            • Definterface-hmac
            • Definterface-encrypt-block
            • Definterface-hash
            • Definterface-encrypt-init
            • Definterface-pbkdf2
            • Aes-256-cbc-pkcs7-interface
            • Aes-192-cbc-pkcs7-interface
            • Aes-128-cbc-pkcs7-interface
            • Aes-256-interface
              • Aes-192-interface
              • Aes-128-interface
              • Pbkdf2-hmac-sha-512-interface
              • Keccak-256-interface
              • Sha-256-interface
              • Keccak-512-interface
              • Ripemd-160-interface
              • Sha-512-interface
              • Pbkdf2-hmac-sha-256-interface
              • Hmac-sha-512-interface
              • Hmac-sha-256-interface
              • Secp256k1-interface
              • Secp256k1-ecdsa-interface
            • Sha-2
            • Keccak
            • Kdf
            • Mimc
            • Padding
            • Hmac
            • Elliptic-curves
            • Attachments
            • Elliptic-curve-digital-signature-algorithm
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Interfaces

    Aes-256-interface

    AES-256 interface.

    AES-256 is specified in the FIPS PUB 197 standard.

    According to FIPS PUB 197, AES-256 has a key size of 256 bits and a block size of 128 bits.

    Definitions and Theorems

    Theorem: bit-list-of-aes-256-encrypt-bits

    (defthm bit-list-of-aes-256-encrypt-bits
      (bit-listp (aes-256-encrypt-bits key block)))

    Theorem: bit-list-of-aes-256-decrypt-bits

    (defthm bit-list-of-aes-256-decrypt-bits
      (bit-listp (aes-256-decrypt-bits key block)))

    Theorem: byte-list-of-aes-256-encrypt-bytes

    (defthm byte-list-of-aes-256-encrypt-bytes
      (byte-listp (aes-256-encrypt-bytes key block)))

    Theorem: byte-list-of-aes-256-decrypt-bytes

    (defthm byte-list-of-aes-256-decrypt-bytes
      (byte-listp (aes-256-decrypt-bytes key block)))

    Theorem: len-of-aes-256-encrypt-bits

    (defthm len-of-aes-256-encrypt-bits
      (equal (len (aes-256-encrypt-bits key block))
             128))

    Theorem: len-of-aes-256-decrypt-bits

    (defthm len-of-aes-256-decrypt-bits
      (equal (len (aes-256-decrypt-bits key block))
             128))

    Theorem: len-of-aes-256-encrypt-bytes

    (defthm len-of-aes-256-encrypt-bytes
      (equal (len (aes-256-encrypt-bytes key block))
             16))

    Theorem: len-of-aes-256-decrypt-bytes

    (defthm len-of-aes-256-decrypt-bytes
      (equal (len (aes-256-decrypt-bytes key block))
             16))

    Theorem: aes-256-encrypt-bits-of-bit-list-fix-key

    (defthm aes-256-encrypt-bits-of-bit-list-fix-key
      (equal (aes-256-encrypt-bits (acl2::bit-list-fix key)
                                   block)
             (aes-256-encrypt-bits key block)))

    Theorem: aes-256-encrypt-bits-bit-list-equiv-congruence-on-key

    (defthm aes-256-encrypt-bits-bit-list-equiv-congruence-on-key
      (implies (acl2::bit-list-equiv key key-equiv)
               (equal (aes-256-encrypt-bits key block)
                      (aes-256-encrypt-bits key-equiv block)))
      :rule-classes :congruence)

    Theorem: aes-256-encrypt-bits-of-bit-list-fix-block

    (defthm aes-256-encrypt-bits-of-bit-list-fix-block
      (equal (aes-256-encrypt-bits key (acl2::bit-list-fix block))
             (aes-256-encrypt-bits key block)))

    Theorem: aes-256-encrypt-bits-bit-list-equiv-congruence-on-block

    (defthm aes-256-encrypt-bits-bit-list-equiv-congruence-on-block
      (implies (acl2::bit-list-equiv block block-equiv)
               (equal (aes-256-encrypt-bits key block)
                      (aes-256-encrypt-bits key block-equiv)))
      :rule-classes :congruence)

    Theorem: aes-256-decrypt-bits-of-bit-list-fix-key

    (defthm aes-256-decrypt-bits-of-bit-list-fix-key
      (equal (aes-256-decrypt-bits (acl2::bit-list-fix key)
                                   block)
             (aes-256-decrypt-bits key block)))

    Theorem: aes-256-decrypt-bits-bit-list-equiv-congruence-on-key

    (defthm aes-256-decrypt-bits-bit-list-equiv-congruence-on-key
      (implies (acl2::bit-list-equiv key key-equiv)
               (equal (aes-256-decrypt-bits key block)
                      (aes-256-decrypt-bits key-equiv block)))
      :rule-classes :congruence)

    Theorem: aes-256-decrypt-bits-of-bit-list-fix-block

    (defthm aes-256-decrypt-bits-of-bit-list-fix-block
      (equal (aes-256-decrypt-bits key (acl2::bit-list-fix block))
             (aes-256-decrypt-bits key block)))

    Theorem: aes-256-decrypt-bits-bit-list-equiv-congruence-on-block

    (defthm aes-256-decrypt-bits-bit-list-equiv-congruence-on-block
      (implies (acl2::bit-list-equiv block block-equiv)
               (equal (aes-256-decrypt-bits key block)
                      (aes-256-decrypt-bits key block-equiv)))
      :rule-classes :congruence)

    Theorem: aes-256-encrypt-bytes-of-byte-list-fix-key

    (defthm aes-256-encrypt-bytes-of-byte-list-fix-key
      (equal (aes-256-encrypt-bytes (byte-list-fix key)
                                    block)
             (aes-256-encrypt-bytes key block)))

    Theorem: aes-256-encrypt-bytes-byte-list-equiv-congruence-on-key

    (defthm aes-256-encrypt-bytes-byte-list-equiv-congruence-on-key
      (implies (byte-list-equiv key key-equiv)
               (equal (aes-256-encrypt-bytes key block)
                      (aes-256-encrypt-bytes key-equiv block)))
      :rule-classes :congruence)

    Theorem: aes-256-encrypt-bytes-of-byte-list-fix-block

    (defthm aes-256-encrypt-bytes-of-byte-list-fix-block
      (equal (aes-256-encrypt-bytes key (byte-list-fix block))
             (aes-256-encrypt-bytes key block)))

    Theorem: aes-256-encrypt-bytes-byte-list-equiv-congruence-on-block

    (defthm aes-256-encrypt-bytes-byte-list-equiv-congruence-on-block
      (implies (byte-list-equiv block block-equiv)
               (equal (aes-256-encrypt-bytes key block)
                      (aes-256-encrypt-bytes key block-equiv)))
      :rule-classes :congruence)

    Theorem: aes-256-decrypt-bytes-of-byte-list-fix-key

    (defthm aes-256-decrypt-bytes-of-byte-list-fix-key
      (equal (aes-256-decrypt-bytes (byte-list-fix key)
                                    block)
             (aes-256-decrypt-bytes key block)))

    Theorem: aes-256-decrypt-bytes-byte-list-equiv-congruence-on-key

    (defthm aes-256-decrypt-bytes-byte-list-equiv-congruence-on-key
      (implies (byte-list-equiv key key-equiv)
               (equal (aes-256-decrypt-bytes key block)
                      (aes-256-decrypt-bytes key-equiv block)))
      :rule-classes :congruence)

    Theorem: aes-256-decrypt-bytes-of-byte-list-fix-block

    (defthm aes-256-decrypt-bytes-of-byte-list-fix-block
      (equal (aes-256-decrypt-bytes key (byte-list-fix block))
             (aes-256-decrypt-bytes key block)))

    Theorem: aes-256-decrypt-bytes-byte-list-equiv-congruence-on-block

    (defthm aes-256-decrypt-bytes-byte-list-equiv-congruence-on-block
      (implies (byte-list-equiv block block-equiv)
               (equal (aes-256-decrypt-bytes key block)
                      (aes-256-decrypt-bytes key block-equiv)))
      :rule-classes :congruence)

    Theorem: true-listp-of-aes-256-encrypt-bits

    (defthm true-listp-of-aes-256-encrypt-bits
      (true-listp (aes-256-encrypt-bits key block))
      :rule-classes :type-prescription)

    Theorem: true-listp-of-aes-256-decrypt-bits

    (defthm true-listp-of-aes-256-decrypt-bits
      (true-listp (aes-256-decrypt-bits key block))
      :rule-classes :type-prescription)

    Theorem: true-listp-of-aes-256-encrypt-bytes

    (defthm true-listp-of-aes-256-encrypt-bytes
      (true-listp (aes-256-encrypt-bytes key block))
      :rule-classes :type-prescription)

    Theorem: true-listp-of-aes-256-decrypt-bytes

    (defthm true-listp-of-aes-256-decrypt-bytes
      (true-listp (aes-256-decrypt-bytes key block))
      :rule-classes :type-prescription)

    Theorem: consp-of-aes-256-encrypt-bits

    (defthm consp-of-aes-256-encrypt-bits
      (consp (aes-256-encrypt-bits key block))
      :rule-classes :type-prescription)

    Theorem: consp-of-aes-256-decrypt-bits

    (defthm consp-of-aes-256-decrypt-bits
      (consp (aes-256-decrypt-bits key block))
      :rule-classes :type-prescription)

    Theorem: consp-of-aes-256-encrypt-bytes

    (defthm consp-of-aes-256-encrypt-bytes
      (consp (aes-256-encrypt-bytes key block))
      :rule-classes :type-prescription)

    Theorem: consp-of-aes-256-decrypt-bytes

    (defthm consp-of-aes-256-decrypt-bytes
      (consp (aes-256-decrypt-bytes key block))
      :rule-classes :type-prescription)