I feel that my question might display a bit of ignorance. I have been searching for answers, but have had no luck--perhaps my assumptions are wrong. I apologize if that is the case.
Context: I have a microcontroller communicating with a server. Every frame is signed using a private key from an RSA/SHA-256 public/private key pair. The pair is generated externally with OpenSSL, and the public key is in the PEM format, which is something like this (it is a not a used key):
-----BEGIN PUBLIC KEY-----
MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgHR/kzljDkbuyOWGzfxSgfrJ3xZd
GZspxrVU+2ZbkDej5KNzGXu5lJdBzATU/h/S4Y2DgwaaN0tRMxX4QeN7x90qmdkO
oUQggpbv7rvju3idBp0fDcV6M56mnkw+EeyeNjDsRqoUVD/zlQdEUUcC00iItu8N
0GH08Ex8ubBhXQ7XAgMBAAE=
-----END PUBLIC KEY-----
My issue:
Due to performance problems on the microcontroller, we had to use an external chip (for instance, ATECC608A) for all of these cryptographic processes. Also, it will be useful for production because this chip can generate its own private/public keys SHA-256 keys. When generating the SHA-256 private key, the chip returns me the public key. However, it does not return me a public key in the .pem
format, but, according to the datasheet, it returns me the coordinates X and Y of the public key, which are 64 bytes.
My questions:
My first assumption that might be mistaken is this: I assume that a SHA256 pair is the same thing as RSA-SHA256. I know that there are many variants of the SHA256 algorithm, but based on what I've read, the RSA is the standard variant. So I am assuming that RSA-SHA256 is the same thing as SHA256. Am I right?
Assuming I have RSA-SHA-256, how can I convert these coordinates to
.pem
? On the server-side, I was using the.pem
public key of the device to verify the signature. Now I am only able to share some coordinates of the public key. Is it possible to convert from coordinates to.pem
? Or am I just misunderstanding a bunch of different concepts?