Performing AES encryption or decryption in multiple modes with a single instruction
First Claim
Patent Images
1. A machine-readable non-transitory storage medium having stored thereon an instruction, which when executed by a machine causes the machine to perform a method comprising:
- determining from a first operand of the instruction an Advanced Encryption Standard (AES) encryption mode by which to encrypt data;
applying an exclusive OR operation to the first operand of the instruction and a second operand of the instruction to produce a combined result and encrypting the combined result using a key in accordance with the determined AES encryption mode to produce an encrypted result; and
placing the encrypted result in a memory location of the first operand of the instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A machine-readable medium may have stored thereon an instruction, which when executed by a machine causes the machine to perform a method. The method may include combining a first operand of the instruction and a second operand of the instruction to produce a result. The result may be encrypted using a key in accordance with an Advanced Encryption Standard (AES) algorithm to produce an encrypted result. The method may also include placing the encrypted result in a location of the first operand of the instruction.
-
Citations
16 Claims
-
1. A machine-readable non-transitory storage medium having stored thereon an instruction, which when executed by a machine causes the machine to perform a method comprising:
-
determining from a first operand of the instruction an Advanced Encryption Standard (AES) encryption mode by which to encrypt data; applying an exclusive OR operation to the first operand of the instruction and a second operand of the instruction to produce a combined result and encrypting the combined result using a key in accordance with the determined AES encryption mode to produce an encrypted result; and
placing the encrypted result in a memory location of the first operand of the instruction. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A processor to perform encryption, comprising:
a first logic, responsive to execution of a single instruction that includes a first operand and a second operand and executable in a selected one of a plurality of Advanced Encryption Standard (AES) modes, to logically combine, via an exclusive OR operation (XOR), a plaintext value supplied by the second operand with a second value supplied by the first operand to produce a combined result, and to encrypt the combined result using an AES algorithm and a key to produce an encrypted result, wherein a particular mode of the plurality of the AES modes via which to produce the encrypted result is selected according to the first operand. - View Dependent Claims (8, 9, 10, 11)
-
12. A system to encrypt data, comprising:
-
a memory to store an Advanced Encryption Standard (AES) encryption instruction having two operands; and a processor to execute the AES encryption instruction according to a particular mode of a plurality of modes of the AES encryption instruction, the particular mode determined based on a value of one of the two operands, wherein; in a first mode and responsive to execution of the AES encryption instruction, the processor is to execute a first loop to clear a first operand, logically combine a plaintext value supplied by a second operand obtained from a first corresponding memory location of a first memory, the first corresponding memory location indicated by a counter value, with a second value supplied by the first operand to produce a combined result, encrypt the combined result using an AES algorithm and a key to produce an encrypted result, store the encrypted result in a second corresponding memory location of a second memory, the second corresponding memory location indicated by the counter value, decrement the counter value, and re-execute the first loop until the counter value reaches a predetermined value; and in a second mode and responsive to the execution of the AES encryption instruction, the processor is to clear the first operand, and thereafter execute a second loop to logically combine the plaintext value with the second value to produce the combined result, encrypt the combined result using the AES algorithm and the key to produce the encrypted result, store the encrypted result in the second corresponding memory location of the second memory indicated by the counter value, decrement the counter value, and re-execute the second loop until the counter value reaches the predetermined value. - View Dependent Claims (13, 14, 15, 16)
-
Specification