Code Monkey home page Code Monkey logo

crypter-file-transfer / crypter Goto Github PK

View Code? Open in Web Editor NEW
37.0 6.0 15.0 19.14 MB

A Blazor WASM web application that offers end-to-end encrypted file and message transfer using Libsodium, Entity Framework, Hangfire, Docker, NUnit, and Mailkit.

Home Page: https://www.crypter.dev

License: GNU Affero General Public License v3.0

C# 91.03% HTML 7.66% CSS 0.71% SCSS 0.24% JavaScript 0.12% Shell 0.11% Dockerfile 0.13%
blazor cryptography file-sharing messaging privacy wasm

crypter's Introduction

Crypter

Licensing

Crypter is open-source software with a dual license.

Personal and Non-Commercial Use

For free, non-commercial use, Crypter is licensed under the AGPLv3.

A copy of the AGLPv3 is provided in LICENSE.md.

Commercial Use

Contact the current copyright holder in order to purchase a commercial license.

Email: [email protected]

Getting Started

Check out these documents to get started working on Crypter:

Also take a look at some of the articles that have come in handy while working on the project:

If you have any questions, please add an issue or send an email to [email protected]. I would love to hear from you.

Projects

Crypter.API

A RESTful API written using ASP.NET.

Crypter.Benchmarks

A sandbox for benchmarking various things.

Crypter.Common

A small class library containing domain models and data types that may be used in any project.

Crypter.Common.Client

A class library containing various interfaces and most of their implementations for use in client applications.

The "Repository" interfaces must be implemented per-environment, since these implementations must decide where and how to store data on the client device. These decisions and locations are device-specific. For example, storing data in a browser is likely to be different than storing data on a mobile phone.

Crypter.Core

All back-end business logic.

Crypter.Crypto.Common

A class library containing interfaces and portable implementations of various cryptographic primitives.

Crypter.Crypto.Providers.Browser

An implementation of the Crypter.Crypto.Common interfaces for use in browsers. This uses libsodium through the BlazorSodium nuget package.

Crypter.Crypto.Providers.Default

An implementation of the Crypter.Crypto.Common interfaces for use in non-browser platforms. This uses libsodium through the Geralt nuget package, as well as System.Security.Cryptography for random number generation.

Crypter.DataAccess

A class library containing code to interact with the PostgreSQL database.

Crypter.Test

A project containing NUnit unit tests.

Crypter.Web

A web application written using ASP.NET Blazor web-assembly.

Acknowledgements

Thank you to the following people and organizations for helping make this project possible:

And special thanks to the C# and Web Dev Buddies Discord servers for answering all my questions and providing motivation to continue working on this project.

crypter's People

Contributors

jack-edwards avatar saescalante avatar spetersluciani avatar jakubstankowski avatar tacosontitan avatar monocle avatar nnowakowski avatar rkj43 avatar shawncologist avatar aarondunn21 avatar danielharder avatar

Stargazers

Hassan Najm avatar  avatar Daniel Nutu avatar Daniel avatar Seonghyun Park avatar Frank Denis avatar Jesus Pacheco avatar  avatar AD avatar Vu Nguyen avatar  avatar  avatar hitchhiker avatar  avatar Daniel avatar Rui Sousa  avatar  avatar Ganeshan Venkataraman avatar Andy | ZephrFish avatar  avatar Eugene Bekker avatar  avatar Tim Kersey avatar  avatar  avatar Jamie Walters avatar ¡Támb! avatar  avatar  avatar  avatar Brahim Afassy avatar Flo avatar Airic avatar  avatar アキラ avatar  avatar Tobias Bartsch avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crypter's Issues

Refresh `About` page

The About page in Crypter.Web is out-of-date. The way we handle encryption and decryption has slightly changed since the page was first created.

Take another pass at the contents of the About page.

Investigate and potentially implement `SubtleCrypto` in the web client

Blazor WASM runs everything on the UI thread. This is fine for many things, but offers a horrible experience when we start doing some of the heavy cryptographic stuff. Creating asymmetric keys and encrypting large files can take forever. It also forces us to use smaller, less-secure asymmetric keys just to get by.

Investigate SubtleCrypto which should be available in every modern browser and will allow us to run our cryptographic functions asynchronously.

[Bug] Rename "Public Name" in user search to "Alias"

Describe the bug
The two options shown while performing a user search are "Search by username" and "Search by public name". "public name" is not the correct terminology.

Expected behavior
The option should use "Alias" instead of "public name".

Make HTTP requests in `Crypter.Web` more consistent

The Crypter.Web project is using a mix of "DIY" HTTP requests and requests using the HttpService. Every request should go through the HttpService.

If something about the HttpService is not working properly, fix it.

For example, Crypter.API will often return a non-200 response in case an error occurs or a user submits some bad data. The HttpService throws an exception in these scenarios; eating the HTTP response body as a result. The response body of those requests contain valuable information that Crypter.Web needs. Need to figure out a better way.

Marking this as a bug due to the issue mentioned above.

Stop logging in to database as 'root'

Crypter.API and Crypter.Tasks are currently logging in to the production database as 'root'.

Create a new user with least privilege. Use this new user with our apps.

Message expiration date appears as the creation date

When a user views the page to decrypt a message, the Creation and Expiration times shown in the preview area are exactly the same.

The Expiration time should not match the Creation time. The Expiration time should be exactly 24 hours after the Creation time.

[Feature] Add beta keys using Crypter.Console

The current method to insert a new Beta Key into the database is to manually login to the MySQL database and run a SQL query. This opens the door for user error.

It would be better if Crypter.Console had a command which allowed the user to insert a new Beta Key of their choosing.

User registration should confirm a user's password

We only require the user to enter their password once during sign up. Since we do not currently support password resets, we should definitely make sure users provide the correct password when they create an account.

The sign up component should require a user to enter t heir password twice. Do not allow the user to register if the two passwords do not match.

Implement server pre-rendering

To reduce the initial loading time of the web client and thus improve the UX, we should implement server-side pre-rendering of the web client.

This will change the web app's hosting model.

Refresh `Privacy Policy`

Visitors can sign up and login. We should refresh our privacy policy to indicate what data we collect and how it's used.

Switch to ECC

Switch from RSA to ECC, in hopes that key generation will be much quicker.

File upload fails for files without a known MIME type

A user received an empty GUID when attempting to upload a file named DEBOUT.500. This is because the front-end cannot determine the content type for the file.

The internet suggests using "application/unknown" in this case.

[Feature] Implement refresh tokens

Add a "Remember Me" option to the login component. Ticking this option on login will store a 'refresh' token in browser local storage, as well as a copy of the token in the database. When a regular auth token expires, the user can get a new auth token using their refresh token.

Standardize modal components

We have a few different modal components that could probably all be standardized. I.e., share the same component.

Minimize the number of modal components. Standardize the UI for remaining modals (center-text, justified, etc).

Improve the UX when a user creates their key-pair

Users are prompted to create their key-pair when they first log in. The UX is not great:

  • Clicking the "OK" button doesn't always appear to work.
  • There is no UI to indicate the page is doing work.

Implement a spinner and show some text that says, "Creating your asymmetric key-pair".

Convert `Crypter.Tasks` to console app

Crypter.Tasks is currently written as an ASP.net project. We should convert this to a console application.

Keep in mind, we may want to run additional tasks down the road. We may not want to run these new tasks at the same interval as our current tasks. Therefore, if we choose to run this console application as a cron job, the application will need to accept arguments.

Otherwise, we can configure the intervals within the console application itself. The application would always be running in the background.

Automatically close navigation menu after making a selection

In the mobile resolution of the web app, the navigation bar remains expanded after the user has made a selection (Sign Up or Login, for example). The navigation menu should automatically close whenever the user clicks an option inside the menu.

Revise privacy settings

Who can see my profile:

  • Users in my contact list
  • Registered users
  • Everyone

Who can send me messages:

  • Users in my contact list
  • Registered users
  • Everyone

Who can send me files:

  • Users in my contact list
  • Registered users
  • Everyone

[Feature] Delete users using Crypter.Console

With user data being stored across multiple tables, completely removing a user from the database would be a chore and prone to error if done manually.

Add a command to Crypter.Console to make the deletion of users easier. The command should either accept a Guid or a Username.

Example:
.\Crypter.Console -d User -u Mordeo
.\Crypter.Console -d User -i {guid}

In these examples I've overloaded the -d flag to accept a type of thing.

So we would also need to modify the existing command that deletes expired transfers. Perhaps:
.\Crypter.Console -d Transfer -e
Where -e indicates expired. This should also take -i {guid}

[Bug] Password hashing only consists of a single round

Describe the bug
Crypter.API only performs a single round of hashing when hashing passwords. This is highly insecure.

Expected behavior
Tens of thousands or even a hundred thousand rounds of hashing should occur. As many rounds as reasonable, without degrading server performance.

Decrypt URL for something that does not exist always states the item is for someone specific

Navigating to a decryption URL for an item that does not exist will tell the visitor that the item they are viewing is intended for a specific recipient.

This message should be updated to include all the reasons why an item cannot be previewed:

  • The item does not exist
  • The item has already been deleted

We should not include "the item is intended for someone in particular" here. In the future, I intend to have separate URLs for items that were uploaded for no one in particular, versus sent to a specific person.

Users still appear logged in even though their token is expired

Our authentication tokens are only valid for 24 hours. The web app does not detect that a user's token has expired when the user navigates back to the app after being away for a while.

When a user navigates back to the app, we should check to see whether their token is still valid. If the token is invalid or expired, log the user out of the web app.

Upgrade to .NET 5

Microsoft is no longer updating Blazor WASM in .NET Core 3.1.

Upgrade all the .NET Core projects to .NET 5.

Do not link items sent to other users

If Alice has sent a message to Bob, that message will appear in Alice's "sent" items. However, this message does not belong to Alice. The message belongs to Bob. Only Bob may decrypt the message.

Do not provide users with a link to their "sent" items if those items were sent to someone in particular.

[Bug] Crypter.Core UserProfileService is missing Insert capability

Describe the bug
Users are only able to update their profile information. There isn't any code which allows users to insert profile information for the first time.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new user
  2. Attempt to set either an "Alias" or "About"
  3. Save
  4. See error

Expected behavior
Users should be able to set and save their profile information

Create a private database server using Docker

At the moment, all of our services are running on a single server. Those services are Web, Database, and Application (Crypter.Console).

Prior to moving forward with adding an email service, which may end up on a server of it's own, we should move the database service to a separate server. This new server should not be publicly accessible. I.e., all incoming connections are closed, unless those requests are coming from another Crypter server.

Reconfigure the apps running on the web server to use this new database server after it gets setup and the data is migrated.

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.