Convert Figma logo to code with AI

google logoend-to-end

End-To-End is a crypto library to encrypt, decrypt, digital sign, and verify signed messages (implementing OpenPGP)

4,129
299
4,129
20

Top Related Projects

Monorepo hosting the proton web clients

Browser extension for OpenPGP encryption with Webmail

OpenPGP implementation for JavaScript

8,883

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

Quick Overview

Google's End-to-End (E2E) is an open-source Chrome extension that helps users encrypt, decrypt, digital sign, and verify signed messages within the browser using OpenPGP. It aims to make encryption more accessible to everyday users while maintaining a high level of security.

Pros

  • Enhances email privacy and security by providing easy-to-use encryption tools
  • Integrates seamlessly with popular webmail providers like Gmail
  • Open-source, allowing for community review and contributions
  • Developed by Google, leveraging their security expertise

Cons

  • Development has been discontinued since 2019
  • Limited to Chrome browser, reducing accessibility for users of other browsers
  • Requires technical knowledge for proper setup and key management
  • May not be as comprehensive as standalone PGP solutions

Code Examples

As End-to-End is a Chrome extension and not a code library, there are no specific code examples to provide. The project consists of JavaScript, HTML, and CSS files that make up the extension's functionality.

Getting Started

Since End-to-End is a discontinued project and not actively maintained, it's not recommended for current use. However, for educational purposes or historical reference, you can explore the source code on GitHub:

  1. Visit the repository: https://github.com/google/end-to-end
  2. Clone the repository:
    git clone https://github.com/google/end-to-end.git
    
  3. Follow the build instructions in the README file to compile the extension
  4. Load the unpacked extension in Chrome for testing (not recommended for production use)

Note: As this project is no longer maintained, it may contain security vulnerabilities and should not be used in a production environment.

Competitor Comparisons

Monorepo hosting the proton web clients

Pros of WebClients

  • Actively maintained with regular updates and improvements
  • Comprehensive web-based email client with a focus on privacy and security
  • Open-source, allowing for community contributions and audits

Cons of WebClients

  • More complex codebase due to its full-featured nature
  • Steeper learning curve for contributors compared to End-to-end

Code Comparison

WebClients (React-based component):

const MailboxContainer = () => {
  const { messages } = useMessages();
  return (
    <div className="mailbox-container">
      {messages.map((message) => (
        <MessageItem key={message.id} message={message} />
      ))}
    </div>
  );
};

End-to-end (JavaScript encryption function):

function encryptMessage(plaintext, publicKey) {
  const encrypted = openpgp.encrypt({
    message: openpgp.message.fromText(plaintext),
    publicKeys: openpgp.key.readArmored(publicKey).keys
  });
  return encrypted;
}

The code snippets highlight the different focus areas of the projects. WebClients emphasizes building a complete email client interface, while End-to-end concentrates on core encryption functionality.

Browser extension for OpenPGP encryption with Webmail

Pros of Mailvelope

  • Active development with regular updates and maintenance
  • Broader browser support, including Firefox and Chrome
  • User-friendly interface for key management and encryption

Cons of Mailvelope

  • Limited to browser-based email clients
  • Requires manual key management and setup
  • May have performance limitations for large-scale deployments

Code Comparison

End-to-End (JavaScript):

goog.provide('e2e.openpgp.asciiArmor');

e2e.openpgp.asciiArmor.encode = function(type, data) {
  var armoredData = '-----BEGIN PGP ' + type + '-----\r\n\r\n';
  armoredData += e2e.byteArrayToBase64(data);
  armoredData += '\r\n-----END PGP ' + type + '-----\r\n';
  return armoredData;
};

Mailvelope (JavaScript):

export function encode(msg) {
  return openpgp.armor.encode(openpgp.enums.armor.message, msg.packets.write());
}

export function decode(armoredText) {
  return openpgp.armor.decode(armoredText).data;
}

Both projects implement OpenPGP encryption, but End-to-End uses Google Closure Library, while Mailvelope relies on the OpenPGP.js library. Mailvelope's code is more concise and modern, using ES6 modules and the latest OpenPGP.js features. End-to-End's implementation is more verbose and uses older JavaScript conventions.

OpenPGP implementation for JavaScript

Pros of openpgpjs

  • Active development and maintenance, with regular updates and bug fixes
  • Broader compatibility across different browsers and platforms
  • More comprehensive documentation and examples for easier implementation

Cons of openpgpjs

  • Larger file size and potentially slower performance in some scenarios
  • Less focus on integration with specific email providers or services
  • May require more manual configuration for advanced use cases

Code Comparison

end-to-end:

goog.require('e2e.openpgp.asciiArmor');
goog.require('e2e.openpgp.block.factory');

var block = e2e.openpgp.block.factory.parseAsciiArmored(armoredText);

openpgpjs:

import * as openpgp from 'openpgp';

const { readMessage } = await openpgp.readMessage({
  armoredMessage: armoredText
});

Both libraries provide functionality for parsing PGP messages, but openpgpjs offers a more modern and straightforward API. end-to-end uses Google Closure Library conventions, while openpgpjs follows contemporary JavaScript practices with promises and ES6 modules.

8,883

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron

Pros of Keybase

  • More active development with regular updates and contributions
  • Broader feature set including file sharing, team management, and cryptocurrency integration
  • Cross-platform support with desktop and mobile applications

Cons of Keybase

  • Larger codebase and more complex architecture
  • Requires account creation and relies on centralized servers
  • Steeper learning curve for new users due to extensive features

Code Comparison

End-to-end (JavaScript):

e2e.openpgp.asciiArmor.encode = function(input) {
  var output = [];
  for (var i = 0; i < input.length; i += 3) {
    var chunk = input.subarray(i, i + 3);
    output.push(e2e.openpgp.asciiArmor.encodeBlock_(chunk));
  }
  return output.join('');
};

Keybase (Go):

func (s *SecretUI) GetPassphrase(arg keybase1.GetPassphraseArg) (keybase1.GetPassphraseRes, error) {
	return s.cli.GetPassphrase(context.TODO(), arg)
}

The End-to-end code snippet shows a function for ASCII armor encoding, while the Keybase snippet demonstrates a method for retrieving passphrases. End-to-end focuses on core cryptographic operations, whereas Keybase's code reflects its broader feature set and client-server architecture.

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

Pros of privacyidea

  • Open-source and actively maintained, with regular updates and community contributions
  • Comprehensive two-factor authentication system with support for various token types
  • Flexible and scalable, suitable for both small and large organizations

Cons of privacyidea

  • Steeper learning curve and more complex setup compared to End-to-End
  • Requires more server-side infrastructure and maintenance

Code Comparison

End-to-End (JavaScript):

e2e.openpgp.asciiArmor.encode = function(data) {
  var result = [];
  result.push('-----BEGIN PGP MESSAGE-----\r\n\r\n');
  result.push(e2e.openpgp.asciiArmor.encodeLines_(data));
  result.push('\r\n-----END PGP MESSAGE-----\r\n');
  return result.join('');
};

privacyidea (Python):

def encode_challenge(challenge):
    """
    Encode the challenge to base32 format
    """
    return base64.b32encode(challenge).strip('=')

def create_otp_value(key, challenge):
    """
    Create the OTP value using the key and the challenge
    """
    return TOTP(key).generate_otp(challenge)

The code snippets demonstrate different approaches: End-to-End focuses on PGP message encoding, while privacyidea handles OTP generation and challenge encoding for two-factor authentication.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

End-To-End

Travis Build

End-To-End is a crypto library to encrypt, decrypt, digital sign, and verify signed messages (implementing OpenPGP and OTR).

This is the source code for the End-To-End library. It's built upon a newly developed, JavaScript-based crypto library. End-To-End implements the OpenPGP standard, IETF RFC 4880, enabling key generation, encryption, decryption, digital signature, and signature verification.

We're releasing this library to enable community review.

For more background, please see our blog post.

Documentation for the project is stored in our Wiki. If you're planning to contribute to the project, check out our Contributor guide.

A few projects have been built on top of this library, to list a few: