mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
Updated the crypto engine:
- Updated AES and SHA-1 source code; - Fixed a few code warnings; - Implemented EDAT/SDAT decryption. Started SPURS implementation: - Added an internal SPURSManager class draft; - Added several drafts for cellSpurs functions. Implemented key.edat decryption in sceNpDrmIsAvailable: - NOTE: Currently, the decrypted key.edat is stored under dev_hdd1/titleID and the user must replace this file in dev_hdd0. This behavior will change in the future as it's currently intended for controlled testing only.
This commit is contained in:
parent
e6aa1a9553
commit
196c2ffe5b
20 changed files with 2891 additions and 821 deletions
|
@ -1,7 +1,22 @@
|
|||
#pragma once
|
||||
#include "aes.h"
|
||||
#include "sha1.h"
|
||||
|
||||
// Auxiliary functions (endian swap and xor).
|
||||
u16 swap16(u16 i);
|
||||
u32 swap32(u32 i);
|
||||
u64 swap64(u64 i);
|
||||
void xor(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size);
|
||||
|
||||
// Hex string conversion auxiliary functions.
|
||||
u64 hex_to_u64(const char* hex_str);
|
||||
void hex_to_bytes(unsigned char *data, const char *hex_str);
|
||||
void hex_to_bytes(unsigned char *data, const char *hex_str);
|
||||
|
||||
// Crypto functions (AES128-CBC, AES128-ECB, SHA1-HMAC and AES-CMAC).
|
||||
void aescbc128_decrypt(unsigned char *key, unsigned char *iv, unsigned char *in, unsigned char *out, int len);
|
||||
void aesecb128_encrypt(unsigned char *key, unsigned char *in, unsigned char *out);
|
||||
bool hmac_hash_compare(unsigned char *key, int key_len, unsigned char *in, int in_len, unsigned char *hash);
|
||||
bool cmac_hash_compare(unsigned char *key, int key_len, unsigned char *in, int in_len, unsigned char *hash);
|
||||
|
||||
// Reverse-engineered custom Lempel–Ziv–Markov based compression (unknown variant of LZRC).
|
||||
int lz_decompress(unsigned char *out, unsigned char *in, unsigned int size);
|
Loading…
Add table
Add a link
Reference in a new issue