ta header trieu rsa

 avatar
Huongnm
c_cpp
23 days ago
1.3 kB
3
Indexable
#pragma once
#include <sys/resource.h>

/********* !!!! WARNING !!!! ***************
 * Please make sure such header is not included
 * in more than one source-file of TA
 *******************************************/

#define TA_PROP_UUID                {0x3f2b1a67, 0xbb77, 0x407f, {0xaa, 0x64, 0x05, 0x22, 0x92, 0x03, 0x2b, 0x6f}}
#define TA_PROP_SINGLE_INSTANCE     FALSE
#define TA_PROP_MULTISESSION        FALSE
#define TA_PROP_INSTANCE_KEEPALIVE  FALSE
#define TA_PROP_DATASIZE            RLIM_INFINITY
#define TA_PROP_STACKSIZE           0x4000
#define TA_PROP_GROUP_ID            "samsung_ta"
#define TA_PROP_VERSION             "ver. none      "

#define CMD_SAVE_PASSWORD		1
#define CMD_CALL_PASSWORD		2
#define CMD_GET_PUBLIC_KEY		3

#define MAX_SIZE 64
#define RSA_2048_KEY_SIZE       256

typedef struct 
{
	char package_name[MAX_SIZE];
	char user_id[MAX_SIZE];
	char password[MAX_SIZE];
} PasswordEntry;

// Struct dùng để truyền qua Shared Memory từ CA vào TA
typedef struct 
{
	char package_name[MAX_SIZE];
	char user_id[MAX_SIZE];
	uint8_t encrypted_password[RSA_2048_KEY_SIZE]; // Đổi thành uint8_t và tăng size lên 256
} EncryptedPasswordEntry;

/* !!!! WARNING !!!! Do not write your code in this file !!!! */
#include <ta_property.h>
Editor is loading...
Leave a Comment