This a masters research project. This project is an effort to create a better more secure method for data storage.
There are three specific aspects to the project.
- The ledger
- The data front
- The data storage its self.
Server Task List:
-
1. Main system (app.js)
-
2. Communication (network.js)
- 2.1 TCP server
-
3. Ledger handling system (ledger.js)
- 3.1 Data inserting (called from API)
-
4. Data handling (functions.js)
- 4.1 Data storing
- 4.2 Data security
- 4.3 Data Hashing
- 4.4 Data distribution
update nodes list
login to any node to upload Data
send my public key / hash
on insert request take data then break up and encrypt the data using the users private key
https://stackoverflow.com/questions/8750780/encrypting-data-with-public-key-in-node-js var crypto = require("crypto"); var path = require("path"); var fs = require("fs");
var encryptStringWithRsaPublicKey = function(toEncrypt, relativeOrAbsolutePathToPublicKey) { var absolutePath = path.resolve(relativeOrAbsolutePathToPublicKey); var publicKey = fs.readFileSync(absolutePath, "utf8"); var buffer = Buffer.from(toEncrypt); var encrypted = crypto.publicEncrypt(publicKey, buffer); return encrypted.toString("base64"); };
var decryptStringWithRsaPrivateKey = function(toDecrypt, relativeOrAbsolutePathtoPrivateKey) { var absolutePath = path.resolve(relativeOrAbsolutePathtoPrivateKey); var privateKey = fs.readFileSync(absolutePath, "utf8"); var buffer = Buffer.from(toDecrypt, "base64"); var decrypted = crypto.privateDecrypt(privateKey, buffer); return decrypted.toString("utf8"); };
module.exports = { encryptStringWithRsaPublicKey: encryptStringWithRsaPublicKey, decryptStringWithRsaPrivateKey: decryptStringWithRsaPrivateKey }
Distributed not p2p.