Skip to main content

No project description provided

Project description

pyattest

Maintainability

pyattest provides a common interface that helps you verify attestations from either Google or Apple.

Installation

pyattest is available on PyPI and can be installed via $ python -m pip install pyattest

Usage

Google

The following parameters are important:

  • key_id: A Base64 encoded SHA-256 hash of your apps certificate
  • apk_package_name: Name of your apk
  • production: Ignores basic integrity and cts profile check if False
  • attest: The jws object string representing the attestation
  • nonce: The nonce used to create the attestation
config = GoogleConfig(key_ids=[key_id], apk_package_name='ch.dreipol.demo', production=True)
attestation = Attestation(attest, nonce, config)

try:
    attestation.verify()
except PyAttestException as exception:
    # Do your thing
    pass

Apple

The following parameters are important:

  • key_id: SHA-256 hash of the public key form the cert you got back from the attestation
  • app_id: Your app’s App ID, which is the concatenation of your 10-digit team identifier, a period, and your app’s CFBundleIdentifier value
  • production: Checks for the appropriate aaguid
  • attest: The apple attestation as binary
  • nonce: The nonce used to create the attestation
config = AppleConfig(key_id=key_id, app_id='1234ABCDEF.ch.dreipol.demo', production=True)
attestation = Attestation(attest, nonce, config)

try:
    attestation.verify()
except PyAttestException as exception:
    # Do your thing
    pass

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

pyattest-0.0.9.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

pyattest-0.0.9-py2.py3-none-any.whl (26.3 kB view hashes)

Uploaded Python 2 Python 3

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