MTB CAT1 Peripheral driver library

General Description

Functions

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_mul_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs long integer multiplication operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_xmul_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs carry less long integer multiplication operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_add_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs long integer addition operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_sub_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs long integer subtraction operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_mov_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a)
 Performs long integer move operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsl1_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a)
 Performs left shifting of long integer by one bit. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsr1_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a)
 Performs right shifting of long integer by one bit. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsr_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint32_t shift)
 Performs right shifting of long integer by shift bits. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_xor_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs long integer exclusive-or operation. More...
 
__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_cond_sub_hw (CRYPTOLITE_Type *base, cy_stc_cryptolite_descr_t *p_struct, uint8_t *p_z, uint32_t word_size_z, uint8_t *p_a, uint32_t word_size_a, uint8_t *p_b, uint32_t word_size_b)
 Performs long integer conditional subtraction operation. More...
 

Function Documentation

◆ Cy_Cryptolite_Vu_mul_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_mul_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs long integer multiplication operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[32]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_mul_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_xmul_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_xmul_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs carry less long integer multiplication operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[32]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_xmul_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_add_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_add_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs long integer addition operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_add_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_sub_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_sub_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs long integer subtraction operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_sub_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_mov_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_mov_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a 
)

Performs long integer move operation.

Note
The pointers p_a & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the operand buffer.
word_size_aThe size of the p_a buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_mov_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_lsl1_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsl1_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a 
)

Performs left shifting of long integer by one bit.

Note
The pointers p_a & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the operand buffer.
word_size_aThe size of the p_a buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_lsl1_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_lsr1_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsr1_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a 
)

Performs right shifting of long integer by one bit.

Note
The pointers p_a & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the operand buffer.
word_size_aThe size of the p_a buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_lsr1_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_lsr_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_lsr_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint32_t  shift 
)

Performs right shifting of long integer by shift bits.

Note
The pointers p_a & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the operand buffer.
word_size_aThe size of the p_a buffer in word size.
shiftThe number of bits to shift right.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
uint8_t bit_shift =5u;
status = Cy_Cryptolite_Vu_lsr_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), bit_shift);

◆ Cy_Cryptolite_Vu_xor_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_xor_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs long integer exclusive-or operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_xor_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));

◆ Cy_Cryptolite_Vu_cond_sub_hw()

__STATIC_INLINE cy_en_cryptolite_status_t Cy_Cryptolite_Vu_cond_sub_hw ( CRYPTOLITE_Type *  base,
cy_stc_cryptolite_descr_t *  p_struct,
uint8_t *  p_z,
uint32_t  word_size_z,
uint8_t *  p_a,
uint32_t  word_size_a,
uint8_t *  p_b,
uint32_t  word_size_b 
)

Performs long integer conditional subtraction operation.

Note
The pointers p_a, p_b & p_z must be 4 byte aligned and end in 4 byte boundary.
User should use the function CY_REMAP_ADDRESS_CRYPTOLITE() to get the remapped address and use it for all the VU operations.
Parameters
baseThe pointer to a Cryptolite instance.
p_structThe pointer to the cy_stc_cryptolite_descr_t.
p_zThe buffer pointer to the store the output.
word_size_zThe size of the p_z buffer in word size.
p_aThe pointer to the first operand buffer.
word_size_aThe size of the p_a buffer in word size.
p_bThe pointer to the second operand buffer.
word_size_bThe size of the p_b buffer in word size.
Returns
status code. See cy_en_cryptolite_status_t.
Function Usage
/* Operand A*/
CY_ALIGN(4) uint8_t operand_a[] =
{
0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
};
/* Operand B*/
CY_ALIGN(4) uint8_t operand_b[16] =
{
0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a
};
CY_ALIGN(4) uint8_t output[16]={0};
cy_stc_cryptolite_descr_t desc;
status = Cy_Cryptolite_Vu_cond_sub_hw (CRYPTOLITE, &desc, output, VU_BITS_TO_WORDS(16*8), operand_a, VU_BITS_TO_WORDS(16*8), operand_b, VU_BITS_TO_WORDS(16*8));