Skip to content

Endorse script uses unixtime instead of custom epoch #5

@tuupola

Description

@tuupola

Currently both vna and vnb timestamps use unixtime with local timezone when signing.

vna = "04/01/2025"

drip-scripts/endorse.py

Lines 239 to 244 in 6dd9da1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions