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

xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl (678.5 kB view details)

Uploaded CPython 3.7m

xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl (713.1 kB view details)

Uploaded CPython 3.7m

xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl (337.3 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl (678.5 kB view details)

Uploaded CPython 3.6m

xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl (713.1 kB view details)

Uploaded CPython 3.6m

xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl (337.3 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl (678.5 kB view details)

Uploaded CPython 3.5m

xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl (713.1 kB view details)

Uploaded CPython 3.5m

xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl (360.4 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl (678.5 kB view details)

Uploaded CPython 3.4m

xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl (713.1 kB view details)

Uploaded CPython 3.4m

xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl (360.4 kB view details)

Uploaded CPython 3.4m macOS 10.6+ intel

xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl (681.7 kB view details)

Uploaded CPython 2.7mu

xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl (716.8 kB view details)

Uploaded CPython 2.7mu

xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl (681.7 kB view details)

Uploaded CPython 2.7m

xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl (716.8 kB view details)

Uploaded CPython 2.7m

xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl (337.3 kB view details)

Uploaded CPython 2.7m macOS 10.9+ x86-64

File details

Details for the file xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 35042ed0318eb3cfe6ea82431a47f96c1551867c4417ac8b363ec865a7629242
MD5 64aed82da2f3fa59aeb69b00d9c2c971
BLAKE2b-256 b78623b9392a146d64ee815d51314bd6e883bb6dd72d65c36c553f031454f592

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0ba7ee98211584a013ce6c7eed189f5dc6b80f36e4df24fafbe7687d04eb2f9d
MD5 3a79b9bd067abaf06203a532c4b96ea5
BLAKE2b-256 86ba4ae033a85d3732eaead3f5811bb20bc02a2a199db1e50d59fd6b648d188a

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.10.0.post0-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.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e23086bb864476c16bebcb1aaff311f16a0a67ee7b743436384c37cf00173f04
MD5 67e70ed4fc5c4ddc809bef566b86cdbb
BLAKE2b-256 bb2a1ec0acd51f92c873a67601bd3bdc942154b6205ce334879a254231f10295

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 26fa8a14f7bc52d66b7fe336722130c64c597f6cafe858397d655139035e57a2
MD5 888896aebf28ff41d07bbe37bab6fcb6
BLAKE2b-256 20f93758b230a18fb209f13875d61fbce8b8351f47a90f5201b0ad2080fc74c2

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 3ca954edeef4273044cd5e79a304460285ffba28ec9d42c731a59b0cb5a0c78d
MD5 0da8dd8360adbad3603d14c8b8ea9bba
BLAKE2b-256 ab8ce2ec5fbaca4a0b607fab5c5821457d1af08ae332b9f98bae88b827fdfd21

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.10.0.post0-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.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 836621e9f5e1a4c840950169253f19cd36b9af0514f5b2e78ab328eb311d866e
MD5 cf45f0b52d8f6c67d39d52ee911e1257
BLAKE2b-256 7d617736e7e43c71878dc4295714644703314c1d53891e90ea6814d774c3ed9e

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 94ada3ff07716b704ecf3d9a6e320f368a025255f09bb43cf232c9253600790e
MD5 0487e671f5c274f7e08cbb20721ab5b0
BLAKE2b-256 2b4dc4eebebf3fe54c6dffadc1f8cd7f102892b34c6a375f62247c64b0fb37e8

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ef9e53959ff0ded7f1158c8f664ade6339c0230c6fa13dfbdcf00b75444035df
MD5 6df2ac6785c808388fa70b0221723f53
BLAKE2b-256 f5a5e055bb3192dee096e25291d20ce4dd87d71ad8f6a403c217a66b4d66955b

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

  • Download URL: xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 360.4 kB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 8062bee7e05c32ffa41c0644f3ba9d64651cb6019b260e47c943d95ae062f60e
MD5 2c683450c01aa0b444dd6c6479fa60fc
BLAKE2b-256 e198694dc8af2527cd753eff0769ec9c84cbe244d3f48104087fdd9fcd20c600

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 77294785a4b062304a17b97a721f9acc552d68225e209f58bcb0c3657d1f34d2
MD5 937f1f91d32d483d3672701e537ebcfe
BLAKE2b-256 abf657e8909dc54173b0e7b9f2c0852b1eace1388f5ff505895971cf0f9dbb60

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 080ea6ecfba0e0d537390b0a2731a6cc48664e7e2f00708f8bea844b95bbc249
MD5 edaf8492ecfc28707f420dbaff108373
BLAKE2b-256 e379b6fb7c52afffe1d1cc5f131b366fbf9123b9a0a2168bf04e214705b1ec87

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

  • Download URL: xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 360.4 kB
  • Tags: CPython 3.4m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 30910cfb0966837e6c681fc3b0092dbc623c370a7bd28cbcdbedeff434ca9e47
MD5 e256812253d1f0b81f1fb1a982190479
BLAKE2b-256 dcd644ce30c6e5645c0f6b868a10ed1dde5eb6052fe9f63ab1af68ce86be4cb7

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1cc4834a808f1da9c20bd2a684fd94b929ff15bab96f7ed32dc345328ef0263d
MD5 9b787e758f42e932995048fbdf63fba2
BLAKE2b-256 eba66f366a81fedf361bfd27cac8891ba023e46fa451fc1072671fc22e1080ea

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4761e2c43deeccd993bed2765d5e315a6a64d3ec1dd438ef14c8edddf5018f76
MD5 a9a88cf988c6b327225f1c8b47a10376
BLAKE2b-256 c37947130acd12f43b33bfcb3121f30d82f8bfff0fa3ef17cd321540b0f13ffa

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6a5ade2549026ef6f1364054fc8825124e887b0fb51c04969b02681de46213d6
MD5 415667093108fbbbefe655a1dba219b1
BLAKE2b-256 947debd750bcc73abb4678b1df6546762f213203ecb7c9be57c95d66b6628b80

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl.

File metadata

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

File hashes

Hashes for xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a622db869701ec2a78f5526773b0c432217fab2164e2fd1559db6b5b1833bd83
MD5 8da01de1a1ee3f65214e8b491b2f0b98
BLAKE2b-256 573447e15e1693dfc5074e7a470e4481aca9e59da4cd30bdf08744ec2078d4fe

See more details on using hashes here.

File details

Details for the file xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 337.3 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.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 30abdd93419d782fe3b251096ca16a190fb3963e36e8e56f1dcb3f56494ad89d
MD5 309d4e367c0414025fa6740308503d1c
BLAKE2b-256 77a041978eba51ae2fd7375b3d619d57177f7f70f0f870c6b083c79ce75546aa

See more details on using hashes here.

Supported by

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