mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-25 12:02:12 +00:00
Upgrade buildroot to 2023.05 (from 2021.08.2), kernel is upgraded to 6.3 (from 5.13.19).
This commit is contained in:
22
support/testing/tests/package/sample_python_spake2.py
Normal file
22
support/testing/tests/package/sample_python_spake2.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from binascii import hexlify
|
||||
|
||||
from spake2 import SPAKE2_A, SPAKE2_B
|
||||
|
||||
|
||||
shared_password = b"This Is The Password!"
|
||||
|
||||
alice = SPAKE2_A(shared_password)
|
||||
alice_msg = alice.start()
|
||||
|
||||
bob = SPAKE2_B(shared_password)
|
||||
bob_msg = bob.start()
|
||||
|
||||
# Alice and Bob exchange their messages...
|
||||
|
||||
alice_key = alice.finish(bob_msg)
|
||||
bob_key = bob.finish(alice_msg)
|
||||
|
||||
print("alice_key:", hexlify(alice_key))
|
||||
print(" bob_key:", hexlify(bob_key))
|
||||
|
||||
assert alice_key == bob_key
|
||||
Reference in New Issue
Block a user