Providing security for transmitted data through the e-commerce environment requires using a fast and high secure encryption algorithm. Balancing between the speed and the security degree is a problem that many of the encryption algorithms suffer from. Increasing the security degree requires increasing the level of complexity which results in increasing encryption time. On the other hand, increasing the algorithm speed may reduce the complexity degree which affects the security level. This paper aims to design an encryption algorithm that balances time and complexity (speed and security). This is done by suggesting a security environment that depends on creating and providing an agent software to be settled into each customer device that manages the purchase and security process without customer interference. The suggested encryption algorithm is applied within this environment. Several modifications are performed on the AES encryption algorithm. The AES was chosen due to its performance (security and speed), which makes it suitable for encrypting transmitted data over the Internet. These modifications involve adding preprocessing steps (padding and zigzag), eliminating Sub Byte step, and reducing the number of rounds. The experimental results showed that the suggested algorithm provides more security and speed in the encryption and decryption process. The randomness degree has increased by 29.5%. The efficiency is increased because the encryption and decryption times are reduced, as is the CPU usage. The throughput for the suggested algorithm is increased by 10% for the encryption process and is increased by 9.3% for the decryption process.