a7firm/src/sega/a7/AppConfig.java

95 lines
4.4 KiB
Java

package sega.a7;
public interface AppConfig {
public static final short VERSION = 0x0205;
public static final short HEADER_SIZE = 6;
public static final short FOOTER_SIZE = 40;
public static final short NONCE_ODD_SIZE = 20;
public static final short NONCE_EVEN_SIZE = 20;
public static final short HMAC_SIZE = 20;
public static final short AES_KEY_SIZE = 0x10;
public static final short AES_IV_SIZE = 0x10;
public static final short AES_DATA_SIZE = 0x10;
public static final short RSA_PRI_MODULUS_SIZE = 0x100;
public static final short RSA_PRI_EXPONENT_SIZE = 0x100;
public static final short UDATA_SIZE = 0x10;
public static final short PLAY_COUNT_VALUE_SIZE = 4;
public static final short STORAGE_SIZE = 0x2800;
public static final short STORAGE_SURPLUS_SIZE = 0x10;
public static final short KEYCHIP_INFO_SIZE = 96;
public static final short TRACE_DATA_INFO_SIZE = 0x10;
public static final short STORAGE_DATA_MAX_READ_SIZE = 192;
public static final short A7_TAG_OFFSET = 0;
public static final short A7_PARAMSIZE_OFFSET = 2;
public static final short A7_COMMAND_OFFSET = 4;
public static final short A7_TAG_SIZE = 2;
public static final short A7_PARAMSIZE_SIZE = 2;
public static final short A7_COMMAND_SIZE = 2;
public static final short A7_CHECKSUM_SIZE = 20;
public static final short A7_AUTH_SIZE = 20;
// Tag codes
public static final short A7_TAG_RQU_COMMAND = 0xC1;
public static final short A7_TAG_RQU_AUTH_COMMAND = 0xC2;
public static final short A7_TAG_RSP_COMMAND = 0xC3;
public static final short A7_TAG_RSP_AUTH_COMMAND = 0xC4;
public static final short A7_TAG_RQU_RSA_COMMAND = 0xC5;
public static final short A7_TAG_RSP_RSA_COMMAND = 0xC6;
public static final short A7_TAG_NG = 0;
// cmd codes
public static final short A7_ORD_SESSION_OPEN = 1;
public static final short A7_ORD_SESSION_CLOSE = 2;
public static final short A7_ORD_AUTH_START = 3;
public static final short A7_ORD_HMAC_CHANGE = 4;
public static final short A7_ORD_KEY_CHANGE = 5;
public static final short A7_ORD_LV_GET = 6;
public static final short A7_ORD_ERROR_GET = 7;
public static final short A7_ORD_VER_GET = 8;
public static final short A7_ORD_KEYCHIP_INFO_WRITE = 9;
public static final short A7_ORD_KEYCHIP_INFO_READ = 10;
public static final short A7_ORD_GKEY_WRITE = 11;
public static final short A7_ORD_GKEY_ENC = 12;
public static final short A7_ORD_GKEY_DEC = 13;
public static final short A7_ORD_SFLAG_WRITE = 14;
public static final short A7_ORD_EEP_INIT = 15;
public static final short A7_ORD_LV_ENABLE = 16;
public static final short A7_ORD_GPRIKEY_MODULUS_WRITE = 17;
public static final short A7_ORD_GPRIKEY_EXPONENS_WRITE = 18;
public static final short A7_ORD_UDATA_WRITE = 19;
public static final short A7_ORD_UDATA_READ = 20;
public static final short A7_ORD_STORAGE_WRITE = 21;
public static final short A7_ORD_STORAGE_READ = 22;
public static final short A7_ORD_RAN_GET = 23;
public static final short A7_ORD_PLAY_COUNT_INCREMENT = 24;
public static final short A7_ORD_PLAY_COUNT_READ = 25;
public static final short A7_ORD_TRACE_DATA_INFO_WRITE = 26;
public static final short A7_ORD_TRACE_DATA_INFO_READ = 27;
public static final short A7_ORD_STORAGE_SIZE_GET = 28;
//Errors
public static final short A7_SUCCESS = 0;
public static final short A7_INVALID_AUTH = 1;
public static final short A7_AUTHFAIL = 2;
public static final short A7_LV_ERROR = 3;
public static final short A7_BAD_PARAMETER = 4;
public static final short A7_EEP_WRITEFAIL = 5;
public static final short A7_BAD_TAG = 6;
public static final short A7_BAD_ORDINAL = 7;
public static final short A7_SUMFAIL = 8;
public static final short A7_EEPWRITE_DISABLE = 9;
public static final short A7_BAD_DATASIZE = 10;
public static final short A7_FAIL = 11;
public static final short GENERAL_BUFFER_SIZE = 0x100;
public static final short FOOTER_BUFFER_SIZE = 20;
public static final short NONCE_ODD_BUFFER_SIZE = 20;
public static final short SEND_OUT_BUFFER_SIZE = 0x100;
public static final short SEND_BUUFER_INFO_ARRAY_SIZE = 2;
public static final short SEND_BUUFER_INFO_OFFSET = 0;
public static final short SEND_BUUFER_INFO_SIZE = 1;
}