Xorchive
Hyperdimensional lockbox
Install / Use
/learn @telamon/XorchiveREADME
pure | mod
code style | standard
xorchive
Hyperdimensional lockbox - Non-enumerable blob storage.
A variant implementation of OFFS technique.
Files stored in this archive white-noise encrypted,
without the key a file cannot be recovered, let alone proven to have been stored.
Each pad in the archive might or might not be part of multiple files.
- Sits ontop of random-access-storage (works in browser + node)
- XOR-pad encrypts contents (default 7 pads)
- Unknown total amount of files
- Unique key for each file
- Uses blake3 to hash pads into keys
<a name="install"></a> Install
yarn add xorchive
<a name="usage"></a> Usage
const raf = require('random-access-file')
const Xorchive = require('xorchive')
const xfs = new Xorchive(raf('myStuff/'), nPads = 7)
let k1 = await xfs.store(readFileSync('~/secret_evidence.md'))
const k2 = await xfs.store(readFileSync('~/README.md'))
// Each key is (32 * nPads) bytes in size
const doc = await xfs.recover(k2)
let k1 = null // secret_evidence.md is now lost forever,
// and there's no proof of it ever having been stored.
API
new Xorchive(storage, nPads = 7, padSize = 128kB, hashSize = 32)
Initialized a new archive.
nPadsnumber of random pads to use for chunk encryption.padSizethe size of a pad. defaults to128 << 10hashSizeblake3 hashSize
store(data)
Encrypts your data as data.length / padSize chunks and
returns a Promise for a key-buffer containing all the hashes of the pads
used during encryption.
dataaccepts Buffer, UInt8Array and Array
recover(key)
Attempts to find all the pads referenced in the key and reconstruct the original data.
returns a Promsie that resolves to your original data if the key is valid.
Donations
_____ _ _ _
| __ \ Help Wanted! | | | | | |
| | | | ___ ___ ___ _ __ | |_| | __ _| |__ ___ ___ ___
| | | |/ _ \/ __/ _ \ '_ \| __| | / _` | '_ \/ __| / __|/ _ \
| |__| | __/ (_| __/ | | | |_| |___| (_| | |_) \__ \_\__ \ __/
|_____/ \___|\___\___|_| |_|\__|______\__,_|_.__/|___(_)___/\___|
If you're reading this it means that the docs are missing or in a bad state.
Writing and maintaining friendly and useful documentation takes
effort and time. In order to do faster releases
I will from now on provide documentation relational to project activity.
__How_to_Help____________________________________.
| |
| - Open an issue if you have ANY questions! :) |
| - Star this repo if you found it interesting |
| - Fork off & help document <3 |
|.________________________________________________|
I publish all of my work as Libre software and will continue to do so,
drop me a penny at Patreon to help fund experiments like these.
Patreon: https://www.patreon.com/decentlabs
Discord: https://discord.gg/K5XjmZx
Telegram: https://t.me/decentlabs_se
<a name="changelog"></a> Changelog
1.2.0
- added API docs
- "fixed" data-length returned by Xorchive#recover() in most cases
1.1.0
- added pad rotatation by oridnal to make the order of pads significant.
- fixed chunked store/recover
1.0.0
- first release
<a name="contribute"></a> Contributing
By making a pull request, you agree to release your modifications under the license stated in the next section.
Only changesets by human contributors will be accepted.
License
GNU AGPLv3 © Tony Ivanov
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
