PS3 EDAT signing problem

Discussion in 'Developer Tools' started by fresh, Nov 4, 2018.

  1. 91
    26
    37
    fresh

    fresh Member

    Joined:
    Sep 7, 2018
    Messages:
    91
    Likes Received:
    26
    Trophy Points:
    37
    Hi!

    For my understanding, a signing tool should work like that:
    Take original data, decrypt it and encrypt with signs and hashes. That should be working again and again with the same (resigned) datas. *Without* watermarking and key modding and other things.

    After looking around i found 3 different (windows) frameworks of these tools:
    - command line based
    - python based
    - java based

    The java thing is working the described way, but with all the things a good hacker never would make: Watermarking, no source codes and more...

    The python thing is too freaky and more an all-in-one one click tool.

    The command line tools: After playing a little bit with make_npdata (v1.3.4), it seems this program have problems with generating correct hashes. You could test it yourself. Take original data, resign it and than take the resigned data and try to resign it again. You will get a *can't decrypt error*...

    So, let's talk about that. Any feedback, hint, solution, fix is welcome. :)

    Greets.
     
  2. 137
    94
    57
    catalinnc

    catalinnc Member

    Joined:
    Dec 26, 2015
    Messages:
    137
    Likes Received:
    94
    Trophy Points:
    57
    sorry man, but you don't know what are you talking...make_npdata is the best free tool available for edat/sdat resigning...it works flawles...i helped developing it and also i spend lots and lots of hours debuging/testing it...
    _

    p.s. maybe you dont know to proper use it? can you give some examples of usage?
    _
     
    Last edited: Nov 4, 2018
  3. 91
    26
    37
    fresh

    fresh Member

    Joined:
    Sep 7, 2018
    Messages:
    91
    Likes Received:
    26
    Trophy Points:
    37
    Code:
    make_npdata.exe -d [original].edat [original].dat KLICS\EP0000-original.klc RAPS\EP0000-original.rap
    NPD HEADER
    NPD version: 4
    NPD license: 2
    NPD type: 0
    NPD content ID: EP0000-original
    
    EDAT HEADER
    EDAT flags: 0x0000003C
    EDAT block size: 0x00004000
    EDAT file size: 0xE152
    
    Parsing data...
    Checking signatures...
    Metadata signature is valid!
    Header signature is valid!
    File successfully parsed!
    
    Decrypting data...
    File successfully decrypted!
    
    
    make_npdata.exe -e [original].dat [new].edat 1 1 3 0 16 3 00 EP0000-original 1
    NPD HEADER
    NPD version: 3
    NPD license: 3
    NPD type: 0
    NPD content ID: EP0000-original
    
    EDAT HEADER
    EDAT flags: 0x0000003C
    EDAT block size: 0x00004000
    EDAT file size: 0xE152
    
    Encrypting data...
    File successfully encrypted!
    Forging data...
    File successfully forged!
    
    
    make_npdata.exe -d [new].edat [new].dat 1
    NPD HEADER
    NPD version: 3
    NPD license: 3
    NPD type: 0
    NPD content ID: EP0000-original
    
    EDAT HEADER
    EDAT flags: 0x0000003C
    EDAT block size: 0x00004000
    EDAT file size: 0xE152
    
    Parsing data...
    Checking signatures...
    Metadata signature is invalid!
    Header signature is invalid!
    File successfully parsed!
    
    Decrypting data...
    File successfully decrypted!
    
     
  4. 137
    94
    57
    catalinnc

    catalinnc Member

    Joined:
    Dec 26, 2015
    Messages:
    137
    Likes Received:
    94
    Trophy Points:
    57
    this is wrong...
    Code:
    make_npdata.exe -e [original].dat [new].edat 1 1 3 0 16 3 00 EP0000-original 1
    fixing an edat requires the original klic...only edat themes have original klic as NPDRM OMAC key 1...
    Code:
    make_npdata.exe -e [original].dat [new].edat 1 1 3 0 16 3 00 EP0000-original KLICS\EP0000-original.klc
    decryption of a free edat (fixed one) also requires the original klic (if is an edat theme you can use NPDRM OMAC key 1)...
    Code:
    make_npdata.exe -d [new].edat [new].dat KLICS\EP0000-original.klc
    _

    p.s. note that re-encrypted edat/sdat will fail the ecdsa checks because private key needed to generate the sig is unknown for now...all the other hashes are correct...
    _
     
  5. 91
    26
    37
    fresh

    fresh Member

    Joined:
    Sep 7, 2018
    Messages:
    91
    Likes Received:
    26
    Trophy Points:
    37
    Thanx 4 feedback!

    The above is not a try to fix anything. It was to understand why i can resign a edat file with the one tool again and again and the edat works, against the other tool (with make_npdata) that failed at the second run.
     
  6. 1,341
    903
    197
    psykosis

    psykosis Developer Developer

    Joined:
    Dec 7, 2014
    Messages:
    1,341
    Likes Received:
    903
    Trophy Points:
    197
    The tools essentially do the same thing, using different programming languages.

    In the future, please leave your judgement of programs you don't understand at the door. TIA
     

Share This Page