Currently both vna and vnb timestamps use unixtime with local timezone when signing.
|
elementa = datetime.datetime.strptime(vna.strip(),"%m/%d/%Y") |
|
tuple = elementa.timetuple() |
|
vnatime = time.mktime(tuple) |
|
#print(vna, hex(int(vnatime))[2:].zfill(8)) |
|
|
|
pleasesign = hex(int(vnbtime))[2:].zfill(8) + hex(int(vnatime))[2:].zfill(8) + clientdet.zfill(32) + client_hihex.zfill(64) + cadet |
RFC 9575 says:
"In ASTM F3411, timestamps are a Unix-style timestamp with an epoch of 2019-01-01 00:00:00 UTC. For DRIP, this format is adopted for Authentication to keep a common time format in Broadcast payloads."
and
"Signature over concatenation of preceding fields (VNB, VNA, DET of Child, HI of Child, and DET of Parent) using the keypair of the Parent DET."
My understanding of above is that signing should be done using the field values from the wire format ie timestamp using the custom epoch and not unixtime. Additionally timezone should be UTC and not local.
Also worth noting that ASTM F3411 says timestamps should be little endian on wire. The hex() function produces big endian output.
Currently both vna and vnb timestamps use unixtime with local timezone when signing.
drip-scripts/endorse.py
Line 126 in 6dd9da1
drip-scripts/endorse.py
Lines 239 to 244 in 6dd9da1
RFC 9575 says:
"In ASTM F3411, timestamps are a Unix-style timestamp with an epoch of 2019-01-01 00:00:00 UTC. For DRIP, this format is adopted for Authentication to keep a common time format in Broadcast payloads."
and
"Signature over concatenation of preceding fields (VNB, VNA, DET of Child, HI of Child, and DET of Parent) using the keypair of the Parent DET."
My understanding of above is that signing should be done using the field values from the wire format ie timestamp using the custom epoch and not unixtime. Additionally timezone should be UTC and not local.
Also worth noting that ASTM F3411 says timestamps should be little endian on wire. The
hex()function produces big endian output.