Tool/software: Code Composer Studio
Dear Sir,
This thread i open for an example of sign and verify buffer. here i have some payload which i have sign with private key and send it to via HTTPS to the client. here i have been looking for the encryption and decryption method for the my application but i cloud not able to execute the secure content delivery method because of the lake of document and proper support so i come up with some ideal like if i cloud sign my payload with unique ECC key which is already stored at entry0 as per the SimpleLink™ Wi-Fi® CC3x20, CC3x3x Network Processor guidelines. as i understood ,as per the Document the key would be the unique per device and it won't be writable and erasable ?
So i here i tried to read stored key with the below snippet .please have a look .
/* get the Public key */
configOpt = SL_NETUTIL_CRYPTO_PUBLIC_KEY_INFO;
objId = 0;
configLen = 255;
rc = sl_NetUtilGet(configOpt, objId, buf, &configLen);
if (rc < 0)
{
SHOW_ERROR(rc, "sl_NetUtilCmd() failed");
}
else
{
for (ii = 0; ii < configLen; ii++)
{
WMDebugInfo(DEBUG_LOG, "key data at index [%d] in hex[%d] = %02x", objId, ii, buf[ii]);
}
WMDebugInfo(DEBUG_LOG, "public key %s", base64decode);
}
I observed something here after getting the response. well i was reading the SECP256R1 key format , here i thing private key will be the 32-byte and public key will the 64-byte long but while reading the key from the index of Zero (0) i found @configLen it self is 64 byte. so my for loop ran for the 64 time's but it should be i thing 32 byte but i am not sure.
Here i have following question about this :
1. what type of the is stored at entry 0 ? is it public key or private key ? and what is the key format because i could not able to print directly .
2. The signed payload i have to send it via HTTPS so other side like cloud they have to verify the payload signature using the public key so i do i share the public via HTTPS.
3. What would be the format of the signature data ?
4. If i want to see the metadata of the key how do i do ? and how to verify that data if get this data ?
Please do needful.
Thanks
Ketan vadodariya