mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 17:55:37 +00:00
Added specific key size values for a test driver
Replaced generic values for the test driver with specific ones for a 256-bit ECC private/public key pair. Signed-off-by: John Durkop <john.durkop@fermatsoftware.com>
This commit is contained in:
parent
750d0e4b72
commit
badd89f525
|
@ -38,20 +38,26 @@ typedef struct {
|
|||
* This macro returns the base size for the key context. It should include
|
||||
* the size for any driver context information stored with each key.
|
||||
*/
|
||||
#define TEST_DRIVER_KEY_CONTEXT_BASE_SIZE sizeof(test_driver_key_context_t)
|
||||
#define TEST_DRIVER_KEY_CONTEXT_BASE_SIZE sizeof( test_driver_key_context_t )
|
||||
|
||||
/** \def TEST_DRIVER_KEY_CONTEXT_KEY_PAIR_SIZE
|
||||
*
|
||||
* Number of bytes included in every key context for a key pair.
|
||||
*
|
||||
* This pair size is for an ECC 256-bit private/public key pair.
|
||||
* Based on this value, the size of the private key can be derived by
|
||||
* subtracting the public key size below from this one.
|
||||
*/
|
||||
|
||||
#define TEST_DRIVER_KEY_CONTEXT_KEY_PAIR_SIZE 0
|
||||
#define TEST_DRIVER_KEY_CONTEXT_KEY_PAIR_SIZE 65
|
||||
|
||||
/** \def TEST_DRIVER_KEY_CONTEXT_PUBLIC_KEY_SIZE
|
||||
*
|
||||
* Number of bytes included in every key context for a public key.
|
||||
*
|
||||
* For ECC public keys, it needs 257 bits so 33 bytes.
|
||||
*/
|
||||
#define TEST_DRIVER_KEY_CONTEXT_PUBLIC_KEY_SIZE 0
|
||||
#define TEST_DRIVER_KEY_CONTEXT_PUBLIC_KEY_SIZE 33
|
||||
|
||||
/** \def TEST_DRIVER_KEY_CONTEXT_SYMMETRIC_FACTOR
|
||||
*
|
||||
|
@ -63,8 +69,10 @@ typedef struct {
|
|||
*
|
||||
* If this is true for a key pair, the key context includes space for the public key.
|
||||
* If this is false, no additional space is added for the public key.
|
||||
*
|
||||
* For this instance, store the public key with the private one.
|
||||
*/
|
||||
#define TEST_DRIVER_KEY_CONTEXT_STORE_PUBLIC_KEY 0
|
||||
#define TEST_DRIVER_KEY_CONTEXT_STORE_PUBLIC_KEY 1
|
||||
|
||||
/** \def TEST_DRIVER_KEY_CONTEXT_SIZE_FUNCTION
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue