Closed maxtropets closed 2 weeks ago
COSE signature currently
uhdr: nil
phdr: {
4 (int) -> key digest (tstr)
395 (int) -> int: VDS
"iat" (tstr) -> int: issued at, standard (coming in #6565)
"ccf.txid" (tstr) -> signed transaction id
}
payload: root (bstr) (detached, therefore 'nil' de facto)
To clarify:
COSE endorsement currently
uhdr: nil
phdr: {
"iat" (tstr) -> int: issued at, standard (coming in #6565)
"ccf.merkle.root" (tstr) -> root (bstr): last signed merkle root of previous epoch
"ccf.epoch.begin" (tstr) -> tx id (tstr) : signed epoch start
"ccf.epoch.end" (tstr) -> tx id (tstr) : signed epoch end
}
payload: root (bstr) (attached)
Proposed schema for cose signature
uhdr: nil
phdr: {
1 (int) -> signing algorithm (int)
4 (int) -> key digest (tstr)
15 (int) -> CWT claims map {
6 (int) -> IAT (int)
}
395 (int) -> int: VDS
"ccf.v1" (tstr) -> CCF specific claims {
tx.id (tstr) -> last TxID signed (tstr)
}
}
payload: root (bstr) (detached, therefore 'nil' de facto)
Proposed schema for cose endorsement
uhdr: nil
phdr: {
1 (int) -> signing algorithm (int)
4 (int) -> key digest (tstr)
15 (int) -> CWT claims map {
6 (int) -> IAT (int)
}
"ccf.v1" (tstr) -> CCF specific claims map {
"epoch.begin" (tstr) -> first TX in the endorsed epoch (tstr)
[optional] "epoch.end" (tstr) -> first TX in the endorsed epoch (tstr)
[optional] "last.root" (tstr) -> root (bstr)
}
}
payload: root (bstr) (detached, therefore 'nil' de facto)
Suggest:
"epoch.txid.first" "epoch.txid.last" "epoch.root.last"
or
"epoch.first.txid" "epoch.last.txid" "epoch.last.root"
not keen on begin/end, because that would typically exclude end.
epoch.first.txid
epoch.last.txid
epoch.last.root.digest
range.last.txid
Where range is the range of transactions that's being signed, and an epoch the full range signed by a given service identity followed by at least one DR.
Originally posted by @achamayou in #6500
Prerequisites