Comments (8)
I originally built this as part of html-vault and then pulled this part out of it. The idea is two have a tool that encrypts any message/secret and generates something that can decrypt itself. I see mainly two advantages of the HTML-based solution over others:
- low entry-barrier: everyone has a web browser. everyone with a reasonably modern browser will be able to use the tool, without installing anything. it is also more platform-independent than other solutions.
- self-contained: the generated self-decrypting page contains all the logic it needs to decrypt the encrypted messages it contains. it can be easily stored as a file.
With self-decrypting-html-page
, you can use this functionality anywhere. The example in the readme uses sodium-encryption
as an example, but you can pass any key & nonce you want.
from self-decrypting-html-page.
How it works:
lib/decrypt.js
contains the logic to decrypt the message, using the nonce and the password entered by the user.lib/decrypt.js
gets bundled with all its dependencies and stored indecrypt.js
, using Browserify.- Then, using brfs, the generated bundle will be inserted into another JS file
generate.js
. The version ofself-decrypting-html-page
published to npm already contains it. - When you call
generateHTML
, it will replace placeholders in the HTML (that already contains the code to decrypt) and give the string back to you.
from self-decrypting-html-page.
Can the page only contain an encrypted string? Or could you send a whole styled page in an encrypted format and have the styled page only show up in full after entering a password?
from self-decrypting-html-page.
I mean a page with images, links, css, etc.
from self-decrypting-html-page.
Currently the decrypted message is being shown in a text field. One could modify self-decrypting-html-page
though, so that the message can e.g. be download as another HTML page.
On the other hand, what you suggest has security implications: If your browser downloaded the decrypted HTML automatically, you would store the decrypted message on disk by accident.
from self-decrypting-html-page.
The string is not saved to disk? Cached?
from self-decrypting-html-page.
Right now the string will only be shown in a text field. Try it at https://html-vault.jannisr.de !
from self-decrypting-html-page.
Please reopen if you have any other questions.
from self-decrypting-html-page.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from self-decrypting-html-page.