CC27xxDriverLibrary
[sha2sw_config.h] SHA2 SW Configuration Options

Build-time configuration options for the SHA2 SW module. More...

Collaboration diagram for [sha2sw_config.h] SHA2 SW Configuration Options:

Macros

#define SHA2SW_VALIDATE_INPUTS   (1)
 Include support for SHA2 224. More...
 
#define SHA2SW_FAST_MESSAGE_SCHEDULE   (1)
 Use a faster implementation of the message schedule which is slightly larger in code size. More...
 
#define SHA2SW_FAST_WORKING_VARS   (1)
 Use a faster implementation of the working variables a-h which is slightly larger in code size. More...
 
#define SHA2SW_USE_ARMCLE   (1)
 Use portions of the constants of the 512 algorithm to support the 256 and 224 algorithms. More...
 

Detailed Description

Build-time configuration options for the SHA2 SW module.

Macro Definition Documentation

§ SHA2SW_VALIDATE_INPUTS

#define SHA2SW_VALIDATE_INPUTS   (1)

Include support for SHA2 224.

Include support for SHA2 384.

If defined, SHA2SW library will check inputs for invalid conditions. Otherwise, parameters will not be checked.

If SHA2SW_VALIDATE_INPUTS is not defined then:

  • the caller is responsible for ensuring all inputs are valid, and
  • the module's functions will only return SHA2SW_STATUS_SUCCESS

Not defining this value will reduce code size.

§ SHA2SW_FAST_MESSAGE_SCHEDULE

#define SHA2SW_FAST_MESSAGE_SCHEDULE   (1)

Use a faster implementation of the message schedule which is slightly larger in code size.

Expected time savings of 2,600 cycles or more per input block. Code size cost for enabling may be as little as 8 bytes.

§ SHA2SW_FAST_WORKING_VARS

#define SHA2SW_FAST_WORKING_VARS   (1)

Use a faster implementation of the working variables a-h which is slightly larger in code size.

Expected time savings of 750 cycles or more per input block. Code size cost for enabling may be as little as 24 bytes.

§ SHA2SW_USE_ARMCLE

#define SHA2SW_USE_ARMCLE   (1)

Use portions of the constants of the 512 algorithm to support the 256 and 224 algorithms.

The initial hash values as well as the round constants (K) of 512/384 are extensions of the values used for 256/224. Thus, const data space can be saved by using the 512/384 constants for the 256/224 algorithm. However, the 256/224 algorithm must spend extra cycles to skip over unneeded constants.

Expected savings of at least 288 bytes of const data at the cost of a few bytes of code space and small change in performance.

Use Arm(R) C Language Extensions

Use ARM(R) CLE to directly access op codes which can improve code size and/or performance.