vitasdk
Documentation of the vitasdk
npdrm.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2COMMON_NPDRM_H_
7 #define _PSP2COMMON_NPDRM_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2common/kernel/rtc.h>
11 #include <psp2common/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 typedef struct ScePsmDrmKeySet {
19  SceUInt8 key[0x10];
23 
24 typedef struct ScePsmDrmExpireTime { // size is 0x10
27  int pad[2];
30 
31 typedef struct SceNpDrmActivationData { // size is 0x1038
37  SceUInt8 unk1[0x40];
39  SceUInt8 unk2[0x10];
40  SceUInt8 unk3[0x10];
44  SceUInt8 ecdsa_signature[0x28]; // checked by pspemu, and SceNpDrm.
47 
48 typedef struct SceNpDrmLicense { // size is 0x200
49  SceInt16 version; // -1 VITA (NPDRM_FREE), 0 PSP, 1 PSP-VITA
52  SceInt16 license_flags; // 0x400:non-check ecdsa
53  SceUInt64 account_id; // 0x0:NPDRM_FREE
54  char content_id[0x30];
55  char key_table[0x10];
56  char key1[0x10];
59  char ecdsa_signature[0x28];
61  char key2[0x10];
62  char unk_0xB0[0x10];
63  char open_psid[0x10];
64  char unk_0xD0[0x10];
67  int unk_0xF8;
68  int sku_flag;
69  char rsa_signature[0x100];
72 
73 typedef struct ScePsmDrmLicense {
74  char magic[0x8];
83  char content_id[0x30];
84  SceUInt8 unk5[0x80];
89 
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* _PSP2COMMON_NPDRM_H_ */
SceRtcTick start_time
Definition: npdrm.h:57
int sku_flag
Definition: npdrm.h:68
SceUInt8 key[0x10]
Definition: npdrm.h:19
SceUInt64 account_id
Definition: npdrm.h:35
char unk_0xD0[0x10]
Definition: npdrm.h:64
SceUInt8 unk1[0x40]
Definition: npdrm.h:37
SceInt16 version_flag
Definition: npdrm.h:33
char open_psid[0x10]
Definition: npdrm.h:63
SceInt16 license_type
Definition: npdrm.h:51
SceInt16 version_flags
Definition: npdrm.h:50
ScePsmDrmKeySet keyset
Definition: npdrm.h:85
char key1[0x10]
Definition: npdrm.h:56
SceRtcTick * end_date
Definition: npdrm.h:26
SceRtcTick expiration_time
Definition: npdrm.h:81
int unk_0xF8
Definition: npdrm.h:67
SceUInt32 unk3
Definition: npdrm.h:78
SceUInt64 account_id
Definition: npdrm.h:77
SceUInt8 primary_key_table[0x80][0x10]
Definition: npdrm.h:36
char ecdsa_signature[0x28]
Definition: npdrm.h:59
int debug_upgradable
Definition: npdrm.h:66
SceInt16 license_flags
Definition: npdrm.h:52
SceUInt8 secondary_key_table[0x65][0x10]
Definition: npdrm.h:41
SceRtcTick expiration_time
Definition: npdrm.h:58
SceUInt8 activation_checksum[0x20]
Definition: npdrm.h:82
char cmd56_handshake_part[0x14]
Definition: npdrm.h:65
SceUInt8 openpsid[0x10]
Definition: npdrm.h:38
SceUInt64 account_id
Definition: npdrm.h:53
SceUInt32 unk1
Definition: npdrm.h:75
char rsa_signature[0x100]
Definition: npdrm.h:69
SceInt16 act_type
Definition: npdrm.h:32
SceInt64 flags
Definition: npdrm.h:60
SceUInt8 hmac_key[0x20]
Definition: npdrm.h:18
int pad[2]
Definition: npdrm.h:27
char content_id[0x30]
Definition: npdrm.h:54
SceUInt8 unk3[0x10]
Definition: npdrm.h:40
char unk_0xB0[0x10]
Definition: npdrm.h:62
SceUInt8 unk2[0x10]
Definition: npdrm.h:39
SceUInt32 unk2
Definition: npdrm.h:76
SceUInt8 unk5[0x80]
Definition: npdrm.h:84
SceUInt8 ecdsa_signature[0x28]
Definition: npdrm.h:44
SceUInt8 rsa_signature[0x100]
Definition: npdrm.h:42
char content_id[0x30]
Definition: npdrm.h:83
char key_table[0x10]
Definition: npdrm.h:55
SceUInt32 unk4
Definition: npdrm.h:79
char magic[0x8]
Definition: npdrm.h:74
SceInt16 version
Definition: npdrm.h:49
SceInt32 version
Definition: npdrm.h:34
SceRtcTick start_time
Definition: npdrm.h:80
VITASDK_BUILD_ASSERT_EQ(0x200, ScePsmDrmKeySet)
SceRtcTick * start_date
Definition: npdrm.h:25
char key2[0x10]
Definition: npdrm.h:61
SceUInt8 unk_sigmature[0x40]
Definition: npdrm.h:43
SceUInt8 rsa_signature[0x100]
Definition: npdrm.h:86
SceUInt8 signature[0x1D0]
Definition: npdrm.h:20
Definition: npdrm.h:31
Definition: npdrm.h:48
Definition: npdrm.h:24
Definition: npdrm.h:17
Definition: npdrm.h:73
Definition: rtc.h:48
int16_t SceInt16
Definition: types.h:41
int32_t SceInt32
Definition: types.h:44
int64_t SceInt64
Definition: types.h:50
uint64_t SceUInt64
Definition: types.h:51
uint32_t SceUInt32
Definition: types.h:45
uint8_t SceUInt8
Definition: types.h:36