Skip to main content
EBonv
Associate III
November 18, 2019
Question

Import Elliptic Curve Keys From .pem Files

  • November 18, 2019
  • 1 reply
  • 803 views

Hi, I am coding on the NUCLEO H753ZI board with the pack for embedded cryptography (x-cube-cryptolib-3.1.2). While this folder provides example with hardcoded keys, it does not provide an example with keys imported from a file.

Typically, I would like to generate elliptic curve keys using openSSL (they would be written in a .pem file) and then to import them in my code to create an instance of ECpoint_stt for the public key or an instance of ECCprivKey_stt for the private key. Is there any method from the STM library that allows me to do so ?

The documentation for x-cube-cryptolib-3.1.2 did not seem to point out such method but it seems strange to me that it does not exist as .pem files is one of the classical ways to store keys.

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
November 18, 2019

Presumably there is code to parse these already readily available also..

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
EBonv
EBonvAuthor
Associate III
November 18, 2019

The patch x-cube-cryptolib-3.1.2 only contains two example projects. Both either generate random keys for the test, either use hardcoded ones.