question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

divergence between implementations serializing ed25519 public keys

See original GitHub issue

There is some ambiguity in the spec regarding how to encode ed25519’s public portion of the keyval:

The 'ed25519' format is:

  { "keytype" : "ed25519",
    "scheme" : "ed25519",
    "keyval" : {"public" : PUBLIC}
  }

where PUBLIC is a 32-byte string.

While the ed25519 public key is a 32-byte string, I could find no implementation that’s serializing the public key to JSON as an array of integers. Instead, implementations are serializing it into a JSON string, but there is a fork in how this is implemented:

Can you provide any guidance on what serialization format we should be using?

edit: turns out rust-tuf uses base64url instead of base64standard for encoding.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
ericktcommented, Aug 1, 2019

I just submitted #47 to update the spec to reflect hex encoding the ed25519 public key, and target file hashes.

1reaction
JustinCapposcommented, Apr 11, 2019

I don’t see this as TAP worthy. It’s just a clarification / fix.

On Wed, Apr 10, 2019 at 8:49 PM Erick Tryzelaar notifications@github.com wrote:

It looks like there’s also divergence on how implementations are encoding the snapshot/timestamp/ targets role hashes, both in the metadata and for the hash-prefixed files:

Also, if we were changing ed25519 metadata to use base64, should the spec also change the keyid and path_hash_prefixes to be base64? The spec specifically calls out that they are hex encoded.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/theupdateframework/specification/issues/42#issuecomment-481923769, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0XD1kwxi-jI5bUgV_xjIIzhmqwyWUjks5vfoa2gaJpZM4ck62t .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Interchange Ed25519 Keys - Hacker News
This is unnecessarily complicated. The beautiful thing about Ed25519 keys (private and public) is that they are simply opaque byte strings.
Read more >
Python Bindings to the Ed25519 Digital Signature System
This package provides python bindings to a C implementation of the Ed25519 public-key signature system 1. The C code is copied from the...
Read more >
What makes an Ethereum keypair valid?
Upon first glance, these public keys look the same as any generated by secp256k1. They can both be serialized to 32 byte values....
Read more >
BIP32-Ed25519 Hierarchical Deterministic Keys over a Non ...
The BIP32 standard [9] specifies not just a derivation of several keys for a wallet, but a hierarchy of keys. We start with...
Read more >
Taming the many EdDSAs - Cryptology ePrint Archive
allows to test compatibility of different Ed25519 implementations which ... For base point B, public key A and signature (R, S), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found