blob: 498687ac10dc136f4acd5379d3d1a6dd7ba87222 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{250:function(e,t,n){e.exports=n.p+"assets/img/teaclave-trustzone-sdk-macros.54db69cf.png"},251:function(e,t,n){e.exports=n.p+"assets/img/teaclave-trustzone-sdk-apis.c71c04ed.png"},260:function(e,t,n){e.exports=n.p+"assets/img/teaclave-trustzone-sdk-design.fab30880.png"},261:function(e,t,n){e.exports=n.p+"assets/img/teaclave-trustzone-sdk-paper.387eb78f.png"},262:function(e,t,n){e.exports=n.p+"assets/img/teaclave-trustzone-sdk-timeline.b003b342.png"},375:function(e,t,n){"use strict";n.r(t);var a=n(11),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("p",[a("a",{attrs:{href:"/blog/2021-03-14-welcome-rust-optee-trustzone-sdk"}},[e._v("English")]),e._v(" | "),a("a",{attrs:{href:"/blog/2021-03-14-welcome-rust-optee-trustzone-sdk-cn"}},[e._v("中文")])]),e._v(" "),a("p",[e._v("TrustZone is a security feature by ARM SoC to provide a trusted execution\nenvironment to protect areas like mobile computing, edge computing, and\nemerging confidential computing, supporting scenarios like payments, key\nmanagement, model protection, etc. However, one major security threat in\nTrustZone applications is the memory safety issue. For instance, a\nvulnerability of Qualcomm's QSEE is caused by the memory safety issue [1].\nAttackers can even get the full-disk encryption key by exploiting such kind of\nvulnerability [2].")]),e._v(" "),a("p",[e._v("In 2019, Baidu open sourced the Rust OP-TEE TrustZone SDK project, enabling\nsafe, functional, and ergonomic development of TrustZone app developments.\nThe SDK provides a safer APIs based on the GlobalPlatform's TEE standard.\nIn addition, Rust OP-TEE TrustZone SDK also support Rust's standard library and\nthird-party crates (i.e., libraries). This will improve the efficiency of\ndevelopments of TrustZone apps, and also extend its usage scenarios.")]),e._v(" "),a("p",[e._v("To accelerate the development of confidential computing ecosystem and improve\nTrustZone's foundation, Baidu has donated Rust OP-TEE TrustZone SDK to Apache Software\nFoundation as a subproject of Teaclave, and renamed it as Teaclave TrustZone SDK.\nThe location of new repository is\n"),a("a",{attrs:{href:"https://github.com/apache/incubator-teaclave-trustzone-sdk",rel:"noopener noreferrer"}},[e._v("https://github.com/apache/incubator-teaclave-trustzone-sdk")]),e._v(".\nSimilar to Teaclave SGX SDK, Teaclave TrustZone SDK will be the foundation of\nTeaclave FaaS platform to support multiple trusted execution environments.")]),e._v(" "),a("h2",{attrs:{id:"design-and-implementation-of-teaclave-trustzone-sdk"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#design-and-implementation-of-teaclave-trustzone-sdk"}},[e._v("#")]),e._v(" Design and Implementation of Teaclave TrustZone SDK")]),e._v(" "),a("p",[e._v("Based on the GlobalPlatform's C APIs, Teaclave TrustZone SDK provides safer Rust interfaces.\nWith the SDK, TrustZone apps will not be affected by any memory safety issues\ncaused by the Rust's strong type system.")]),e._v(" "),a("p",[a("img",{attrs:{src:n(260),alt:"Teaclave TrustZone SDK Design"}})]),e._v(" "),a("p",[e._v("We also created procedure macros to help developments. For example, developers\ncan simply put\n"),a("code",[e._v("#[ta_create]")]),e._v(", "),a("code",[e._v("#[ta_open_session]")]),e._v(", "),a("code",[e._v("#[ta_close_session]")]),e._v(", "),a("code",[e._v("#[ta_destory]")]),e._v(",\nand "),a("code",[e._v("#[ta_invoke_command]")]),e._v(" annotations before corresponding functions. These\nannotations will automatically generate helper functions to bridge the normal/secure worlds.")]),e._v(" "),a("p",[a("img",{attrs:{src:n(250),alt:"Teaclave TrustZone SDK Macros"}})]),e._v(" "),a("p",[e._v("By using the rich type system of Rust, the memory safety issues will be reported\nat compile time. For example, in the following case, compared to C's APIs, the\nRust APIs have clearer semantics and more strict type checking.")]),e._v(" "),a("p",[a("img",{attrs:{src:n(251),alt:"Teaclave TrustZone SDK APIs"}})]),e._v(" "),a("p",[e._v("The project also has 13 samples, including encryption/decryption, secure storage, HOTP, etc.\nAlso, we provide a message passing sample code by using "),a("code",[e._v("serde")]),e._v(" for\nserialization and de-serialization between different worlds to avoid any\nsecurity issues caused by improper design in boundaries.")]),e._v(" "),a("h2",{attrs:{id:"getting-started-and-documentations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getting-started-and-documentations"}},[e._v("#")]),e._v(" Getting Started and Documentations")]),e._v(" "),a("p",[e._v("All APIs in Teaclave TrustZone SDK are well documented. In the project's Wiki\npage, we have "),a("a",{attrs:{href:"https://github.com/apache/incubator-teaclave-trustzone-sdk/wiki/Getting-started-with-OPTEE-for-QEMU-ARMv8",rel:"noopener noreferrer"}},[e._v("a quick-start document")]),e._v("\nto guide you compiling and running a TrustZone app in QEMU emulators.\nYou can find more design and performance evaluation in our paper published in ACSAC 2020.")]),e._v(" "),a("p",[a("img",{attrs:{src:n(261),alt:"Teaclave TrustZone Paper"}})]),e._v(" "),a("h2",{attrs:{id:"teaclave-trustzone-sdk-timeline"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#teaclave-trustzone-sdk-timeline"}},[e._v("#")]),e._v(" Teaclave TrustZone SDK Timeline")]),e._v(" "),a("ul",[a("li",[e._v("2019: Open source.")]),e._v(" "),a("li",[e._v("2019: Talks in Linaro Connect and RustCon Asia.")]),e._v(" "),a("li",[e._v("2020: Technical report published in ACSAC 2020.")]),e._v(" "),a("li",[e._v("2020: Many open source projects started to use the SDK. E.g., "),a("a",{attrs:{href:"https://github.com/veracruz-project/veracruz",rel:"noopener noreferrer"}},[e._v("Veracruz by ARM Research")]),e._v("\nis an experimental projects on confidential computing using the SDK.")]),e._v(" "),a("li",[e._v("Feb 2021: Support OP-TEE 3.11 and 3.12.")]),e._v(" "),a("li",[e._v("Feb 2021: Initial the donation procedure.")]),e._v(" "),a("li",[e._v("Mar 2021: Officially transferred to Teaclave.")])]),e._v(" "),a("p",[a("img",{attrs:{src:n(262),alt:"Teacalve TrustZone SDK Timeline"}})]),e._v(" "),a("p",[e._v("References:")]),e._v(" "),a("p",[e._v("[1] Qualcomm's Secure Execution Environment (QSEE) privilege escalation\nvulnerability and exploit (CVE-2015-6639) :\n"),a("a",{attrs:{href:"http://bits-please.blogspot.com/2016/05/qsee-privilege-escalation-vulnerability.html",rel:"noopener noreferrer"}},[e._v("http://bits-please.blogspot.com/2016/05/qsee-privilege-escalation-vulnerability.html")])]),e._v(" "),a("p",[e._v("[2] Extracting Qualcomm's KeyMaster Keys - Breaking Android Full Disk\nEncryption:\n"),a("a",{attrs:{href:"http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html",rel:"noopener noreferrer"}},[e._v("http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html")])])])}),[],!1,null,null,null);t.default=s.exports}}]);