Sponsored Links

Sponsored Links

Page 1 of 3 123 LastLast
Results 1 to 10 of 21



  1. #1
    Registered User flatz's Avatar
    Join Date
    Dec 2011
    Posts
    1
    Sponsored Links

    ReActPSN PS3 RAP2RIF .RAP to .RIF File Converter is Released

    Sponsored Links
    Following up on the previous ReActPSN v2.20 release, I have recently created a small PS3 RAP2RIF converter application for converting .RAP files from ReActPSN to .RIF file format.

    Download: [Register or Login to view links]

    It is based on a my own research.

    Place it to the ps3tools directory along with other tools and then place your idps and act.dat files to appropriate folders.

    This tool will generate .rif file that you should copy to your exdata/ folder. Then you can unself a corresponding NPDRM file.

    Have fun.

    Finally, from flatz comes the source code for RAP2RIF and RAP2RIFKey below:

    RAP2RIF: pastie.org/private/yltlfwubsz8w5pyhmojyfg
    Code:
    // (c) flatz
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    
    #include "common.h"
    #include "tools.h"
    
    static const u8 rif_header[16] = {
    	0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02
    };
    
    static const u8 rif_footer[16] = {
    	0x00, 0x00, 0x01, 0x2F, 0x41, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    static const u8 rif_junk = 0x11;
    
    static int load_from_file(const char *name, u8 *data, u32 length);
    static int rap_to_klicensee(u8 *rap_key, u8 *klicensee);
    
    int main(int argc, char *argv[])
    {
    	struct keylist *klist = NULL;
    	struct rif *rif = NULL;
    	struct actdat *actdat = NULL;
    	FILE *fp = NULL;
    	int i;
    
    	u8 rap_key[16];
    	u8 klicensee[16];
    	u8 content_id[48];
    	u8 padding[16];
    	u8 rif_key[16];
    	u8 enc_const[16];
    	u8 dec_actdat[16];
    	u8 signature[40];
    	u32 actdat_key_index;
    
    	const char *p1;
    	const char *p2;
    
    	if (argc < 3) {
    		fail("usage: rap2rif <rap file> <rif file>");
    		goto fail;
    	}
    
    	klist = keys_get(KEY_NPDRM);
    	if (klist == NULL) {
    		fail("no key found");
    		goto fail;
    	}
    
        actdat = actdat_get();
    	if (actdat == NULL) {
    		fail("unable to load act.dat");
    		goto fail;
    	}
    
    	if (load_from_file(argv[1], rap_key, sizeof(rap_key)) < 0) {
    		fail("unable to load rap file");
    		goto fail;
    	}
    
    	memset(content_id, 0, sizeof(content_id));
    	p1 = strrchr(argv[1], '/');
    	if (p1 == NULL)
    		p1 = strrchr(argv[1], '\\');
    	else
    		++p1;
    	if (p1 == NULL)
    		p1 = argv[1];
    	else
    		++p1;
    	p2 = strrchr(argv[1], '.');
    	if (p1 == NULL || p2 == NULL || *(p1 + 1) == '\0' || p2 < p1) {
    		fail("unable to get content ID");
    		goto fail;
    	}
    	strncpy(content_id, p1, p2 - p1);
    
    	memset(klicensee, 0, sizeof(klicensee));
    	rap_to_klicensee(rap_key, klicensee);
    
    	memset(padding, 0, sizeof(padding));
    	memset(rif_key, 0, sizeof(rif_key));
    
    	actdat_key_index = 0;
    	wbe32(padding + sizeof(padding) - sizeof(actdat_key_index), actdat_key_index);
    
    	aes128_enc(klist->idps->key, klist->npdrm_const->key, enc_const);
    	aes128(enc_const, &actdat->keyTable[actdat_key_index * 16], dec_actdat);
    	aes128_enc(klist->rif->key, padding, padding);
    	aes128_enc(dec_actdat, klicensee, rif_key);
    
    	memset(signature, rif_junk, sizeof(signature));
    
    	fp = fopen(argv[2], "wb");
    	if (fp == NULL) {
    		fail("unable to create rif file");
    		goto fail;
    	}
    	fwrite(rif_header, sizeof(rif_header), 1, fp);
    	fwrite(content_id, sizeof(content_id), 1, fp);
    	fwrite(padding, sizeof(padding), 1, fp);
    	fwrite(rif_key, sizeof(rif_key), 1, fp);
    	fwrite(rif_footer, sizeof(rif_footer), 1, fp);
    	fwrite(signature, sizeof(signature), 1, fp);
    	fclose(fp);
    
    	return 0;
    
    fail:
    	if (fp != NULL) {
    		fclose(fp);
    	}
    
    	if (actdat != NULL) {
    		free(actdat);
    	}
    
    	if (klist != NULL) {
    		if (klist->keys != NULL)
    			free(klist->keys);
    		free(klist);
    	}
    
    	return 0;
    }
    
    static int load_from_file(const char *path, u8 *data, u32 length)
    {
    	FILE *fp = NULL;
    	u32 read;
    	int ret = -1;
    	fp = fopen(path, "rb");
    	if (fp == NULL)
    		goto fail;
    	read = fread(data, length, 1, fp);
    	if (read != 1)
    		goto fail;
    	ret = 0;
    fail:
    	if (fp != NULL)
    		fclose(fp);
    	return ret;
    }
    
    static int rap_to_klicensee(u8 *rap_key, u8 *klicensee)
    {
    	static u8 rap_initial_key[16] = {
    		0x86, 0x9F, 0x77, 0x45, 0xC1, 0x3F, 0xD8, 0x90, 0xCC, 0xF2, 0x91, 0x88, 0xE3, 0xCC, 0x3E, 0xDF
    	};
    	static u8 pbox[16] = {
    		0x0C, 0x03, 0x06, 0x04, 0x01, 0x0B, 0x0F, 0x08, 0x02, 0x07, 0x00, 0x05, 0x0A, 0x0E, 0x0D, 0x09
    	};
    	static u8 e1[16] = {
    		0xA9, 0x3E, 0x1F, 0xD6, 0x7C, 0x55, 0xA3, 0x29, 0xB7, 0x5F, 0xDD, 0xA6, 0x2A, 0x95, 0xC7, 0xA5
    	};
    	static u8 e2[16] = {
    		0x67, 0xD4, 0x5D, 0xA3, 0x29, 0x6D, 0x00, 0x6A, 0x4E, 0x7C, 0x53, 0x7B, 0xF5, 0x53, 0x8C, 0x74
    	};
    
    	int round_num;
    	int i;
    
    	u8 key[16];
    	aes128(rap_initial_key, rap_key, key);
    
    	for (round_num = 0; round_num < 5; ++round_num) {
    		for (i = 0; i < 16; ++i) {
    			int p = pbox[i];
    			key[p] ^= e1[p];
    		}
    		for (i = 15; i >= 1; --i) {
    			int p = pbox[i];
    			int pp = pbox[i - 1];
    			key[p] ^= key[pp];
    		}
    		int o = 0;
    		for (i = 0; i < 16; ++i) {
    			int p = pbox[i];
    			u8 kc = key[p] - o;
    			u8 ec2 = e2[p];
    			if (o != 1 || kc != 0xFF) {
    				o = kc < ec2 ? 1 : 0;
    				key[p] = kc - ec2;
    			} else if (kc == 0xFF) {
    				key[p] = kc - ec2;
    			} else {
    				key[p] = kc;
    			}
    		}
    	}
    
    	memcpy(klicensee, key, sizeof(key));
    	return 0;
    }
    RAP2RIFKey: pastie.org/private/pmnmsnqg6zbfnk9xactbw
    Code:
    // (c) flatz
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    
    #include "common.h"
    #include "tools.h"
    
    static int load_from_file(const char *name, u8 *data, u32 length);
    static int rap_to_klicensee(u8 *rap_key, u8 *klicensee);
    
    int main(int argc, char *argv[])
    {
    	struct keylist *klist = NULL;
    	struct rif *rif = NULL;
    	FILE *fp = NULL;
    	int i;
    
    	u8 rap_key[16];
    	u8 klicensee[16];
    
    	if (argc < 3) {
    		printf("usage: rap2rifkey <rap file> <rif key file>\n");
    		return 0;
    	}
    
    	klist = keys_get(KEY_NPDRM);
    	if (klist == NULL) {
    		fail("no key found");
    		goto fail;
    	}
    
    	if (load_from_file(argv[1], rap_key, sizeof(rap_key)) < 0) {
    		fail("unable to load rap file");
    		goto fail;
    	}
    
    	memset(klicensee, 0, sizeof(klicensee));
    	rap_to_klicensee(rap_key, klicensee);
    
    	fp = fopen(argv[2], "wb");
    	if (fp == NULL) {
    		fail("unable to create rif key file");
    		goto fail;
    	}
    	fwrite(klicensee, sizeof(klicensee), 1, fp);
    	fclose(fp);
    
    	return 0;
    
    fail:
    	if (fp != NULL) {
    		fclose(fp);
    	}
    
    	if (klist != NULL) {
    		if (klist->keys != NULL)
    			free(klist->keys);
    		free(klist);
    	}
    
    	return 0;
    }
    
    static int load_from_file(const char *path, u8 *data, u32 length)
    {
    	FILE *fp = NULL;
    	u32 read;
    	int ret = -1;
    	fp = fopen(path, "rb");
    	if (fp == NULL)
    		goto fail;
    	read = fread(data, length, 1, fp);
    	if (read != 1)
    		goto fail;
    	ret = 0;
    fail:
    	if (fp != NULL)
    		fclose(fp);
    	return ret;
    }
    
    static int rap_to_klicensee(u8 *rap_key, u8 *klicensee)
    {
    	static u8 rap_initial_key[16] = {
    		0x86, 0x9F, 0x77, 0x45, 0xC1, 0x3F, 0xD8, 0x90, 0xCC, 0xF2, 0x91, 0x88, 0xE3, 0xCC, 0x3E, 0xDF
    	};
    	static u8 pbox[16] = {
    		0x0C, 0x03, 0x06, 0x04, 0x01, 0x0B, 0x0F, 0x08, 0x02, 0x07, 0x00, 0x05, 0x0A, 0x0E, 0x0D, 0x09
    	};
    	static u8 e1[16] = {
    		0xA9, 0x3E, 0x1F, 0xD6, 0x7C, 0x55, 0xA3, 0x29, 0xB7, 0x5F, 0xDD, 0xA6, 0x2A, 0x95, 0xC7, 0xA5
    	};
    	static u8 e2[16] = {
    		0x67, 0xD4, 0x5D, 0xA3, 0x29, 0x6D, 0x00, 0x6A, 0x4E, 0x7C, 0x53, 0x7B, 0xF5, 0x53, 0x8C, 0x74
    	};
    
    	int round_num;
    	int i;
    
    	u8 key[16];
    	aes128(rap_initial_key, rap_key, key);
    
    	for (round_num = 0; round_num < 5; ++round_num) {
    		for (i = 0; i < 16; ++i) {
    			int p = pbox[i];
    			key[p] ^= e1[p];
    		}
    		for (i = 15; i >= 1; --i) {
    			int p = pbox[i];
    			int pp = pbox[i - 1];
    			key[p] ^= key[pp];
    		}
    		int o = 0;
    		for (i = 0; i < 16; ++i) {
    			int p = pbox[i];
    			u8 kc = key[p] - o;
    			u8 ec2 = e2[p];
    			if (o != 1 || kc != 0xFF) {
    				o = kc < ec2 ? 1 : 0;
    				key[p] = kc - ec2;
    			} else if (kc == 0xFF) {
    				key[p] = kc - ec2;
    			} else {
    				key[p] = kc;
    			}
    		}
    	}
    
    	memcpy(klicensee, key, sizeof(key));
    	return 0;
    }
    Finally, from sorg: Addition to FLAG_0x20: Hash in header for metadata is still valid. Just hash all pieces of metadata

    ReActPSN PS3 RAP2RIF .RAP to .RIF File Converter is Released

    More PlayStation 3 News...
    Attached Thumbnails<br><br> Attached Thumbnails

    rap2rif_screen01.png  
    Attached Files Attached Files

  2. #2
    Forum Moderator PS3 News's Avatar
    Join Date
    Apr 2005
    Posts
    27,730
    Sponsored Links

    Thumbs Up

    Sponsored Links
    Thanks for the release flatz and +Rep! I have also promoted the news to our main page now as well.

  3. #3
    Banned User catalinnc's Avatar
    Join Date
    May 2007
    Posts
    18
    Sponsored Links
    Sponsored Links
    thanks a lot for this amazing tool... how about a rif2rap tool (using act.dat, idps and .rif)

  4. #4
    Forum Moderator PS3 News's Avatar
    Join Date
    Apr 2005
    Posts
    27,730

    RIF2RAP PS3 Homebrew App, Export RAP Files Without Downgrading

    Following up on RenPKG and RAP2RIF, PlayStation 3 homebrew developer Eslab has now made available RIF2RAP which no longer requires users to downgrade their PS3 console to 3.55 to export the RAP files.

    Download: [Register or Login to view links] / [Register or Login to view links] (Mirror) / [Register or Login to view links] (Mirror #2) / [Register or Login to view links] / [Register or Login to view links] (Mirror) by BlackDeath / [Register or Login to view links] by Anxietic

    With this application, it is now possible to convert RIF files on the PlayStation 3 console to RAP files.

    From mikufans: Hello, recently my friend released a tool: rif2rap. It does help those who want to share the rap. And there is no need to downgrade the PS3 concole to 3.55 to export the rap. Just run this rif2rap.exe, and get the rap.

    Tested OK by some of my friends. The Tutorial is so easy that no need to explain here.

    The program is written by Eslab. Enjoy!!

    Q: How to get my act.dat?
    A: PS3 file path: dev_hdd0/home/00000X/exdata

    Q: How to get my idps?
    A: Dump your PS3 flash, and visit ps3devwiki.com/wiki/IDPS (see below) You don't need to downgrade your console. The lastest MM supports flash dump.

    IDPS

    The IDPS is a 16 byte value that contains console specific information. Exactly what information this stores is not completely known.

    Structure
    Code:
    00000000  00 00 00 01 00 89 00 0B 14 00 EF DD CA 25 52 66  .....‰....%Rf
                             ^^    ^^
                     Target ID      PS3 Model type
    6th byte represents your Target ID

    8th byte represents your PS3 Model

    The IDPS can be found in EID0 and EID5, see Flash (NAND @ 0x80870 / NOR @ 0x2F070)

    Displayed under setting information on MultiMan or on registry/application_persistent file inside PlayStation Store folder (as DeviceID).

    Q: How to import the rap?
    A: Install the ReActPsn 2.23.pkg, tested OK on 4.30CFW V2.03

    From the ReadMe File: Your console's IDPS named idps is in the exdata file folder. Your act.dat is also in the exdata file folder.

    The usage:
    Code:
    rif2rap <xxx.rif> <xxx.rap>
    or
    rif2rap <xxx.rif>
    From BlackDeath: I have created a little "batch-version"... Just copy all *.rif files in the folder and run convert_all_rif2rap.exe (of course u have to place your act.dat and idps in exdata folder)

    It's just a quick version, feel free to test. Maybe it's useful for those like me, with many *.rif files. kudos to Eslab for this nice rif2rap tool.

    From Anxietic: Is that get_IDPS app able to be ported to 4.21? if so would remove the need to downgrade to get it. I signed it for 4.20+, try, maybe it works.

    From snkysnake02 followed by haz367: I say over complicated not in literary terms. In mm you gota load then load fileos then do this then do that, by the time ya make it through those steps I already have mine with 2 clicks

    1. Boot toolbox
    2. Click dump nand / nor flash

    Less steps ie. Less complex do you follow now LOL ^_^

    From there on 4.xx CFW's to get ur IDPS as a file (all "idps dumpers" are not working properly on 4.xx)
    • open the NOR or NAND dump with HxD workshop
    • click CTRL+E or click "edit-select block"
    • paste the idps - OFFSETS below into the 2 boxes
    • enter

    Start offset - End offset
    NOR: 2f070 - 2F07F = IDPS
    NAND: 80870 - 8087F = IDPS

    1)
    • rightclick the IDPS and copy the line or just do CTLR+C
    • create new file
    • CTRL+B or paste write the IDPS into new file
    • save the new file as "idps" without any extension!! > not idps.txt etc...

    2) or write down the IDPS from Multiman - system settings
    • write into "new file" with HxD
    • save as "idps"
    • result looks like this with your OWN IDPS

    Finally, c/p your "act.dat" and "idps" in the exdata folder and convert your rifs to raps: rap2rif, rif2rap

    From oakhead69: ReActPSN needs RAP files to work. These can be created on CFW 3.55 by reactPSN from the rif files that are present in your exdata folder. i.e. it performs a RIF2RAP for you. Problem is reactPSN will not do this on CFW 4.xx, hence you need to use this program to do it for you.

    More information so that you can understand this if you are interested: In order for reactPSN to work the PS3 needs to be able to decrypt locally licensed EDAT files. In order to do this it needs a number of keys, the main 2 that we are interested in are the devKLic and the keyFromRif. The devKLic is either a known hard coded key in the F/W this is the case for PSX, PS2, PSP, minis, Demos and others.

    For DLC, updates, PSN games this key is in the application executable (e.g. BOOT.BIN). The other key the keyFromRif is what the RAP file provides. The other 2 keys it needs are the EDATKEY and the EDATHASH, there are <V4 versions of theses and >=V4 versions of these. I have tired to keep this simple, hope it helps. It is also needed as you say to make games etc work with out reactPSN. In order to convert an EDAT file from locally licensed to free the same keys are needed as described above.

    From Asure: You can use rap2rif to create valid RIF files from a RAP file.. So there's no need for ReactPSN at this stage, the rif files are generated on your PC. And yes, this requires a valid ACT.DAT and IDPS to reactivate them. But, they can be any act/idps files you want to activate them against.

    I had a similar problem before, but you need a fully activated act.dat for this to work. It works best when you grab the act.dat of a new (dummy) account that you create on your CFW system, and downloaded a free game/demo with.

    You can't use an account that you have content on, which is shared on PS3's. Also you can't put back the act.dat (let's say we ftp a copy out) after deactivating the PS3/account. Sony will delete it from your system when you sign in with it.

    In my case i was referring to rap2rif, with a PS3 cfw that act.dat was created by connecting to PSN using an original account that signed in. This account was already active on two PS3's. It didn't get all the data from Sony, so it could not be used. I created an extra dummy account and signed in with it, bought a free add-on, then it was good to go. (with idps, rap2rif, etc.)

    RIF2RAP PS3 Homebrew App, Export RAP Files Without Downgrading

    RIF2RAP PS3 Homebrew App, Export RAP Files Without Downgrading

    More PlayStation 3 News...

  5. #5
    Member BerserkLeon's Avatar
    Join Date
    Feb 2011
    Posts
    69
    seems to work with the rifs reactpsn 2.23 wouldn't turn to raps. thanks

  6. #6
    Registered User jmleolgq's Avatar
    Join Date
    Jul 2012
    Posts
    6
    The lastest MM supports idps displaying.

    Turn the MutiMan mode to XMB, select [Settings] -> [System Information].

  7. #7
    Contributor XxUnkn0wnxX's Avatar
    Join Date
    Nov 2012
    Posts
    5
    here is a mirror for RIF2RAP Edit by BlackDeath: [Register or Login to view links]

  8. #8
    Forum Moderator PS3 News's Avatar
    Join Date
    Apr 2005
    Posts
    27,730

    RAP2RIF & RIF2RAP v1.02 PS3 Homebrew Application is Updated

    Following up on the RAP2RIF and RIF2RAP PS3 homebrew utilities, today the Italian PlayStation 3 developers at BiteYourConsole have made available Rap2Rif & Rif2Rap v1.02 with the changes outlined below.

    Download: [Register or Login to view links] / [Register or Login to view links] (Mirror) / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] by zecoxao

    To quote, roughly translated: Here comes a new update to the utility windows Rap2Rif & Rif2Rap that brings us to version 1.2 solving several bugs found in Windows XP. You may recall that the utility is used to convert the file has Rap file in Ref and vice versa.

    Changelog:
    • Fixed several bugs on Windows XP.
    • Added Content_ID2edat by type C00 demo.
    • Addition scan the directories.
    • Enter the file act.dat & IDPs in the DATA folder and launch the utility rap2rif & rif2rap to fix this symbol c00 enter a demo. PARAM.SFO pkg file or a file to be generated. edat.

    From pink1: Here is a tool I put together. It's pretty much rap2rif, rif2rap and an edat fix tool for C00 type demos. Put your act.dat & idps in the data folder and you're ready for rap2rif & rif2rap. To fix C00 type demos input a .pkg from a C00 demo or the PARAM.SFO and it will output the fixed .edat.

    Update: This (R2R+edat v1.0.1) is a small update to R2R+edat, it fixes edats being a byte short & should speed up pkg2edat a lot by only decrypting the first 5MB instead of the whole pkg. Put your act.dat & idps in the data folder and you're ready for rap2rif & rif2rap.

    To fix C00 type demos input a .pkg from a C00 demo or the PARAM.SFO and it will output the fixed .edat.

    Update #2: This (R2R v1.02) is an update to R2R+edat v1.0.1. I've fixed some bugs on XP added Content_ID2edat for type C00 demos and added directory scanning plus a lot of little fixes I don't remember. Put your act.dat & idps in the data folder and you're ready for rap2rif & rif2rap.

    To fix C00 type demos input a .pkg from a C00 demo or the PARAM.SFO and it will output the fixed .edat. A huge thanks to catalinnc for testing & letting me know about the problems on XP.

    Update #3: zecoxao has also released an ACT.DAT and RIF generator stating the following, to quote:

    Download: [Register or Login to view links]

    Hint: try to figure out what those initials mean

    RAP2RIF & RIF2RAP v1.02 PS3 Homebrew Application is Updated

    More PlayStation 3 News...

  9. #9
    Member sguerrini97's Avatar
    Join Date
    Sep 2011
    Posts
    51
    Any mirror for rap2rif? Rghost isn't working here..

    Thanks.

  10. #10
    Forum Moderator PS3 News's Avatar
    Join Date
    Apr 2005
    Posts
    27,730
    I added a mirror and some previous builds to the main article, here is the mirror to the latest: [Register or Login to view links]

 

Sponsored Links
Page 1 of 3 123 LastLast
Affiliates - Contact Us - PS3 Downloads - Privacy Statement - Site Rules - Top - © 2014 PlayStation 3 News