codehash.db icon indicating copy to clipboard operation
codehash.db copied to clipboard

Organization: Key and signature filename syntax

Open andrewdavidwong opened this issue 9 years ago • 1 comments

This is a relatively minor organizational issue, but one worth considering early on.

Currently, the filename syntax for keys and detached signatures on keys is specified as follows:

Key: <id>.key Detached signature on a key: key.{id}.{id_of_the_signer}

In my pull request (https://github.com/rootkovska/codehash.db/pull/2), I suggest changing this to:

Key: <id>.key Detached signature on a key: <id>.key.<id_of_the_signer>

This will result in detached signatures sorting immediately after the key they sign. An additional benefit is that it will avoid the following situation (which would probably end up happening under the current scheme):

codehash.db./witnesses/
└── keys
    ├── joanna.key
    ├── jones.key
    ├── key.joanna.jones
    ├── key.joanna.smith
    └── smith.key

In other words, all the detached signatures on keys get grouped together and lexically sorted at the letter "k," which breaks up the group of keys sorted lexically by ID if there are IDs that begin with characters before or after "k."

By contrast, under my suggested scheme, the files would sort like so:

codehash.db./witnesses/
└── keys
    ├── joanna.key
    ├── joanna.key.jones
    ├── joanna.key.smith
    ├── jones.key
    └── smith.key

andrewdavidwong avatar Nov 13 '16 00:11 andrewdavidwong

Also makes sense, yes.

rootkovska avatar Dec 10 '16 16:12 rootkovska