Add public key export to pico-hsm-tool.py #128

Open
krlnokrl wants to merge 1 commits from krlnokrl/master into master

Summary

Describe in plain language what this PR does and why.

  • Small functionality improvement to pico-hsm-tool

  • Add the functionality to export public keys to pico-hsm-tool.py
    This exposes the function public_key() from pypicohsm/PicoHSM.py

  • Keys can be written to console or to file in PEM, DER and OpenSSH format.

Testing

  • Hardware / board(s) tested: picoHSM 6.4 - pi-pico2
  • Library version: pypicohsm version "2.0.2"
  • Exported keys tested: RSA, ED25519, EC:secp256r1, EC:secp512r1
  • Formats tested: PEM, DER, OpenSSH

Licensing confirmation (required)

By checking the box below, you confirm ALL of the following:

  • You are the author of this contribution, or you have the right to contribute it.
  • You have read CONTRIBUTING.md.
  • You agree that this contribution may be merged, used, modified, and redistributed:
    • under the AGPLv3 Community Edition, and
    • under any proprietary / commercial / Enterprise editions of this project,
      now or in the future.
  • You understand that submitting this PR does not create any support obligation,
    SLA, or guarantee of merge.

I confirm the above licensing terms:

  • Yes, I agree

Anything else?

Optional: missing official mirror of pypicohsm and pypicokey libraries renders pico-hsm-tool hard to develop.

## Summary Describe in plain language what this PR does and why. - Small functionality improvement to pico-hsm-tool - Add the functionality to export public keys to pico-hsm-tool.py This exposes the function public_key() from pypicohsm/PicoHSM.py - Keys can be written to console or to file in PEM, DER and OpenSSH format. ## Testing - Hardware / board(s) tested: picoHSM 6.4 - pi-pico2 - Library version: pypicohsm version "2.0.2" - Exported keys tested: RSA, ED25519, EC:secp256r1, EC:secp512r1 - Formats tested: PEM, DER, OpenSSH ## Licensing confirmation (required) By checking the box below, you confirm ALL of the following: - You are the author of this contribution, or you have the right to contribute it. - You have read `CONTRIBUTING.md`. - You agree that this contribution may be merged, used, modified, and redistributed: - under the AGPLv3 Community Edition, **and** - under any proprietary / commercial / Enterprise editions of this project, now or in the future. - You understand that submitting this PR does not create any support obligation, SLA, or guarantee of merge. **I confirm the above licensing terms:** - [x] Yes, I agree ## Anything else? Optional: missing official mirror of pypicohsm and pypicokey libraries renders pico-hsm-tool hard to develop.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin krlnokrl/master:krlnokrl/master
git checkout krlnokrl/master
Sign in to join this conversation.