• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

shchmue/Lockpick: Nintendo Switch encryption key derivation homebrew

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

shchmue/Lockpick

开源软件地址:

https://github.com/shchmue/Lockpick

开源编程语言:

C 96.4%

开源软件介绍:

Lockpick

Lockpick is a ground-up C++17 rewrite of homebrew key derivation software, namely kezplez-nx. It also dumps titlekeys. This will dump all keys through *_key_05 on firmwares below 6.2.0 and through *_key_06 on 6.2.0.

Due to key generation changes introduced in 7.0.0, Lockpick is not able to dump keys ending in 07 at all. Furthermore, unfortunately the public method to dump tsec_root_key is only available on firmware 6.2.0 so 7.x consoles can only dump through keys ending in 05.

What this software does differently

  • Dumps titlekeys and SD seed
  • Dumps all keys through 6.2.0
  • Uses the superfast xxHash instead of sha256 when searching exefs for keys for a ~5x speed improvement
  • Gets all possible keys from running process memory - this means no need to decrypt Package2 at all, let alone decompress KIPs
  • Gets bis keys and header_key without tsec, sbk, master_key_00 or aes sources. Shoutout to exelix11 for using this method in SwitchThemeInjector! Homebrew devs should be doing this instead of requiring users to provide key files!

Usage

  1. Use Hekate v4.5+ to dump TSEC and fuses:
    1. Push hekate payload bin using TegraRCMSmash/TegraRCMGUI/modchip/injector
    2. Using the VOL and Power buttons to navigate, select Console info...
    3. Select Print fuse info (not kfuse info)
    4. Press Power to save fuse info to SD card
    5. Select Print TSEC keys
    6. Press Power to save TSEC keys to SD card
  2. Launch CFW of choice
  3. Open Homebrew Menu
  4. Run Lockpick
  5. Use the resulting /switch/prod.keys file as needed and rename if required by any software you're using

You may instead use biskeydump and dump to SD to get all keys prior to the 6.2.0 generation - all keys up to those ending in 05. Lockpick will dump all keys up to that point regardless which firmware it's run on.

Notes

  • To get keys ending in 06, you must have firmware 6.2.0 installed
  • No one knows package1_key_06, it's derived and erased fully within the encrypted TSEC payload. While there's a way to extricate tsec_root_key due to the way it's used, this is unfortunately not true of the package1 key
  • If for some reason you dump TSEC keys on 6.2.0 and not fuses (secure_boot_key) you will still get everything except any of the package1 or keyblob keys (without secure_boot_key, you can't decrypt keyblobs and that's where package1 keys live)

Building

Release built with libnx release v2.4.0.

Uses freetype which comes with switch-portlibs via devkitPro pacman:

pacman -S libnx switch-portlibs

then run:

make

to build.

Special Thanks

  • tèsnos! For making kezplez-nx, being an all-around cool and helpful person and open to my contributions, not to mention patient with my enthusiasm. kezplez taught me an absolute TON about homebrew.
  • SciresM for hactool, containing to my knowledge the first public key derivation software, and for get_titlekeys.py
  • roblabla for the original keys gist and for believing in our habilities
  • The folks in the ReSwitched Discord server for answering my innumerable questions while researching this (and having such a useful chat backlog!)
  • The memory reading code from jakibaki's sys-netcheat was super useful for getting keys out of running process memory
  • The System Save dumping methodology from Adubbz' Compelled Disclosure
  • Shouts out to fellow key derivers: shadowninja108 for HACGUI, Thealexbarney for Libhac, and rajkosto

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
cartr/homebrew-qt4: Homebrew tap for Qt4 and dependent formulae on Sierra发布时间:2022-06-14
下一篇:
cloudflare/homebrew-cloudflare发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap