security - Is there a way to reliably delete/wipe a variable (i.e. key/password) in JavaScript? -
Today there is a crypto library for JavaScript and therefore there may be a situation where the password / key / secret / sensitivity A variable in javascript is stored
I do not want to take this risk that this sensitive data has been leaked / disclosed and therefore I want to know that javascript is a powerful way to wipe a variable The way, so About the data Awaskript engine will not balance information? For example, I did not want to trust some GC so data could become sluggish.
An answer can be an example code which kills / omits a variable and also gives an explanation (and if there are differences on what type of javascript implementation browsers / nodes) it relies on Does that data have been deleted?
Otherwise if the job is impossible, then I appreciate the explanation why this is and it also accepts it.
Script Variables for the target webpage user Can not be accessed). The goal is to ensure that the memory of the Javascript engine does not contain copies of the shadow / cache of data, after the required point I want the data to be finished so that any (attacker software) memory related to JavaScript variables Seeing the secret data can be obtained
Javascript trash is collected. Apart from this, no mechanism has been created for destinies resource management. You can do one, but resources must be external.
Even if you get this kind of mechanism (C ++ node in external module), when you get the copy of their memory approved, the engine does not guarantee you a strong guarantee. You must manually assign the same variable parts of the resource data and replace it with junk. This potential works but is not guaranteed at the engine level. This is not a problem that Javascript is implemented well to implement this point. nobody is here . He said - working on the variants of ECMAScript (JS standard) which guarantees you a stronger one is a good first step towards addressing this problem (but no such guarantee yet). I do not even want to start on the browser, where browser extensions can easily get better hooks from you and write A potential solution would be to run the entire program in a VM which uses encrypted RAM, but I am against making my own crypto roll in this way. Generally, an attacker should not have access to your program's RAM in the first place, if they do, they can install a browser extension :) function.prototype.col and hook on each function call In Javascript, there is a lot of powerful AOP capabilities built, in this example worse than that.
Comments
Post a Comment