-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Add encryption #58
Conversation
settings.ini
Outdated
@@ -13,17 +13,17 @@ maxpendingchannels = 5 | |||
|
|||
[bitcoin] | |||
active = true | |||
node = neutrino | |||
network = mainnet | |||
node = btcd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert settings
@@ -19,14 +23,28 @@ const types = { | |||
SOCKET_UNAUTHORIZED_CONNECTION: "UNAUTHORIZED_CONNECTION", | |||
SOCKET_SIGN_MESSAGE_SUCCESS: "SIGN_MESSAGE_SUCCESS", | |||
SOCKET_ADD_INVOICE_REMOTE_RESPONSE: "ADD_INVOICE_REMOTE_RESPONSE", | |||
SOCKET_ADD_INVOICE_ENCRYPTED_REMOTE_RESPONSE: "ADD_INVOICE_ENCRYPTED_REMOTE_RESPONSE", | |||
SOCKET_ADD_INVOICE_REMOTE_REQUEST: "ADD_INVOICE_REMOTE_REQUEST", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate with line 17
invoiceResponse[key] = null; | ||
const id = `${Date.now()}${crypto.randomBytes(5).toString("hex")}`; | ||
|
||
// const defParams = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftoff?
retest this please |
retest this please |
retest this please |
1 similar comment
retest this please |
// timout for saving shared keys - 1 hour | ||
const KEY_SAVE_TIMEOUT = 60 * 60 * 1000; | ||
// local storage for shared keys | ||
// let keyStorage = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something left from dev
const pubkey = ec.keyFromPublic(msg.data.pubkey, "hex"); | ||
// remember shared key for particular id | ||
|
||
// for test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left from testing/dev or necessary part?
break; | ||
} | ||
case types.SOCKET_PUBKEY_RESPONSE: { | ||
logger.debug("Will check auth", invoiceStorage[msg.data.id]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup logger, remove unnecessary, duplicated(for comments too)
Add encryption for socket messages for invoice (compatible for receive from an old version of wallet, but cannot send to an old version of wallet)