Skip to main content

Python wrapper for the XTT Trust Transit protocol securing IoT network traffic.

Project description

# xtt-python

[![PyPI version](https://badge.fury.io/py/xtt.svg)](https://badge.fury.io/py/xtt)
[![Build Status](https://travis-ci.org/xaptum/xtt-python.svg?branch=master)](https://travis-ci.org/xaptum/xtt-python)

A Python module (`xtt`) that encapsulates the [XTT Trusted
Transit](https://github.com/xaptum/xtt) protocol for securing Internet
of Things (IoT) devices.

## Installation

``` bash
pip install xtt
```

The package is published to PyPI for Python 2.7 and 3.3+ for Linux and
OS X. `pip` installs all dependencies, including `xtt` itself.

## Quick-Start

``` python
import socket
import xtt

# In these examples, we assume the id, certs, and keys needed to run
# an XTT client handshake are available as files.

# Load root certificate, used to authenticate the server
root_id = xtt.CertificateRootId.from_file("root_id.bin")
root_pubkey = xtt.ED25519PublicKey.from_file("root_pub.bin")

# Load the server id
server_id = xtt.Identity.from_file("server_id.bin")

# Load the DAA group information
group_basename = b'BASENAME'
group_gpk = xtt.LRSWGroupPublicKey.from_file("daa_gpk.bin")
group_id = xtt.GroupId(hashlib.sha256(group_gpk.data).digest())
group_cred = xtt.LRSWCredential.from_file("daa_cred.bin")
group_secretkey = xtt.LRSWPrivateKey.from_file("daa_secretkey.bin")
group_ctx = xtt.ClientLRSWGroupContext(group_id, group_secretkey,
group_cred, group_basename)

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
sock.connect(('192.0.2.1', 4443))

xtt_sock = xtt.XTTClientSocket(sock,
version = xtt.Version.ONE,
suite_spec = xtt.SuiteSpec.XTT_X25519_LRSW_ED25519_CHACHA20POLY1305_SHA512,
group_ctx, server_id, root_id, root_pubkey)
xtt_sock.start()
my_identity = xtt_sock.identity
my_public_key = xtt_sock.longterm_public_key
my_private_key = xtt_sock.longterm_private_key
```

## Contributing

Please submit bugs, questions, suggestions, or (ideally) contributions
as issues and pull requests on GitHub.

## License
Copyright 2018 Xaptum, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this work except in compliance with the License. You may obtain a copy of
the License from the LICENSE.txt file or at

[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.


Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

xtt-0.9.2.post2-cp37-cp37m-manylinux1_x86_64.whl (678.2 kB view details)

Uploaded CPython 3.7m

xtt-0.9.2.post2-cp37-cp37m-manylinux1_i686.whl (712.8 kB view details)

Uploaded CPython 3.7m

xtt-0.9.2.post2-cp37-cp37m-macosx_10_9_x86_64.whl (337.3 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

xtt-0.9.2.post2-cp36-cp36m-manylinux1_x86_64.whl (678.2 kB view details)

Uploaded CPython 3.6m

xtt-0.9.2.post2-cp36-cp36m-manylinux1_i686.whl (712.8 kB view details)

Uploaded CPython 3.6m

xtt-0.9.2.post2-cp36-cp36m-macosx_10_9_x86_64.whl (337.3 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

xtt-0.9.2.post2-cp35-cp35m-manylinux1_x86_64.whl (678.2 kB view details)

Uploaded CPython 3.5m

xtt-0.9.2.post2-cp35-cp35m-manylinux1_i686.whl (712.8 kB view details)

Uploaded CPython 3.5m

xtt-0.9.2.post2-cp35-cp35m-macosx_10_6_intel.whl (360.4 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ Intel (x86-64, i386)

xtt-0.9.2.post2-cp34-cp34m-manylinux1_x86_64.whl (678.2 kB view details)

Uploaded CPython 3.4m

xtt-0.9.2.post2-cp34-cp34m-manylinux1_i686.whl (712.8 kB view details)

Uploaded CPython 3.4m

xtt-0.9.2.post2-cp34-cp34m-macosx_10_6_intel.whl (360.4 kB view details)

Uploaded CPython 3.4mmacOS 10.6+ Intel (x86-64, i386)

xtt-0.9.2.post2-cp27-cp27mu-manylinux1_x86_64.whl (681.4 kB view details)

Uploaded CPython 2.7mu

xtt-0.9.2.post2-cp27-cp27mu-manylinux1_i686.whl (716.3 kB view details)

Uploaded CPython 2.7mu

xtt-0.9.2.post2-cp27-cp27m-manylinux1_x86_64.whl (681.4 kB view details)

Uploaded CPython 2.7m

xtt-0.9.2.post2-cp27-cp27m-manylinux1_i686.whl (716.3 kB view details)

Uploaded CPython 2.7m

xtt-0.9.2.post2-cp27-cp27m-macosx_10_9_x86_64.whl (337.2 kB view details)

Uploaded CPython 2.7mmacOS 10.9+ x86-64

File details

Details for the file xtt-0.9.2.post2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 678.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b0705cd87747a3d0adc6dd9fcdd80501841239b1c31dd8e9a26c898a205123f2
MD5 8749792e389fbb414ca360019d3c8e1e
BLAKE2b-256 bc4a2397602fb084a68cfc6dcb1ad2d85172a1484a5a2188641ec3dd2873618c

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 712.8 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 6d2f028aab3832931b23747095f372b4c2426f23e134250d40e7fb79e2ee916a
MD5 d9ff5916050e62064925baedab51ff5f
BLAKE2b-256 92b3c15f331828d17129d00d2d0fcf6028944ee34576f45e597947e7401afeb5

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 337.3 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.9.2.post2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1029c7540581e6efc2adf54b21627f23d1c102817ee50dc88aceb97eba1ac8d7
MD5 737466d0e18a0ef8800ce32c83ec947a
BLAKE2b-256 ea00a02e622701c829f97f914d45a78c47ce9f0205f5e5da6667f0831aede38d

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 678.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2c9647681e39b9a9c4d43b9e9b5bb95ba2b2848801fffaeb8a713748dbdd3521
MD5 266d18567a8a42b0632322e756174159
BLAKE2b-256 e0f0401e0a1f5af8e5ca10e2e1e79c93f22cd3e8e49b702e9779fea1f2e0b69c

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 712.8 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f571a7c2613287a18217caab63b9b849cff6eb2c7d8b9842e81d4899ecef204b
MD5 161074f8d122035060278b29cc46ce18
BLAKE2b-256 4d97c0c88641383dbd66494d5d9f3e6013b35407c2ba2485f6d4bc78d0e4f297

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 337.3 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.9.2.post2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ea0c52f98d4051fc08d45a4be695d17f1545cb5d14af4db6313f481756cee8d
MD5 43e0f72705f71b2e9c2f96cca7e7e38f
BLAKE2b-256 8b1f98f93829c2042fbd91ac5fbfc160c40ce2a6e71407dc2101fa0c1be99cf7

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 678.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 505439e45b1d32a4abfd94f38fb058ac7359999b19abdb82654bf78e7d2d4415
MD5 00a3678fc32139bde3f9c114d2925594
BLAKE2b-256 b4394908d148744d6663ae5c9158f0f9570919f6e348f1227d4dc0dfa5f94651

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 712.8 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2759f4bac92737d31d5ee8751af27120699c8340f9faca03419d4bc7767d2c93
MD5 1edf01cd4e8dfa897ffab0904d15f87e
BLAKE2b-256 03520684b28a82d6cc7e830ba22580348047df91c1f64f16613adb01f5b3015d

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 360.4 kB
  • Tags: CPython 3.5m, macOS 10.6+ Intel (x86-64, i386)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.9.2.post2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 efd5eaa5f9c337fcc1a7c18a1e7dfd0dbc4c087b443c6732ccb252c42bb7805d
MD5 28ffe61e96e298fc36daf94d35d69133
BLAKE2b-256 45088814ffa8dc7ae73f59e3a682fbfa1e971579d3b2468d95b14626ad10701b

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 678.2 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bc918129ec2c79347f17a03b9f7ded1d76b70826cb4532fae918f6997743a1f9
MD5 df3a9396da0942d6587b5c7aa6b3d634
BLAKE2b-256 362c3d0db2d7586ba777f8688dc14c3d71a608025ec51fc224ef4bab62d11745

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 712.8 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7a74c8b4dc9517ec91e00fabe3e84575e0a03637b118456322f284775510a253
MD5 28d8a0de9861d8dfc0e9d45ebb435642
BLAKE2b-256 028d30861df58e40bca805184bf2cb51411fae3acbea95ea4c9afc0d9fc3b34e

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp34-cp34m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 360.4 kB
  • Tags: CPython 3.4m, macOS 10.6+ Intel (x86-64, i386)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.9.2.post2-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 1e3a28e430b4e2b5247f374de732892a1f478401f732d3bd637637d80f63c831
MD5 860d2669be888db08084e2d053bd8bb6
BLAKE2b-256 4755065ee8e8ea781558307124b6103fb05860799bb6d1253031d0eed5ae5910

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 681.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f52b2a3cc0176ad9cb92a120619c7b57530a14e65620b73f225e16391beb6787
MD5 b48a80b59293efbb003bad83452093a0
BLAKE2b-256 15e3534634796aba81e4e2be138674316d7c8d6872eb0f95f1edf55a8367e206

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp27-cp27mu-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp27-cp27mu-manylinux1_i686.whl
  • Upload date:
  • Size: 716.3 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f477bfcc0e5d615ac0b13538464b3ac28978bf7f3036f4707fc886cf94dbaa08
MD5 51085086edcef1fb048185f6f5be1e91
BLAKE2b-256 a41a0dba0eed6c5a9dac03dec4268454880f8dcbfa42a6b9320bbb7924678fdb

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 681.4 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f32af3a97b77b7bc9d31726bf6e88a6c3a69ab97917fc436d33cddc885c60516
MD5 484a7f41647e561d2c259c257d4ec08b
BLAKE2b-256 defeaf6d1e2fed31c2be0d6cc72298de0f7a5c18c82d769dad2416a7ffcbab4c

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp27-cp27m-manylinux1_i686.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp27-cp27m-manylinux1_i686.whl
  • Upload date:
  • Size: 716.3 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for xtt-0.9.2.post2-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 3a45c44435ddc93c97e80dc6a0e5b5113659ed80892c137d4387d64fca9b00b5
MD5 2edc9e9d0fbc39fac7c5e434c03619b9
BLAKE2b-256 bd52c60ec5de295aa24eec6a9a647d562ebfc71c77af6339f3a3a4c6495b69df

See more details on using hashes here.

File details

Details for the file xtt-0.9.2.post2-cp27-cp27m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.9.2.post2-cp27-cp27m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 337.2 kB
  • Tags: CPython 2.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.9.2.post2-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d89a8404b1294941cd8b76d20c88b096815c05028dfd051767fbdf23dce4690e
MD5 6a06d138a557abd3bfbbf106697bdca7
BLAKE2b-256 b9ed9ec209f8a4b1046c9f5cdd3ed675f41cacac739dc53893f3b82ad48aff94

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