jedisct1 / rust-ed25519-compact

Small, wasm-friendly, zero-dependencies Ed25519 and X25519 implementation for Rust.
MIT License
121 stars 22 forks source link

Add possibility to construct `KeyPair` with an untrusted public key #24

Closed brycx closed 2 years ago

brycx commented 2 years ago

see #23

What do you think about this @jedisct1? The naming is based on the rationale, that we'd want to use this verification routine when the public key comes from an untrusted source.

jedisct1 commented 2 years ago

What bytes represents here is not very clear.

What do you think of https://github.com/jedisct1/rust-ed25519-compact/commit/fd9c5d0bbca7834bd853e2e5897ebeb9a311f830 instead?

brycx commented 2 years ago

That seems like a more sensible approach, I was also a bit iffy about the clarity. I'd perhaps add a wrapper function additionally to KeyPair to validate. But other than that, that would work great for me too.