Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Decrypts encrypted files on the fly using WebCrypto in a Service Worker

License

NotificationsYou must be signed in to change notification settings

wiktor-k/sw-crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decrypts AES-GCM encrypted files using keys embedded in URL fragments.

This kind of URLs is generated byConversations when uploading filesin encrypted chat sessions.

Putting this Service Worker on HTTP Upload host allows users to open encryptedfiles in their browsers without transmitting encryption keys.

Running

Start a server:

python -m SimpleHTTPServer

Go to root page:

http://localhost:8000

This will register Service Worker and allow decrypting files, such as this one:

http://localhost:8000/leaf-veins.jpg#492fc2ba53dd27a4f4a6a250310609f0c6c82267073eb9967390796a2d770e0a89d3f95c650d1f533e60b7e51a96cacf

Installing Service Worker

Service worker is installed only on explicit call from JavaScript or when a Link header is inserted in response headers:

Link: </worker.js>; rel="serviceworker"; scope="/"

To check this version use:

python server.py

Unfortunately the initial request will not be processed by the Worker so the first file will not be decrypted.

SeeA header-based SW installation for more details.

About

Decrypts encrypted files on the fly using WebCrypto in a Service Worker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp