Skip to content

Commit

Permalink
Also show PRF
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkx committed Apr 14, 2020
1 parent 195dfc5 commit 1162b63
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test-vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
import time
from datetime import datetime, timedelta

from LowCostDP3T import KeyStore
from LowCostDP3T import KeyStore, BROADCAST_KEY
import secrets
import hashlib
import hmac

null_secret = bytes.fromhex('00000000000000000000000000000000')

print("Secret: {}".format(null_secret.hex()))

prf = hmac.new(null_secret, BROADCAST_KEY.encode(), hashlib.sha256).digest()
print("PRF: {}".format(prf.hex()))

ks = KeyStore()
ks.SKt = []
ks.SKt.insert(0, null_secret)
Expand Down

0 comments on commit 1162b63

Please sign in to comment.