-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgrade DID RSA Key format #573
Conversation
c94705f
to
9bcd52a
Compare
Branch shenanigans resolved! |
@@ -7,5 +7,7 @@ import qualified System.IO.Unsafe as Unsafe | |||
|
|||
import Fission.Prelude | |||
|
|||
|
|||
-- Wait. This is weird. How did this end up in this module? | |||
instance Arbitrary Ed25519.SecretKey where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup that is weird! It's probably me being confused, but the compiler warning is turned off because {-# OPTIONS_GHC -fno-warn-orphans #-}
. All the more reason for us to just bite the bullet and newtype everything. The more that I think about it, the more I'm in favour of just doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to clarify: let's make this change in this PR. This line should not be in this module!
fission-web-server/library/Fission/Web/Server/Handler/User/Verify.hs
Outdated
Show resolved
Hide resolved
I'm pretty sure I need this? https://github.com/fission-suite/fission/runs/5005311975
@expede Github Actions continues making my life hard by being somewhat flakey:
This only happened in the "🏺 Artifacts (Nix) / 🖥️ ubuntu-latest ❄️ Nix (pull_request)" action. All other actions are running through (including tests now!). So I think this is ready for another round of review 👍 (no rush but just to make sure you don't think this blocked on me getting the tests working or something) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂 Thanks for the enthusiasm. I need to change/revert one thing, which is the RSA DID encoding should be rolled back to the old format for now, because - as you've experienced - it breaks e.g. the AWAKE protocol, as long as the auth lobby doesn't understand the new DID format. I'll merge it later today! (Let's not have another PR hanging like the last one 😱 ) |
The rest of the system needs to understand the new format first! Still, we can now *consume* the new format in the server/CLI.
Ported over most changes from #550 but adapted to the format with the prefix bytes
0x85 0x24
which is the unsigned varint encoding of0x1204
.Also, instead of storing the ASN1 DER
SubjectPublicKeyInfo
, it stores ASN1 DER encodedRSAPublicKey
s (which are part ofSubjectPublicKeyInfo
s with RSA public keys) as per the DID spec (w3c-ccg/did-method-key#41).Depends on #571. Currently that's the "branch this will merge into" for better diffs on github, but I'll change this to the branch that #571 will merge into once that's merged.