Giter VIP home page Giter VIP logo

chainpad's Introduction

CryptPad

CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data are encrypted, in the eventuality of a breach, attackers have no way of seeing the stored content. Moreover, if the administators don’t alter the code, they and the service also cannot infer any piece of information about the users' content.

Drive screenshot

Suite screenshots

Installation

For development

Our developer guide provides instructions for setting up a local instance without HTTPS or our more advanced security features.

For production

Configuring CryptPad for production requires a little more work, but the process is described in our admin installation guide. From there you can find more information about customization and maintenance.

Current version

The most recent version and all past release notes can be found on the releases page on GitHub.

Setup using Docker

You can find Dockerfile, docker-compose.yml and docker-entrypoint.sh files at the root of this repository. We also publish every release on Docker Hub as AMD64 & ARM64 official images.

Previously, Docker images were community maintained, had their own repository and weren't official supported. We changed that with v5.4.0 during July 2023. Thanks to @promasu for all the work on the community images.

Privacy / Security

CryptPad offers a variety of collaborative tools that encrypt your data in your browser before it is sent to the server and your collaborators. In the event that the server is compromized, the database holds encrypted data that is not of much value to attackers.

The code which performs the encryption is still loaded from the host server like any other web page, so you still need to trust the administrator to keep their server secure and to send you the right code. An expert can download code from the server and check that it isn't doing anything malicious like leaking your encryption keys, which is why this is considered an active attack.

The platform is designed to minimize what data is exposed to its operators. User registration and account access are based on cryptographic keys that are derived from your username and password. Hence, the server never needs to see either, and you don't need to worry about whether they are being stored securely. It is impossible to verify whether a server's operators are logging your IP or other activity, so if you consider this information sensitive it is safest to assume it is being recorded and access your preferred instance via Tor browser.

A correctly configured instance has safeguards to prevent collaborators from doing some nasty things like injecting scripts into collaborative documents or uploads. The project is actively maintained and bugs that our safeguards don't catch tend to get fixed quickly. For this reason it is best to only use instances that are running the most recent version, which is currently on a three-month release cycle. It is difficult for a non-expert to determine whether an instance is otherwise configured correctly, so we are actively working on allowing administrators to opt in to a public directory of servers that meet our strict criteria for safety.

For end users, a guide is provided in our blog to help understanding the security of CryptPad. This blog post also explains and show the best practices when using CryptPad and clarify what end-to-end encryption entails and not.

Translations

CryptPad can be translated with nothing more than a web browser via our Weblate instance. See the state of the translated languages:

More information about this can be found in our translation guide.

Contacting Us

The best places to reach the development team and the community are the CryptPad Forum and the Matrix chat

The team is also on the fediverse: @[email protected]

Team

CryptPad is actively developed by a team at XWiki SAS, a company that has been building Open-Source software since 2004 with contributors from around the world. Between 2015 and 2019 it was funded by a research grant from the French state through BPI France. In the years since we have been funded by NLnet PET, NGI TRUST, NGI DAPSI, subscribers of CryptPad.fr, and donations to our Open-Collective campaign.

Contributing

We love Open Source and we love contribution. Learn more about contributing.

If you have any questions or comments, or if you're interested in contributing to CryptPad, come say hi in our Matrix channel.

This project is tested with BrowserStack.

License

AGPL logo

This software is and will always be available under the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. If you wish to use this technology in a proprietary product, please contact [email protected]

chainpad's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chainpad's Issues

"parentHash is not valid" errors causes browser to cease realtime synchronization

Under some conditions (difficult to reliably reproduce) ChainPad will begin to say messages like:
[fbYnK+Ra4wk=] patch [62b8507e27efd6a4913e06c1dc0bf37bb594896a9a4692f5d1fcebbdee747e77] parentHash is not valid
and then it will cease to synchronize with others in the group.
A likely cause of this is
console.log at the point of failure:

[fbYnK+Ra4wk=]  applying [21e38a70849be79a7592b61b1f552fe799e7955db5ad1a1079c3828abec99ad6]
chainpad.js:568 [fbYnK+Ra4wk=]  applying [5ea83e6051e1a3fba80a3eed78bee36296705fb5d50f4de33d87a7edafd39cdf]
chainpad.js:568 [fbYnK+Ra4wk=]  applying [407169423af4f93e8497b70e39b2250b0442e4e5606eea27691036a902ddb290]
chainpad.js:568 [fbYnK+Ra4wk=]  applying [acac8b28dca3ad2cf67a1b1434cf565ee491c326c0ae8bbabdd56492b05a81b7]
main.js:246 shjson2 !== shjsonrealtimeOptions.onRemote @ main.js:246
chainpad.js:568 [fbYnK+Ra4wk=]  applying [ea838524ffd8a9a6ebfd165dadc1cfc72c6c23c0d1999e38f614001023663b27]
chainpad.js:568 [fbYnK+Ra4wk=]  reverting [ea838524ffd8a9a6ebfd165dadc1cfc72c6c23c0d1999e38f614001023663b27]
chainpad.js:568 [fbYnK+Ra4wk=]  applying [ac37441e85b942fb0f292cabd3dcecf37318b9bfec67ad2fd1d028c8a3cbd8a5]
json-ot.js:37 TypeError: Cannot read property 'offset' of null(…)JsonOT.validate @ json-ot.js:37
json-ot.js:38 Uncaught ReferenceError: e is not definedws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  applying [daaf6eec72952b0413ab69cf0df8baaae847e0bf03923c0f80042bdc5ba83596]
chainpad.js:568 [fbYnK+Ra4wk=]  patch [9ac268f8e4c393e0dafde153de5da62b4a9e850fc69f9b77ee803e609360ece3] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [400c87b6563b9e954b8ab8724db82fadaf154144ac932a76711d2ac73add054f] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [0ce93063ee2bc192eca8687a38545bd92964115f99cbd555655e034d28d230cf] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [729b2216725f9fc97cdd597b3cd6af19a0e70380dfb34aed704bc8b71d36dd4b] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [1cfaa87305f1599e643f6d368f2cc5c82a1868bda9a984f43726ae88b66cd7f5] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [c31729845b317ca3811e82f44b13d3f975570dd8e8ae9ad08edc0c6bb81625d9] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [4706fcaa95d4bd25a633ae42119f7cf395f184abb11326983655fa4a877d9fe0] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [69602533bb881a5a45c359705fcc61ccf7a8820e36ee99467f7f871f72e494c9] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [6beaee739ec4cf7717a1cbfaa422608f073cf66400a94a39c37d382675b7c876] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [863c3ac08c9a7a6abaf7dff63a1fecc1297726b22cad81c768eaa840b8de7b83] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [f5020658f4a88fb490a8770d1d2dafee71cb8acda34a6edade39e4cd874e1039] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [f66cf43eaf813cf2256a7fa0bf07616d6ed3a36216dbfcd3e06cb8b1970c95ba] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [e1139cd9e707451c990d9e50d5a1fd304e707a5e276752f8b29e0341dbe16323] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [165ee629e7e480cb58c7df836015bd4bcb2b6d21c14ce9f12435a5b13078ee24] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [299704d0b3c1414d614f57e5b6983a372c6658d86cafe6d9f28b695bbcc751ee] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [68e3cba05c91c3eaaf389c1d379359b3c8702dc349f36102ca0d164a813a1024] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [9464a452304ed30b05be2cadf1bb493b045f0aa0420148e4fe925fe901e5d924] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [393aa9f1b500664e26a2e989585624f4008b99f0fb43567b3c640d8ae2553d69] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [a7b1900e2a1cf0aba9aed833d6e95aed681dad2d6ae4d1cfabcf10f307b53199] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [2bf2c73084360f9c6b2684ece82adca25943c0d2d6e557e13aedba7046bd63d6] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [0cd36e22cbe450495b9170bc5a932ac53a9da79b76639be1a8ec3f35f068b818] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [73c916ebf90fd56be9795309b35486b8c9b6ccca0c86158e18a918c44928e4b9] parentHash is not valid
chainpad.js:1041 Uncaught Errorws.onmessage @ reconnecting-websocket.js:278
chainpad.js:568 [fbYnK+Ra4wk=]  patch [84832f8688d41800b1a3345569a1834e3d3bc61caae0d5bd8e5f1ecb8ef6cd3b] parentHash is not valid
chainpad.js:1041 Uncaught Error

How do I start chainpad

Hello

Sorry for the noob question. I cloned chainpad to my local, but how can I start and try it.

I already did:

npm install
node make

The testes pass, and what should I do next?

Patch operations for loop issue

https://github.com/xwiki-contrib/chainpad/blob/master/chainpad.dist.js#L960

        for (var i = 0; i < realtime.changeHandlers.length; i++) {
            for (var j = patch.operations.length; j >= 0; j--) {
                var op = patch.operations[j];
                realtime.changeHandlers[i](op.offset, op.toRemove, op.toInsert);
            }
        }

This line:

 for (var j = patch.operations.length; j >= 0; j--) {

should be:

 for (var j = patch.operations.length - 1; j >= 0; j--) {

Otherwise, if you have only one operation, you'd start out at patch.operations[1], which is out of bounds.

sha256 does not convert strings to bytes properly

This is a problem for ever upgrading the sha256 implementation used. As far as I know the actual algorithm is fine but the conversion of strings to bytes silently drops upper codepage characters, doing effectively a string.charCodeAt(i) & 0xff. This was not obvious at first because the sha256 implementation uses an array of integers rather than bytes in order to be faster so the conversion involves some bit-shifting and is not obvious in it's intent.

An actual result of this is there is a possibility for a patch containing UTF to be disguised as one which doesn't, but this is unlikely to happen accidentally and there is no security implication as this sha256 is for integrity only.

Performance

Hey Great Idea!
This is a really interesting take on collaborative editing. I just found this and I have a few questions, that also might be good to include in the readme.

  • What advantages do blockchains offer over OT in this scenario?
  • Why do those advantages out-weigh the time it takes SHA-ing everything (it seems slow)

Thanks!

Reverted backspaces

Calls to pluggable OT function are not providing the correct text input leading to reverted backspaces

Can this be used in a mobile app that could go offline for long periods?

I'd like to build an app that allows a user to edit encrypted journal entries. If they edit an entry on their computer while offline, edit the same entry on their phone while offline, and then both devices go online, I'd like those two entries to be reconciled.

The readme suggests this project can handle delays and race conditions/does some form of reconciliation, but it doesn't seem to be designed for long periods of users being offline. Is that correct? If it's not set up for long periods of being offline, do you have a rough idea how hard it would be to make that work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.