- @zeph (that's me!)
- @I-Knight-I for their massive help with the cryptographic implementations, the compression algorithms and other miscellaneous bits of knowledge
- @AgentDark447 for their open-source software, allowing me to learn about the SHARC archive format
- @hykem for their efforts in reverse engineering the PS3 file formats such as NPD and SCE
hdk-rs is a modular, low-level toolchain for interacting with PlayStation Home and PS3 file formats. Built with pure Rust, it focuses on safety, performance, and ergonomic usage.
Unlike legacy C tools, hdk-rs leverages Rust's type system and traits. Readers and Writers implement standard std::io::Read, Write, and Seek traits, allowing for seamless streaming and composition.
β οΈ Status: Work In Progress > This library is currently under active construction. Expect breaking changes. The code is strictly linted to ensure high quality as the API stabilizes.
hdk-rs is designed to be modular. You only pay for what you use. The library is split into individual crates, allowing you to only include the logic required for your specific needs.
| Crate | Description |
|---|---|
hdk-secure |
Implementation of algorithms from Sony's libsecure. Supports XTEA and Blowfish. Fully compatible with the RustCrypto ecosystem. |
hdk-archive |
Reader/Writer support for BAR and SHARC PlayStation Home archives. Includes a full-fledged Mapper for recovering file paths. |
hdk-sdat |
Full support for the Sony SDATA format. Unpack, repack, and stream data efficiently. |
hdk-firmware |
Handle PUP containers, SCE file encryption/decryption (used in system updates like PS3UPDAT.PUP) as well as PKG files for PS3/PSP. |
hdk-comp |
Implementations of EdgeLZMA and EdgeZlib. Deeply integrated with IO traits to allow streaming composition with crypto modules. |
hdk-mdl |
Read PlayStation Home MDL (HM) model files. Supports export to JSON for easy inspection, via the export feature flag. |
The crates are currently hosted on GitHub. To use them, add the specific crate you need to your Cargo.toml using a git dependency. Since this is a monorepo, use the same repository URL for any crate in the ecosystem.
[dependencies]
# Example: Using the crypto and archive modules
hdk-secure = { git = "https://github.com/ZephyrCodesStuff/hdk-rs", branch = "main" }
hdk-archive = { git = "https://github.com/ZephyrCodesStuff/hdk-rs", branch = "main" }Contributions are welcome! Since this project aims for stability and correctness:
- Please ensure
cargo clippypasses. - Ensure no functionality is added without corresponding tests.
- Do not go out-of-scope. Your PR should only touch what is relevant to your addition.
- Make sure your PR contains all the details needed to know what you're changing and why.
Note: although not strictly enforced, running clippy::pedantic every now and then is not a bad idea.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
What this means:
- β You can use this library to build open source tools.
- β You can modify the library to suit your needs.
- π If you use this library in a networked service (e.g., a backend server interacting with clients), you must make the source code of that service available to users.
- π If you distribute a binary that links to this library, you must provide the source code for your application.
See LICENSE for more details.