You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
I am running through implementing a u2f server in elixir and have been using this library as a guide.
I have a question about the following line of code: _parse_tlv_size
After going through the implementation I don't quite understand why n_bytes is being initialized to 1 instead of 0. When the value of the length triplet is 128 or less, shouldn't we just have an offset of 2 bytes (1 for tag and 1 for length) with the value being calculated based on the second byte? Perhaps I am misunderstanding something, but I was curious as to why an additional byte was necessary.
The text was updated successfully, but these errors were encountered:
Yeah, I think that code path which is why I don't think anyone has suggested to correct it. However, I'm fairly certain that it is incorrect as I wrote a DER encoder for elixir where that code path is hit. Not a huge issue IMO but I'd like to see it corrected so other reference implementations are correct.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am running through implementing a u2f server in elixir and have been using this library as a guide.
I have a question about the following line of code: _parse_tlv_size
I am bit new to DER encoding, but I have found the following link to be useful
After going through the implementation I don't quite understand why
n_bytes
is being initialized to 1 instead of 0. When the value of the length triplet is 128 or less, shouldn't we just have an offset of 2 bytes (1 for tag and 1 for length) with the value being calculated based on the second byte? Perhaps I am misunderstanding something, but I was curious as to why an additional byte was necessary.The text was updated successfully, but these errors were encountered: