Skip to content

Commit

Permalink
fixed cipher object creation
Browse files Browse the repository at this point in the history
cipher object now created with IV and changed to gcm mode. Encryption
code moved to utils.js
  • Loading branch information
HainaLi committed Jun 26, 2017
1 parent ba6030f commit ef8bc9a
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 285 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
We thank Samuel Hanvron for coming with the name Horcrux and his contributions to the design and implementation (including the instructions below).

This code is a command line research prototype aimed to explore password manager designs and to understand trusted components. It's not for personal use.

# Horcrux Walkthrough

Welcome! This repository is home to Horcrux, a password manager which does not
Expand Down
10 changes: 5 additions & 5 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

var node_path = '/usr/bin/nodejs';
var keystore_size = "11";
var num_table_keys = "3";

//set user dummy passwords
var dummyUsername = "dummyUser";
Expand Down Expand Up @@ -69,7 +70,6 @@

} else {
found = true;
//authKey = data.slice(0, data.length - 1); // remove newline character and store authKey
}
}

Expand Down Expand Up @@ -98,7 +98,7 @@
var configJSON = message['configJSON'];
var master_password = message['master_password'];

var enc = spawn(node_path, ["encrypter.js", configJSON, master_password]);
var enc = spawn(node_path, ["utils.js", "encryptConfig", configJSON, master_password]);

enc.stdout.on('data', function(data) {
console.log('encrypter: ' + data);
Expand All @@ -115,7 +115,7 @@
});

// check for config.json (first action Horcrux does)
var checkConfig = spawn(node_path, ["check-config.js"]);
var checkConfig = spawn(node_path, ["utils.js", "check-config"]);

checkConfig.stdout.on('data', function(data) {
if (data.includes("config.json present: Account ready for login")) {
Expand Down Expand Up @@ -181,7 +181,7 @@
var domain = new URL(url).hostname;

// retrieves the username/email associated with account
var retrieve = spawn(node_path, ["utils.js", "retrieve", authKey, domain, keystore_size]);
var retrieve = spawn(node_path, ["utils.js", "retrieve", authKey, domain, keystore_size, num_table_keys]);
retrieve.stdout.on('data', function(data) {
console.log('retrieve: ' + data);

Expand All @@ -200,7 +200,7 @@
real_username = message; // username input to the panel

// make new password, shares, and storage requests
var storer = spawn(node_path, ["utils.js", "store", authKey, domain, real_username, keystore_size]);
var storer = spawn(node_path, ["utils.js", "store", authKey, domain, real_username, keystore_size, num_table_keys]);
storer.stdout.on('data', function(data) {
console.log('storer: ' + data);

Expand Down
Loading

0 comments on commit ef8bc9a

Please sign in to comment.