Skip to content

aksdb/cryptml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrypTML

This is a simple (and naive) little project to allow wrapping encrypted HTML into a little decryption wrapper, that will do the decryption client side using browser native decryption capabilities.

Motivation

I sometimes produce markdown documents that I want to share in a rendered form but that contain sensitive information. Most filesharing systems (dropbox, nextcloud, seafile, google drive, etc.) will only allow to download the attached files but not show the HTML as-is. To keep the content "safe" from unintended visitors and not having to trust the server I share it with, I can now encrypt it but still produce a link that can be viewed immediately.

The security of course relies only on the fact that the key is not practically guessable. As soon as the (full) URL leaks, the security is gone.

Build

You need Go 1.17 or later to build this tool.

If you have it, simply run go build . in the checked out repository or go install . to directly put it into your $GOPATH/bin.

Example

  • Create the HTML file you want to share.
  • Call cryptml source/myfile.html target/myfile.html
  • Note the printed key.
  • Upload target/myfile.html to the HTTP server of your choice.
  • Go to your browser and visit: https://<yourserver>/myfile.html#<key> (replacing <key> with the one you noted earlier).

Upload directly to server

Intended use case: the server in question allows uploads via WebDAV and serves the files via default HTTP.

cryptml myfile.html https://user:pass@example.com/dav/myfile.html

If the URL ends with /, the original filename is appended automatically.

About

Simple HTML encryption and client side decryption

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published