Skip to main content

A pure Python implemention of rfc7748

Project description

rfc7748 (Elliptic Curves for Security)

A pure Python implemention of rfc7748.

Usage:

# this code supports both python 2 and 3
from binascii import hexlify
from rfc7748 import x25519

private_key = b'1' * 32
public_key = x25519.scalar_base_mult(private_key)
print(hexlify(public_key))

peer_public_key = b'2' * 32
shared_secret = x25519.scalar_mult(private_key, peer_public_key)
print(hexlify(shared_secret))

'''output:
b'04f5f29162c31a8defa18e6e742224ee806fc1718a278be859ba5620402b8f3a'
b'a6d830c3561f210fc006c77768369af0f5b3e3e502e74bd3e80991d7cb7bfa50'
'''

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

rfc7748-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file rfc7748-0.0.1.tar.gz.

File metadata

  • Download URL: rfc7748-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for rfc7748-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7c2933e118c73127acae5aafa97af7091aa73753987f0d424a067789fee700be
MD5 d4b1af3b13a5db070279f759d0de886c
BLAKE2b-256 ccd3efd2c2f87276d2bb224c2cc86a087e2f8a272c405078599a61bd5e61530e

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