File: test_x25519.py

package info (click to toggle)
python-lib25519 0~20241004.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 120 kB
  • sloc: python: 179; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 236 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from lib25519 import x25519


def test_x25519():

    pk1, sk1 = x25519.keypair()
    pk2, sk2 = x25519.keypair()
    k1 = x25519.dh(pk1, sk2)
    k2 = x25519.dh(pk2, sk1)
    assert (k1 == k2)

if __name__ == 'main':
    test_x25519()