{"id":445602,"date":"2017-12-01T09:42:31","date_gmt":"2017-12-01T17:42:31","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?post_type=msr-research-item&p=445602"},"modified":"2018-10-16T20:06:43","modified_gmt":"2018-10-17T03:06:43","slug":"building-secure-sgx-enclaves-using-f-c-c-x64","status":"publish","type":"msr-research-item","link":"https:\/\/www.microsoft.com\/en-us\/research\/publication\/building-secure-sgx-enclaves-using-f-c-c-x64\/","title":{"rendered":"Building Secure SGX Enclaves using F*, C\/C++ and X64"},"content":{"rendered":"
Intel SGX offers hardware mechanisms to isolate code and\u00a0data running within enclaves from the rest of the platform.\u00a0This enables security verification on a relatively small software\u00a0TCB, but the task still involves complex low-level code.<\/p>\n
Relying on the Everest verification toolchain, we use F\u2217\u00a0for\u00a0developing specifications, code, and proofs; and then safely\u00a0compile F\u2217\u00a0code to standalone C code. However, this does\u00a0not account for all code running within the enclave, which\u00a0also includes trusted C and assembly code for bootstrapping\u00a0and for core libraries. Besides, we cannot expect all enclave\u00a0applications to be rewritten in F\u2217, so we also compile legacy\u00a0C++ defensively, using variants of \/guard that dynamically\u00a0enforce their safety at runtime.<\/p>\n
To reason about enclave security, we thus compose different\u00a0sorts of code and verification styles, from fine-grained\u00a0statically-verified F\u2217\u00a0to dynamically-monitored C++ and custom\u00a0SGX instructions. This involves two related program\u00a0semantics: most of the verification is conducted within F\u2217\u00a0using the target semantics of Kremlin\u2014a fragment of C with\u00a0a structured memory\u2014whereas SGX features and dynamic\u00a0checks embedded by defensive C++ compilers require lower-level\u00a0X64 code, for which we use the verified assembly language\u00a0for Everest (VALE) and its embedding in F\u2217.<\/p>\n","protected":false},"excerpt":{"rendered":"
Intel SGX offers hardware mechanisms to isolate code and\u00a0data running within enclaves from the rest of the platform.\u00a0This enables security verification on a relatively small software\u00a0TCB, but the task still involves complex low-level code. Relying on the Everest verification toolchain, we use F\u2217\u00a0for\u00a0developing specifications, code, and proofs; and then safely\u00a0compile F\u2217\u00a0code to standalone C code. […]<\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"_classifai_error":"","footnotes":""},"msr-content-type":[3],"msr-research-highlight":[],"research-area":[13560,13558],"msr-publication-type":[193716],"msr-product-type":[],"msr-focus-area":[],"msr-platform":[],"msr-download-source":[],"msr-locale":[268875],"msr-post-option":[],"msr-field-of-study":[],"msr-conference":[],"msr-journal":[],"msr-impact-theme":[],"msr-pillar":[],"class_list":["post-445602","msr-research-item","type-msr-research-item","status-publish","hentry","msr-research-area-programming-languages-software-engineering","msr-research-area-security-privacy-cryptography","msr-locale-en_us"],"msr_publishername":"","msr_edition":"PRISC\u201918","msr_affiliation":"","msr_published_date":"2018-01-01","msr_host":"","msr_duration":"","msr_version":"","msr_speaker":"","msr_other_contributors":"","msr_booktitle":"","msr_pages_string":"","msr_chapter":"","msr_isbn":"","msr_journal":"","msr_volume":"","msr_number":"","msr_editors":"","msr_series":"","msr_issue":"","msr_organization":"","msr_how_published":"","msr_notes":"","msr_highlight_text":"","msr_release_tracker_id":"","msr_original_fields_of_study":"","msr_download_urls":"","msr_external_url":"","msr_secondary_video_url":"","msr_longbiography":"","msr_microsoftintellectualproperty":1,"msr_main_download":"445605","msr_publicationurl":"","msr_doi":"","msr_publication_uploader":[{"type":"file","title":"prisc18-paper1","viewUrl":"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2017\/12\/prisc18-paper1.pdf","id":445605,"label_id":0}],"msr_related_uploader":"","msr_attachments":[],"msr-author-ordering":[{"type":"text","value":"Anitha Gollamudi","user_id":0,"rest_url":false},{"type":"user_nicename","value":"fournet","user_id":31819,"rest_url":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/microsoft-research\/v1\/researchers?person=fournet"}],"msr_impact_theme":[],"msr_research_lab":[],"msr_event":[444528],"msr_group":[],"msr_project":[],"publication":[],"video":[],"download":[],"msr_publication_type":"inproceedings","related_content":[],"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/445602"}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/types\/msr-research-item"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/445602\/revisions"}],"predecessor-version":[{"id":445614,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/445602\/revisions\/445614"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media?parent=445602"}],"wp:term":[{"taxonomy":"msr-content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-content-type?post=445602"},{"taxonomy":"msr-research-highlight","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-highlight?post=445602"},{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=445602"},{"taxonomy":"msr-publication-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-publication-type?post=445602"},{"taxonomy":"msr-product-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-product-type?post=445602"},{"taxonomy":"msr-focus-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-focus-area?post=445602"},{"taxonomy":"msr-platform","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-platform?post=445602"},{"taxonomy":"msr-download-source","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-download-source?post=445602"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=445602"},{"taxonomy":"msr-post-option","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-post-option?post=445602"},{"taxonomy":"msr-field-of-study","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-field-of-study?post=445602"},{"taxonomy":"msr-conference","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-conference?post=445602"},{"taxonomy":"msr-journal","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-journal?post=445602"},{"taxonomy":"msr-impact-theme","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-impact-theme?post=445602"},{"taxonomy":"msr-pillar","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-pillar?post=445602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}