Patent ID: 11943367
Assignee: MARVELL ASIA PTE LTD
Field: Digital communication (Electrical engineering)
Classification: CPC H | IPC H

Claim 0:
1. An apparatus for performing cryptographic primitives, comprising:
a hardware processor configured to:
receive an instruction to perform a cryptographic primitive,
wherein the instruction comprises one or more operands,
wherein at least one of the operands indicates one or more data structures that include values for the cryptographic primitive, and the values include a first value indicating a mode of encryption that indicates an order of performing an encryption operation and an authentication operation and a second value indicating a cipher type,
wherein the one or more operands further comprises a context operand and an input data operand,
the context operand includes per-session configurations for the cryptographic primitive and includes an initialization vector (IV) field not changeable in a session, and
the input data operand includes values specific to the instruction,

the input data operand includes data to be encrypted or authenticated; read an IV by:
in response to determining that a field of the context operand indicates that the IV is provided as context data, read the IV from the IV field of the context operand; and
in response to determining that the field of the context operand indicates that the IV is provided as input data, read the IV from the input data operand; and

perform the cryptographic primitive using the IV and store an output of the cryptographic primitive in an output data structure.