|
cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
|
#include "unity.h"#include "esp32_crypto_provider.h"#include "CW_Defs.h"#include "CW_Utils.h"#include <string.h>#include <stdio.h>Go to the source code of this file.
Macros | |
| #define | TV_SHA256_OUT_BYTES (32U) |
| #define | TV_SHA512_OUT_BYTES (64U) |
| #define | TV_AES_KEY_BYTES (16U) |
| #define | TV_AES_IV_BYTES (16U) |
| #define | TV_AES_BLOCK_BYTES (16U) |
| #define | TV_EC_COORD_BYTES (32U) |
| #define | TV_EC_PUBKEY_BYTES (64U) |
| #define | TV_RANDOM_BYTES (32U) |
| #define | TV_BIT_PAD_INPUT_BYTES (3U) /* plaintext shorter than one AES block */ |
Functions | |
| TEST_CASE ("sha256 NIST abc vector", "[crypto_provider]") | |
| TEST_CASE ("sha512 NIST abc vector", "[crypto_provider]") | |
| TEST_CASE ("aesCbcEncrypt NIST SP800-38A F.2.1 one block", "[crypto_provider]") | |
| TEST_CASE ("aesCbcDecrypt NIST SP800-38A F.2.2 one block", "[crypto_provider]") | |
| TEST_CASE ("aesCbc bit-padding round-trip", "[crypto_provider]") | |
| TEST_CASE ("ecdh shared secret symmetry secp256r1", "[crypto_provider]") | |
| TEST_CASE ("random returns true and produces distinct draws", "[crypto_provider]") | |
Variables | |
| static ESP32CryptoProvider | s_provider |
| #define TV_AES_BLOCK_BYTES (16U) |
Definition at line 21 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().
| #define TV_AES_IV_BYTES (16U) |
Definition at line 20 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().
| #define TV_AES_KEY_BYTES (16U) |
Definition at line 19 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().
| #define TV_BIT_PAD_INPUT_BYTES (3U) /* plaintext shorter than one AES block */ |
Definition at line 25 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| #define TV_EC_COORD_BYTES (32U) |
Definition at line 22 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| #define TV_EC_PUBKEY_BYTES (64U) |
Definition at line 23 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| #define TV_RANDOM_BYTES (32U) |
Definition at line 24 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| #define TV_SHA256_OUT_BYTES (32U) |
Definition at line 17 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| #define TV_SHA512_OUT_BYTES (64U) |
Definition at line 18 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE().
| TEST_CASE | ( | "aesCbc bit-padding round-trip" | , |
| "" | [crypto_provider] ) |
Definition at line 165 of file test_esp32_crypto_provider.cpp.
References s_provider, TV_AES_BLOCK_BYTES, TV_AES_IV_BYTES, TV_AES_KEY_BYTES, and TV_BIT_PAD_INPUT_BYTES.
| TEST_CASE | ( | "aesCbcDecrypt NIST SP800-38A F.2.2 one block" | , |
| "" | [crypto_provider] ) |
Definition at line 126 of file test_esp32_crypto_provider.cpp.
References s_provider, TV_AES_BLOCK_BYTES, TV_AES_IV_BYTES, and TV_AES_KEY_BYTES.
| TEST_CASE | ( | "aesCbcEncrypt NIST SP800-38A F.2.1 one block" | , |
| "" | [crypto_provider] ) |
Definition at line 89 of file test_esp32_crypto_provider.cpp.
References s_provider, TV_AES_BLOCK_BYTES, TV_AES_IV_BYTES, and TV_AES_KEY_BYTES.
| TEST_CASE | ( | "ecdh shared secret symmetry secp256r1" | , |
| "" | [crypto_provider] ) |
Definition at line 215 of file test_esp32_crypto_provider.cpp.
References s_provider, TV_EC_COORD_BYTES, and TV_EC_PUBKEY_BYTES.
| TEST_CASE | ( | "random returns true and produces distinct draws" | , |
| "" | [crypto_provider] ) |
Definition at line 244 of file test_esp32_crypto_provider.cpp.
References s_provider, and TV_RANDOM_BYTES.
| TEST_CASE | ( | "sha256 NIST abc vector" | , |
| "" | [crypto_provider] ) |
Definition at line 37 of file test_esp32_crypto_provider.cpp.
References s_provider, and TV_SHA256_OUT_BYTES.
| TEST_CASE | ( | "sha512 NIST abc vector" | , |
| "" | [crypto_provider] ) |
Definition at line 65 of file test_esp32_crypto_provider.cpp.
References s_provider, and TV_SHA512_OUT_BYTES.
|
static |
Definition at line 31 of file test_esp32_crypto_provider.cpp.
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().