linkle icon indicating copy to clipboard operation
linkle copied to clipboard

NCA extraction

Open roblabla opened this issue 6 years ago • 16 comments

Parse and extract nca sections.

roblabla avatar Dec 27 '18 20:12 roblabla

Better format

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L141-L151


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Check if NCA is already decrypted

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L170-L180


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

NCA: Verify header with RSA2048 PSS

We want to make sure the NCAs have a valid signature before decrypting. Maybe put it behind a flag that accepts invalidly signed NCAs?


https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L206-L216


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

NCA0 => return

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L222-L232


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Implement RightsID crypto.

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L228-L238


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Store the SDK version in a more human readable format.

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L277-L287


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Implement rights id.

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L281-L291


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Nca::raw_section should reopen the file, not dup2 the handle.

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L294-L304


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Make VerificationStream actually verify the data it reads.

based on the hash table located with the help of the superblock. It will need a different implementation for PFS0 and RomFs (and maybe Bktr?).


https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/format/nca.rs#L457-L467


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Figure out why this is necessary.

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/lib.rs#L1-L4


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

Document

https://github.com/MegatonHammer/linkle/blob/935fed26b7da56583d53b44fa4f1c2acfd125217/src/utils.rs#L5-L15


This comment was generated by todo based on a TODO comment in 935fed26b7da56583d53b44fa4f1c2acfd125217 in #34. cc @roblabla.

todo[bot] avatar Dec 27 '18 20:12 todo[bot]

NCA0 => return

https://github.com/MegatonHammer/linkle/blob/9ba46f8aca8299c7c7e1e44fa5918b1d6792ae33/src/format/nca.rs#L222-L232


This comment was generated by todo based on a TODO comment in 9ba46f8aca8299c7c7e1e44fa5918b1d6792ae33 in #34. cc @roblabla.

todo[bot] avatar Jan 24 '19 02:01 todo[bot]

NCA0 => return

https://github.com/MegatonHammer/linkle/blob/2d2206bfe287897bcb65923b290799527ca9b3e3/src/format/nca.rs#L264-L274


This comment was generated by todo based on a TODO comment in 2d2206bfe287897bcb65923b290799527ca9b3e3 in #34. cc @roblabla.

todo[bot] avatar Jan 27 '19 00:01 todo[bot]

Bubble up the error.

https://github.com/MegatonHammer/linkle/blob/2d2206bfe287897bcb65923b290799527ca9b3e3/src/format/nca.rs#L627-L637


This comment was generated by todo based on a TODO comment in 2d2206bfe287897bcb65923b290799527ca9b3e3 in #34. cc @roblabla.

todo[bot] avatar Jan 27 '19 00:01 todo[bot]

Bubble up the error.

https://github.com/MegatonHammer/linkle/blob/2d2206bfe287897bcb65923b290799527ca9b3e3/src/format/nca.rs#L649-L659


This comment was generated by todo based on a TODO comment in 2d2206bfe287897bcb65923b290799527ca9b3e3 in #34. cc @roblabla.

todo[bot] avatar Jan 27 '19 00:01 todo[bot]

Now, verify the buffer.

https://github.com/MegatonHammer/linkle/blob/2d2206bfe287897bcb65923b290799527ca9b3e3/src/format/nca.rs#L741-L751


This comment was generated by todo based on a TODO comment in 2d2206bfe287897bcb65923b290799527ca9b3e3 in #34. cc @roblabla.

todo[bot] avatar Jan 27 '19 00:01 todo[bot]