File System
Finally, I released a console tools for working with files service.
In a server (service node) the file are stored in generated shadownames. The shadownames are generated on client, and they look like this: zxce.12 .Directories and real filenames are stored on client in separate config files (~/.privateness/keys/files.json and directories.json). All manipulations with directories and filenames are made on client. Shadownames also used in all command line parameters.
All communications with files between client and server are made by file ID . File ID is generated on server using filename hash and user’s signature.
File get’s optionaly encrypted on client side. All keys are generated in client, separate key for each file.
Files.json example:
“lpto.87”: {
“cipher”: “k\\zE@EC-):>\”#2/w`->2gy>+-’]5elbi”,
“cipher-type”: “salsa20”,
“directory”: 2,
“filename”: “ionskico_omega.sql”,
“filepath”: “/home/user/Videos/ionskico_omega.sql”,
“size”: 4653663,
“status”: “n”
},
directories.json example:
“directories”: {
“http://node-xxx.net": {
“0”: {
“name”: “”,
“parent_id”: 0
},
“1”: {
“parent_id”: 0,
“name”: “old”
},
“2”: {
“parent_id”: 1,
“name”: “123456789”
},
“3”: {
“parent_id”: 0,
“name”: “new”
},
“4”: {
“parent_id”: 5,
“name”: “qwerty”
},
“5”: {
“parent_id”: 0,
“name”: “555”
},
“6”: {
“parent_id”: 4,
“name”: “pub”
}
}
},
“current”: {
“http://node-xxx.net”: 6
}