ietf-wg-ntp / draft-roughtime

Other
0 stars 1 forks source link

Simplification of server response #3

Open fiestajetsam opened 1 week ago

fiestajetsam commented 1 week ago

Originally Roughtime just sent over one, fixed cert and at some point switched to having a long lived, and an delegated cert. The current structure of server response is a few layers deep, and I'd propose a flattening out of it. If we represent it as something JSON-like, it should look as of -11 like:

{
  VER: uint32,
  PATH: Path,
  INDX: uint32,
  CERT: {
    SIG: ed25519ctx signature,
    DELE: {
      MINT: Timestamp,
      MAXT: Timestamp,
      PUBK: ed25519 public key,
    }
  },
  SIG: edd25519ctx signature,
  SREP: {
    ROOT: Root,
    MIDP: Timestamp,
    RADI: uint32
  }
}

What I propose is a slight restructure, flattening out:

{
  VER: uint32,
  PATH: Path,
  INDX: uint32,
  CSIG: ed25519ctx signature,
  CERT: {
    MINT: Timestamp,
    MAXT: Timestamp,
    PUBK: ed25519 public key
  },
  TSIG: ed25519ctx signature,
  SREP: {
    ROOT: Root,
    MIDP: Timestamp,
    RADI: uint32
  }
}

There's a few reasons for this:

dansarie commented 5 days ago

I'm happy with the way it currently is. If this is implemented, it should be detected through version reporting - anything else just adds complexity and weirdness.