Go to the documentation of this file.
38 #ifndef __ARCH_ARM_INSTS_CRYPTO_HH__
39 #define __ARCH_ARM_INSTS_CRYPTO_HH__
81 return ((
a & 0x80) ? ((
a << 1) ^ 0x1b) : (
a << 1));
95 uint32_t
choose(uint32_t
X, uint32_t Y, uint32_t Z)
97 return (((Y ^ Z) &
X) ^ Z);
100 uint32_t
parity(uint32_t
X, uint32_t Y, uint32_t Z)
107 return ((
X & Y) | ((
X | Y) & Z));
120 void sha256Op(uint32_t *
X, uint32_t *Y, uint32_t *Z);
124 void load2Reg(uint32_t *
X, uint32_t *Y, uint8_t *
output, uint8_t *input);
125 void load3Reg(uint32_t *
X, uint32_t *Y, uint32_t *Z,
126 uint8_t *
output, uint8_t *input, uint8_t *input2);
134 void sha256H(uint8_t *
output, uint8_t *input, uint8_t *input2);
139 void sha1C(uint8_t *
output, uint8_t *input, uint8_t *input2);
140 void sha1P(uint8_t *
output, uint8_t *input, uint8_t *input2);
141 void sha1M(uint8_t *
output, uint8_t *input, uint8_t *input2);
143 void sha1Su0(uint8_t *
output, uint8_t *input, uint8_t *input2);
150 #endif //__ARCH_ARM_INSTS_CRYPTO_HH__
static const uint8_t aesSBOX[256]
Look up table for subByttes transformation.
void sha1M(uint8_t *output, uint8_t *input, uint8_t *input2)
void sha256Su1(uint8_t *output, uint8_t *input, uint8_t *input2)
void sha1Su1(uint8_t *output, uint8_t *input)
void sha256H2(uint8_t *output, uint8_t *input, uint8_t *input2)
void aesDecrypt(uint8_t *output, uint8_t *input, uint8_t *key)
static void output(const char *filename)
void sha256H(uint8_t *output, uint8_t *input, uint8_t *input2)
static const uint8_t aesFFEXP[256]
Look up table for {03}^X where {03} and X are elements in the filed G(256)
void sha1C(uint8_t *output, uint8_t *input, uint8_t *input2)
void sha1P(uint8_t *output, uint8_t *input, uint8_t *input2)
uint8_t aesFFMul(uint8_t a, uint8_t b)
Finite field multiplication of two elements in the field G(256)
void sha1Op(uint8_t *output, uint8_t *input, uint8_t *input2, SHAOp op)
void aesShiftRows(uint8_t *output, uint8_t *input)
void store1Reg(uint8_t *output, uint32_t *X)
uint32_t ror(uint32_t x, uint8_t shift)
uint32_t sigma0(uint32_t X)
static const uint8_t aesINVSHIFT[16]
void aesInvShiftRows(uint8_t *output, uint8_t *input)
static const uint8_t aesInvSBOX[256]
Look up table for inverse subBytes transformation.
void sha1H(uint8_t *output, uint8_t *input)
void sha256Op(uint32_t *X, uint32_t *Y, uint32_t *Z)
void sha256Su0(uint8_t *output, uint8_t *input)
uint32_t majority(uint32_t X, uint32_t Y, uint32_t Z)
void sha1Su0(uint8_t *output, uint8_t *input, uint8_t *input2)
void _sha1Op(uint32_t *X, uint32_t *Y, uint32_t *Z, SHAOp op)
void aesInvSubBytes(uint8_t *output, uint8_t *input)
void load2Reg(uint32_t *X, uint32_t *Y, uint8_t *output, uint8_t *input)
uint32_t sigma1(uint32_t X)
static const uint8_t aesFFLOG[256]
Look up table for Finite Field logarithm where the base is the element {03} in the field G(256)
void aesSubBytes(uint8_t *output, uint8_t *input)
void load3Reg(uint32_t *X, uint32_t *Y, uint32_t *Z, uint8_t *output, uint8_t *input, uint8_t *input2)
void aesEncrypt(uint8_t *output, uint8_t *input, uint8_t *key)
uint32_t choose(uint32_t X, uint32_t Y, uint32_t Z)
void aesMixColumns(uint8_t *output, uint8_t *input)
void aesInvMixColumns(uint8_t *output, uint8_t *input)
uint32_t parity(uint32_t X, uint32_t Y, uint32_t Z)
uint8_t aesFFMul2(uint8_t a)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static const uint8_t aesSHIFT[16]
void aesAddRoundKey(uint8_t *output, uint8_t *input, uint8_t *key)
Generated on Thu Jun 16 2022 10:41:38 for gem5 by doxygen 1.8.17