Giter Club home page Giter Club logo

edd-sl-cryptographic-signatures's Introduction

EDD SL Cryptographic Signatures Build Status

This WordPress plugin is an extension for the Easy Digital Downloads plugin, and integrates with its Software Licenses extension to provide cryptographic signatures for download packages.

Purpose

In order to use this plugin, you should understand the basics of digital signatures. Cryptographic signatures are not produced via hash functions, but by digitally signing a package with a private key. A digital signature ensures both integrity and authenticity. When a package is verified using a digital signature and the public key, it proves that the package's contents are exactly what the owner of the private key intended.

Why is this important?

Say that one day, your EDD site was hacked. The attacker could put out new updates for all of your downloads, and by including a backdoor in the packages, he could compromise all of the sites running your downloads. In other words, every site that installs your downloads is only as secure as your own site and update infrastructure. If your site, or the network connection between sites, is compromised, then the other site is placed at risk.

But it doesn't have to be this way. You can ensure that the security of your site doesn't affect the sites of those who install your downloads. You can protect against infrastructure attacks by digitally signing your packages. Then, you can include code in your downloads to verify an update package with the signature and public key before installing it. If things don't match up, then the package did not come from you—it wasn't signed by your private key. And in that case, your download can refuse to install the update.

Now if an attacker compromises your site, any package updates they put out won't be installed by the sites running your downloads. The attacker won't have your private key, and so won't be able to provide valid signatures for the packages.

Now you can have peace of mind!

You just need to make sure that you always sign your packages offline; never ever upload the private key to your server, or else a hacker would be able to get it, defeating the purpose.

Set Up

So the steps to use this plugin are:

  1. Generate a private/public key pair using Ed25519. One easy way to do this is using Minisign:

    $ minisign -G
    
  2. Add code to verify update packages to the update code for your downloads, and include your public key. (You can utilize sodium_compat to help with this; see WordPoints/wordpoints@266ee29 for a rough example.)

  3. Use your private key to digitally sign your packages for future updates (a helper script is provided for this purpose):

    $ bin/sign-package.sh my-download.zip
    

    ...and supply the signatures to the update API using this plugin (see below).

Screenshots

You can enter the signature for each file in the Download Files meta box:

screenshot-2017-11-7 edit download wordpress develop wordpress

Then, the signature for the download package is included in the API response:

src wordpress-develop dev_edd_action get_version item_id 317_-_2017-11-07_15 18 15

This also works when beta versions are enabled: the ed25519_signature key will be the signature of the beta package.

edd-sl-cryptographic-signatures's People

Contributors

jdgrimes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

kapyshonchik

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.