0.2.20 • Published 4 years ago

archiviation v0.2.20

Weekly downloads
3
License
AGPL-3.0
Repository
github
Last release
4 years ago

Archiviation (work-in-progress)

A way to publish text with GitHub Pages without allowing everyone to read.

Note: This software does not have a stable version yet.

Explain Like You Are A Developer

Archiviation encrypts your text files with AES. The AES key is derived from the master key and the filename. The master key is automatically generated during initialization.

A file can be accessed online with a URL like https://username.github.io/?key=${__AES_KEY__}&file=${__FILE_NAME__}, after you push the repository to GitHub Pages (or any other web server). The identifier consists of the 64-character-long AES encryption key and the filename hash. The page will load the file with XMLHttpRequest from https://username.github.io/db/${__FILE_NAME__}. So you do not have to worry about the sensitivity of file names; the URL itself cannot be used to infer the filename.

__AES_KEY__ is generated by:

var key = crypto.createHash('sha256').update(config.masterKey + 'd46fb93ff24448b4a04ee3115cf5147d|9cfbf34fc443455baf19c27f692ecc76|' + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(0, 22);
return key;

__FILE_NAME__ is generated by:

var masterSalt = crypto.createHash('sha256').update(config.masterKey.slice(0, 32)).digest('base64');
var filename = crypto.createHash('sha256').update('d46fb93ff24448b4a04ee3115cf5147d|9cfbf34fc443455baf19c27f692ecc77|' + masterSalt + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(0, 28);
filename += '_' + crypto.createHash('sha256').update('48b4a04ee3115c' + masterSalt.slice(0,5) + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(4, 8);
return filename;

This approach should probably be cryptographically strong enough. Probably!

Use

Dependencies

  • node
  • npm

Installation

Install through NPM:

$ npm install -g archiviation

If NPM is not available:

$ git clone https://github.com/neruthes/archiviation.git
$ cd archiviation
$ npm install .
$ npm link

Initialization

Get inside a directory which you would like to store your project.

$ archiviation init
$ archiviation build
$ cat docs-index.txt

Configuration

All information you are able to configure is in /archiviation-config.json.

Management

You may add plaintext files in /source-articles.

Publishing

You are supposed to git init in /html. And publish to any web server, like GitHub Pages.

Cheatsheet

LINKTO

Create a link to a file. Otherwise, if you add a link in Markdown grammar to a file in the archive, you will need to manually update the link whenever you modify the master key. Modifying the master key will make all previously generated links invalid.

{{LINKTO|File_Name.txt}}

Copyright

© 2018-2020 Neruthes (a.k.a. J.N.)

License: AGPL.

0.2.20

4 years ago

0.2.19

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

5 years ago

0.1.0

5 years ago