€•šôŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ4/translations/zh_CN/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/zh_TW/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/it_IT/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ja_JP/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ko_KR/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/pt_BR/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/sp_SP/filesystems/ubifs-authentication”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒN/var/lib/git/docbuild/linux/Documentation/filesystems/ubifs-authentication.rst”h´Kubh¶)”}”(hŒUBIFS Authentication”h]”hŒUBIFS Authentication”…””}”hhÈsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´Kubh¶)”}”(hŒsigma star gmbh”h]”hŒsigma star gmbh”…””}”hhÖsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´Kubh¶)”}”(hŒ2018”h]”hŒ2018”…””}”hhäsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÇh´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUBIFS Authentication Support”h]”hŒUBIFS Authentication Support”…””}”(hhùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hhôh²hh³hÇh´K ubhó)”}”(hhh]”(hø)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjh²hh³hÇh´K ubhŒ paragraph”“”)”}”(hXeUBIFS utilizes the fscrypt framework to provide confidentiality for file contents and file names. This prevents attacks where an attacker is able to read contents of the filesystem on a single point in time. A classic example is a lost smartphone where the attacker is unable to read personal data stored on the device without the filesystem decryption key.”h]”hXeUBIFS utilizes the fscrypt framework to provide confidentiality for file contents and file names. This prevents attacks where an attacker is able to read contents of the filesystem on a single point in time. A classic example is a lost smartphone where the attacker is unable to read personal data stored on the device without the filesystem decryption key.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjh²hubj)”}”(hXùAt the current state, UBIFS encryption however does not prevent attacks where the attacker is able to modify the filesystem contents and the user uses the device afterwards. In such a scenario an attacker can modify filesystem contents arbitrarily without the user noticing. One example is to modify a binary to perform a malicious action when executed [DMC-CBC-ATTACK]. Since most of the filesystem metadata of UBIFS is stored in plain, this makes it fairly easy to swap files and replace their contents.”h]”hXùAt the current state, UBIFS encryption however does not prevent attacks where the attacker is able to modify the filesystem contents and the user uses the device afterwards. In such a scenario an attacker can modify filesystem contents arbitrarily without the user noticing. One example is to modify a binary to perform a malicious action when executed [DMC-CBC-ATTACK]. Since most of the filesystem metadata of UBIFS is stored in plain, this makes it fairly easy to swap files and replace their contents.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjh²hubj)”}”(hXòOther full disk encryption systems like dm-crypt cover all filesystem metadata, which makes such kinds of attacks more complicated, but not impossible. Especially, if the attacker is given access to the device multiple points in time. For dm-crypt and other filesystems that build upon the Linux block IO layer, the dm-integrity or dm-verity subsystems [DM-INTEGRITY, DM-VERITY] can be used to get full data authentication at the block layer. These can also be combined with dm-crypt [CRYPTSETUP2].”h]”hXòOther full disk encryption systems like dm-crypt cover all filesystem metadata, which makes such kinds of attacks more complicated, but not impossible. Especially, if the attacker is given access to the device multiple points in time. For dm-crypt and other filesystems that build upon the Linux block IO layer, the dm-integrity or dm-verity subsystems [DM-INTEGRITY, DM-VERITY] can be used to get full data authentication at the block layer. These can also be combined with dm-crypt [CRYPTSETUP2].”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjh²hubj)”}”(hXzThis document describes an approach to get file contents _and_ full metadata authentication for UBIFS. Since UBIFS uses fscrypt for file contents and file name encryption, the authentication system could be tied into fscrypt such that existing features like key derivation can be utilized. It should however also be possible to use UBIFS authentication without using encryption.”h]”hXzThis document describes an approach to get file contents _and_ full metadata authentication for UBIFS. Since UBIFS uses fscrypt for file contents and file name encryption, the authentication system could be tied into fscrypt such that existing features like key derivation can be utilized. It should however also be possible to use UBIFS authentication without using encryption.”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K$hjh²hubhó)”}”(hhh]”(hø)”}”(hŒMTD, UBI & UBIFS”h]”hŒMTD, UBI & UBIFS”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjRh²hh³hÇh´K,ubj)”}”(hXOn Linux, the MTD (Memory Technology Devices) subsystem provides a uniform interface to access raw flash devices. One of the more prominent subsystems that work on top of MTD is UBI (Unsorted Block Images). It provides volume management for flash devices and is thus somewhat similar to LVM for block devices. In addition, it deals with flash-specific wear-leveling and transparent I/O error handling. UBI offers logical erase blocks (LEBs) to the layers on top of it and maps them transparently to physical erase blocks (PEBs) on the flash.”h]”hXOn Linux, the MTD (Memory Technology Devices) subsystem provides a uniform interface to access raw flash devices. One of the more prominent subsystems that work on top of MTD is UBI (Unsorted Block Images). It provides volume management for flash devices and is thus somewhat similar to LVM for block devices. In addition, it deals with flash-specific wear-leveling and transparent I/O error handling. UBI offers logical erase blocks (LEBs) to the layers on top of it and maps them transparently to physical erase blocks (PEBs) on the flash.”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K.hjRh²hubj)”}”(hŒÃUBIFS is a filesystem for raw flash which operates on top of UBI. Thus, wear leveling and some flash specifics are left to UBI, while UBIFS focuses on scalability, performance and recoverability.”h]”hŒÃUBIFS is a filesystem for raw flash which operates on top of UBI. Thus, wear leveling and some flash specifics are left to UBI, while UBIFS focuses on scalability, performance and recoverability.”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K6hjRh²hubhŒ literal_block”“”)”}”(hX;+------------+ +*******+ +-----------+ +-----+ | | * UBIFS * | UBI-BLOCK | | ... | | JFFS/JFFS2 | +*******+ +-----------+ +-----+ | | +-----------------------------+ +-----------+ +-----+ | | | UBI | | MTD-BLOCK | | ... | +------------+ +-----------------------------+ +-----------+ +-----+ +------------------------------------------------------------------+ | MEMORY TECHNOLOGY DEVICES (MTD) | +------------------------------------------------------------------+ +-----------------------------+ +--------------------------+ +-----+ | NAND DRIVERS | | NOR DRIVERS | | ... | +-----------------------------+ +--------------------------+ +-----+ Figure 1: Linux kernel subsystems for dealing with raw flash”h]”hX;+------------+ +*******+ +-----------+ +-----+ | | * UBIFS * | UBI-BLOCK | | ... | | JFFS/JFFS2 | +*******+ +-----------+ +-----+ | | +-----------------------------+ +-----------+ +-----+ | | | UBI | | MTD-BLOCK | | ... | +------------+ +-----------------------------+ +-----------+ +-----+ +------------------------------------------------------------------+ | MEMORY TECHNOLOGY DEVICES (MTD) | +------------------------------------------------------------------+ +-----------------------------+ +--------------------------+ +-----+ | NAND DRIVERS | | NOR DRIVERS | | ... | +-----------------------------+ +--------------------------+ +-----+ Figure 1: Linux kernel subsystems for dealing with raw flash”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´KThrough UBIFS’ concept of a wandering tree, it already takes care of only updating and persisting changed parts from leaf node up to the root node of the full B+ tree. This enables us to augment the index nodes of the tree with a hash over each node’s child nodes. As a result, the index basically also a Merkle tree. Since the leaf nodes of the index contain the actual filesystem data, the hashes of their parent index nodes thus cover all the file contents and file metadata. When a file changes, the UBIFS index is updated accordingly from the leaf nodes up to the root node including the master node. This process can be hooked to recompute the hash only for each changed node at the same time. Whenever a file is read, UBIFS can verify the hashes from each leaf node up to the root node to ensure the node’s integrity.”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhj…h²hubj)”}”(hXTo ensure the authenticity of the whole index, the UBIFS master node stores a keyed hash (HMAC) over its own contents and a hash of the root node of the index tree. As mentioned above, the master node is always written to the flash whenever the index is persisted (ie. on index commit).”h]”hXTo ensure the authenticity of the whole index, the UBIFS master node stores a keyed hash (HMAC) over its own contents and a hash of the root node of the index tree. As mentioned above, the master node is always written to the flash whenever the index is persisted (ie. on index commit).”…””}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M hj…h²hubj)”}”(hŒìUsing this approach only UBIFS index nodes and the master node are changed to include a hash. All other types of nodes will remain unchanged. This reduces the storage overhead which is precious for users of UBIFS (ie. embedded devices).”h]”hŒìUsing this approach only UBIFS index nodes and the master node are changed to include a hash. All other types of nodes will remain unchanged. This reduces the storage overhead which is precious for users of UBIFS (ie. embedded devices).”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhj…h²hubj€)”}”(hXë +---------------+ | Master Node | | (hash) | +---------------+ | v +-------------------+ | Index Node #1 | | | | branch0 branchn | | (hash) (hash) | +-------------------+ | ... | (fanout: 8) | | +-------+ +------+ | | v v +-------------------+ +-------------------+ | Index Node #2 | | Index Node #3 | | | | | | branch0 branchn | | branch0 branchn | | (hash) (hash) | | (hash) (hash) | +-------------------+ +-------------------+ | ... | ... | v v v +-----------+ +----------+ +-----------+ | Data Node | | INO Node | | DENT Node | +-----------+ +----------+ +-----------+ Figure 3: Coverage areas of index node hash and master node HMAC”h]”hXë +---------------+ | Master Node | | (hash) | +---------------+ | v +-------------------+ | Index Node #1 | | | | branch0 branchn | | (hash) (hash) | +-------------------+ | ... | (fanout: 8) | | +-------+ +------+ | | v v +-------------------+ +-------------------+ | Index Node #2 | | Index Node #3 | | | | | | branch0 branchn | | branch0 branchn | | (hash) (hash) | | (hash) (hash) | +-------------------+ +-------------------+ | ... | ... | v v v +-----------+ +----------+ +-----------+ | Data Node | | INO Node | | DENT Node | +-----------+ +----------+ +-----------+ Figure 3: Coverage areas of index node hash and master node HMAC”…””}”hjÀsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´Mhj…h²hubj)”}”(hX¤The most important part for robustness and power-cut safety is to atomically persist the hash and file contents. Here the existing UBIFS logic for how changed nodes are persisted is already designed for this purpose such that UBIFS can safely recover if a power-cut occurs while persisting. Adding hashes to index nodes does not change this since each hash will be persisted atomically together with its respective node.”h]”hX¤The most important part for robustness and power-cut safety is to atomically persist the hash and file contents. Here the existing UBIFS logic for how changed nodes are persisted is already designed for this purpose such that UBIFS can safely recover if a power-cut occurs while persisting. Adding hashes to index nodes does not change this since each hash will be persisted atomically together with its respective node.”…””}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M;hj…h²hubeh}”(h]”Œindex-authentication”ah ]”h"]”Œindex authentication”ah$]”h&]”uh1hòhjh²hh³hÇh´Kÿubhó)”}”(hhh]”(hø)”}”(hŒJournal Authentication”h]”hŒJournal Authentication”…””}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjäh²hh³hÇh´MDubj)”}”(hXþThe journal is authenticated too. Since the journal is continuously written it is necessary to also add authentication information frequently to the journal so that in case of a powercut not too much data can't be authenticated. This is done by creating a continuous hash beginning from the commit start node over the previous reference nodes, the current reference node, and the bud nodes. From time to time whenever it is suitable authentication nodes are added between the bud nodes. This new node type contains a HMAC over the current state of the hash chain. That way a journal can be authenticated up to the last authentication node. The tail of the journal which may not have a authentication node cannot be authenticated and is skipped during journal replay.”h]”hXThe journal is authenticated too. Since the journal is continuously written it is necessary to also add authentication information frequently to the journal so that in case of a powercut not too much data can’t be authenticated. This is done by creating a continuous hash beginning from the commit start node over the previous reference nodes, the current reference node, and the bud nodes. From time to time whenever it is suitable authentication nodes are added between the bud nodes. This new node type contains a HMAC over the current state of the hash chain. That way a journal can be authenticated up to the last authentication node. The tail of the journal which may not have a authentication node cannot be authenticated and is skipped during journal replay.”…””}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MFhjäh²hubj)”}”(hŒ0We get this picture for journal authentication::”h]”hŒ/We get this picture for journal authentication:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MQhjäh²hubj€)”}”(hX3,,,,,,,, ,......,........................................... ,. CS , hash1.----. hash2.----. ,. | , . |hmac . |hmac ,. v , . v . v ,.REF#0,-> bud -> bud -> bud.-> auth -> bud -> bud.-> auth ... ,..|...,........................................... , | , , | ,,,,,,,,,,,,,,, . | hash3,----. , | , |hmac , v , v , REF#1 -> bud -> bud,-> auth ... ,,,|,,,,,,,,,,,,,,,,,, v REF#2 -> ... | V ...”h]”hX3,,,,,,,, ,......,........................................... ,. CS , hash1.----. hash2.----. ,. | , . |hmac . |hmac ,. v , . v . v ,.REF#0,-> bud -> bud -> bud.-> auth -> bud -> bud.-> auth ... ,..|...,........................................... , | , , | ,,,,,,,,,,,,,,, . | hash3,----. , | , |hmac , v , v , REF#1 -> bud -> bud,-> auth ... ,,,|,,,,,,,,,,,,,,,,,, v REF#2 -> ... | V ...”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´MShjäh²hubj)”}”(hXSince the hash also includes the reference nodes an attacker cannot reorder or skip any journal heads for replay. An attacker can only remove bud nodes or reference nodes from the end of the journal, effectively rewinding the filesystem at maximum back to the last commit.”h]”hXSince the hash also includes the reference nodes an attacker cannot reorder or skip any journal heads for replay. An attacker can only remove bud nodes or reference nodes from the end of the journal, effectively rewinding the filesystem at maximum back to the last commit.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mghjäh²hubj)”}”(hXThe location of the log area is stored in the master node. Since the master node is authenticated with a HMAC as described above, it is not possible to tamper with that without detection. The size of the log area is specified when the filesystem is created using `mkfs.ubifs` and stored in the superblock node. To avoid tampering with this and other values stored there, a HMAC is added to the superblock struct. The superblock node is stored in LEB 0 and is only modified on feature flag or similar changes, but never on file changes.”h]”(hXThe location of the log area is stored in the master node. Since the master node is authenticated with a HMAC as described above, it is not possible to tamper with that without detection. The size of the log area is specified when the filesystem is created using ”…””}”(hj-h²hh³Nh´NubhŒtitle_reference”“”)”}”(hŒ `mkfs.ubifs`”h]”hŒ mkfs.ubifs”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hj-ubhX and stored in the superblock node. To avoid tampering with this and other values stored there, a HMAC is added to the superblock struct. The superblock node is stored in LEB 0 and is only modified on feature flag or similar changes, but never on file changes.”…””}”(hj-h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mlhjäh²hubeh}”(h]”Œjournal-authentication”ah ]”h"]”Œjournal authentication”ah$]”h&]”uh1hòhjh²hh³hÇh´MDubhó)”}”(hhh]”(hø)”}”(hŒLPT Authentication”h]”hŒLPT Authentication”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjWh²hh³hÇh´Mvubj)”}”(hXThe location of the LPT root node on the flash is stored in the UBIFS master node. Since the LPT is written and read atomically on every commit, there is no need to authenticate individual nodes of the tree. It suffices to protect the integrity of the full LPT by a simple hash stored in the master node. Since the master node itself is authenticated, the LPTs authenticity can be verified by verifying the authenticity of the master node and comparing the LTP hash stored there with the hash computed from the read on-flash LPT.”h]”hXThe location of the LPT root node on the flash is stored in the UBIFS master node. Since the LPT is written and read atomically on every commit, there is no need to authenticate individual nodes of the tree. It suffices to protect the integrity of the full LPT by a simple hash stored in the master node. Since the master node itself is authenticated, the LPTs authenticity can be verified by verifying the authenticity of the master node and comparing the LTP hash stored there with the hash computed from the read on-flash LPT.”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MxhjWh²hubeh}”(h]”Œlpt-authentication”ah ]”h"]”Œlpt authentication”ah$]”h&]”uh1hòhjh²hh³hÇh´Mvubeh}”(h]”Œauthentication”ah ]”h"]”Œauthentication”ah$]”h&]”uh1hòhj³h²hh³hÇh´Kòubhó)”}”(hhh]”(hø)”}”(hŒKey Management”h]”hŒKey Management”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj†h²hh³hÇh´M‚ubj)”}”(hXpFor simplicity, UBIFS authentication uses a single key to compute the HMACs of superblock, master, commit start and reference nodes. This key has to be available on creation of the filesystem (`mkfs.ubifs`) to authenticate the superblock node. Further, it has to be available on mount of the filesystem to verify authenticated nodes and generate new HMACs for changes.”h]”(hŒÁFor simplicity, UBIFS authentication uses a single key to compute the HMACs of superblock, master, commit start and reference nodes. This key has to be available on creation of the filesystem (”…””}”(hj—h²hh³Nh´Nubj6)”}”(hŒ `mkfs.ubifs`”h]”hŒ mkfs.ubifs”…””}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hj—ubhŒ£) to authenticate the superblock node. Further, it has to be available on mount of the filesystem to verify authenticated nodes and generate new HMACs for changes.”…””}”(hj—h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M„hj†h²hubj)”}”(hXˆUBIFS authentication is intended to operate side-by-side with UBIFS encryption (fscrypt) to provide confidentiality and authenticity. Since UBIFS encryption has a different approach of encryption policies per directory, there can be multiple fscrypt master keys and there might be folders without encryption. UBIFS authentication on the other hand has an all-or-nothing approach in the sense that it either authenticates everything of the filesystem or nothing. Because of this and because UBIFS authentication should also be usable without encryption, it does not share the same master key with fscrypt, but manages a dedicated authentication key.”h]”hXˆUBIFS authentication is intended to operate side-by-side with UBIFS encryption (fscrypt) to provide confidentiality and authenticity. Since UBIFS encryption has a different approach of encryption policies per directory, there can be multiple fscrypt master keys and there might be folders without encryption. UBIFS authentication on the other hand has an all-or-nothing approach in the sense that it either authenticates everything of the filesystem or nothing. Because of this and because UBIFS authentication should also be usable without encryption, it does not share the same master key with fscrypt, but manages a dedicated authentication key.”…””}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MŠhj†h²hubj)”}”(hXGThe API for providing the authentication key has yet to be defined, but the key can eg. be provided by userspace through a keyring similar to the way it is currently done in fscrypt. It should however be noted that the current fscrypt approach has shown its flaws and the userspace API will eventually change [FSCRYPT-POLICY2].”h]”hXGThe API for providing the authentication key has yet to be defined, but the key can eg. be provided by userspace through a keyring similar to the way it is currently done in fscrypt. It should however be noted that the current fscrypt approach has shown its flaws and the userspace API will eventually change [FSCRYPT-POLICY2].”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M”hj†h²hubj)”}”(hX8Nevertheless, it will be possible for a user to provide a single passphrase or key in userspace that covers UBIFS authentication and encryption. This can be solved by the corresponding userspace tools which derive a second key for authentication in addition to the derived fscrypt master key used for encryption.”h]”hX8Nevertheless, it will be possible for a user to provide a single passphrase or key in userspace that covers UBIFS authentication and encryption. This can be solved by the corresponding userspace tools which derive a second key for authentication in addition to the derived fscrypt master key used for encryption.”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mšhj†h²hubj)”}”(hŒöTo be able to check if the proper key is available on mount, the UBIFS superblock node will additionally store a hash of the authentication key. This approach is similar to the approach proposed for fscrypt encryption policy v2 [FSCRYPT-POLICY2].”h]”hŒöTo be able to check if the proper key is available on mount, the UBIFS superblock node will additionally store a hash of the authentication key. This approach is similar to the approach proposed for fscrypt encryption policy v2 [FSCRYPT-POLICY2].”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M hj†h²hubeh}”(h]”Œkey-management”ah ]”h"]”Œkey management”ah$]”h&]”uh1hòhj³h²hh³hÇh´M‚ubeh}”(h]”Œubifs-authentication”ah ]”h"]”Œubifs authentication”ah$]”h&]”uh1hòhhôh²hh³hÇh´KÏubhó)”}”(hhh]”(hø)”}”(hŒFuture Extensions”h]”hŒFuture Extensions”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hjÿh²hh³hÇh´M§ubj)”}”(hXKIn certain cases where a vendor wants to provide an authenticated filesystem image to customers, it should be possible to do so without sharing the secret UBIFS authentication key. Instead, in addition the each HMAC a digital signature could be stored where the vendor shares the public key alongside the filesystem image. In case this filesystem has to be modified afterwards, UBIFS can exchange all digital signatures with HMACs on first mount similar to the way the IMA/EVM subsystem deals with such situations. The HMAC key will then have to be provided beforehand in the normal way.”h]”hXKIn certain cases where a vendor wants to provide an authenticated filesystem image to customers, it should be possible to do so without sharing the secret UBIFS authentication key. Instead, in addition the each HMAC a digital signature could be stored where the vendor shares the public key alongside the filesystem image. In case this filesystem has to be modified afterwards, UBIFS can exchange all digital signatures with HMACs on first mount similar to the way the IMA/EVM subsystem deals with such situations. The HMAC key will then have to be provided beforehand in the normal way.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M©hjÿh²hubeh}”(h]”Œfuture-extensions”ah ]”h"]”Œfuture extensions”ah$]”h&]”uh1hòhhôh²hh³hÇh´M§ubhó)”}”(hhh]”(hø)”}”(hŒ References”h]”hŒ References”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hj&h²hh³hÇh´M´ubj)”}”(hŒV[CRYPTSETUP2] https://www.saout.de/pipermail/dm-crypt/2017-November/005745.html”h]”(hŒ[CRYPTSETUP2] ”…””}”(hj7h²hh³Nh´NubhŒ reference”“”)”}”(hŒAhttps://www.saout.de/pipermail/dm-crypt/2017-November/005745.html”h]”hŒAhttps://www.saout.de/pipermail/dm-crypt/2017-November/005745.html”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jCuh1j?hj7ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M¶hj&h²hubj)”}”(hŒƒ[DMC-CBC-ATTACK] https://www.jakoblell.com/blog/2013/12/22/practical-malleability-attack-against-cbc-encrypted-luks-partitions/”h]”(hŒ[DMC-CBC-ATTACK] ”…””}”(hjVh²hh³Nh´Nubj@)”}”(hŒnhttps://www.jakoblell.com/blog/2013/12/22/practical-malleability-attack-against-cbc-encrypted-luks-partitions/”h]”hŒnhttps://www.jakoblell.com/blog/2013/12/22/practical-malleability-attack-against-cbc-encrypted-luks-partitions/”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j`uh1j?hjVubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M¸hj&h²hubj)”}”(hŒ\[DM-INTEGRITY] https://www.kernel.org/doc/Documentation/device-mapper/dm-integrity.rst”h]”(hŒ[DM-INTEGRITY] ”…””}”(hjsh²hh³Nh´Nubj@)”}”(hŒGhttps://www.kernel.org/doc/Documentation/device-mapper/dm-integrity.rst”h]”hŒGhttps://www.kernel.org/doc/Documentation/device-mapper/dm-integrity.rst”…””}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j}uh1j?hjsubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mºhj&h²hubj)”}”(hŒV[DM-VERITY] https://www.kernel.org/doc/Documentation/device-mapper/verity.rst”h]”(hŒ[DM-VERITY] ”…””}”(hjh²hh³Nh´Nubj@)”}”(hŒAhttps://www.kernel.org/doc/Documentation/device-mapper/verity.rst”h]”hŒAhttps://www.kernel.org/doc/Documentation/device-mapper/verity.rst”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jšuh1j?hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M¼hj&h²hubj)”}”(hŒ[[FSCRYPT-POLICY2] https://lore.kernel.org/r/20171023214058.128121-1-ebiggers3@gmail.com/”h]”(hŒ[FSCRYPT-POLICY2] ”…””}”(hj­h²hh³Nh´Nubj@)”}”(hŒFhttps://lore.kernel.org/r/20171023214058.128121-1-ebiggers3@gmail.com/”h]”hŒFhttps://lore.kernel.org/r/20171023214058.128121-1-ebiggers3@gmail.com/”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j·uh1j?hj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M¾hj&h²hubj)”}”(hŒP[UBIFS-WP] http://www.linux-mtd.infradead.org/doc/ubifs_whitepaper.pdf”h]”(hŒ[UBIFS-WP] ”…””}”(hjÊh²hh³Nh´Nubj@)”}”(hŒ;http://www.linux-mtd.infradead.org/doc/ubifs_whitepaper.pdf”h]”hŒ;http://www.linux-mtd.infradead.org/doc/ubifs_whitepaper.pdf”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÔuh1j?hjÊubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MÀhj&h²hubeh}”(h]”Œ references”ah ]”h"]”Œ references”ah$]”h&]”uh1hòhhôh²hh³hÇh´M´ubeh}”(h]”Œubifs-authentication-support”ah ]”h"]”Œubifs authentication support”ah$]”h&]”uh1hòhhh²hh³hÇh´K ubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h÷NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œ1”]”jDasŒrefids”}”Œnameids”}”(jôjñj°j­j¨j¥j7j4jjj jj˜jTjüjùjjjƒj€jájÞjTjQj{jxjôjñj#j jìjéuŒ nametypes”}”(jô‰j°‰j¨‰j7‰j‰j ‰j˜ˆjü‰j‰jƒ‰já‰jT‰j{‰jô‰j#‰jì‰uh}”(jñhôj­jj¥jRj4jSjj:jjjNjDjTjrjùj³jjÒj€jjÞj…jQjäjxjWjñj†j jÿjéj&uŒ footnote_refs”}”jZ]”jDasŒ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”jraŒ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”j(Ks…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.