Skip to main content
# 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.


Metadata

Release files for xtt 0.10.0.post0

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

Built distributions (wheels)

Table of built distributions (wheels) for xtt 0.10.0.post0
File
xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details
xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 Details
xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ Intel (x86-64, i386) Details
xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl CPython 3.4 CPython 3.4 pymalloc macOS 10.6+ Intel (x86-64, i386) Details
xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details
xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-32 Details
xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.9+ x86-64 Details

Total release size: 10.1 MB

Release files / xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp37-cp37m-manylinux1_x86_64.whl
Size 678.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
35042ed0318eb3cfe6ea82431a47f96c1551867c4417ac8b363ec865a7629242
BLAKE2b-256 checksum
How to use checksums
b78623b9392a146d64ee815d51314bd6e883bb6dd72d65c36c553f031454f592
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp37-cp37m-manylinux1_i686.whl
Size 713.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
0ba7ee98211584a013ce6c7eed189f5dc6b80f36e4df24fafbe7687d04eb2f9d
BLAKE2b-256 checksum
How to use checksums
86ba4ae033a85d3732eaead3f5811bb20bc02a2a199db1e50d59fd6b648d188a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL xtt-0.10.0.post0-cp37-cp37m-macosx_10_9_x86_64.whl
Size 337.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
e23086bb864476c16bebcb1aaff311f16a0a67ee7b743436384c37cf00173f04
BLAKE2b-256 checksum
How to use checksums
bb2a1ec0acd51f92c873a67601bd3bdc942154b6205ce334879a254231f10295
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp36-cp36m-manylinux1_x86_64.whl
Size 678.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
26fa8a14f7bc52d66b7fe336722130c64c597f6cafe858397d655139035e57a2
BLAKE2b-256 checksum
How to use checksums
20f93758b230a18fb209f13875d61fbce8b8351f47a90f5201b0ad2080fc74c2
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp36-cp36m-manylinux1_i686.whl
Size 713.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
3ca954edeef4273044cd5e79a304460285ffba28ec9d42c731a59b0cb5a0c78d
BLAKE2b-256 checksum
How to use checksums
ab8ce2ec5fbaca4a0b607fab5c5821457d1af08ae332b9f98bae88b827fdfd21
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl

Download URL xtt-0.10.0.post0-cp36-cp36m-macosx_10_9_x86_64.whl
Size 337.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
836621e9f5e1a4c840950169253f19cd36b9af0514f5b2e78ab328eb311d866e
BLAKE2b-256 checksum
How to use checksums
7d617736e7e43c71878dc4295714644703314c1d53891e90ea6814d774c3ed9e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp35-cp35m-manylinux1_x86_64.whl
Size 678.5 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
94ada3ff07716b704ecf3d9a6e320f368a025255f09bb43cf232c9253600790e
BLAKE2b-256 checksum
How to use checksums
2b4dc4eebebf3fe54c6dffadc1f8cd7f102892b34c6a375f62247c64b0fb37e8
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp35-cp35m-manylinux1_i686.whl
Size 713.1 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
ef9e53959ff0ded7f1158c8f664ade6339c0230c6fa13dfbdcf00b75444035df
BLAKE2b-256 checksum
How to use checksums
f5a5e055bb3192dee096e25291d20ce4dd87d71ad8f6a403c217a66b4d66955b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl

Download URL xtt-0.10.0.post0-cp35-cp35m-macosx_10_6_intel.whl
Size 360.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ Intel (x86-64, i386)
SHA-256 checksum
How to use checksums
8062bee7e05c32ffa41c0644f3ba9d64651cb6019b260e47c943d95ae062f60e
BLAKE2b-256 checksum
How to use checksums
e198694dc8af2527cd753eff0769ec9c84cbe244d3f48104087fdd9fcd20c600
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp34-cp34m-manylinux1_x86_64.whl
Size 678.5 kB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
77294785a4b062304a17b97a721f9acc552d68225e209f58bcb0c3657d1f34d2
BLAKE2b-256 checksum
How to use checksums
abf657e8909dc54173b0e7b9f2c0852b1eace1388f5ff505895971cf0f9dbb60
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp34-cp34m-manylinux1_i686.whl
Size 713.1 kB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
080ea6ecfba0e0d537390b0a2731a6cc48664e7e2f00708f8bea844b95bbc249
BLAKE2b-256 checksum
How to use checksums
e379b6fb7c52afffe1d1cc5f131b366fbf9123b9a0a2168bf04e214705b1ec87
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl

Download URL xtt-0.10.0.post0-cp34-cp34m-macosx_10_6_intel.whl
Size 360.4 kB
Tags CPython 3.4 CPython 3.4 pymalloc macOS 10.6+ Intel (x86-64, i386)
SHA-256 checksum
How to use checksums
30910cfb0966837e6c681fc3b0092dbc623c370a7bd28cbcdbedeff434ca9e47
BLAKE2b-256 checksum
How to use checksums
dcd644ce30c6e5645c0f6b868a10ed1dde5eb6052fe9f63ab1af68ce86be4cb7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp27-cp27mu-manylinux1_x86_64.whl
Size 681.7 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
1cc4834a808f1da9c20bd2a684fd94b929ff15bab96f7ed32dc345328ef0263d
BLAKE2b-256 checksum
How to use checksums
eba66f366a81fedf361bfd27cac8891ba023e46fa451fc1072671fc22e1080ea
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp27-cp27mu-manylinux1_i686.whl
Size 716.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
4761e2c43deeccd993bed2765d5e315a6a64d3ec1dd438ef14c8edddf5018f76
BLAKE2b-256 checksum
How to use checksums
c37947130acd12f43b33bfcb3121f30d82f8bfff0fa3ef17cd321540b0f13ffa
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl

Download URL xtt-0.10.0.post0-cp27-cp27m-manylinux1_x86_64.whl
Size 681.7 kB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
6a5ade2549026ef6f1364054fc8825124e887b0fb51c04969b02681de46213d6
BLAKE2b-256 checksum
How to use checksums
947debd750bcc73abb4678b1df6546762f213203ecb7c9be57c95d66b6628b80
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl

Download URL xtt-0.10.0.post0-cp27-cp27m-manylinux1_i686.whl
Size 716.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
a622db869701ec2a78f5526773b0c432217fab2164e2fd1559db6b5b1833bd83
BLAKE2b-256 checksum
How to use checksums
573447e15e1693dfc5074e7a470e4481aca9e59da4cd30bdf08744ec2078d4fe
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl

Download URL xtt-0.10.0.post0-cp27-cp27m-macosx_10_9_x86_64.whl
Size 337.3 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
30abdd93419d782fe3b251096ca16a190fb3963e36e8e56f1dcb3f56494ad89d
BLAKE2b-256 checksum
How to use checksums
77a041978eba51ae2fd7375b3d619d57177f7f70f0f870c6b083c79ce75546aa
Upload date
Uploaded using Trusted Publishing?
What is 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
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