Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

age-plugin-tlock identities also contain the length of the encoded url #9

Open
AnomalRoil opened this issue Jun 18, 2024 · 1 comment

Comments

@AnomalRoil
Copy link

AnomalRoil commented Jun 18, 2024

The current format definition doesn't seem to conform to what is done in practice:

```
AGE-PLUGIN-TLOCK-<TYPE><IDENTITY>
```
* `<TYPE>` is 0 for `RAW` or 1 for `HTTP`. It provides flexibility on upgrading the identity between implementation and threat model,
* `<IDENTITY>` is the bytes of the beacon signature corresponding to the round for `RAW`, and is an remote HTTP URL in case of `HTTP`,

doesn't says so, but actually bincode is adding the length of the string, prepended in front of the string:
https://github.com/bincode-org/bincode/blob/trunk/docs/spec.md#collections

As can be seen in this playground link:
https://go.dev/play/p/-CoBESeIQr3

I'm currently working on a Go version of the age-tlock plugin and I think it'd be great to have both implementation rely on the same encoding and formats. Do you want to specify that the length is encoded too or do you want to only have the raw string following the value 1 ?

@AnomalRoil
Copy link
Author

Actually it's not only that: it seems the VarInt encoding that bincode is using is not what is usually understood as "varint".

Could we find a common ground with a more "normal" type of encoding for recipients and identities?

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

No branches or pull requests

1 participant