Custom Fernet implementation #338
Unanswered
faragher
asked this question in
Help & Questions
Replies: 1 comment 3 replies
-
You are right, keeping the name is misleading. Originally (and long ago), Reticulum used unmodified Fernet. This was changed since the overhead reduction is very much worth it. The deauthentication is redundant and unnecessary in Reticulum, and saving the 9 bytes has a cascading effect due to block sizes vs packet MTUs, that really does improve efficiency over low-bandwidth mediums. But yes, we should probably drop the Fernet naming, and come up with something better to describe it. Any ideas? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have conceptual questions regarding Reticulum's use of modified Fernet.
For those who aren't familiar, Reticulum uses a modified Fernet implementation. The stock implementation is a base64url encoded token consisting of:
The Reticulum implementation omits the version code and timestamp resulting in an overhead of 48 bytes per token as opposed to 57 bytes per token.
The intent of the timestamp is to de-authenticate a token after a certain period. I can see the thought process of removing data from an unused feature, but it's still part of the specification.
So, I have some concerns. Mostly, this isn't a Fernet implementation. If a Reticulum application developer tries to use the functions with stock Fernet tokens, it will fail (this is by design since HMACs will differ between the two token types) and if someone decides to use a Fernet library, it will fail to connect to Reticulum reference implementations.
I'm not certain if nine bytes is worth the change, but it's done. Any change would break compatibility with every other Reticulum version. I would, however, suggest that beyond even making a note, that the implementation's name is changed. I doubt the name of the token makes any real difference, but a modified implementation with a standard name implies interoperability where none exists.
Should we consider making a change in the terminology or documentation to explicitly remove any expectations of interoperability?
Beta Was this translation helpful? Give feedback.
All reactions