Skip to content

Conversation

@Geal
Copy link
Contributor

@Geal Geal commented May 10, 2025

No description provided.

@Geal Geal force-pushed the geal/spec-fixes branch from 4489645 to 8e3b3b2 Compare May 10, 2025 16:36
is a Biscuit token, that base 64 string should be prefixed with `biscuit:`.

### Cryptography
## Cryptography
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the cryptography section at the same level as the format section

If all signatures are verified, extract pk_n+1 from the last block and
sig from the proof field, and check `verify(pk_n+1, sig_n+1, data_n+alg_n+1+pk_n+1+sig_n)`

### Blocks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already covered in a different part of the spec

them with its rules list.

### Symbol table
## Symbol table
Copy link
Contributor Author

@Geal Geal May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the symbol table section is moving up a level. Maybe it should move under the format section though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should rename it to "string interning", since it’s not just a serialization matter

@Geal Geal force-pushed the geal/spec-fixes branch from 24a3cf9 to 0efbe10 Compare May 10, 2025 18:06
Copy link
Contributor

@divarvel divarvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few comments / suggestions / typo fixes

transmitted over the wire is either the normal Biscuit wrapper:
The token contains two levels of serialization, each with its own versioning scheme.

### Signed blocks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Signed blocks
### Signed blocks

}
```

The `rootKeyId` is a hint to decide which root public key should be used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `rootKeyId` is a hint to decide which root public key should be used
The `rootKeyId` is a hint to help the consumer decide which root public key should be used


The `rootKeyId` is a hint to decide which root public key should be used
for signature verification.
The `authority` block has a special meaning, as it is signed by the root key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be bullet points or have a line break after them

}
```

The `SignedBlock` structure carries the sigend data and its signatures, representing the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `SignedBlock` structure carries the sigend data and its signatures, representing the
The `SignedBlock` structure carries the signed data and its signatures, representing the

- `externalSignature`: if present, it is a signature of the current block by another key
- `version`: indicates the version of the signed payload format

The version field is used to vary how the block is signed and verified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The version field is used to vary how the block is signed and verified.
The version field is used to specify how the block was signed and must be verified.

The `rootKeyId` is a hint to decide which root public key should be used
for signature verification.
Public keys are serialized as a byte array, with the `algorithm` field discriminating between
algorithms. The algorithm depedent serialization format is described in the [Cryptography section](#Algorithms).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
algorithms. The algorithm depedent serialization format is described in the [Cryptography section](#Algorithms).
algorithms. The algorithm-dependent serialization format is described in the [Cryptography section](#Algorithms).

```

Each `SignedBlock` contains:
- `block`: a `Block` structure serialized as a byte array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should hint that why there are two layers of serialization (unless it’s already done somewhere else)

was generated. Since a Biscuit implementation at version N can receive a valid
Each `Block` contains the following fields:
- `symbols`: the list of new [symbols](#symbol-table) introduced in this block.
- `context`: a free form field with no particular meaning for Biscuit authorization. It can be used to hold application specific data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `context`: a free form field with no particular meaning for Biscuit authorization. It can be used to hold application specific data
- `context`: a free-form field with no particular meaning for Biscuit authorization. It can be used to hold application specific data


When transmitted as text, a Biscuit token should be serialized to a
URLS safe base 64 string. When the context does not indicate that it
URL safe base 64 string. When the context does not indicate that it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
URL safe base 64 string. When the context does not indicate that it
URL-safe base 64 string. When the context does not indicate that it

them with its rules list.

### Symbol table
## Symbol table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should rename it to "string interning", since it’s not just a serialization matter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants