-
I'm attempting to migrate from using DSA to using ed25519 for signing our software updates (XQuartz/XQuartz#199). I generated my ed25519 key like:
I extracted the public key like:
I placed the contents of sparkle_ed25519_priv.pem (without the header/footer) into the app's Info.plist in the SUPublicEDKey key, eg:
I generated the signature using openssl pkeyutl:
I then placed that signature into sparkle:edSignature in our feed, eg:
Existing installs using DSA are still updating fine, but my test build which has the SUPublicEDKey entry and no SUPublicDSAKeyFile entry is failing:
I downloaded https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.2_beta1/XQuartz-2.8.2_beta1.dmg myself and verified it fine:
So why is Sparkle failing to verify here? What am I missing? The EdDSA Migration page doesn't provide much support for generating the signature the way Sparkle wants it, and the Sparkle Documentation tells the user how to create the signing keys (using |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
If you use I never tried with openssl. The library we use may expect it to be in a certain format or something. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I'm using generate_keys and sign_update in my build pipeline now, but I'd like to be able to use |
Beta Was this translation helpful? Give feedback.
-
It might be complicated and related to orlp/ed25519#10 |
Beta Was this translation helpful? Give feedback.
-
Interesting, thanks! |
Beta Was this translation helpful? Give feedback.
-
Posting this for future reference: the issue I linked above is only for using the private keys generated by # Generate private key
openssl genpkey -algorithm Ed25519 -outform DER -out sparkle_ed25519_priv.der
# Extract public key
openssl pkey -inform der -in sparkle_ed25519_priv.der -pubout -outform der -out sparkle_ed25519_pub.der
# This will get you your 32-byte public key ignoring the OID header stuff at the beginning, which can be put as the `SUPublicEDKey`
tail -c 32 sparkle_ed25519_pub.der | base64
# Generate a signature for a download file, suitable for the sparkle:edSignature
openssl pkeyutl -keyform der -sign -inkey sparkle_ed25519_priv.der -rawin -in my-file.dmg | base64 |
Beta Was this translation helpful? Give feedback.
It might be complicated and related to orlp/ed25519#10