Skip to main content

With this repo you can use Enigma Bridge encryption service.

Installation

pip install ebclient

Usage

The following example assumes that you already have access to the encryption server, i.e., you have a valid api key, which in this case is ‘API_TEST’.

Calling processData():

from ebclient.process_data import ProcessData
from ebclient.uo import Configuration, Endpoint, SimpleRetry, UO
from ebclient.crypto_util import *

# Construct general configuration (endpoint, request config)
cfg = Configuration()
cfg.endpoint_process = Endpoint.url('https://site2.enigmabridge.com:11180')
cfg.api_key = 'API_TEST'

# UO you want to work with
uo_aes = UO(uo_id=0xee01,
            uo_type=0x4,
            enc_key=from_hex('e134567890123456789012345678901234567890123456789012345678901234'),
            mac_key=from_hex('e224262820223456789012345678901234567890123456789012345678901234'),
            configuration=cfg)

# ProcessData itself
pd = ProcessData(uo=uo_aes, config=cfg)
result = pd.call(from_hex('6bc1bee22e409f96e93d7e117393172a'))
print(from_hex('95c6bb9b6a1c3835f98cc56087a03e82') == result)

For more usage examples please refer to tests and our API documentation.

Dependencies

pip install pycrypto requests

Or to install to home directory

pip install --user pycrypto requests

If the error ImportError: No module named Crypto is thrown it’s needed to run pip with --upgrade and update pycrypto to the latest version.

Compatibility

We should be compatible with Python 2.6+ and Python 3+.

Troubleshooting

Error in installation of dependencies (cryptography, pyOpenSSL): sorry, but this version only supports 100 named groups [100-named-groups]

Solution: Install downgraded version of pycparser and pyOpenSSL:

pip install pycparser==2.13
pip install pyOpenSSL==0.13
pip install cryptography

You may need to install some deps for the python packages

yum install gcc g++ openssl-devel libffi-devel python-devel

SNI on Python < 2.7.9

TLS SNI support was added to Python. For earlier versions SNI needs to be added to Requests networking library.

pip install urllib3
pip install pyopenssl
pip install ndg-httpsclient
pip install pyasn1

Mac OSX installation

For new OSX versions (El Capitan and above) the default system python installation cannot be modified with standard means. There are some workarounds, but one can also use --user switch for pip.

pip install --user cryptography

Metadata

Release files for ebclient 1.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebclient 1.1.17
File Size Uploaded
ebclient-1.1.17.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ebclient 1.1.17
File Interpreter ABI Platform
ebclient-1.1.17-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 51.9 kB

Release files / ebclient-1.1.17.tar.gz

Download URL ebclient-1.1.17.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
be7844c2444d5f05d731148900605edf7def368e623db5cf85f91d7b888ace2f
BLAKE2b-256 checksum
How to use checksums
335b521d6d3d627fa8413900854e782e834979d73ef20bcc9011f9ec8b627c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / ebclient-1.1.17-py2.py3-none-any.whl

Download URL ebclient-1.1.17-py2.py3-none-any.whl
Size 30.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4fce4702a929c8fdf135850c121ca4b4dd8e0db8ac352791a43aca1fda0c5ca0
BLAKE2b-256 checksum
How to use checksums
fb2af522ed97fb4c825ba661eb438df57c0444e4f108b6367a034c693cfc78e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

1.1.17 This release

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page