def test_decrypt_aes_vector_set(aes_vector_set): for vector in AES_VECTOR_SETS[aes_vector_set]: assert cipher.decrypt(vector.key, vector.ciphertext, bytes_to_long(vector.iv)) == vector.plaintext
def test_aes_counter_length_based_on_key(key_length): key = b'\x00' * key_length plaintext = b'\x01' * key_length ciphertext = cipher.encrypt(key, plaintext) cipher.decrypt(key, ciphertext)