:sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessubstitution_definition)}(h&.. |AArch32| replace:: :term:`AArch32`h]h pending_xref)}(h:term:`AArch32`h]h inline)}(hhh]h TextAArch32}(hhparenthuba attributes}(ids]classes](xrefstdstd-termenames]dupnames]backrefs]utagnamehh!hubah"}(h$]h&]h+]h-]h/]refdocdesign/auth-framework refdomainh)reftypeterm refexplicitrefwarn reftargetAArch32uh1hsource lineKh!h ubah"}(h$]h&]h+]AArch32ah-]h/]uh1h hAhBhCKh!hhhubh )}(h&.. |AArch64| replace:: :term:`AArch64`h]h)}(h:term:`AArch64`h]h)}(hhQh]hAArch64}(hhh!hSubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hOubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainh]reftypeterm refexplicitrefwarnh?AArch64uh1hhAhBhCKh!hKubah"}(h$]h&]h+]AArch64ah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |AMU| replace:: :term:`AMU`h]h)}(h :term:`AMU`h]h)}(hh|h]hAMU}(hhh!h~ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hzubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhreftypeterm refexplicitrefwarnh?AMUuh1hhAhBhCKh!hvubah"}(h$]h&]h+]AMUah-]h/]uh1h hAhBhCKh!hhhubh )}(h&.. |AMUs| replace:: :term:`AMUs `h]h)}(h:term:`AMUs `h]h)}(hhh]hAMUs}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhreftypeterm refexplicitrefwarnh?AMUuh1hhAhBhCKh!hubah"}(h$]h&]h+]AMUsah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |API| replace:: :term:`API`h]h)}(h :term:`API`h]h)}(hhh]hAPI}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhތreftypeterm refexplicitrefwarnh?APIuh1hhAhBhCKh!hubah"}(h$]h&]h+]APIah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |BTI| replace:: :term:`BTI`h]h)}(h :term:`BTI`h]h)}(hhh]hBTI}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?BTIuh1hhAhBhCKh!hubah"}(h$]h&]h+]BTIah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |CoT| replace:: :term:`CoT`h]h)}(h :term:`CoT`h]h)}(hj(h]hCoT}(hhh!j*ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j&ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj4reftypeterm refexplicitrefwarnh?CoTuh1hhAhBhCKh!j"ubah"}(h$]h&]h+]CoTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |COT| replace:: :term:`COT`h]h)}(h :term:`COT`h]h)}(hjSh]hCOT}(hhh!jUubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jQubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj_reftypeterm refexplicitrefwarnh?COTuh1hhAhBhCKh!jMubah"}(h$]h&]h+]COTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |CSS| replace:: :term:`CSS`h]h)}(h :term:`CSS`h]h)}(hj~h]hCSS}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j|ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?CSSuh1hhAhBhCK h!jxubah"}(h$]h&]h+]CSSah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |CVE| replace:: :term:`CVE`h]h)}(h :term:`CVE`h]h)}(hjh]hCVE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?CVEuh1hhAhBhCK h!jubah"}(h$]h&]h+]CVEah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DTB| replace:: :term:`DTB`h]h)}(h :term:`DTB`h]h)}(hjh]hDTB}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?DTBuh1hhAhBhCK h!jubah"}(h$]h&]h+]DTBah-]h/]uh1h hAhBhCK h!hhhubh )}(h .. |DS-5| replace:: :term:`DS-5`h]h)}(h :term:`DS-5`h]h)}(hjh]hDS-5}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?DS-5uh1hhAhBhCK h!jubah"}(h$]h&]h+]DS-5ah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DSU| replace:: :term:`DSU`h]h)}(h :term:`DSU`h]h)}(hj*h]hDSU}(hhh!j,ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j(ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj6reftypeterm refexplicitrefwarnh?DSUuh1hhAhBhCK h!j$ubah"}(h$]h&]h+]DSUah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DT| replace:: :term:`DT`h]h)}(h :term:`DT`h]h)}(hjUh]hDT}(hhh!jWubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jSubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjareftypeterm refexplicitrefwarnh?DTuh1hhAhBhCKh!jOubah"}(h$]h&]h+]DTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |EL| replace:: :term:`EL`h]h)}(h :term:`EL`h]h)}(hjh]hEL}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j~ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ELuh1hhAhBhCKh!jzubah"}(h$]h&]h+]ELah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |EHF| replace:: :term:`EHF`h]h)}(h :term:`EHF`h]h)}(hjh]hEHF}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?EHFuh1hhAhBhCKh!jubah"}(h$]h&]h+]EHFah-]h/]uh1h hAhBhCKh!hhhubh )}(h".. |FCONF| replace:: :term:`FCONF`h]h)}(h :term:`FCONF`h]h)}(hjh]hFCONF}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FCONFuh1hhAhBhCKh!jubah"}(h$]h&]h+]FCONFah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FDT| replace:: :term:`FDT`h]h)}(h :term:`FDT`h]h)}(hjh]hFDT}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?FDTuh1hhAhBhCKh!jubah"}(h$]h&]h+]FDTah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |FF-A| replace:: :term:`FF-A`h]h)}(h :term:`FF-A`h]h)}(hj,h]hFF-A}(hhh!j.ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j*ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj8reftypeterm refexplicitrefwarnh?FF-Auh1hhAhBhCKh!j&ubah"}(h$]h&]h+]FF-Aah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FIP| replace:: :term:`FIP`h]h)}(h :term:`FIP`h]h)}(hjWh]hFIP}(hhh!jYubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jUubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjcreftypeterm refexplicitrefwarnh?FIPuh1hhAhBhCKh!jQubah"}(h$]h&]h+]FIPah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FVP| replace:: :term:`FVP`h]h)}(h :term:`FVP`h]h)}(hjh]hFVP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FVPuh1hhAhBhCKh!j|ubah"}(h$]h&]h+]FVPah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FWU| replace:: :term:`FWU`h]h)}(h :term:`FWU`h]h)}(hjh]hFWU}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FWUuh1hhAhBhCKh!jubah"}(h$]h&]h+]FWUah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |GIC| replace:: :term:`GIC`h]h)}(h :term:`GIC`h]h)}(hjh]hGIC}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?GICuh1hhAhBhCKh!jubah"}(h$]h&]h+]GICah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |ISA| replace:: :term:`ISA`h]h)}(h :term:`ISA`h]h)}(hjh]hISA}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ISAuh1hhAhBhCKh!jubah"}(h$]h&]h+]ISAah-]h/]uh1h hAhBhCKh!hhhubh )}(h$.. |Linaro| replace:: :term:`Linaro`h]h)}(h:term:`Linaro`h]h)}(hj.h]hLinaro}(hhh!j0ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j,ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj:reftypeterm refexplicitrefwarnh?Linarouh1hhAhBhCKh!j(ubah"}(h$]h&]h+]Linaroah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |MMU| replace:: :term:`MMU`h]h)}(h :term:`MMU`h]h)}(hjYh]hMMU}(hhh!j[ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jWubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjereftypeterm refexplicitrefwarnh?MMUuh1hhAhBhCKh!jSubah"}(h$]h&]h+]MMUah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |MPAM| replace:: :term:`MPAM`h]h)}(h :term:`MPAM`h]h)}(hjh]hMPAM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPAMuh1hhAhBhCKh!j~ubah"}(h$]h&]h+]MPAMah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |MPMM| replace:: :term:`MPMM`h]h)}(h :term:`MPMM`h]h)}(hjh]hMPMM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPMMuh1hhAhBhCKh!jubah"}(h$]h&]h+]MPMMah-]h/]uh1h hAhBhCKh!hhhubh )}(h".. |MPIDR| replace:: :term:`MPIDR`h]h)}(h :term:`MPIDR`h]h)}(hjh]hMPIDR}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPIDRuh1hhAhBhCKh!jubah"}(h$]h&]h+]MPIDRah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |MTE| replace:: :term:`MTE`h]h)}(h :term:`MTE`h]h)}(hjh]hMTE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MTEuh1hhAhBhCKh!jubah"}(h$]h&]h+]MTEah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |OEN| replace:: :term:`OEN`h]h)}(h :term:`OEN`h]h)}(hj0h]hOEN}(hhh!j2ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j.ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj<reftypeterm refexplicitrefwarnh?OENuh1hhAhBhCKh!j*ubah"}(h$]h&]h+]OENah-]h/]uh1h hAhBhCKh!hhhubh )}(h$.. |OP-TEE| replace:: :term:`OP-TEE`h]h)}(h:term:`OP-TEE`h]h)}(hj[h]hOP-TEE}(hhh!j]ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jYubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjgreftypeterm refexplicitrefwarnh?OP-TEEuh1hhAhBhCK h!jUubah"}(h$]h&]h+]OP-TEEah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |OTE| replace:: :term:`OTE`h]h)}(h :term:`OTE`h]h)}(hjh]hOTE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?OTEuh1hhAhBhCK!h!jubah"}(h$]h&]h+]OTEah-]h/]uh1h hAhBhCK!h!hhhubh )}(h.. |PDD| replace:: :term:`PDD`h]h)}(h :term:`PDD`h]h)}(hjh]hPDD}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PDDuh1hhAhBhCK"h!jubah"}(h$]h&]h+]PDDah-]h/]uh1h hAhBhCK"h!hhhubh )}(h".. |PAUTH| replace:: :term:`PAUTH`h]h)}(h :term:`PAUTH`h]h)}(hjh]hPAUTH}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PAUTHuh1hhAhBhCK#h!jubah"}(h$]h&]h+]PAUTHah-]h/]uh1h hAhBhCK#h!hhhubh )}(h.. |PMF| replace:: :term:`PMF`h]h)}(h :term:`PMF`h]h)}(hjh]hPMF}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PMFuh1hhAhBhCK$h!jubah"}(h$]h&]h+]PMFah-]h/]uh1h hAhBhCK$h!hhhubh )}(h .. |PSCI| replace:: :term:`PSCI`h]h)}(h :term:`PSCI`h]h)}(hj2h]hPSCI}(hhh!j4ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j0ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj>reftypeterm refexplicitrefwarnh?PSCIuh1hhAhBhCK%h!j,ubah"}(h$]h&]h+]PSCIah-]h/]uh1h hAhBhCK%h!hhhubh )}(h.. |RAS| replace:: :term:`RAS`h]h)}(h :term:`RAS`h]h)}(hj]h]hRAS}(hhh!j_ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j[ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjireftypeterm refexplicitrefwarnh?RASuh1hhAhBhCK&h!jWubah"}(h$]h&]h+]RASah-]h/]uh1h hAhBhCK&h!hhhubh )}(h.. |ROT| replace:: :term:`ROT`h]h)}(h :term:`ROT`h]h)}(hjh]hROT}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ROTuh1hhAhBhCK'h!jubah"}(h$]h&]h+]ROTah-]h/]uh1h hAhBhCK'h!hhhubh )}(h .. |SCMI| replace:: :term:`SCMI`h]h)}(h :term:`SCMI`h]h)}(hjh]hSCMI}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SCMIuh1hhAhBhCK(h!jubah"}(h$]h&]h+]SCMIah-]h/]uh1h hAhBhCK(h!hhhubh )}(h.. |SCP| replace:: :term:`SCP`h]h)}(h :term:`SCP`h]h)}(hjh]hSCP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SCPuh1hhAhBhCK)h!jubah"}(h$]h&]h+]SCPah-]h/]uh1h hAhBhCK)h!hhhubh )}(h .. |SDEI| replace:: :term:`SDEI`h]h)}(h :term:`SDEI`h]h)}(hj h]hSDEI}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SDEIuh1hhAhBhCK*h!jubah"}(h$]h&]h+]SDEIah-]h/]uh1h hAhBhCK*h!hhhubh )}(h.. |SDS| replace:: :term:`SDS`h]h)}(h :term:`SDS`h]h)}(hj4h]hSDS}(hhh!j6ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j2ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj@reftypeterm refexplicitrefwarnh?SDSuh1hhAhBhCK+h!j.ubah"}(h$]h&]h+]SDSah-]h/]uh1h hAhBhCK+h!hhhubh )}(h.. |SEA| replace:: :term:`SEA`h]h)}(h :term:`SEA`h]h)}(hj_h]hSEA}(hhh!jaubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j]ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjkreftypeterm refexplicitrefwarnh?SEAuh1hhAhBhCK,h!jYubah"}(h$]h&]h+]SEAah-]h/]uh1h hAhBhCK,h!hhhubh )}(h.. |SiP| replace:: :term:`SiP`h]h)}(h :term:`SiP`h]h)}(hjh]hSiP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SiPuh1hhAhBhCK-h!jubah"}(h$]h&]h+]SiPah-]h/]uh1h hAhBhCK-h!hhhubh )}(h.. |SIP| replace:: :term:`SIP`h]h)}(h :term:`SIP`h]h)}(hjh]hSIP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SIPuh1hhAhBhCK.h!jubah"}(h$]h&]h+]SIPah-]h/]uh1h hAhBhCK.h!hhhubh )}(h.. |SMC| replace:: :term:`SMC`h]h)}(h :term:`SMC`h]h)}(hjh]hSMC}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SMCuh1hhAhBhCK/h!jubah"}(h$]h&]h+]SMCah-]h/]uh1h hAhBhCK/h!hhhubh )}(h".. |SMCCC| replace:: :term:`SMCCC`h]h)}(h :term:`SMCCC`h]h)}(hj h]hSMCCC}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SMCCCuh1hhAhBhCK0h!jubah"}(h$]h&]h+]SMCCCah-]h/]uh1h hAhBhCK0h!hhhubh )}(h.. |SoC| replace:: :term:`SoC`h]h)}(h :term:`SoC`h]h)}(hj6h]hSoC}(hhh!j8ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j4ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjBreftypeterm refexplicitrefwarnh?SoCuh1hhAhBhCK1h!j0ubah"}(h$]h&]h+]SoCah-]h/]uh1h hAhBhCK1h!hhhubh )}(h.. |SP| replace:: :term:`SP`h]h)}(h :term:`SP`h]h)}(hjah]hSP}(hhh!jcubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j_ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjmreftypeterm refexplicitrefwarnh?SPuh1hhAhBhCK2h!j[ubah"}(h$]h&]h+]SPah-]h/]uh1h hAhBhCK2h!hhhubh )}(h.. |SPD| replace:: :term:`SPD`h]h)}(h :term:`SPD`h]h)}(hjh]hSPD}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SPDuh1hhAhBhCK3h!jubah"}(h$]h&]h+]SPDah-]h/]uh1h hAhBhCK3h!hhhubh )}(h.. |SPM| replace:: :term:`SPM`h]h)}(h :term:`SPM`h]h)}(hjh]hSPM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SPMuh1hhAhBhCK4h!jubah"}(h$]h&]h+]SPMah-]h/]uh1h hAhBhCK4h!hhhubh )}(h .. |SSBS| replace:: :term:`SSBS`h]h)}(h :term:`SSBS`h]h)}(hjh]hSSBS}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SSBSuh1hhAhBhCK5h!jubah"}(h$]h&]h+]SSBSah-]h/]uh1h hAhBhCK5h!hhhubh )}(h.. |SVE| replace:: :term:`SVE`h]h)}(h :term:`SVE`h]h)}(hj h]hSVE}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?SVEuh1hhAhBhCK6h!j ubah"}(h$]h&]h+]SVEah-]h/]uh1h hAhBhCK6h!hhhubh )}(h.. |TBB| replace:: :term:`TBB`h]h)}(h :term:`TBB`h]h)}(hj8 h]hTBB}(hhh!j: ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j6 ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjD reftypeterm refexplicitrefwarnh?TBBuh1hhAhBhCK7h!j2 ubah"}(h$]h&]h+]TBBah-]h/]uh1h hAhBhCK7h!hhhubh )}(h .. |TBBR| replace:: :term:`TBBR`h]h)}(h :term:`TBBR`h]h)}(hjc h]hTBBR}(hhh!je ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!ja ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjo reftypeterm refexplicitrefwarnh?TBBRuh1hhAhBhCK8h!j] ubah"}(h$]h&]h+]TBBRah-]h/]uh1h hAhBhCK8h!hhhubh )}(h.. |TEE| replace:: :term:`TEE`h]h)}(h :term:`TEE`h]h)}(hj h]hTEE}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TEEuh1hhAhBhCK9h!j ubah"}(h$]h&]h+]TEEah-]h/]uh1h hAhBhCK9h!hhhubh )}(h .. |TF-A| replace:: :term:`TF-A`h]h)}(h :term:`TF-A`h]h)}(hj h]hTF-A}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TF-Auh1hhAhBhCK:h!j ubah"}(h$]h&]h+]TF-Aah-]h/]uh1h hAhBhCK:h!hhhubh )}(h .. |TF-M| replace:: :term:`TF-M`h]h)}(h :term:`TF-M`h]h)}(hj h]hTF-M}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TF-Muh1hhAhBhCK;h!j ubah"}(h$]h&]h+]TF-Mah-]h/]uh1h hAhBhCK;h!hhhubh )}(h.. |TLB| replace:: :term:`TLB`h]h)}(h :term:`TLB`h]h)}(hj h]hTLB}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TLBuh1hhAhBhCKh!j_ ubah"}(h$]h&]h+]TRNGah-]h/]uh1h hAhBhCK>h!hhhubh )}(h.. |TSP| replace:: :term:`TSP`h]h)}(h :term:`TSP`h]h)}(hj h]hTSP}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TSPuh1hhAhBhCK?h!j ubah"}(h$]h&]h+]TSPah-]h/]uh1h hAhBhCK?h!hhhubh )}(h.. |TZC| replace:: :term:`TZC`h]h)}(h :term:`TZC`h]h)}(hj h]hTZC}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TZCuh1hhAhBhCK@h!j ubah"}(h$]h&]h+]TZCah-]h/]uh1h hAhBhCK@h!hhhubh )}(h".. |UBSAN| replace:: :term:`UBSAN`h]h)}(h :term:`UBSAN`h]h)}(hj h]hUBSAN}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?UBSANuh1hhAhBhCKAh!j ubah"}(h$]h&]h+]UBSANah-]h/]uh1h hAhBhCKAh!hhhubh )}(h .. |UEFI| replace:: :term:`UEFI`h]h)}(h :term:`UEFI`h]h)}(hj h]hUEFI}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?UEFIuh1hhAhBhCKBh!j ubah"}(h$]h&]h+]UEFIah-]h/]uh1h hAhBhCKBh!hhhubh )}(h .. |WDOG| replace:: :term:`WDOG`h]h)}(h :term:`WDOG`h]h)}(hj< h]hWDOG}(hhh!j> ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j: ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjH reftypeterm refexplicitrefwarnh?WDOGuh1hhAhBhCKCh!j6 ubah"}(h$]h&]h+]WDOGah-]h/]uh1h hAhBhCKCh!hhhubh )}(h!.. |XLAT| replace:: :term:`XLAT` h]h)}(h :term:`XLAT`h]h)}(hjg h]hXLAT}(hhh!ji ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!je ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjs reftypeterm refexplicitrefwarnh?XLATuh1hhAhBhCKDh!ja ubah"}(h$]h&]h+]XLATah-]h/]uh1h hAhBhCKDh!hhhubh section)}(hhh](h title)}(h)Authentication Framework & Chain of Trusth]h)Authentication Framework & Chain of Trust}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAV/home/test/workspace/code/optee_3.16/trusted-firmware-a/docs/design/auth-framework.rsthCKubh paragraph)}(hThe aim of this document is to describe the authentication framework implemented in Trusted Firmware-A (TF-A). This framework fulfills the following requirements:h]hThe aim of this document is to describe the authentication framework implemented in Trusted Firmware-A (TF-A). This framework fulfills the following requirements:}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubh enumerated_list)}(hhh](h list_item)}(hIt should be possible for a platform port to specify the Chain of Trust in terms of certificate hierarchy and the mechanisms used to verify a particular image/certificate. h]j )}(hIt should be possible for a platform port to specify the Chain of Trust in terms of certificate hierarchy and the mechanisms used to verify a particular image/certificate.h]hIt should be possible for a platform port to specify the Chain of Trust in terms of certificate hierarchy and the mechanisms used to verify a particular image/certificate.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hX4The framework should distinguish between: - The mechanism used to encode and transport information, e.g. DER encoded X.509v3 certificates to ferry Subject Public Keys, hashes and non-volatile counters. - The mechanism used to verify the transported information i.e. the cryptographic libraries. h](j )}(h)The framework should distinguish between:h]h)The framework should distinguish between:}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK h!j ubh bullet_list)}(hhh](j )}(hThe mechanism used to encode and transport information, e.g. DER encoded X.509v3 certificates to ferry Subject Public Keys, hashes and non-volatile counters. h]j )}(hThe mechanism used to encode and transport information, e.g. DER encoded X.509v3 certificates to ferry Subject Public Keys, hashes and non-volatile counters.h]hThe mechanism used to encode and transport information, e.g. DER encoded X.509v3 certificates to ferry Subject Public Keys, hashes and non-volatile counters.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubj )}(h[The mechanism used to verify the transported information i.e. the cryptographic libraries. h]j )}(hZThe mechanism used to verify the transported information i.e. the cryptographic libraries.h]hZThe mechanism used to verify the transported information i.e. the cryptographic libraries.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubeh"}(h$]h&]h+]h-]h/]bullet-uh1j hAj hCKh!j ubeh"}(h$]h&]h+]h-]h/]uh1j h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]enumtypearabicprefixhsuffix.uh1j h!j hhhAj hCKubj )}(h]The framework has been designed following a modular approach illustrated in the next diagram:h]h]The framework has been designed following a modular approach illustrated in the next diagram:}(hj3 h!j1 hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubh literal_block)}(hX+---------------+---------------+------------+ | Trusted | Trusted | Trusted | | Firmware | Firmware | Firmware | | Generic | IO Framework | Platform | | Code i.e. | (IO) | Port | | BL1/BL2 (GEN) | | (PP) | +---------------+---------------+------------+ ^ ^ ^ | | | v v v +-----------+ +-----------+ +-----------+ | | | | | Image | | Crypto | | Auth | | Parser | | Module |<->| Module |<->| Module | | (CM) | | (AM) | | (IPM) | | | | | | | +-----------+ +-----------+ +-----------+ ^ ^ | | v v +----------------+ +-----------------+ | Cryptographic | | Image Parser | | Libraries (CL) | | Libraries (IPL) | +----------------+ +-----------------+ | | | | | | v v +-----------------+ | Misc. Libs e.g. | | ASN.1 decoder | | | +-----------------+ DIAGRAM 1.h]hX+---------------+---------------+------------+ | Trusted | Trusted | Trusted | | Firmware | Firmware | Firmware | | Generic | IO Framework | Platform | | Code i.e. | (IO) | Port | | BL1/BL2 (GEN) | | (PP) | +---------------+---------------+------------+ ^ ^ ^ | | | v v v +-----------+ +-----------+ +-----------+ | | | | | Image | | Crypto | | Auth | | Parser | | Module |<->| Module |<->| Module | | (CM) | | (AM) | | (IPM) | | | | | | | +-----------+ +-----------+ +-----------+ ^ ^ | | v v +----------------+ +-----------------+ | Cryptographic | | Image Parser | | Libraries (CL) | | Libraries (IPL) | +----------------+ +-----------------+ | | | | | | v v +-----------------+ | Misc. Libs e.g. | | ASN.1 decoder | | | +-----------------+ DIAGRAM 1.}(hhh!jA ubah"}(h$]h&]h+]h-]h/] xml:spacepreserveuh1j? hAj hCKh!j hhubj )}(hThis document describes the inner details of the authentication framework and the abstraction mechanisms available to specify a Chain of Trust.h]hThis document describes the inner details of the authentication framework and the abstraction mechanisms available to specify a Chain of Trust.}(hjS h!jQ hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK>h!j hhubj )}(hhh](j )}(hFramework designh]hFramework design}(hjd h!jb hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j_ hhhAj hCKBubj )}(hThis section describes some aspects of the framework design and the rationale behind them. These aspects are key to verify a Chain of Trust.h]hThis section describes some aspects of the framework design and the rationale behind them. These aspects are key to verify a Chain of Trust.}(hjr h!jp hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKDh!j_ hhubj )}(hhh](j )}(hChain of Trusth]hChain of Trust}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j~ hhhAj hCKHubj )}(hXA CoT is basically a sequence of authentication images which usually starts with a root of trust and culminates in a single data image. The following diagram illustrates how this maps to a CoT for the BL31 image described in the `TBBR-Client specification`_.h](hA CoT is basically a sequence of authentication images which usually starts with a root of trust and culminates in a single data image. The following diagram illustrates how this maps to a CoT for the BL31 image described in the }(hA CoT is basically a sequence of authentication images which usually starts with a root of trust and culminates in a single data image. The following diagram illustrates how this maps to a CoT for the BL31 image described in the h!j hhhANhCNubh reference)}(h`TBBR-Client specification`_h]hTBBR-Client specification}(hTBBR-Client specificationh!j ubah"}(h$]h&]h+]h-]h/]nameTBBR-Client specificationrefurihhttps://developer.arm.com/docs/den0006/latest/trusted-board-boot-requirements-client-tbbr-client-armv8-auh1j h!j resolvedKubh.}(hj0 h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKJh!j~ hhubj@ )}(hX7+------------------+ +-------------------+ | ROTPK/ROTPK Hash |------>| Trusted Key | +------------------+ | Certificate | | (Auth Image) | /+-------------------+ / | / | / | / | L v +------------------+ +-------------------+ | Trusted World |------>| BL31 Key | | Public Key | | Certificate | +------------------+ | (Auth Image) | +-------------------+ / | / | / | / | / v +------------------+ L +-------------------+ | BL31 Content |------>| BL31 Content | | Certificate PK | | Certificate | +------------------+ | (Auth Image) | +-------------------+ / | / | / | / | / v +------------------+ L +-------------------+ | BL31 Hash |------>| BL31 Image | | | | (Data Image) | +------------------+ | | +-------------------+ DIAGRAM 2.h]hX7+------------------+ +-------------------+ | ROTPK/ROTPK Hash |------>| Trusted Key | +------------------+ | Certificate | | (Auth Image) | /+-------------------+ / | / | / | / | L v +------------------+ +-------------------+ | Trusted World |------>| BL31 Key | | Public Key | | Certificate | +------------------+ | (Auth Image) | +-------------------+ / | / | / | / | / v +------------------+ L +-------------------+ | BL31 Content |------>| BL31 Content | | Certificate PK | | Certificate | +------------------+ | (Auth Image) | +-------------------+ / | / | / | / | / v +------------------+ L +-------------------+ | BL31 Hash |------>| BL31 Image | | | | (Data Image) | +------------------+ | | +-------------------+ DIAGRAM 2.}(hhh!j ubah"}(h$]h&]h+]h-]h/]jO jP uh1j? hAj hCKQh!j~ hhubj )}(hmThe root of trust is usually a public key (ROTPK) that has been burnt in the platform and cannot be modified.h]hmThe root of trust is usually a public key (ROTPK) that has been burnt in the platform and cannot be modified.}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKwh!j~ hhubeh"}(h$]chain-of-trustah&]h+]chain of trustah-]h/]uh1j h!j_ hhhAj hCKHubj )}(hhh](j )}(h Image typesh]h Image types}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCK{ubj )}(hXImages in a CoT are categorised as authentication and data images. An authentication image contains information to authenticate a data image or another authentication image. A data image is usually a boot loader binary, but it could be any other data that requires authentication.h]hXImages in a CoT are categorised as authentication and data images. An authentication image contains information to authenticate a data image or another authentication image. A data image is usually a boot loader binary, but it could be any other data that requires authentication.}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK}h!j hhubeh"}(h$] image-typesah&]h+] image typesah-]h/]uh1j h!j_ hhhAj hCK{ubj )}(hhh](j )}(hComponent responsibilitiesh]hComponent responsibilities}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCKubj )}(hdFor every image in a Chain of Trust, the following high level operations are performed to verify it:h]hdFor every image in a Chain of Trust, the following high level operations are performed to verify it:}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubj )}(hhh](j )}(h?Allocate memory for the image either statically or at runtime. h]j )}(h>Allocate memory for the image either statically or at runtime.h]h>Allocate memory for the image either statically or at runtime.}(hj+ h!j) ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j% ubah"}(h$]h&]h+]h-]h/]uh1j h!j" hhhAj hCNubj )}(h8Identify the image and load it in the allocated memory. h]j )}(h7Identify the image and load it in the allocated memory.h]h7Identify the image and load it in the allocated memory.}(hjC h!jA ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j= ubah"}(h$]h&]h+]h-]h/]uh1j h!j" hhhAj hCNubj )}(h2Check the integrity of the image as per its type. h]j )}(h1Check the integrity of the image as per its type.h]h1Check the integrity of the image as per its type.}(hj[ h!jY ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jU ubah"}(h$]h&]h+]h-]h/]uh1j h!j" hhhAj hCNubj )}(hAAuthenticate the image as per the cryptographic algorithms used. h]j )}(h@Authenticate the image as per the cryptographic algorithms used.h]h@Authenticate the image as per the cryptographic algorithms used.}(hjs h!jq ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jm ubah"}(h$]h&]h+]h-]h/]uh1j h!j" hhhAj hCNubj )}(h~If the image is an authentication image, extract the information that will be used to authenticate the next image in the CoT. h]j )}(h}If the image is an authentication image, extract the information that will be used to authenticate the next image in the CoT.h]h}If the image is an authentication image, extract the information that will be used to authenticate the next image in the CoT.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j" hhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!j hhhAj hCKubj )}(hIn Diagram 1, each component is responsible for one or more of these operations. The responsibilities are briefly described below.h]hIn Diagram 1, each component is responsible for one or more of these operations. The responsibilities are briefly described below.}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubj )}(hhh](j )}(h+TF-A Generic code and IO framework (GEN/IO)h]h+TF-A Generic code and IO framework (GEN/IO)}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCKubj )}(hXThese components are responsible for initiating the authentication process for a particular image in BL1 or BL2. For each BL image that requires authentication, the Generic code asks recursively the Authentication module what is the parent image until either an authenticated image or the ROT is reached. Then the Generic code calls the IO framework to load the image and calls the Authentication module to authenticate it, following the CoT from ROT to Image.h]hXThese components are responsible for initiating the authentication process for a particular image in BL1 or BL2. For each BL image that requires authentication, the Generic code asks recursively the Authentication module what is the parent image until either an authenticated image or the ROT is reached. Then the Generic code calls the IO framework to load the image and calls the Authentication module to authenticate it, following the CoT from ROT to Image.}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubeh"}(h$])tf-a-generic-code-and-io-framework-gen-ioah&]h+]+tf-a generic code and io framework (gen/io)ah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(hTF-A Platform Port (PP)h]hTF-A Platform Port (PP)}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCKubj )}(h The platform is responsible for:h]h The platform is responsible for:}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubj )}(hhh](j )}(hSpecifying the CoT for each image that needs to be authenticated. Details of how a CoT can be specified by the platform are explained later. The platform also specifies the authentication methods and the parsing method used for each image. h]j )}(hSpecifying the CoT for each image that needs to be authenticated. Details of how a CoT can be specified by the platform are explained later. The platform also specifies the authentication methods and the parsing method used for each image.h]hSpecifying the CoT for each image that needs to be authenticated. Details of how a CoT can be specified by the platform are explained later. The platform also specifies the authentication methods and the parsing method used for each image.}(hjh!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hStatically allocating memory for each parameter in each image which is used for verifying the CoT, e.g. memory for public keys, hashes etc. h]j )}(hStatically allocating memory for each parameter in each image which is used for verifying the CoT, e.g. memory for public keys, hashes etc.h]hStatically allocating memory for each parameter in each image which is used for verifying the CoT, e.g. memory for public keys, hashes etc.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(h%Providing the ROTPK or a hash of it. h]j )}(h$Providing the ROTPK or a hash of it.h]h$Providing the ROTPK or a hash of it.}(hj0h!j.ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j*ubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hProviding additional information to the IPM to enable it to identify and extract authentication parameters contained in an image, e.g. if the parameters are stored as X509v3 extensions, the corresponding OID must be provided. h]j )}(hProviding additional information to the IPM to enable it to identify and extract authentication parameters contained in an image, e.g. if the parameters are stored as X509v3 extensions, the corresponding OID must be provided.h]hProviding additional information to the IPM to enable it to identify and extract authentication parameters contained in an image, e.g. if the parameters are stored as X509v3 extensions, the corresponding OID must be provided.}(hjHh!jFubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jBubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hhFulfill any other memory requirements of the IPM and the CM (not currently described in this document). h]j )}(hgFulfill any other memory requirements of the IPM and the CM (not currently described in this document).h]hgFulfill any other memory requirements of the IPM and the CM (not currently described in this document).}(hj`h!j^ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jZubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hExport functions to verify an image which uses an authentication method that cannot be interpreted by the CM, e.g. if an image has to be verified using a NV counter, then the value of the counter to compare with can only be provided by the platform. h]j )}(hExport functions to verify an image which uses an authentication method that cannot be interpreted by the CM, e.g. if an image has to be verified using a NV counter, then the value of the counter to compare with can only be provided by the platform.h]hExport functions to verify an image which uses an authentication method that cannot be interpreted by the CM, e.g. if an image has to be verified using a NV counter, then the value of the counter to compare with can only be provided by the platform.}(hjxh!jvubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jrubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hSExport a custom IPM if a proprietary image format is being used (described later). h]j )}(hRExport a custom IPM if a proprietary image format is being used (described later).h]hRExport a custom IPM if a proprietary image format is being used (described later).}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!j hhhAj hCKubeh"}(h$]tf-a-platform-port-ppah&]h+]tf-a platform port (pp)ah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(hAuthentication Module (AM)h]hAuthentication Module (AM)}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hIt is responsible for:h]hIt is responsible for:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hhh](j )}(hProviding the necessary abstraction mechanisms to describe a CoT. Amongst other things, the authentication and image parsing methods must be specified by the PP in the CoT. h]j )}(hProviding the necessary abstraction mechanisms to describe a CoT. Amongst other things, the authentication and image parsing methods must be specified by the PP in the CoT.h]hProviding the necessary abstraction mechanisms to describe a CoT. Amongst other things, the authentication and image parsing methods must be specified by the PP in the CoT.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(h[Verifying the CoT passed by GEN by utilising functionality exported by the PP, IPM and CM. h]j )}(hZVerifying the CoT passed by GEN by utilising functionality exported by the PP, IPM and CM.h]hZVerifying the CoT passed by GEN by utilising functionality exported by the PP, IPM and CM.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hXsTracking which images have been verified. In case an image is a part of multiple CoTs then it should be verified only once e.g. the Trusted World Key Certificate in the TBBR-Client spec. contains information to verify SCP_BL2, BL31, BL32 each of which have a separate CoT. (This responsibility has not been described in this document but should be trivial to implement). h]j )}(hXrTracking which images have been verified. In case an image is a part of multiple CoTs then it should be verified only once e.g. the Trusted World Key Certificate in the TBBR-Client spec. contains information to verify SCP_BL2, BL31, BL32 each of which have a separate CoT. (This responsibility has not been described in this document but should be trivial to implement).h]hXrTracking which images have been verified. In case an image is a part of multiple CoTs then it should be verified only once e.g. the Trusted World Key Certificate in the TBBR-Client spec. contains information to verify SCP_BL2, BL31, BL32 each of which have a separate CoT. (This responsibility has not been described in this document but should be trivial to implement).}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hXReusing memory meant for a data image to verify authentication images e.g. in the CoT described in Diagram 2, each certificate can be loaded and verified in the memory reserved by the platform for the BL31 image. By the time BL31 (the data image) is loaded, all information to authenticate it will have been extracted from the parent image i.e. BL31 content certificate. It is assumed that the size of an authentication image will never exceed the size of a data image. It should be possible to verify this at build time using asserts. h]j )}(hXReusing memory meant for a data image to verify authentication images e.g. in the CoT described in Diagram 2, each certificate can be loaded and verified in the memory reserved by the platform for the BL31 image. By the time BL31 (the data image) is loaded, all information to authenticate it will have been extracted from the parent image i.e. BL31 content certificate. It is assumed that the size of an authentication image will never exceed the size of a data image. It should be possible to verify this at build time using asserts.h]hXReusing memory meant for a data image to verify authentication images e.g. in the CoT described in Diagram 2, each certificate can be loaded and verified in the memory reserved by the platform for the BL31 image. By the time BL31 (the data image) is loaded, all information to authenticate it will have been extracted from the parent image i.e. BL31 content certificate. It is assumed that the size of an authentication image will never exceed the size of a data image. It should be possible to verify this at build time using asserts.}(hj h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jhhhAj hCKubeh"}(h$]authentication-module-amah&]h+]authentication module (am)ah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(hCryptographic Module (CM)h]hCryptographic Module (CM)}(hjEh!jChhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j@hhhAj hCKubj )}(h.The CM is responsible for providing an API to:h]h.The CM is responsible for providing an API to:}(hjSh!jQhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j@hhubj )}(hhh](j )}(hVerify a digital signature.h]j )}(hjdh]hVerify a digital signature.}(hjdh!jfubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jbubah"}(h$]h&]h+]h-]h/]uh1j h!j_hhhAj hCNubj )}(hVerify a hash. h]j )}(hVerify a hash.h]hVerify a hash.}(hjh!j}ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jyubah"}(h$]h&]h+]h-]h/]uh1j h!j_hhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!j@hhhAj hCKubj )}(hX The CM does not include any cryptography related code, but it relies on an external library to perform the cryptographic operations. A Crypto-Library (CL) linking the CM and the external library must be implemented. The following functions must be provided by the CL:h]hX The CM does not include any cryptography related code, but it relies on an external library to perform the cryptographic operations. A Crypto-Library (CL) linking the CM and the external library must be implemented. The following functions must be provided by the CL:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j@hhubj@ )}(hXvoid (*init)(void); int (*verify_signature)(void *data_ptr, unsigned int data_len, void *sig_ptr, unsigned int sig_len, void *sig_alg, unsigned int sig_alg_len, void *pk_ptr, unsigned int pk_len); int (*verify_hash)(void *data_ptr, unsigned int data_len, void *digest_info_ptr, unsigned int digest_info_len);h]hXvoid (*init)(void); int (*verify_signature)(void *data_ptr, unsigned int data_len, void *sig_ptr, unsigned int sig_len, void *sig_alg, unsigned int sig_alg_len, void *pk_ptr, unsigned int pk_len); int (*verify_hash)(void *data_ptr, unsigned int data_len, void *digest_info_ptr, unsigned int digest_info_len);}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP languagecuh1j? hAj hCKh!j@hhubj )}(h9These functions are registered in the CM using the macro:h]h9These functions are registered in the CM using the macro:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j@hhubj@ )}(hCREGISTER_CRYPTO_LIB(_name, _init, _verify_signature, _verify_hash);h]hCREGISTER_CRYPTO_LIB(_name, _init, _verify_signature, _verify_hash);}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP jjuh1j? hAj hCKh!j@hhubj )}(hc``_name`` must be a string containing the name of the CL. This name is used for debugging purposes.h](h literal)}(h ``_name``h]h_name}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhZ must be a string containing the name of the CL. This name is used for debugging purposes.}(hZ must be a string containing the name of the CL. This name is used for debugging purposes.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j@hhubeh"}(h$]cryptographic-module-cmah&]h+]cryptographic module (cm)ah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(hImage Parser Module (IPM)h]hImage Parser Module (IPM)}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hThe IPM is responsible for:h]hThe IPM is responsible for:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hhh](j )}(h@Checking the integrity of each image loaded by the IO framework.h]j )}(hj"h]h@Checking the integrity of each image loaded by the IO framework.}(hj"h!j$ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hExtracting parameters used for authenticating an image based upon a description provided by the platform in the CoT descriptor. h]j )}(hExtracting parameters used for authenticating an image based upon a description provided by the platform in the CoT descriptor.h]hExtracting parameters used for authenticating an image based upon a description provided by the platform in the CoT descriptor.}(hj=h!j;ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j7ubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jhhhAj hCMubj )}(hXImages may have different formats (for example, authentication images could be x509v3 certificates, signed ELF files or any other platform specific format). The IPM allows to register an Image Parser Library (IPL) for every image format used in the CoT. This library must implement the specific methods to parse the image. The IPM obtains the image format from the CoT and calls the right IPL to check the image integrity and extract the authentication parameters.h]hXImages may have different formats (for example, authentication images could be x509v3 certificates, signed ELF files or any other platform specific format). The IPM allows to register an Image Parser Library (IPL) for every image format used in the CoT. This library must implement the specific methods to parse the image. The IPM obtains the image format from the CoT and calls the right IPL to check the image integrity and extract the authentication parameters.}(hjWh!jUhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hSee Section "Describing the image parsing methods" for more details about the mechanism the IPM provides to define and register IPLs.h]hSee Section “Describing the image parsing methods” for more details about the mechanism the IPM provides to define and register IPLs.}(hjeh!jchhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM h!jhhubeh"}(h$]image-parser-module-ipmah&]h+]image parser module (ipm)ah-]h/]uh1j h!j hhhAj hCKubeh"}(h$]component-responsibilitiesah&]h+]component responsibilitiesah-]h/]uh1j h!j_ hhhAj hCKubj )}(hhh](j )}(hAuthentication methodsh]hAuthentication methods}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCMubj )}(h5The AM supports the following authentication methods:h]h5The AM supports the following authentication methods:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hhh](j )}(hHashh]j )}(hjh]hHash}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hDigital signature h]j )}(hDigital signatureh]hDigital signature}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jhhhAj hCMubj )}(hThe platform may specify these methods in the CoT in case it decides to define a custom CoT instead of reusing a predefined one.h]hThe platform may specify these methods in the CoT in case it decides to define a custom CoT instead of reusing a predefined one.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hIf a data image uses multiple methods, then all the methods must be a part of the same CoT. The number and type of parameters are method specific. These parameters should be obtained from the parent image using the IPM.h]hIf a data image uses multiple methods, then all the methods must be a part of the same CoT. The number and type of parameters are method specific. These parameters should be obtained from the parent image using the IPM.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hhh](j )}(hX6Hash Parameters: #. A pointer to data to hash #. Length of the data #. A pointer to the hash #. Length of the hash The hash will be represented by the DER encoding of the following ASN.1 type: :: DigestInfo ::= SEQUENCE { digestAlgorithm DigestAlgorithmIdentifier, digest Digest } This ASN.1 structure makes it possible to remove any assumption about the type of hash algorithm used as this information accompanies the hash. This should allow the Cryptography Library (CL) to support multiple hash algorithm implementations. h](j )}(hHashh]hHash}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj )}(h Parameters:h]h Parameters:}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj )}(hhh](j )}(hA pointer to data to hashh]j )}(hjh]hA pointer to data to hash}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM!h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hLength of the datah]j )}(hj3h]hLength of the data}(hj3h!j5ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM"h!j1ubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hA pointer to the hashh]j )}(hjJh]hA pointer to the hash}(hjJh!jLubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM#h!jHubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hLength of the hash h]j )}(hLength of the hashh]hLength of the hash}(hjeh!jcubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM$h!j_ubah"}(h$]h&]h+]h-]h/]uh1j h!jubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jubj )}(hMThe hash will be represented by the DER encoding of the following ASN.1 type:h]hMThe hash will be represented by the DER encoding of the following ASN.1 type:}(hjh!j}ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM&h!jubj@ )}(hgDigestInfo ::= SEQUENCE { digestAlgorithm DigestAlgorithmIdentifier, digest Digest }h]hgDigestInfo ::= SEQUENCE { digestAlgorithm DigestAlgorithmIdentifier, digest Digest }}(hhh!jubah"}(h$]h&]h+]h-]h/]jO jP uh1j? hAj hCM+h!jubj )}(hThis ASN.1 structure makes it possible to remove any assumption about the type of hash algorithm used as this information accompanies the hash. This should allow the Cryptography Library (CL) to support multiple hash algorithm implementations.h]hThis ASN.1 structure makes it possible to remove any assumption about the type of hash algorithm used as this information accompanies the hash. This should allow the Cryptography Library (CL) to support multiple hash algorithm implementations.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM0h!jubeh"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hX;Digital Signature Parameters: #. A pointer to data to sign #. Length of the data #. Public Key Algorithm #. Public Key value #. Digital Signature Algorithm #. Digital Signature value The Public Key parameters will be represented by the DER encoding of the following ASN.1 type: :: SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier{PUBLIC-KEY,{PublicKeyAlgorithms}}, subjectPublicKey BIT STRING } The Digital Signature Algorithm will be represented by the DER encoding of the following ASN.1 types. :: AlgorithmIdentifier {ALGORITHM:IOSet } ::= SEQUENCE { algorithm ALGORITHM.&id({IOSet}), parameters ALGORITHM.&Type({IOSet}{@algorithm}) OPTIONAL } The digital signature will be represented by: :: signature ::= BIT STRING h](j )}(hDigital Signatureh]hDigital Signature}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM5h!jubj )}(h Parameters:h]h Parameters:}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM7h!jubj )}(hhh](j )}(hA pointer to data to signh]j )}(hjh]hA pointer to data to sign}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM9h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hLength of the datah]j )}(hjh]hLength of the data}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM:h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hPublic Key Algorithmh]j )}(hjh]hPublic Key Algorithm}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM;h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hPublic Key valueh]j )}(hjh]hPublic Key value}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM<h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hDigital Signature Algorithmh]j )}(hj.h]hDigital Signature Algorithm}(hj.h!j0ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM=h!j,ubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hDigital Signature value h]j )}(hDigital Signature valueh]hDigital Signature value}(hjIh!jGubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM>h!jCubah"}(h$]h&]h+]h-]h/]uh1j h!jubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jubj )}(h^The Public Key parameters will be represented by the DER encoding of the following ASN.1 type:h]h^The Public Key parameters will be represented by the DER encoding of the following ASN.1 type:}(hjch!jaubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM@h!jubj@ )}(hSubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier{PUBLIC-KEY,{PublicKeyAlgorithms}}, subjectPublicKey BIT STRING }h]hSubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier{PUBLIC-KEY,{PublicKeyAlgorithms}}, subjectPublicKey BIT STRING }}(hhh!joubah"}(h$]h&]h+]h-]h/]jO jP uh1j? hAj hCMEh!jubj )}(heThe Digital Signature Algorithm will be represented by the DER encoding of the following ASN.1 types.h]heThe Digital Signature Algorithm will be represented by the DER encoding of the following ASN.1 types.}(hjh!j}ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMIh!jubj@ )}(hAlgorithmIdentifier {ALGORITHM:IOSet } ::= SEQUENCE { algorithm ALGORITHM.&id({IOSet}), parameters ALGORITHM.&Type({IOSet}{@algorithm}) OPTIONAL }h]hAlgorithmIdentifier {ALGORITHM:IOSet } ::= SEQUENCE { algorithm ALGORITHM.&id({IOSet}), parameters ALGORITHM.&Type({IOSet}{@algorithm}) OPTIONAL }}(hhh!jubah"}(h$]h&]h+]h-]h/]jO jP uh1j? hAj hCMNh!jubj )}(h-The digital signature will be represented by:h]h-The digital signature will be represented by:}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMSh!jubj@ )}(hsignature ::= BIT STRINGh]hsignature ::= BIT STRING}(hhh!jubah"}(h$]h&]h+]h-]h/]jO jP uh1j? hAj hCMWh!jubeh"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!jhhhAj hCMubj )}(htThe authentication framework will use the image descriptor to extract all the information related to authentication.h]htThe authentication framework will use the image descriptor to extract all the information related to authentication.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMYh!jhhubeh"}(h$]authentication-methodsah&]h+]authentication methodsah-]h/]uh1j h!j_ hhhAj hCMubeh"}(h$]framework-designah&]h+]framework designah-]h/]uh1j h!j hhhAj hCKBubj )}(hhh](j )}(hSpecifying a Chain of Trusth]hSpecifying a Chain of Trust}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCM]ubj )}(hXA CoT can be described as a set of image descriptors linked together in a particular order. The order dictates the sequence in which they must be verified. Each image has a set of properties which allow the AM to verify it. These properties are described below.h]hXA CoT can be described as a set of image descriptors linked together in a particular order. The order dictates the sequence in which they must be verified. Each image has a set of properties which allow the AM to verify it. These properties are described below.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM_h!jhhubj )}(hThe PP is responsible for defining a single or multiple CoTs for a data image. Unless otherwise specified, the data structures described in the following sections are populated by the PP statically.h]hThe PP is responsible for defining a single or multiple CoTs for a data image. Unless otherwise specified, the data structures described in the following sections are populated by the PP statically.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMdh!jhhubj )}(hhh](j )}(h$Describing the image parsing methodsh]h$Describing the image parsing methods}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCMiubj )}(hXThe parsing method refers to the format of a particular image. For example, an authentication image that represents a certificate could be in the X.509v3 format. A data image that represents a boot loader stage could be in raw binary or ELF format. The IPM supports three parsing methods. An image has to use one of the three methods described below. An IPL is responsible for interpreting a single parsing method. There has to be one IPL for every method used by the platform.h]hXThe parsing method refers to the format of a particular image. For example, an authentication image that represents a certificate could be in the X.509v3 format. A data image that represents a boot loader stage could be in raw binary or ELF format. The IPM supports three parsing methods. An image has to use one of the three methods described below. An IPL is responsible for interpreting a single parsing method. There has to be one IPL for every method used by the platform.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMkh!j hhubj )}(hhh](j )}(hRaw format: This format is effectively a nop as an image using this method is treated as being in raw binary format e.g. boot loader images used by TF-A. This method should only be used by data images. h]j )}(hRaw format: This format is effectively a nop as an image using this method is treated as being in raw binary format e.g. boot loader images used by TF-A. This method should only be used by data images.h]hRaw format: This format is effectively a nop as an image using this method is treated as being in raw binary format e.g. boot loader images used by TF-A. This method should only be used by data images.}(hj4h!j2ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMsh!j.ubah"}(h$]h&]h+]h-]h/]uh1j h!j+hhhAj hCNubj )}(hX\X509V3 method: This method uses industry standards like X.509 to represent PKI certificates (authentication images). It is expected that open source libraries will be available which can be used to parse an image represented by this method. Such libraries can be used to write the corresponding IPL e.g. the X.509 parsing library code in mbed TLS. h]j )}(hX[X509V3 method: This method uses industry standards like X.509 to represent PKI certificates (authentication images). It is expected that open source libraries will be available which can be used to parse an image represented by this method. Such libraries can be used to write the corresponding IPL e.g. the X.509 parsing library code in mbed TLS.h]hX[X509V3 method: This method uses industry standards like X.509 to represent PKI certificates (authentication images). It is expected that open source libraries will be available which can be used to parse an image represented by this method. Such libraries can be used to write the corresponding IPL e.g. the X.509 parsing library code in mbed TLS.}(hjLh!jJubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMwh!jFubah"}(h$]h&]h+]h-]h/]uh1j h!j+hhhAj hCNubj )}(hXPlatform defined method: This method caters for platform specific proprietary standards to represent authentication or data images. For example, The signature of a data image could be appended to the data image raw binary. A header could be prepended to the combined blob to specify the extents of each component. The platform will have to implement the corresponding IPL to interpret such a format. h]j )}(hXPlatform defined method: This method caters for platform specific proprietary standards to represent authentication or data images. For example, The signature of a data image could be appended to the data image raw binary. A header could be prepended to the combined blob to specify the extents of each component. The platform will have to implement the corresponding IPL to interpret such a format.h]hXPlatform defined method: This method caters for platform specific proprietary standards to represent authentication or data images. For example, The signature of a data image could be appended to the data image raw binary. A header could be prepended to the combined blob to specify the extents of each component. The platform will have to implement the corresponding IPL to interpret such a format.}(hjdh!jbubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM}h!j^ubah"}(h$]h&]h+]h-]h/]uh1j h!j+hhhAj hCNubeh"}(h$]h&]h+]h-]h/]j, j- j. hj/ j0 uh1j h!j hhhAj hCMsubj )}(h=The following enum can be used to define these three methods.h]h=The following enum can be used to define these three methods.}(hj~h!j|hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j hhubj@ )}(htypedef enum img_type_enum { IMG_RAW, /* Binary image */ IMG_PLAT, /* Platform specific format */ IMG_CERT, /* X509v3 certificate */ IMG_MAX_TYPES, } img_type_t;h]htypedef enum img_type_enum { IMG_RAW, /* Binary image */ IMG_PLAT, /* Platform specific format */ IMG_CERT, /* X509v3 certificate */ IMG_MAX_TYPES, } img_type_t;}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP jjuh1j? hAj hCMh!j hhubj )}(hhhhANhCNubh)}(h:ref:`Trusted Board Boot`h]h)}(hjIh]hTrusted Board Boot}(hhh!jKubah"}(h$]h&](h(stdstd-refeh+]h-]h/]uh1hh!jGubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjUreftyperef refexplicitrefwarnh?trusted board bootuh1hhAj hCMh!j>ubh document.}(h document.h!j>hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hXFollowing the :ref:`Porting Guide`, a platform must provide unique identifiers for all the images and certificates that will be loaded during the boot process. If a platform is using the TBBR as a reference for trusted boot, these identifiers can be obtained from ``include/common/tbbr/tbbr_img_def.h``. Arm platforms include this file in ``include/plat/arm/common/arm_def.h``. Other platforms may also include this file or provide their own identifiers.h](hFollowing the }(hFollowing the h!jrhhhANhCNubh)}(h:ref:`Porting Guide`h]h)}(hj}h]h Porting Guide}(hhh!jubah"}(h$]h&](h(stdstd-refeh+]h-]h/]uh1hh!j{ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftyperef refexplicitrefwarnh? porting guideuh1hhAj hCMh!jrubh, a platform must provide unique identifiers for all the images and certificates that will be loaded during the boot process. If a platform is using the TBBR as a reference for trusted boot, these identifiers can be obtained from }(h, a platform must provide unique identifiers for all the images and certificates that will be loaded during the boot process. If a platform is using the TBBR as a reference for trusted boot, these identifiers can be obtained from h!jrhhhANhCNubj)}(h&``include/common/tbbr/tbbr_img_def.h``h]h"include/common/tbbr/tbbr_img_def.h}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jrubh%. Arm platforms include this file in }(h%. Arm platforms include this file in h!jrhhhANhCNubj)}(h%``include/plat/arm/common/arm_def.h``h]h!include/plat/arm/common/arm_def.h}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jrubhN. Other platforms may also include this file or provide their own identifiers.}(hN. Other platforms may also include this file or provide their own identifiers.h!jrhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(h**Important**: the authentication module uses these identifiers to index the CoT array, so the descriptors location in the array must match the identifiers.h](h strong)}(h **Important**h]h Important}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: the authentication module uses these identifiers to index the CoT array, so the descriptors location in the array must match the identifiers.}(h: the authentication module uses these identifiers to index the CoT array, so the descriptors location in the array must match the identifiers.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(h#Each image descriptor must specify:h]h#Each image descriptor must specify:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hhh](j )}(hN``img_id``: the corresponding image unique identifier defined by the platform.h]j )}(hjh](j)}(h ``img_id``h]himg_id}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhD: the corresponding image unique identifier defined by the platform.}(hD: the corresponding image unique identifier defined by the platform.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hX$``img_type``: the image parser module uses the image type to call the proper parsing library to check the image integrity and extract the required authentication parameters. Three types of images are currently supported: - ``IMG_RAW``: image is a raw binary. No parsing functions are available, other than reading the whole image. - ``IMG_PLAT``: image format is platform specific. The platform may use this type for custom images not directly supported by the authentication framework. - ``IMG_CERT``: image is an x509v3 certificate. h](j )}(h``img_type``: the image parser module uses the image type to call the proper parsing library to check the image integrity and extract the required authentication parameters. Three types of images are currently supported:h](j)}(h ``img_type``h]himg_type}(hhh!j*ubah"}(h$]h&]h+]h-]h/]uh1jh!j&ubh: the image parser module uses the image type to call the proper parsing library to check the image integrity and extract the required authentication parameters. Three types of images are currently supported:}(h: the image parser module uses the image type to call the proper parsing library to check the image integrity and extract the required authentication parameters. Three types of images are currently supported:h!j&ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j"ubj )}(hhh](j )}(hk``IMG_RAW``: image is a raw binary. No parsing functions are available, other than reading the whole image.h]j )}(hk``IMG_RAW``: image is a raw binary. No parsing functions are available, other than reading the whole image.h](j)}(h ``IMG_RAW``h]hIMG_RAW}(hhh!jNubah"}(h$]h&]h+]h-]h/]uh1jh!jJubh`: image is a raw binary. No parsing functions are available, other than reading the whole image.}(h`: image is a raw binary. No parsing functions are available, other than reading the whole image.h!jJubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jFubah"}(h$]h&]h+]h-]h/]uh1j h!jCubj )}(h``IMG_PLAT``: image format is platform specific. The platform may use this type for custom images not directly supported by the authentication framework.h]j )}(h``IMG_PLAT``: image format is platform specific. The platform may use this type for custom images not directly supported by the authentication framework.h](j)}(h ``IMG_PLAT``h]hIMG_PLAT}(hhh!juubah"}(h$]h&]h+]h-]h/]uh1jh!jqubh: image format is platform specific. The platform may use this type for custom images not directly supported by the authentication framework.}(h: image format is platform specific. The platform may use this type for custom images not directly supported by the authentication framework.h!jqubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jmubah"}(h$]h&]h+]h-]h/]uh1j h!jCubj )}(h.``IMG_CERT``: image is an x509v3 certificate. h]j )}(h-``IMG_CERT``: image is an x509v3 certificate.h](j)}(h ``IMG_CERT``h]hIMG_CERT}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh!: image is an x509v3 certificate.}(h!: image is an x509v3 certificate.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jCubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!j"ubeh"}(h$]h&]h+]h-]h/]uh1j h!jhhhANhCNubj )}(hX]``parent``: pointer to the parent image descriptor. The parent will contain the information required to authenticate the current image. If the parent is NULL, the authentication parameters will be obtained from the platform (i.e. the BL2 and Trusted Key certificates are signed with the ROT private key, whose public part is stored in the platform).h]j )}(hX]``parent``: pointer to the parent image descriptor. The parent will contain the information required to authenticate the current image. If the parent is NULL, the authentication parameters will be obtained from the platform (i.e. the BL2 and Trusted Key certificates are signed with the ROT private key, whose public part is stored in the platform).h](j)}(h ``parent``h]hparent}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhXS: pointer to the parent image descriptor. The parent will contain the information required to authenticate the current image. If the parent is NULL, the authentication parameters will be obtained from the platform (i.e. the BL2 and Trusted Key certificates are signed with the ROT private key, whose public part is stored in the platform).}(hXS: pointer to the parent image descriptor. The parent will contain the information required to authenticate the current image. If the parent is NULL, the authentication parameters will be obtained from the platform (i.e. the BL2 and Trusted Key certificates are signed with the ROT private key, whose public part is stored in the platform).h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubj )}(hX~``img_auth_methods``: this points to an array which defines the authentication methods that must be checked to consider an image authenticated. Each method consists of a type and a list of parameter descriptors. A parameter descriptor consists of a type and a cookie which will point to specific information required to extract that parameter from the image (i.e. if the parameter is stored in an x509v3 extension, the cookie will point to the extension OID). Depending on the method type, a different number of parameters must be specified. This pointer should not be NULL. Supported methods are: - ``AUTH_METHOD_HASH``: the hash of the image must match the hash extracted from the parent image. The following parameter descriptors must be specified: - ``data``: data to be hashed (obtained from current image) - ``hash``: reference hash (obtained from parent image) - ``AUTH_METHOD_SIG``: the image (usually a certificate) must be signed with the private key whose public part is extracted from the parent image (or the platform if the parent is NULL). The following parameter descriptors must be specified: - ``pk``: the public key (obtained from parent image) - ``sig``: the digital signature (obtained from current image) - ``alg``: the signature algorithm used (obtained from current image) - ``data``: the data to be signed (obtained from current image) h](j )}(hXU``img_auth_methods``: this points to an array which defines the authentication methods that must be checked to consider an image authenticated. Each method consists of a type and a list of parameter descriptors. A parameter descriptor consists of a type and a cookie which will point to specific information required to extract that parameter from the image (i.e. if the parameter is stored in an x509v3 extension, the cookie will point to the extension OID). Depending on the method type, a different number of parameters must be specified. This pointer should not be NULL. Supported methods are:h](j)}(h``img_auth_methods``h]himg_auth_methods}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhXA: this points to an array which defines the authentication methods that must be checked to consider an image authenticated. Each method consists of a type and a list of parameter descriptors. A parameter descriptor consists of a type and a cookie which will point to specific information required to extract that parameter from the image (i.e. if the parameter is stored in an x509v3 extension, the cookie will point to the extension OID). Depending on the method type, a different number of parameters must be specified. This pointer should not be NULL. Supported methods are:}(hXA: this points to an array which defines the authentication methods that must be checked to consider an image authenticated. Each method consists of a type and a list of parameter descriptors. A parameter descriptor consists of a type and a cookie which will point to specific information required to extract that parameter from the image (i.e. if the parameter is stored in an x509v3 extension, the cookie will point to the extension OID). Depending on the method type, a different number of parameters must be specified. This pointer should not be NULL. Supported methods are:h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj )}(hhh](j )}(hX``AUTH_METHOD_HASH``: the hash of the image must match the hash extracted from the parent image. The following parameter descriptors must be specified: - ``data``: data to be hashed (obtained from current image) - ``hash``: reference hash (obtained from parent image) h](j )}(h``AUTH_METHOD_HASH``: the hash of the image must match the hash extracted from the parent image. The following parameter descriptors must be specified:h](j)}(h``AUTH_METHOD_HASH``h]hAUTH_METHOD_HASH}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: the hash of the image must match the hash extracted from the parent image. The following parameter descriptors must be specified:}(h: the hash of the image must match the hash extracted from the parent image. The following parameter descriptors must be specified:h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj )}(hhh](j )}(h9``data``: data to be hashed (obtained from current image)h]j )}(hj8h](j)}(h``data``h]hdata}(hhh!j=ubah"}(h$]h&]h+]h-]h/]uh1jh!j:ubh1: data to be hashed (obtained from current image)}(h1: data to be hashed (obtained from current image)h!j:ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j6ubah"}(h$]h&]h+]h-]h/]uh1j h!j3ubj )}(h6``hash``: reference hash (obtained from parent image) h]j )}(h5``hash``: reference hash (obtained from parent image)h](j)}(h``hash``h]hhash}(hhh!jdubah"}(h$]h&]h+]h-]h/]uh1jh!j`ubh-: reference hash (obtained from parent image)}(h-: reference hash (obtained from parent image)h!j`ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j\ubah"}(h$]h&]h+]h-]h/]uh1j h!j3ubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!jubeh"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hX``AUTH_METHOD_SIG``: the image (usually a certificate) must be signed with the private key whose public part is extracted from the parent image (or the platform if the parent is NULL). The following parameter descriptors must be specified: - ``pk``: the public key (obtained from parent image) - ``sig``: the digital signature (obtained from current image) - ``alg``: the signature algorithm used (obtained from current image) - ``data``: the data to be signed (obtained from current image) h](j )}(h``AUTH_METHOD_SIG``: the image (usually a certificate) must be signed with the private key whose public part is extracted from the parent image (or the platform if the parent is NULL). The following parameter descriptors must be specified:h](j)}(h``AUTH_METHOD_SIG``h]hAUTH_METHOD_SIG}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: the image (usually a certificate) must be signed with the private key whose public part is extracted from the parent image (or the platform if the parent is NULL). The following parameter descriptors must be specified:}(h: the image (usually a certificate) must be signed with the private key whose public part is extracted from the parent image (or the platform if the parent is NULL). The following parameter descriptors must be specified:h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj )}(hhh](j )}(h3``pk``: the public key (obtained from parent image)h]j )}(hjh](j)}(h``pk``h]hpk}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh-: the public key (obtained from parent image)}(h-: the public key (obtained from parent image)h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(h<``sig``: the digital signature (obtained from current image)h]j )}(hjh](j)}(h``sig``h]hsig}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh5: the digital signature (obtained from current image)}(h5: the digital signature (obtained from current image)h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(hC``alg``: the signature algorithm used (obtained from current image)h]j )}(hjh](j)}(h``alg``h]halg}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh<: the signature algorithm used (obtained from current image)}(h<: the signature algorithm used (obtained from current image)h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubj )}(h>``data``: the data to be signed (obtained from current image) h]j )}(h=``data``: the data to be signed (obtained from current image)h](j)}(h``data``h]hdata}(hhh!j-ubah"}(h$]h&]h+]h-]h/]uh1jh!j)ubh5: the data to be signed (obtained from current image)}(h5: the data to be signed (obtained from current image)h!j)ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j%ubah"}(h$]h&]h+]h-]h/]uh1j h!jubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!jubeh"}(h$]h&]h+]h-]h/]uh1j h!jubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!jubeh"}(h$]h&]h+]h-]h/]uh1j h!jhhhANhCNubj )}(hXg``authenticated_data``: this array pointer indicates what authentication parameters must be extracted from an image once it has been authenticated. Each parameter consists of a parameter descriptor and the buffer address/size to store the parameter. The CoT is responsible for allocating the required memory to store the parameters. This pointer may be NULL. h]j )}(hXf``authenticated_data``: this array pointer indicates what authentication parameters must be extracted from an image once it has been authenticated. Each parameter consists of a parameter descriptor and the buffer address/size to store the parameter. The CoT is responsible for allocating the required memory to store the parameters. This pointer may be NULL.h](j)}(h``authenticated_data``h]hauthenticated_data}(hhh!jlubah"}(h$]h&]h+]h-]h/]uh1jh!jhubhXP: this array pointer indicates what authentication parameters must be extracted from an image once it has been authenticated. Each parameter consists of a parameter descriptor and the buffer address/size to store the parameter. The CoT is responsible for allocating the required memory to store the parameters. This pointer may be NULL.}(hXP: this array pointer indicates what authentication parameters must be extracted from an image once it has been authenticated. Each parameter consists of a parameter descriptor and the buffer address/size to store the parameter. The CoT is responsible for allocating the required memory to store the parameters. This pointer may be NULL.h!jhubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jdubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!jhhubj )}(hXIn the ``tbbr_cot*.c`` file, a set of buffers are allocated to store the parameters extracted from the certificates. In the case of the TBBR CoT, these parameters are hashes and public keys. In DER format, an RSA-4096 public key requires 550 bytes, and a hash requires 51 bytes. Depending on the CoT and the authentication process, some of the buffers may be reused at different stages during the boot.h](hIn the }(hIn the h!jhhhANhCNubj)}(h``tbbr_cot*.c``h]h tbbr_cot*.c}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhX| file, a set of buffers are allocated to store the parameters extracted from the certificates. In the case of the TBBR CoT, these parameters are hashes and public keys. In DER format, an RSA-4096 public key requires 550 bytes, and a hash requires 51 bytes. Depending on the CoT and the authentication process, some of the buffers may be reused at different stages during the boot.}(hX| file, a set of buffers are allocated to store the parameters extracted from the certificates. In the case of the TBBR CoT, these parameters are hashes and public keys. In DER format, an RSA-4096 public key requires 550 bytes, and a hash requires 51 bytes. Depending on the CoT and the authentication process, some of the buffers may be reused at different stages during the boot.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hNext in that file, the parameter descriptors are defined. These descriptors will be used to extract the parameter data from the corresponding image.h]hNext in that file, the parameter descriptors are defined. These descriptors will be used to extract the parameter data from the corresponding image.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hhh](j )}(h Example: the BL31 Chain of Trusth]h Example: the BL31 Chain of Trust}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCMubj )}(h4Four image descriptors form the BL31 Chain of Trust:h]h4Four image descriptors form the BL31 Chain of Trust:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj@ )}(hXstatic const auth_img_desc_t trusted_key_cert = { .img_id = TRUSTED_KEY_CERT_ID, .img_type = IMG_CERT, .parent = NULL, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &subject_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &trusted_world_pk, .data = { .ptr = (void *)trusted_world_pk_buf, .len = (unsigned int)PK_DER_LEN } }, [1] = { .type_desc = &non_trusted_world_pk, .data = { .ptr = (void *)non_trusted_world_pk_buf, .len = (unsigned int)PK_DER_LEN } } } }; static const auth_img_desc_t soc_fw_key_cert = { .img_id = SOC_FW_KEY_CERT_ID, .img_type = IMG_CERT, .parent = &trusted_key_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &trusted_world_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &soc_fw_content_pk, .data = { .ptr = (void *)content_pk_buf, .len = (unsigned int)PK_DER_LEN } } } }; static const auth_img_desc_t soc_fw_content_cert = { .img_id = SOC_FW_CONTENT_CERT_ID, .img_type = IMG_CERT, .parent = &soc_fw_key_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &soc_fw_content_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &soc_fw_hash, .data = { .ptr = (void *)soc_fw_hash_buf, .len = (unsigned int)HASH_DER_LEN } }, [1] = { .type_desc = &soc_fw_config_hash, .data = { .ptr = (void *)soc_fw_config_hash_buf, .len = (unsigned int)HASH_DER_LEN } } } }; static const auth_img_desc_t bl31_image = { .img_id = BL31_IMAGE_ID, .img_type = IMG_RAW, .parent = &soc_fw_content_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_HASH, .param.hash = { .data = &raw_data, .hash = &soc_fw_hash } } } };h]hXstatic const auth_img_desc_t trusted_key_cert = { .img_id = TRUSTED_KEY_CERT_ID, .img_type = IMG_CERT, .parent = NULL, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &subject_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &trusted_world_pk, .data = { .ptr = (void *)trusted_world_pk_buf, .len = (unsigned int)PK_DER_LEN } }, [1] = { .type_desc = &non_trusted_world_pk, .data = { .ptr = (void *)non_trusted_world_pk_buf, .len = (unsigned int)PK_DER_LEN } } } }; static const auth_img_desc_t soc_fw_key_cert = { .img_id = SOC_FW_KEY_CERT_ID, .img_type = IMG_CERT, .parent = &trusted_key_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &trusted_world_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &soc_fw_content_pk, .data = { .ptr = (void *)content_pk_buf, .len = (unsigned int)PK_DER_LEN } } } }; static const auth_img_desc_t soc_fw_content_cert = { .img_id = SOC_FW_CONTENT_CERT_ID, .img_type = IMG_CERT, .parent = &soc_fw_key_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_SIG, .param.sig = { .pk = &soc_fw_content_pk, .sig = &sig, .alg = &sig_alg, .data = &raw_data } }, [1] = { .type = AUTH_METHOD_NV_CTR, .param.nv_ctr = { .cert_nv_ctr = &trusted_nv_ctr, .plat_nv_ctr = &trusted_nv_ctr } } }, .authenticated_data = (const auth_param_desc_t[COT_MAX_VERIFIED_PARAMS]) { [0] = { .type_desc = &soc_fw_hash, .data = { .ptr = (void *)soc_fw_hash_buf, .len = (unsigned int)HASH_DER_LEN } }, [1] = { .type_desc = &soc_fw_config_hash, .data = { .ptr = (void *)soc_fw_config_hash_buf, .len = (unsigned int)HASH_DER_LEN } } } }; static const auth_img_desc_t bl31_image = { .img_id = BL31_IMAGE_ID, .img_type = IMG_RAW, .parent = &soc_fw_content_cert, .img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { [0] = { .type = AUTH_METHOD_HASH, .param.hash = { .data = &raw_data, .hash = &soc_fw_hash } } } };}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP jjuh1j? hAj hCMh!jhhubj )}(hX&The **Trusted Key certificate** is signed with the ROT private key and contains the Trusted World public key and the Non-Trusted World public key as x509v3 extensions. This must be specified in the image descriptor using the ``img_auth_methods`` and ``authenticated_data`` arrays, respectively.h](hThe }(hThe h!jhhhANhCNubj)}(h**Trusted Key certificate**h]hTrusted Key certificate}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh is signed with the ROT private key and contains the Trusted World public key and the Non-Trusted World public key as x509v3 extensions. This must be specified in the image descriptor using the }(h is signed with the ROT private key and contains the Trusted World public key and the Non-Trusted World public key as x509v3 extensions. This must be specified in the image descriptor using the h!jhhhANhCNubj)}(h``img_auth_methods``h]himg_auth_methods}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!jubh and }(h and h!jhhhANhCNubj)}(h``authenticated_data``h]hauthenticated_data}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!jubh arrays, respectively.}(h arrays, respectively.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMPh!jhhubj )}(hX:The Trusted Key certificate is authenticated by checking its digital signature using the ROTPK. Four parameters are required to check a signature: the public key, the algorithm, the signature and the data that has been signed. Therefore, four parameter descriptors must be specified with the authentication method:h]hX:The Trusted Key certificate is authenticated by checking its digital signature using the ROTPK. Four parameters are required to check a signature: the public key, the algorithm, the signature and the data that has been signed. Therefore, four parameter descriptors must be specified with the authentication method:}(hj;h!j9hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMUh!jhhubj )}(hhh](j )}(hX``subject_pk``: parameter descriptor of type ``AUTH_PARAM_PUB_KEY``. This type is used to extract a public key from the parent image. If the cookie is an OID, the key is extracted from the corresponding x509v3 extension. If the cookie is NULL, the subject public key is retrieved. In this case, because the parent image is NULL, the public key is obtained from the platform (this key will be the ROTPK).h]j )}(hX``subject_pk``: parameter descriptor of type ``AUTH_PARAM_PUB_KEY``. This type is used to extract a public key from the parent image. If the cookie is an OID, the key is extracted from the corresponding x509v3 extension. If the cookie is NULL, the subject public key is retrieved. In this case, because the parent image is NULL, the public key is obtained from the platform (this key will be the ROTPK).h](j)}(h``subject_pk``h]h subject_pk}(hhh!jRubah"}(h$]h&]h+]h-]h/]uh1jh!jNubh: parameter descriptor of type }(h: parameter descriptor of type h!jNubj)}(h``AUTH_PARAM_PUB_KEY``h]hAUTH_PARAM_PUB_KEY}(hhh!jeubah"}(h$]h&]h+]h-]h/]uh1jh!jNubhXP. This type is used to extract a public key from the parent image. If the cookie is an OID, the key is extracted from the corresponding x509v3 extension. If the cookie is NULL, the subject public key is retrieved. In this case, because the parent image is NULL, the public key is obtained from the platform (this key will be the ROTPK).}(hXP. This type is used to extract a public key from the parent image. If the cookie is an OID, the key is extracted from the corresponding x509v3 extension. If the cookie is NULL, the subject public key is retrieved. In this case, because the parent image is NULL, the public key is obtained from the platform (this key will be the ROTPK).h!jNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMZh!jJubah"}(h$]h&]h+]h-]h/]uh1j h!jGhhhAj hCNubj )}(hs``sig``: parameter descriptor of type ``AUTH_PARAM_SIG``. It is used to extract the signature from the certificate.h]j )}(hs``sig``: parameter descriptor of type ``AUTH_PARAM_SIG``. It is used to extract the signature from the certificate.h](j)}(h``sig``h]hsig}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: parameter descriptor of type }(h: parameter descriptor of type h!jubj)}(h``AUTH_PARAM_SIG``h]hAUTH_PARAM_SIG}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh;. It is used to extract the signature from the certificate.}(h;. It is used to extract the signature from the certificate.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM`h!jubah"}(h$]h&]h+]h-]h/]uh1j h!jGhhhAj hCNubj )}(h``sig_alg``: parameter descriptor of type ``AUTH_PARAM_SIG``. It is used to extract the signature algorithm from the certificate.h]j )}(h``sig_alg``: parameter descriptor of type ``AUTH_PARAM_SIG``. It is used to extract the signature algorithm from the certificate.h](j)}(h ``sig_alg``h]hsig_alg}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: parameter descriptor of type }(h: parameter descriptor of type h!jubj)}(h``AUTH_PARAM_SIG``h]hAUTH_PARAM_SIG}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhE. It is used to extract the signature algorithm from the certificate.}(hE. It is used to extract the signature algorithm from the certificate.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMbh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jGhhhAj hCNubj )}(h``raw_data``: parameter descriptor of type ``AUTH_PARAM_RAW_DATA``. It is used to extract the data to be signed from the certificate. h]j )}(h``raw_data``: parameter descriptor of type ``AUTH_PARAM_RAW_DATA``. It is used to extract the data to be signed from the certificate.h](j)}(h ``raw_data``h]hraw_data}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh: parameter descriptor of type }(h: parameter descriptor of type h!jubj)}(h``AUTH_PARAM_RAW_DATA``h]hAUTH_PARAM_RAW_DATA}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubhC. It is used to extract the data to be signed from the certificate.}(hC. It is used to extract the data to be signed from the certificate.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMdh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jGhhhAj hCNubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMZh!jhhubj )}(hXOnce the signature has been checked and the certificate authenticated, the Trusted World public key needs to be extracted from the certificate. A new entry is created in the ``authenticated_data`` array for that purpose. In that entry, the corresponding parameter descriptor must be specified along with the buffer address to store the parameter value. In this case, the ``trusted_world_pk`` descriptor is used to extract the public key from an x509v3 extension with OID ``TRUSTED_WORLD_PK_OID``. The BL31 key certificate will use this descriptor as parameter in the signature authentication method. The key is stored in the ``trusted_world_pk_buf`` buffer.h](hOnce the signature has been checked and the certificate authenticated, the Trusted World public key needs to be extracted from the certificate. A new entry is created in the }(hOnce the signature has been checked and the certificate authenticated, the Trusted World public key needs to be extracted from the certificate. A new entry is created in the h!j8hhhANhCNubj)}(h``authenticated_data``h]hauthenticated_data}(hhh!jAubah"}(h$]h&]h+]h-]h/]uh1jh!j8ubh array for that purpose. In that entry, the corresponding parameter descriptor must be specified along with the buffer address to store the parameter value. In this case, the }(h array for that purpose. In that entry, the corresponding parameter descriptor must be specified along with the buffer address to store the parameter value. In this case, the h!j8hhhANhCNubj)}(h``trusted_world_pk``h]htrusted_world_pk}(hhh!jTubah"}(h$]h&]h+]h-]h/]uh1jh!j8ubhP descriptor is used to extract the public key from an x509v3 extension with OID }(hP descriptor is used to extract the public key from an x509v3 extension with OID h!j8hhhANhCNubj)}(h``TRUSTED_WORLD_PK_OID``h]hTRUSTED_WORLD_PK_OID}(hhh!jgubah"}(h$]h&]h+]h-]h/]uh1jh!j8ubh. The BL31 key certificate will use this descriptor as parameter in the signature authentication method. The key is stored in the }(h. The BL31 key certificate will use this descriptor as parameter in the signature authentication method. The key is stored in the h!j8hhhANhCNubj)}(h``trusted_world_pk_buf``h]htrusted_world_pk_buf}(hhh!jzubah"}(h$]h&]h+]h-]h/]uh1jh!j8ubh buffer.}(h buffer.h!j8hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMgh!jhhubj )}(hXThe **BL31 Key certificate** is authenticated by checking its digital signature using the Trusted World public key obtained previously from the Trusted Key certificate. In the image descriptor, we specify a single authentication method by signature whose public key is the ``trusted_world_pk``. Once this certificate has been authenticated, we have to extract the BL31 public key, stored in the extension specified by ``soc_fw_content_pk``. This key will be copied to the ``content_pk_buf`` buffer.h](hThe }(hThe h!jhhhANhCNubj)}(h**BL31 Key certificate**h]hBL31 Key certificate}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh is authenticated by checking its digital signature using the Trusted World public key obtained previously from the Trusted Key certificate. In the image descriptor, we specify a single authentication method by signature whose public key is the }(h is authenticated by checking its digital signature using the Trusted World public key obtained previously from the Trusted Key certificate. In the image descriptor, we specify a single authentication method by signature whose public key is the h!jhhhANhCNubj)}(h``trusted_world_pk``h]htrusted_world_pk}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh}. Once this certificate has been authenticated, we have to extract the BL31 public key, stored in the extension specified by }(h}. Once this certificate has been authenticated, we have to extract the BL31 public key, stored in the extension specified by h!jhhhANhCNubj)}(h``soc_fw_content_pk``h]hsoc_fw_content_pk}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh!. This key will be copied to the }(h!. This key will be copied to the h!jhhhANhCNubj)}(h``content_pk_buf``h]hcontent_pk_buf}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh buffer.}(h buffer.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMqh!jhhubj )}(hXThe **BL31 certificate** is authenticated by checking its digital signature using the BL31 public key obtained previously from the BL31 Key certificate. We specify the authentication method using ``soc_fw_content_pk`` as public key. After authentication, we need to extract the BL31 hash, stored in the extension specified by ``soc_fw_hash``. This hash will be copied to the ``soc_fw_hash_buf`` buffer.h](hThe }(hThe h!jhhhANhCNubj)}(h**BL31 certificate**h]hBL31 certificate}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh is authenticated by checking its digital signature using the BL31 public key obtained previously from the BL31 Key certificate. We specify the authentication method using }(h is authenticated by checking its digital signature using the BL31 public key obtained previously from the BL31 Key certificate. We specify the authentication method using h!jhhhANhCNubj)}(h``soc_fw_content_pk``h]hsoc_fw_content_pk}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!jubhm as public key. After authentication, we need to extract the BL31 hash, stored in the extension specified by }(hm as public key. After authentication, we need to extract the BL31 hash, stored in the extension specified by h!jhhhANhCNubj)}(h``soc_fw_hash``h]h soc_fw_hash}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!jubh". This hash will be copied to the }(h". This hash will be copied to the h!jhhhANhCNubj)}(h``soc_fw_hash_buf``h]hsoc_fw_hash_buf}(hhh!j0 ubah"}(h$]h&]h+]h-]h/]uh1jh!jubh buffer.}(h buffer.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMyh!jhhubj )}(hXjThe **BL31 image** is authenticated by calculating its hash and matching it with the hash obtained from the BL31 certificate. The image descriptor contains a single authentication method by hash. The parameters to the hash method are the reference hash, ``soc_fw_hash``, and the data to be hashed. In this case, it is the whole image, so we specify ``raw_data``.h](hThe }(hThe h!jI hhhANhCNubj)}(h**BL31 image**h]h BL31 image}(hhh!jR ubah"}(h$]h&]h+]h-]h/]uh1jh!jI ubh is authenticated by calculating its hash and matching it with the hash obtained from the BL31 certificate. The image descriptor contains a single authentication method by hash. The parameters to the hash method are the reference hash, }(h is authenticated by calculating its hash and matching it with the hash obtained from the BL31 certificate. The image descriptor contains a single authentication method by hash. The parameters to the hash method are the reference hash, h!jI hhhANhCNubj)}(h``soc_fw_hash``h]h soc_fw_hash}(hhh!je ubah"}(h$]h&]h+]h-]h/]uh1jh!jI ubhP, and the data to be hashed. In this case, it is the whole image, so we specify }(hP, and the data to be hashed. In this case, it is the whole image, so we specify h!jI hhhANhCNubj)}(h ``raw_data``h]hraw_data}(hhh!jx ubah"}(h$]h&]h+]h-]h/]uh1jh!jI ubh.}(hj0 h!jI hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubeh"}(h$]example-the-bl31-chain-of-trustah&]h+] example: the bl31 chain of trustah-]h/]uh1j h!jhhhAj hCMubeh"}(h$] the-tbbr-cotah&]h+] the tbbr cotah-]h/]uh1j h!jhhhAj hCMlubj )}(hhh](j )}(hThe image parser libraryh]hThe image parser library}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCMubj )}(hXThe image parser module relies on libraries to check the image integrity and extract the authentication parameters. The number and type of parser libraries depend on the images used in the CoT. Raw images do not need a library, so only an x509v3 library is required for the TBBR CoT.h]hXThe image parser module relies on libraries to check the image integrity and extract the authentication parameters. The number and type of parser libraries depend on the images used in the CoT. Raw images do not need a library, so only an x509v3 library is required for the TBBR CoT.}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j hhubj )}(hArm platforms will use an x509v3 library based on mbed TLS. This library may be found in ``drivers/auth/mbedtls/mbedtls_x509_parser.c``. It exports three functions:h](hYArm platforms will use an x509v3 library based on mbed TLS. This library may be found in }(hYArm platforms will use an x509v3 library based on mbed TLS. This library may be found in h!j hhhANhCNubj)}(h.``drivers/auth/mbedtls/mbedtls_x509_parser.c``h]h*drivers/auth/mbedtls/mbedtls_x509_parser.c}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!j ubh. It exports three functions:}(h. It exports three functions:h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j hhubj@ )}(hvoid init(void); int check_integrity(void *img, unsigned int img_len); int get_auth_param(const auth_param_type_desc_t *type_desc, void *img, unsigned int img_len, void **param, unsigned int *param_len);h]hvoid init(void); int check_integrity(void *img, unsigned int img_len); int get_auth_param(const auth_param_type_desc_t *type_desc, void *img, unsigned int img_len, void **param, unsigned int *param_len);}(hhh!j ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP jjuh1j? hAj hCMh!j hhubj )}(hThe library is registered in the framework using the macro ``REGISTER_IMG_PARSER_LIB()``. Each time the image parser module needs to access an image of type ``IMG_CERT``, it will call the corresponding function exported in this file.h](h;The library is registered in the framework using the macro }(h;The library is registered in the framework using the macro h!j hhhANhCNubj)}(h``REGISTER_IMG_PARSER_LIB()``h]hREGISTER_IMG_PARSER_LIB()}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1jh!j ubhE. Each time the image parser module needs to access an image of type }(hE. Each time the image parser module needs to access an image of type h!j hhhANhCNubj)}(h ``IMG_CERT``h]hIMG_CERT}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1jh!j ubh@, it will call the corresponding function exported in this file.}(h@, it will call the corresponding function exported in this file.h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j hhubj )}(hThe build system must be updated to include the corresponding library and mbed TLS sources. Arm platforms use the ``arm_common.mk`` file to pull the sources.h](hrThe build system must be updated to include the corresponding library and mbed TLS sources. Arm platforms use the }(hrThe build system must be updated to include the corresponding library and mbed TLS sources. Arm platforms use the h!j'!hhhANhCNubj)}(h``arm_common.mk``h]h arm_common.mk}(hhh!j0!ubah"}(h$]h&]h+]h-]h/]uh1jh!j'!ubh file to pull the sources.}(h file to pull the sources.h!j'!hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j hhubeh"}(h$]the-image-parser-libraryah&]h+]the image parser libraryah-]h/]uh1j h!jhhhAj hCMubj )}(hhh](j )}(hThe cryptographic libraryh]hThe cryptographic library}(hjV!h!jT!hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jQ!hhhAj hCMubj )}(hXqThe cryptographic module relies on a library to perform the required operations, i.e. verify a hash or a digital signature. Arm platforms will use a library based on mbed TLS, which can be found in ``drivers/auth/mbedtls/mbedtls_crypto.c``. This library is registered in the authentication framework using the macro ``REGISTER_CRYPTO_LIB()`` and exports four functions:h](hThe cryptographic module relies on a library to perform the required operations, i.e. verify a hash or a digital signature. Arm platforms will use a library based on mbed TLS, which can be found in }(hThe cryptographic module relies on a library to perform the required operations, i.e. verify a hash or a digital signature. Arm platforms will use a library based on mbed TLS, which can be found in h!jb!hhhANhCNubj)}(h)``drivers/auth/mbedtls/mbedtls_crypto.c``h]h%drivers/auth/mbedtls/mbedtls_crypto.c}(hhh!jk!ubah"}(h$]h&]h+]h-]h/]uh1jh!jb!ubhM. This library is registered in the authentication framework using the macro }(hM. This library is registered in the authentication framework using the macro h!jb!hhhANhCNubj)}(h``REGISTER_CRYPTO_LIB()``h]hREGISTER_CRYPTO_LIB()}(hhh!j~!ubah"}(h$]h&]h+]h-]h/]uh1jh!jb!ubh and exports four functions:}(h and exports four functions:h!jb!hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jQ!hhubj@ )}(hXvoid init(void); int verify_signature(void *data_ptr, unsigned int data_len, void *sig_ptr, unsigned int sig_len, void *sig_alg, unsigned int sig_alg_len, void *pk_ptr, unsigned int pk_len); int verify_hash(void *data_ptr, unsigned int data_len, void *digest_info_ptr, unsigned int digest_info_len); int auth_decrypt(enum crypto_dec_algo dec_algo, void *data_ptr, size_t len, const void *key, unsigned int key_len, unsigned int key_flags, const void *iv, unsigned int iv_len, const void *tag, unsigned int tag_len)h]hXvoid init(void); int verify_signature(void *data_ptr, unsigned int data_len, void *sig_ptr, unsigned int sig_len, void *sig_alg, unsigned int sig_alg_len, void *pk_ptr, unsigned int pk_len); int verify_hash(void *data_ptr, unsigned int data_len, void *digest_info_ptr, unsigned int digest_info_len); int auth_decrypt(enum crypto_dec_algo dec_algo, void *data_ptr, size_t len, const void *key, unsigned int key_len, unsigned int key_flags, const void *iv, unsigned int iv_len, const void *tag, unsigned int tag_len)}(hhh!j!ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}jO jP jjuh1j? hAj hCMh!jQ!hhubj )}(h}The mbedTLS library algorithm support is configured by both the ``TF_MBEDTLS_KEY_ALG`` and ``TF_MBEDTLS_KEY_SIZE`` variables.h](h@The mbedTLS library algorithm support is configured by both the }(h@The mbedTLS library algorithm support is configured by both the h!j!hhhANhCNubj)}(h``TF_MBEDTLS_KEY_ALG``h]hTF_MBEDTLS_KEY_ALG}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1jh!j!ubh and }(h and h!j!hhhANhCNubj)}(h``TF_MBEDTLS_KEY_SIZE``h]hTF_MBEDTLS_KEY_SIZE}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1jh!j!ubh variables.}(h variables.h!j!hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jQ!hhubj )}(hhh](j )}(hX*``TF_MBEDTLS_KEY_ALG`` can take in 3 values: `rsa`, `ecdsa` or `rsa+ecdsa`. This variable allows the Makefile to include the corresponding sources in the build for the various algorithms. Setting the variable to `rsa+ecdsa` enables support for both rsa and ecdsa algorithms in the mbedTLS library. h]j )}(hX)``TF_MBEDTLS_KEY_ALG`` can take in 3 values: `rsa`, `ecdsa` or `rsa+ecdsa`. This variable allows the Makefile to include the corresponding sources in the build for the various algorithms. Setting the variable to `rsa+ecdsa` enables support for both rsa and ecdsa algorithms in the mbedTLS library.h](j)}(h``TF_MBEDTLS_KEY_ALG``h]hTF_MBEDTLS_KEY_ALG}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1jh!j!ubh can take in 3 values: }(h can take in 3 values: h!j!ubh title_reference)}(h`rsa`h]hrsa}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1j!h!j!ubh, }(h, h!j!ubj!)}(h`ecdsa`h]hecdsa}(hhh!j"ubah"}(h$]h&]h+]h-]h/]uh1j!h!j!ubh or }(h or h!j!ubj!)}(h `rsa+ecdsa`h]h rsa+ecdsa}(hhh!j#"ubah"}(h$]h&]h+]h-]h/]uh1j!h!j!ubh. This variable allows the Makefile to include the corresponding sources in the build for the various algorithms. Setting the variable to }(h. This variable allows the Makefile to include the corresponding sources in the build for the various algorithms. Setting the variable to h!j!ubj!)}(h `rsa+ecdsa`h]h rsa+ecdsa}(hhh!j6"ubah"}(h$]h&]h+]h-]h/]uh1j!h!j!ubhJ enables support for both rsa and ecdsa algorithms in the mbedTLS library.}(hJ enables support for both rsa and ecdsa algorithms in the mbedTLS library.h!j!ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j!ubah"}(h$]h&]h+]h-]h/]uh1j h!j!hhhAj hCNubj )}(hq``TF_MBEDTLS_KEY_SIZE`` sets the supported RSA key size for TFA. Valid values include 1024, 2048, 3072 and 4096. h]j )}(hp``TF_MBEDTLS_KEY_SIZE`` sets the supported RSA key size for TFA. Valid values include 1024, 2048, 3072 and 4096.h](j)}(h``TF_MBEDTLS_KEY_SIZE``h]hTF_MBEDTLS_KEY_SIZE}(hhh!j]"ubah"}(h$]h&]h+]h-]h/]uh1jh!jY"ubhY sets the supported RSA key size for TFA. Valid values include 1024, 2048, 3072 and 4096.}(hY sets the supported RSA key size for TFA. Valid values include 1024, 2048, 3072 and 4096.h!jY"ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jU"ubah"}(h$]h&]h+]h-]h/]uh1j h!j!hhhAj hCNubj )}(h~``TF_MBEDTLS_USE_AES_GCM`` enables the authenticated decryption support based on AES-GCM algorithm. Valid values are 0 and 1. h]j )}(h}``TF_MBEDTLS_USE_AES_GCM`` enables the authenticated decryption support based on AES-GCM algorithm. Valid values are 0 and 1.h](j)}(h``TF_MBEDTLS_USE_AES_GCM``h]hTF_MBEDTLS_USE_AES_GCM}(hhh!j"ubah"}(h$]h&]h+]h-]h/]uh1jh!j"ubhc enables the authenticated decryption support based on AES-GCM algorithm. Valid values are 0 and 1.}(hc enables the authenticated decryption support based on AES-GCM algorithm. Valid values are 0 and 1.h!j"ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j|"ubah"}(h$]h&]h+]h-]h/]uh1j h!j!hhhAj hCNubeh"}(h$]h&]h+]h-]h/]j j uh1j hAj hCMh!jQ!hhubh note)}(hIf code size is a concern, the build option ``MBEDTLS_SHA256_SMALLER`` can be defined in the platform Makefile. It will make mbed TLS use an implementation of SHA-256 with smaller memory footprint (~1.5 KB less) but slower (~30%).h]j )}(hIf code size is a concern, the build option ``MBEDTLS_SHA256_SMALLER`` can be defined in the platform Makefile. It will make mbed TLS use an implementation of SHA-256 with smaller memory footprint (~1.5 KB less) but slower (~30%).h](h,If code size is a concern, the build option }(h,If code size is a concern, the build option h!j"ubj)}(h``MBEDTLS_SHA256_SMALLER``h]hMBEDTLS_SHA256_SMALLER}(hhh!j"ubah"}(h$]h&]h+]h-]h/]uh1jh!j"ubh can be defined in the platform Makefile. It will make mbed TLS use an implementation of SHA-256 with smaller memory footprint (~1.5 KB less) but slower (~30%).}(h can be defined in the platform Makefile. It will make mbed TLS use an implementation of SHA-256 with smaller memory footprint (~1.5 KB less) but slower (~30%).h!j"ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j"ubah"}(h$]h&]h+]h-]h/]uh1j"h!jQ!hhhAj hCNubh transition)}(h--------------h]h"}(h$]h&]h+]h-]h/]uh1j"hAj hCMh!jQ!hhubj )}(hM*Copyright (c) 2017-2020, Arm Limited and Contributors. All rights reserved.*h]h emphasis)}(hj"h]hKCopyright (c) 2017-2020, Arm Limited and Contributors. All rights reserved.}(hhh!j"ubah"}(h$]h&]h+]h-]h/]uh1j"h!j"ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jQ!hhubh target)}(h.. _TBBR-Client specification: https://developer.arm.com/docs/den0006/latest/trusted-board-boot-requirements-client-tbbr-client-armv8-ah]h"}(h$]tbbr-client-specificationah&]h+]tbbr-client specificationah-]h/]j j uh1j"hCMh!jQ!hhhAj referencedKubeh"}(h$]the-cryptographic-libraryah&]h+]the cryptographic libraryah-]h/]uh1j h!jhhhAj hCMubeh"}(h$]implementation-exampleah&]h+]implementation exampleah-]h/]uh1j h!j hhhAj hCMdubeh"}(h$]'authentication-framework-chain-of-trustah&]h+])authentication framework & chain of trustah-]h/]uh1j h!hhhhAj hCKubeh"}(h$]h&]h+]h-]h/]sourcej uh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(j N generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjF#error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcej _destinationN _config_files]pep_referencesN pep_base_url https://www.python.org/dev/peps/pep_file_url_templatepep-%04drfc_referencesN rfc_base_urlhttps://tools.ietf.org/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKsyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xformembed_stylesheetcloak_email_addressesenvNubreporterNindirect_targets]substitution_defs}(hHh hshKhhvhhhhjhjJj"jujMjjxjjjjj!jjLj$jwjOjjzjjjjj#jjNj&jyjQjj|jjjjj%jjPj(j{jSjj~jjjjj'jjRj*j}jUjjjjjjj)jjTj,jjWjjjjjjj+jjVj.jjYjjjjjjj-jjXj0jj[jjjjj jj/ j jZ j2 j j] j j j j j j j1 j j\ j4 j j_ j j j j j j j3 j j^ j6 j ja usubstitution_names}(aarch32hHaarch64hsamuhamushɌapihbtijcotjucssjcvejdtbjds-5j!dsujLdtjweljehfjfconfjfdtj#ff-ajNfipjyfvpjfwujgicjisaj%linarojPmmuj{mpamjmpmmjmpidrjmtej'oenjRop-teej}otejpddjpauthjpmfj)pscijTrasjrotjscmijscpjsdeij+sdsjVseajsipjsmcjsmcccj-socjXspjspdjspmjssbsj svej/ tbbjZ tbbrj teej tf-aj tf-mj tlbj1 tlkj\ trngj tspj tzcj ubsanj uefij3 wdogj^ xlatj urefnames}tbbr-client specification]j asrefids}nameids}(j #j#jjj j j j j~j{j j jjj=j:jjjvjsjjjjj@j=jjjjjjj#j#j j j j jN!jK!j#j #j#j#u nametypes}(j #NjNj Nj Nj~Nj NjNj=NjNjvNjNjNj@NjNjNjNj#Nj Nj NjN!Nj#Nj#uh$}(j#j jj_ j j~ j j j{j j j jj j:jjj@jsjjjjjj=j jjCjjjjj#jj jj jjK!j j #jQ!j#j"u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN decorationNhhub.