started on mib3 kdf

This commit is contained in:
Eljakim 2024-12-11 11:54:30 +01:00
parent da14253312
commit 4c4ae97635
3 changed files with 392 additions and 0 deletions

View File

@ -16,3 +16,10 @@ Documentation on Samsung devices, currently mainly the Samsung S7. Here we're ex
BootROM_8890/03_exploit_boot_chain.rst BootROM_8890/03_exploit_boot_chain.rst
BootROM_8890/04_xen_and_mib3.rst BootROM_8890/04_xen_and_mib3.rst
BootROM_8890/05_notes.rst BootROM_8890/05_notes.rst
.. toctree::
:maxdepth: 2
:caption: Key derivation:
key_derivation/index.rst

View File

@ -0,0 +1,314 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1642px" height="419px" viewBox="-0.5 -0.5 1642 419" content="&lt;mxfile&gt;&lt;diagram id=&quot;DUc70v5XKaM1rCFcs5d2&quot; name=&quot;Page-1&quot;&gt;7Vptc9soEP41/piMAL3YH/2StjftTTuT61zvUwcLbDORhQ7h2O6vP7CQLQmcOLGqTDSXDw6sYIWefXa1LBqg6Xr3UeBs9ScnNBlAj+wGaDaA6s8L1D8t2ReSIIKFYCkYKUTgJLhnv6gReka6YYTmtYGS80SyrC6MeZrSWNZkWAi+rQ9b8KR+1wwvqSW4j3FiS/9mRK4K6TDwTvJPlC1X5Z2BZ66scTnYCPIVJnxbEaG7AZoKzmXRWu+mNNHglbgU8z6cuXpcmKCpvGSCwf0RJxvzbGZdcl8+LE3JWGOmeilPlXBCcL6iWgFQnZVcJ6ap5d+wlFSkBwn0kJLmUvCHI07qCSfFLSixQD6tGhyxUCSifE2l2Ksh2xPaJdirCtClTNAES/ZYV4+N0ZdHdcc7fONM3Rh6hqAgLO1l+DkszVXqyPlGxNRMq8Lb0OQ/o0disaTS0qMalcc+iQ7GcxsSWYac8fV3YFlT0p2sW62wz5QnXJxMvGBJ0hDhhC21XWNlJKrkk0cqJFNOMTYX1owQfZvJdsUkvc9wrO+5VSFAyQTfpORAGu/IAK2A7l7KATPhpoGtPzL9CkdCB0eQd54ONfyfADv432scXhOEdYuELXmNpac9rxnZdlP43puuMVzFVnTH5I9K+x/N59vA9GY7Q+9DZ192UrWcH9VOZZbunqYdeuW8S+2tln/AtRBFbgpcadumSfzot5kksnxrkcdin0lu2aoeU1xRp2K6akQbQLTAJMKxFf7UlbkfBp7fTpACwwZuvh2kVHLgcErgtxCnQNA7foMy3zsQrsTqStJfjCc4R87vacLjh1YZOgeELDwXQ4EXoRFth6Goker4gc3QYeQiaDMqvwrQqH8E9R0EDbsiqG8R9DPd30su6NeMpq3yk3gxpdDFzyAMQNQSPwP4PD8BeCKruQrO/uUHBRUb9Bx2Rc/QoqdaxM8Huv+p9vPxO6RnGARvR0/XtuO903No0/OcCVqnJ7Kj5x9fp3990SKG1e9ntUfTpaxXge7dwqCCO7gQdTPrCHxnsCPUVVQYnn1pfaTyHQaFaPSG76yO97S3HbATOnJ+eO076zB1LATeVwZkegObVzQ3axweapgWNOqrzQkgeuEEKyGvT1CNYtGvLhR6Lm/TA3INBNGupcvp6ufBhDvV2AuWLp3E+oLnakyNUZdXCgXN2S88P+jT/DD4K+XBZBDMnnJHU9s3kwfHinqVS4UvnPVT79aDYVRD2yh/bbmkHMIXi5xeWwmB9m5zAMNEl2/zDKc1U4T/bvSRwUSXd28M/mM1IqELeUCxHKBaS/3f7FuV6ceElGrVigrNxZh3GHpHb7ldgP0rt0DXbrarcgu08zG9i/2EUx09DGfnoqSrjllNWXsOoxZL6KNeMp+zWOUmN5ucCrboj++g5rvN5TuuI5VWfOcFdd/enGGBZqI4tBH/XWdY0JV1O7c3V5bZRyRwMRdTHyDYEo6wGfZddXYXkqANKFH/9uHIkXJfe7R0MZx23jOOY5rr/PQD05G/CXaSsCzXGOcrnGkh4RuVF94d5c+Qto3g+bwnA9c5T9gG/+zD/35toCOvwywO2af7M77u85cUDe6GHX5JgezXfnspW+kE04TntD95GvCC7jY5qnv6Gq3YxJ6+6UN3/wE=&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<path d="M 1640 417 L 80 417" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="stroke"/>
<rect x="0" y="87" width="60" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 102px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DomU1
</div>
</div>
</div>
</foreignObject>
<text x="30" y="106" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
DomU1
</text>
</switch>
</g>
<path d="M 1600 217 L 80 217" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="stroke"/>
<path d="M 1220 107 L 286.36 67.27" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 281.12 67.05 L 288.26 63.85 L 286.36 67.27 L 287.96 70.84 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="220" y="37" width="1000" height="140" fill="#fad7ac" stroke="#b46504" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 998px; height: 1px; padding-top: 107px; margin-left: 221px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
fscrypto
</div>
</div>
</div>
</foreignObject>
<text x="720" y="111" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
fscrypto
</text>
</switch>
</g>
<path d="M 1210 107 L 566.36 72.34" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 561.12 72.06 L 568.29 68.94 L 566.36 72.34 L 567.92 75.93 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="340" y="47" width="870" height="120" fill="#b1ddf0" stroke="#10739e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 868px; height: 1px; padding-top: 107px; margin-left: 341px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
fscryptUnlock
</div>
</div>
</div>
</foreignObject>
<text x="775" y="111" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
fscryptUnlock
</text>
</switch>
</g>
<path d="M 670 72 L 688.63 72" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 693.88 72 L 686.88 75.5 L 688.63 72 L 686.88 68.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="560" y="47" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 72px; margin-left: 561px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
KeyStoreOpen
</div>
</div>
</div>
</foreignObject>
<text x="615" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
KeyStoreOpen
</text>
</switch>
</g>
<path d="M 805 72 L 823.63 72" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 828.88 72 L 821.88 75.5 L 823.63 72 L 821.88 68.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="695" y="47" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 72px; margin-left: 696px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
get_key_desc
</div>
</div>
</div>
</foreignObject>
<text x="750" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
get_key_desc
</text>
</switch>
</g>
<path d="M 940 72 L 953.63 72" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 958.88 72 L 951.88 75.5 L 953.63 72 L 951.88 68.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 857.5 97 L 857.5 290.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 857.5 295.88 L 854 288.88 L 857.5 290.63 L 861 288.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 197px; margin-left: 858px;">
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
IOCTL via Kernel
</div>
</div>
</div>
</foreignObject>
<text x="858" y="200" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
IOCTL via Kernel
</text>
</switch>
</g>
<rect x="830" y="47" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 72px; margin-left: 831px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
KeyStoreGet
</div>
</div>
</div>
</foreignObject>
<text x="885" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
KeyStoreGet
</text>
</switch>
</g>
<path d="M 1070 72 L 1070 17 Q 1070 7 1080 7 L 1200 7 Q 1210 7 1220 7 L 1330 7 Q 1340 7 1340 17 L 1340 30.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 1340 35.88 L 1336.5 28.88 L 1340 30.63 L 1343.5 28.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 6px; margin-left: 1192px;">
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
Key is added to kernel keyring
</div>
</div>
</div>
</foreignObject>
<text x="1192" y="10" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
Key is added to kernel keyring
</text>
</switch>
</g>
<rect x="960" y="47" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 72px; margin-left: 961px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<span style="text-align: left;">
fscryptKeyAdd
</span>
</div>
</div>
</div>
</foreignObject>
<text x="1015" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
fscryptKeyAdd
</text>
</switch>
</g>
<path d="M 530 72 L 553.63 72" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 558.88 72 L 551.88 75.5 L 553.63 72 L 551.88 68.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="370" y="47" width="160" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 72px; margin-left: 371px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
OpenHandle
<br/>
to
<br/>
<span style="text-align: left;">
/dev/mobicore-userif
</span>
</div>
</div>
</div>
</foreignObject>
<text x="450" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
OpenHandle...
</text>
</switch>
</g>
<rect x="230" y="77" width="60" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 92px; margin-left: 231px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
fscrypto
</div>
</div>
</div>
</foreignObject>
<text x="260" y="96" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
fscrypto
</text>
</switch>
</g>
<rect x="1260" y="37" width="160" height="130" fill="#fad9d5" stroke="#ae4132" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 102px; margin-left: 1261px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
Kernel
</div>
</div>
</div>
</foreignObject>
<text x="1340" y="106" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Kernel
</text>
</switch>
</g>
<path d="M 170 107 L 213.63 107" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 218.88 107 L 211.88 110.5 L 213.63 107 L 211.88 103.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="120" cy="107" rx="50" ry="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<ellipse cx="120" cy="107" rx="46" ry="26" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 90px; height: 1px; padding-top: 107px; margin-left: 75px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
Access File
</div>
</div>
</div>
</foreignObject>
<text x="120" y="111" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Access File
</text>
</switch>
</g>
<rect x="830" y="297" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 322px; margin-left: 831px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
KeyStoreGet
</div>
</div>
</div>
</foreignObject>
<text x="885" y="326" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
KeyStoreGet
</text>
</switch>
</g>
<rect x="10" y="287" width="60" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 302px; margin-left: 11px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
Dom1
</div>
</div>
</div>
</foreignObject>
<text x="40" y="306" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Dom1
</text>
</switch>
</g>
<rect x="1090" y="47" width="110" height="50" fill="#d0cee2" stroke="#56517e" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 72px; margin-left: 1091px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<span style="text-align: left;">
KeyStoreClose
</span>
</div>
</div>
</div>
</foreignObject>
<text x="1145" y="76" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
KeyStoreClose
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,71 @@
===================
MIB3 Key derivation
===================
This section is dedicated to the key derivation process on the MIB3 High (VAG) head unit.
As per this:
.. code-block:: c
void fscryptUnlock(char *path)
{
int iVar1;
1.
local_8 = ___stack_chk_guard;
fprintf(_stdout,"Call to fscryptUnlock with Path %s\n",path,&stdout,0);
iVar1 = waitfor_timeout("/dev/mobicore-userif",0xffffffffffffffff,0xffffffffffffffff,1);
if (iVar1 == 0) {
iVar1 = get_key_desc?(path,&local_60);
if (iVar1 == 0) {
iVar2 = KeyStoreOpen();
if (iVar2 == 0) {
iVar2 = KeyStoreGet(&local_60,0x10,&local_48,0x40);
if (iVar2 == 0) {
KeyStoreClose();
iVar2 = fscryptKeyAdd(&local_48,&local_60);
if (iVar2 < 0) {
iVar1 = -5;
fscryptKeyWipe(&local_48,0x40);
}
else {
fscryptKeyWipe(&local_48,0x40);
}
}
else {
KeyStoreClose();
iVar1 = -3;
}
}
else {
iVar1 = -3;
perror("Failed to connect to TEE");
}
}
}
else {
iVar1 = -3;
fwrite("Failed to wait for kinibi interface\n",1,0x24,_stderr);
}
if (local_8 == ___stack_chk_guard) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(iVar1);
}
Or in a diagram:
.. figure:: images/fscrypt.drawio.svg
.. code-block:: c
void KeyStoreGet(void *key_id,uint id_len,void *key_buffer,uint key_len)
TODO:
* What is located at ``/dev/mobicore-userif`` in domu1?