US 11,943,367 B1
Generic cryptography wrapper
Dhanalakshmi Saravanan, Bangalore (IN); Raga Sruthi Nemalipuri, Hyderabad (IN); Priya Ainapur, Secunderabad (IN); K. Raveendra, Visakhapatnam (IN); and Bapu Hinge, Bangalore (IN)
Assigned to Marvell Asia Pte, Ltd., Singapore (SG)
Filed by Marvell Asia Pte Ltd, Singapore (SG)
Filed on May 18, 2021, as Appl. No. 17/323,263.
Claims priority of provisional application 63/027,106, filed on May 19, 2020.
Int. Cl. H04L 29/06 (2006.01); H04L 9/06 (2006.01); H04L 9/08 (2006.01); H04L 9/32 (2006.01)
CPC H04L 9/3242 (2013.01) [H04L 9/0631 (2013.01); H04L 9/0861 (2013.01)] 19 Claims
OG exemplary drawing
 
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.