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
Support working with ed25519 seeds in addition to raw keypairs.
Our ed25519 library uses a representation of its key pair that
is incompatible with most modern implementations, which usually
work with the original 32-byte seed; Peters' impentation represents
the private key as the clamped sha512 of the seed.
This change:
- preserves the original seed when generating keys
- adds CLI commands to obtain the seed via `get prv.seed`,
under the same conditions as `get prv.key` is allowed
- adds support for `set prv.key` to supply a seed, in which
case the keypair will be re-generated from it. This is
mostly to enable external key management using modern
libraries, but could also be of use on devices where
we don't have a trustworthy entropy source.
I split Identity::writeTo(uint8_t*,size_t) into explicit forms for
the thing being written; the original implementation wrote a
different thing depending on the length, which would be ambiguous
between pubkey and seed and cumbersome if it tried to return all
three in one long buffer. Identity::readFrom() did not have that
ambiguity problem because keys can't be set from pubkey alone,
though it might be preferable to split readFrom() up as well
and not use magic length values.
0 commit comments