def test_encrypt_aes_vector_set(aes_vector_set): for vector in AES_VECTOR_SETS[aes_vector_set]: assert cipher.encrypt(vector.key, vector.plaintext, bytes_to_long(vector.iv)) == vector.ciphertext
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)