From 72fea3902f46fb00ab86e273eaf4bb939100bf20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Est=C3=A9vez?= Date: Wed, 17 Jan 2024 10:43:34 +0100 Subject: [PATCH] add pubkey format conversion to README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index c7dea48..afc951c 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,16 @@ The tree root is given as a 256-bit hexadecimal number in place of the `...`. Th `--merkle-root` argument. The tree root is also listed in other parts of the GSC Products website. +The public key is also given as 264-bit compressed point in hexadecimal, both in +an XML file containing the public key, and in the Merkle tree XML file, as well +as in other parts of the GSC Products website. This format can be converted to +PEM with the [ecdsa](https://pypi.org/project/ecdsa/) Python package as follows: +``` +ECDSA_PUBKEY="..." python -c 'import ecdsa; import os; vk = ecdsa.VerifyingKey.from_string(bytes.fromhex(os.environ["ECDSA_PUBKEY"]), curve=ecdsa.NIST256p); print(str(vk.to_pem(), encoding="ascii"), end="")' +``` +Here `...` should be replaced by the 264-bit hexadecimal representation of the +public key. + ## Development status galileo-osnma has been usable since its first release during the public test