nbdkit-xor-filter(1)
π nbdkit-xor-filter β obfuscate contents of a plugin with XOR π
okay bestie, sit DOWN, because we're talking about nbdkit-xor-filter(1), part of the nbdkit manual. this little cutie is a filter that scrambles your plugin's data with XOR and honestly? it's giving β¨maskedβ¨.
π NAME π
nbdkit-xor-filter β obfuscate contents of a plugin with XOR π
β¨ SYNOPSIS β¨
nbdkit --filter=xor [PLUGIN ARGS ...] xor=VALUE xorlen=LENBYTES
nbdkit --filter=xor [PLUGIN ARGS ...] xor=rand[:SEED]
π DESCRIPTION π
nbdkit-xor-filter is a filter for nbdkit(1) and what it does is XOR (that's exclusive or, the iconic bitwise bestie) a value across all of the data in the underlying plugin. so every single byte gets the treatment. no cap.
what's it for? two things, lowkey:
- obfuscating the contents of a plugin π
- being a trivial, insecure, but fast type of encryption
and if you want proper encryption, do NOT come to this filter's party β go see nbdkit-luks-filter(1) instead, she's the real one π
this filter has two modes, and you gotta pick one:
mode 1: fixed repeating pattern β you XOR with a value that repeats over and over:
nbdkit file disk.img --filter=xor xor=0xDEADBEEF xorlen=4
mode 2: PRNG vibes β you XOR with the output of a pseudo-random number generator (PRNG), and you can optionally hand it a seed, using xor=rand[:SEED]. the result is more obfuscated π and in this mode, xorlen is just... not used. she's off duty.
nbdkit file disk.img --filter=xor xor=rand:1984
π¨ okay important thing, this filter does not currently support sparse plugins. trim operations will fill the backing plugin with XORed zeroes β which makes it super easy to read out the "key". that's yet another reason this is not secure, bestie. it's giving open diary π
π PARAMETERS π
xor=VALUEβ the value that gets XORed with the underlying data. it's either truncated or extended toxorlenbytes, whatever it needs to be. usually you wanna write this in hex using the0xprefix, that's the move π
the value is big endian. for example, xor=0x123456 xorlen=3 will XOR bytes like this:
data: A0 A1 A2 A3 A4 A5 A6
XOR with: 12 34 56 12 34 56 12
ββββββββββββββββββββ
result: B2 95 F4 B1 90 F3 B4
look at that alignment. ate. π₯
xor=randxor=rand:SEEDβ XOR the underlying data with the output of a pseudo-random number generator (PRNG). optionally you can give it a seed for the PRNG (and if you don't, the seed is0, default behaviour, she's chill like that).
the xor parameter is required. no xor, no service π
ββοΈ
xorlen=LENBYTESβ the length of the XOR value, in bytes. any length from 1 to 8 is supported, so that's your range, don't get creative πΈ
this parameter is required when you're using xor=VALUE, and it should not be set for xor=rand. two different girls, two different rules, iykyk.
π¦ FILES π¦
$filterdir/nbdkit-xor-filter.soβ the filter itself. the main character file π
use nbdkit --dump-config to find the location of $filterdir. that's how you find her house π
β VERSION β
nbdkit-xor-filter first appeared in nbdkit 1.48. a legend was born β¨
πΈ SEE ALSO πΈ
nbdkit(1), nbdkit-file-plugin(1), nbdkit-luks-filter(1), nbdkit-map-filter(1), nbdkit-pattern-plugin(1), nbdkit-random-plugin(1), nbdkit-swab-filter(1), nbdkit-filter(3), nbdkit_parse_uint64_t(3).
go read them, bestie, they're all part of the family π«Ά
π AUTHORS π
Richard W.M. Jones β the icon, the moment, the whole entire vibe π
π COPYRIGHT π
Copyright Red Hat
π LICENSE π
redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
and that's the whole page, periodt π
mwah! this was nbdkit 1.48.1, dated 2026-08-29, for the nbdkit-xor-filter(1) manual. stay obfuscated, stay unbothered, and remember: XOR is not encryption, she's just a vibe ππβ¨
π¦ where this page comes from
- fedora 44: nbdkit-basic-filters 1.48.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms