Giter Site home page Giter Site logo

sitedata / webclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ctemplar/webclient

0.0 2.0 0.0 87.18 MB

Official Angular webclient for the CTemplar secure (end-to-end encrypted) email service.

Home Page: https://ctemplar.com/

License: Apache License 2.0

TypeScript 45.06% HTML 41.20% CSS 12.88% JavaScript 0.85%

webclient's Introduction

CTemplar

Build Status

Official Angular cross-platform client for the CTemplar secure email service.

Prerequisites

This project was generated with Angular CLI version 1.7.3 and upgraded to 8.3.3.

Installation

npm install

Usage

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Security

CTemplar uses bcrypt.js and OpenPGP.js for hashing and encryption.

Hash Password

CTemplar hashes every password before sending it to server for authentication or sign-up purposes. A unique salt is created from user's Username which is then used to hash the password using bcrypt.hashSync(password, salt) method.

Encryption

CTemplar encrypts and decrypts contents of every email using user's public/private key pair which is generated during sign up process.

  • Public/Private Key pair is generated by openpgp.generateKey method using user's plain password as passphrase.
    const options = {
      userIds: [{ name: username, email: '[email protected]' }],
      numBits: 4096,
      passphrase: password
    };
    openpgp.generateKey(options);
    
  • Mail contents are encrypted by openpgp.encrypt method using receiver's Public Key.
    const options = {
        data: content,
        publicKeys: openpgp.key.readArmored(publicKey).keys
    };
    openpgp.encrypt(options);
    
  • Mail contents are decrypted by openpgp.decrypt method using user's Private Key.
    let decryptedPrivateKey = openpgp.key.readArmored(privateKey).keys[0];
    decryptedPrivateKey.decrypt(passphrase);
    
    const options = {
        message: openpgp.message.readArmored(encryptedContent),
        privateKeys: [decryptedPrivateKey]
    };
    openpgp.decrypt(options);
    

Transparent build code

We host our build code publicly on github and we also provide the details on how to match checksum of code on github and the one we serve on our website. Find the details of build and how to calculate checksum here : https://github.com/CTemplar/webclient/tree/master/dist

Contribution

This project is still in early phase so bug reports via Issues and Pull Requests are welcome.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

License

Apache License 2.0

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.