Skip to main content

GPG middleware for EH Forwarder Bot, encrypts and decrypts messages.

Project description

Module ID: blueset.gpg

A middleware for EH Forwarder Bot that encrypts and decrypts messages using GnuPG.

This middleware simply encrypts outgoing messages with recipients’ registered public key, and decrypt incoming messages with your own secret key.

All encrypted messages should be and will be ASCII armored. All messages that was not successfully encrypted/decrypted will be delivered untouched.

This middleware only encrypt/decrypt text messages. Other types of messages are kept untouched.

Dependencies

  • EH Forwarder Bot >=2.0

  • GnuPG

  • An imported key pair that is used to decrypt incoming messages

Getting Started

  1. Make sure you have access to a public key server of your choice with the gpg installed.

  2. Have at least one key pair registered in local GPG.

  3. Install this middleware:

    pip3 install efb-gpg-middleware
  4. Create a config file in your current EFB profile: <PATH_TO_EFB_PROFILE>/blueset.gpg/config.yaml:

    # Signature of your own key pair (required)
    key: BD6B65EC00638DC9083781D5D4B65BB1A106200A
    
    # Passphrase to the key pair (optional)
    password: test
    
    # Trust all key in the local stoage
    # (optional, default: true)
    always_trust: true
    
    # Path to the GPG binary
    # (optional, default: search from $PATH)
    binary: /usr/bin/gpg
    
    # Preferred public key server
    # (optional, default: pgp.mit.edu)
    server: pgp.mit.edu

How to use

Send commands as text messages in chats to interact with the middleware. All command messages will not be delivered to slave channel.

  • gpg`info: Show the key fingerprint used for this chat.

  • gpg`search query: Search for a key from the key server.

  • gpg`bind fingerprinthex: Use key for specified fingerprint for a chat.

  • gpg`clear: Do not encrypt messages sent to this chat.

When you have told the middleware to use a key for a chat, it will encrypt all your text messages sent to this chat with the key specified.

The middleware will try to decrypt all incoming text messages with GnuPG regardless of settings, and only update the message if the decryption is successful.

Footnote

If you find this module not as useful, don’t laugh. This is just a demo that shows you one type of things you can do with EFB Middleware.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

efb-gpg-middleware-1.0.0.post0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

efb_gpg_middleware-1.0.0.post0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file efb-gpg-middleware-1.0.0.post0.tar.gz.

File metadata

File hashes

Hashes for efb-gpg-middleware-1.0.0.post0.tar.gz
Algorithm Hash digest
SHA256 2ec563dfd66ce6f08b75525d516ae1c6a6629c0e6d81309b3f6a8ef8740de4a4
MD5 be864ccb5a728e50990f9b0c9257df09
BLAKE2b-256 ad0cfff89d237eb3c1c8a751a4f336b11d9bdea628f109ffffe503d8591c78f8

See more details on using hashes here.

File details

Details for the file efb_gpg_middleware-1.0.0.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for efb_gpg_middleware-1.0.0.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0a9c00445d68cfc58ecc476cdd6885864f3570bbe5f2d6f2ae7ee0de62e475
MD5 3dddc4ade9610093d3addba99262ff10
BLAKE2b-256 c62dffa34d5e102cf35ddb5cac12a8051c9bbf481aae7aa54d627e36c8c0c7fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page