From 57708eb7ac08c23f419619dc9c9f765317df8694 Mon Sep 17 00:00:00 2001 From: bigpickle Date: Mon, 5 Oct 2026 21:51:10 +0800 Subject: [PATCH] Close the second round of review findings: public_from_private --- sigil/keys.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sigil/keys.py b/sigil/keys.py index b787d81..d583da3 100644 --- a/sigil/keys.py +++ b/sigil/keys.py @@ -37,6 +37,10 @@ def public_bytes(public: PublicKey) -> bytes: ) +def public_from_private(private: PrivateKey) -> PublicKey: + return private.public_key() + + def from_public_bytes(raw: bytes) -> PublicKey: return Ed25519PublicKey.from_public_bytes(raw)