MCUX CLNS MCUX Crypto Library Normal Secure |

Macros | Functions
mcuxClRsa_verify_pssverify_sha2_256_example.c File Reference

Example of using function mcuxClRsa_verify to perform the RSA signature verification with EMSA-PSS-VERIFY padding scheme according to PKCS #1 v2.2. More...

`#include <mcuxClSession.h>`
`#include <mcuxCsslFlowProtection.h>`
`#include <mcuxClPkc.h>`
`#include <mcuxClRsa.h>`
`#include <toolchain.h>`
`#include <stdbool.h>`
`#include <mcuxClCss.h>`

## Macros
#define | RSA_KEY_BIT_LENGTH
| The example uses a 2048-bit key. More...
#define | RSA_KEY_BYTE_LENGTH
| Converting the key-bitlength to bytelength. More...
#define | RSA_PUBLIC_EXP_BYTE_LENGTH
| The public exponent has a length of three bytes. More...
#define | RSA_MESSAGE_DIGEST_LENGTH
| The example uses a Sha2-256 digest, which is 32 bytes long. More...
#define | RSA_PSS_SALT_LENGTH
| The salt for the PSS padding is 32 bytes long. More...

## Functions
static const uint8_t modulus [RSA_KEY_BYTE_LENGTH] | __attribute__ ((aligned(4)))
| Example value for public RSA modulus N. More...
bool | mcuxClRsa_verify_pssverify_sha2_256_example (void)
| Performs a session set-up; a call to function mcuxClRsa_verify using mode mcuxClRsa_Mode_Verify_Pss_Sha2_256; a session clean-up. More...

## Detailed Description

Example of using function mcuxClRsa_verify to perform the RSA signature verification with EMSA-PSS-VERIFY padding scheme according to PKCS #1 v2.2.

## Macro Definition Documentation

## ◆ RSA_KEY_BIT_LENGTH

#define RSA_KEY_BIT_LENGTH

The example uses a 2048-bit key.

## ◆ RSA_KEY_BYTE_LENGTH

#define RSA_KEY_BYTE_LENGTH

Converting the key-bitlength to bytelength.

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.

## ◆ RSA_PUBLIC_EXP_BYTE_LENGTH

#define RSA_PUBLIC_EXP_BYTE_LENGTH

The public exponent has a length of three bytes.

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.

## ◆ RSA_MESSAGE_DIGEST_LENGTH

#define RSA_MESSAGE_DIGEST_LENGTH

The example uses a Sha2-256 digest, which is 32 bytes long.

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.

## ◆ RSA_PSS_SALT_LENGTH

#define RSA_PSS_SALT_LENGTH

The salt for the PSS padding is 32 bytes long.

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.

## Function Documentation

## ◆ __attribute__()

static const uint8_t modulus [RSA_KEY_BYTE_LENGTH] __attribute__ | ( | (aligned(4)) |  | ) |
| static

Example value for public RSA modulus N.

Example value for RSA signature s.

Example value for Sha2-256 message digest.

Example value for public RSA exponent e.

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.

## ◆ mcuxClRsa_verify_pssverify_sha2_256_example()

bool mcuxClRsa_verify_pssverify_sha2_256_example | ( | void |  | ) |

Performs a session set-up; a call to function mcuxClRsa_verify using mode mcuxClRsa_Mode_Verify_Pss_Sha2_256; a session clean-up.

Return values

  true | The example code completed successfully
  false | The example code failed

Examples
  mcuxClRsa_verify_pssverify_sha2_256_example.c.