html-vault – create self-contained HTML for password protected content

栏目: IT技术 · 发布时间: 6年前

内容简介:Create self-contained HTML pages protecting secret information. Usage:Here's anWhen called, the program requires you to enter a password. It will then generate the HTML output file. This may take a moment. Once completed, the generated

html-vault

Create self-contained HTML pages protecting secret information. Usage:

html-vault ~/Document/secret.txt protected.html

Here's an example HTML file (password is "thisisanexample")

When called, the program requires you to enter a password. It will then generate the HTML output file. This may take a moment. Once completed, the generated protected.html file is is a self-contained HTML file with the content of secret.txt embedded in a way that it can only be accessed if the password is known. You might then place this file on a hidden url for later access.

This works by using browser based crypto. A derived password is generated using 20 million rounds of PBKDF2. The secret file content is AES-CBC encrypted using this derived password.

What it can and can't do

  • The generated HTML can of course not detect if it was copied. So you cannot known if your file is in the hands of an attacker. Placing the file on a secret https URL might make this a bit more unlikely but of course cannot prevent it.

  • If the browser or OS used to view the HTML file cannot be trusted, the encryption is useless as the plain password could be logged by a keylogger for later decryption and the password might still be in memory somewhere. This also includes rogue browser extensions with full DOM access.

  • If the password it too weak, bruteforcing the content might still be viable. PBKDF2 somewhat helps and the large number of rounds was chosen to make bruteforcing more difficult.

  • A server-side attacker might modify the HTML and inject code that exfiltrates the entered password. This might be mitigated by inspecting the HTML source code prior to entering the password. The generated HTML is reasonably small to make this easy.

  • It does not authenticate the decrypted content. This would be rather useless anyway as that implies that someone was able to modify the HTML file in which case you might have bigger problems.

  • There have been no reviews yet, but the source code should be (and stay!) easy to understand.

Status

Unreviewed - use with caution. Feedback is welcome.

Requirements

  • Tested with a recent Chrome/Firefox version. Requires SubtleCrypto API.

  • Python2 or Python3 with pyCrypto

License

BSD 2-clause


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

微信民族志、自媒体时代的知识生产与文化实践

微信民族志、自媒体时代的知识生产与文化实践

赵旭东 / 中国社会科学出版社 / 2017-9 / 98.00元

进入二十一世纪以来,随着网络技术的发展,自媒体的悄然登场深度影响着我们的日常生活。中国社会中自媒体通讯方式的普及以及随之而有的一种文化书写的新形式——微信民族志的出现使原有文化秩序中时空意义发生转变的同时,也在重新塑造着以研究异文化为己任的人类学学科自身的成长、转型与发展。在此种情境之下,由中国人民大学人类学研究所、中国人民大学国家发展与战略研究院、中国人民大学社会学理论与方法研究中心、《探索与争......一起来看看 《微信民族志、自媒体时代的知识生产与文化实践》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具