Hello. I am using the Cryptology module to perform ECDH key exchange. My question is primarily on how or what to pass in for the first parameter, algorithm. The byte array received from the peripheral device, their public key. I am trying to turn it into a key so that I can add it to the KeyAgreement.
using Toybox.Cryptology as Crypto;
I am doing garminPK = Crypto.createPublicKey(Crypto.KEY_PAIR_ELLIPTIC_CURVE_SEC256R1, otherPKbytes);
But I am getting fatal errors of types (
1 Details: "Could not find symbol 'KEY_PAIR_ELLIPTIC_CURVE_SECP256R1'"
2 Error: Unhandled Exception // No details, but same line when trying the numeric value instead of the enum (1)
3 Error: Symbol Not Found Error
Details: 'Failed invoking <symbol>'
)
Just trying variations of the two KEY_PAIR enums and the hardcoded 0 or 1. Am I passing something completely wrong? Any details help please. Thank you