PS2 kelftool and ELF headers

Discussion in 'Tools & Utilties' started by Berion, Dec 5, 2019.

  1. 2,444
    2,430
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,444
    Likes Received:
    2,430
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    Anyone know if elfs turned into krypto elfs have header? Or maybe decryption goes wrong? I getting garbage (at least it looks like on first sight, but structure is far from random) with all *.kelf whatever they comes from SP193's FMCB 1.9, some stuff from Oliviera or krHACKen. Is this normal?

    @sp193 @krHACKen

    kelftool.png
     
    Last edited: Dec 6, 2019
  2. 83
    236
    57
    krHACKen

    krHACKen Developer

    Joined:
    Nov 2, 2014
    Messages:
    83
    Likes Received:
    236
    Trophy Points:
    57
    MBR KELFs don't have an ELF header. After decrypting a MBR KELF, or a PSX xFlash NAND xosdmain.elf, you should get a raw EE executable binary, without an ELF header, which is loaded and executed at fixed EERAM address 100000h.
     
    akuhak, TnA and Berion like this.
  3. 2,444
    2,430
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,444
    Likes Received:
    2,430
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    Oh, that's strange. ^^
    Thanks for answer.
     
  4. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    @Berion... Please delete that word from your OSD-Keyboard word-prediction! :D

    Not kernelelf, but KryptoELF!
     
    Berion likes this.
  5. 2,444
    2,430
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,444
    Likes Received:
    2,430
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    @TnA And I'm whole life living in mistake? I was sure they are kernel (whatever the sense...) elfs, really. Because You know, why krypto instead of crypto? ;p I edited my earlier post but I'm still not sure if I did it reasonable right.
     
  6. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    If you know and say/write it that way since "you were born" (lol, I suppose not...), then I suppose the answer is "Yes!"!

    Google doesn't really yield any related results, if I search for "kernelelf PS2" or "Kernel elf PS2"... Maybe you mix it up with the Linux RTE "kernel Loader" or from another console "kernel elf Loader" (for loading something into kernel RAM, but not it's own type of file)!

    That's Sony's fault! I edited my earlier post but I'm still not sure if I did it reasonable right.
     
    Last edited: Dec 6, 2019
  7. 2,444
    2,430
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,444
    Likes Received:
    2,430
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    That's strange, indeed none of the crawlers back any results except my blasphemy. So how this can be written in my /dev/brain0? I know few peoples who using the same name - Mandela effect? ;p However, krypto elfs are mentioned always on assemblergames. Is this anyhow official name or just scene nomenclature?
     
  8. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    Yeah, I immediately thought of the Mandela Effect as well... Crazy! It seems some of those old-school-scenes since ~2011 are affected by it!:confused:


    I THINK, this is even official nomenclature! I hope someone like @sp193 or @krHACKen knows that!
     
  9. 780
    1,406
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    780
    Likes Received:
    1,406
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    What's your source of that? I don't think I've seen anything that explains what the K in KELF and KIRX stood for. In EELOAD from ROM 0100J, it mentions Kelf and Kmodule.

    I've heard of this "Krypto" explanation before, but it's likely hearsay.
     
    akuhak likes this.
  10. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    I think @Jimmykaelkael had some references and linked to it in the "FreeVast Continues" - Thread!

    It's also called KryptoELF (by Jimmykaelkael, Neme and others) in that and other threads multiple times.
    Maybe that reference was found in the DVD-Player-Install/Update-Discs?!

    The bad thing... We didn't (and still don't?) have an official documentation about KELFs, KIRXs, SECRMAN (at least for it's binding/signing), etc., AFAIK!
     
  11. 1,656
    1,316
    347
    jolek

    jolek Senior Member

    Joined:
    Dec 29, 2017
    Messages:
    1,656
    Likes Received:
    1,316
    Trophy Points:
    347
    Gender:
    Male
    Last edited: Dec 7, 2019
    TnA and Algol like this.
  12. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
  13. 7,651
    5,866
    872
    kozarovv

    kozarovv Developer

    Joined:
    Nov 8, 2014
    Messages:
    7,651
    Likes Received:
    5,866
    Trophy Points:
    872
    Home Page:
    I don't think that Krypto is correct. I never found that term in any official file/manual/doc/internal docs/proto files/anything.
     
    sp193 likes this.
  14. 2,444
    2,430
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,444
    Likes Received:
    2,430
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    BTW: Anyone have dirty_kelfmake? Link to it at psx-scene is dead.
     
  15. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    @kozarovv: I don't know it for sure! I've got to admit, that I adapted the term from the FreeVast-Project and haven't read it myself before!

    Soooo... It very well could mean something else, but was EVER referred to this way on all boards since then (at least to my knowledge and except for a few posts from Berion)!

    Maybe @l.oliveira knows it?
     
    Last edited: Dec 7, 2019
  16. 429
    310
    97
    RandQalan

    RandQalan Member

    Joined:
    Oct 4, 2014
    Messages:
    429
    Likes Received:
    310
    Trophy Points:
    97
    I have both dirty and SCEDoormat
     

    Attached Files:

    Berion, Algol, jolek and 1 other person like this.
  17. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    THX for attaching it!

    FORTUNATELY, we have a quite complete dump of psx-scene.com, before the DB-corruption, which wiped almost if not all attachments!

    I love the web-archive for this kind of stuff!
     
  18. 1,656
    1,316
    347
    jolek

    jolek Senior Member

    Joined:
    Dec 29, 2017
    Messages:
    1,656
    Likes Received:
    1,316
    Trophy Points:
    347
    Gender:
    Male
    You mean Release 3 of SCEDoormat?
    I've found this topic here, but the links (source or ELF) to http://aybabtu.chez.com... are dead:
    https://www.psx-place.com/threads/scedoormat_nome-rel-3-source-code-release-by-krhacken.11381/.
    I've additionally found this version at Project Page:
    http://www.metagames-eu.com/forums/...ome-un-encapsuleur-elf-kelf-libre-134416.html.

    If someone do not like to download from 1fichier.com, here is mirror:
    http://www.mediafire.com/file/umze87j0j1ppxyz/SCEDoormat_NoME_Rel.03.zip.
    Source code:
    https://www.mediafire.com/file/i50ljxoklpa5kit/src_SCEDoormat3_NoME.zip.
     
    Last edited: Dec 7, 2019
    TnA and Algol like this.
  19. 1,335
    721
    222
    TnA

    TnA Senior Member

    Joined:
    Jul 1, 2018
    Messages:
    1,335
    Likes Received:
    721
    Trophy Points:
    222
    Gender:
    Male
    Location:
    Germany --> Saxony
    Meanwhile, I am creating a "test" or "bug-report" thread here: https://www.psx-place.com/threads/daedalus-x64-bug-reports.27281/

    I know it will probably cause a lot of issues on almost all games, but maybe some Homebrew works and I suppose it might be helpful for those who want to help out, contribute, test, code, whatever!


    @jolek: Yes, exactly! THX for the upload/mirror!
     
    Last edited: Dec 7, 2019
  20. 83
    236
    57
    krHACKen

    krHACKen Developer

    Joined:
    Nov 2, 2014
    Messages:
    83
    Likes Received:
    236
    Trophy Points:
    57
    dirty_kelfmake appends the ELF to a valid KELF header. It was made for loading apps off PATINFO (such as DISKLOAD and POPStarter), as part of AKuHAKs' hdl_dumx project. Although loading the hackish KELF from pfs/PATINFO works, as long as the size of the ELF does not exceed the length of the raw block, it is not possible to CARD-bind it. Because the last block of the KELF (encrypted and signed block) is missing.

    SCEDoormat does a full ELF encapsulation, using blobs of signed data. The code for generating the blob files was not released, because it involed things that triggers the giant enemy crab...
     
    akuhak, Berion, RandQalan and 3 others like this.

Share This Page