diff --git a/examples/ECCX08HMAC/ECCX08HMAC.ino b/examples/ECCX08HMAC/ECCX08HMAC.ino index 935334d..222651b 100644 --- a/examples/ECCX08HMAC/ECCX08HMAC.ino +++ b/examples/ECCX08HMAC/ECCX08HMAC.ino @@ -1,7 +1,7 @@ /* ECCX08 HMAC functionality example - This sketch uses the ECC608 to generate an hmac on some data. + This sketch uses the ECC608 to generate an HMAC on some data. Stores key using nonce. Tested on the Arduino Nano RP2040. diff --git a/examples/ECCX08RandomNumber/ECCX08RandomNumber.ino b/examples/ECCX08RandomNumber/ECCX08RandomNumber.ino index 4744c1e..4a6a3b6 100644 --- a/examples/ECCX08RandomNumber/ECCX08RandomNumber.ino +++ b/examples/ECCX08RandomNumber/ECCX08RandomNumber.ino @@ -2,7 +2,7 @@ ECCX08 Random Number This sketch uses the ECC508 or ECC608 to generate a random number - every second and print it to the Serial monitor + every second and print it to the Serial Monitor Circuit: - MKR board with ECC508 or ECC608 on board diff --git a/examples/ECCX08Signing/ECCX08Signing.ino b/examples/ECCX08Signing/ECCX08Signing.ino index c9d9695..fe92d3e 100644 --- a/examples/ECCX08Signing/ECCX08Signing.ino +++ b/examples/ECCX08Signing/ECCX08Signing.ino @@ -3,7 +3,7 @@ This sketch uses the ECC508 or ECC608 to sign some data using the private key of a key slot, the signature - is printed to the Serial monitor. Then the signature is + is printed to the Serial Monitor. Then the signature is verified using the public key of the slot. NOTE: the input data must be 64 bytes in length! @@ -69,14 +69,14 @@ void setup() { Serial.println(); - // To make the signature verifcation fail, uncomment the next line: + // To make the signature verification fail, uncomment the next line: // signature[0] = 0x00; // validate the signature if (ECCX08.ecdsaVerify(input, signature, publicKey)) { Serial.println("Verified signature successfully :D"); } else { - Serial.println("oh no! failed to verify signature :("); + Serial.println("Oh no! Failed to verify signature :("); } } diff --git a/examples/Tools/ECCX08SelfSignedCert/ECCX08SelfSignedCert.ino b/examples/Tools/ECCX08SelfSignedCert/ECCX08SelfSignedCert.ino index a83562b..a5cade8 100644 --- a/examples/Tools/ECCX08SelfSignedCert/ECCX08SelfSignedCert.ino +++ b/examples/Tools/ECCX08SelfSignedCert/ECCX08SelfSignedCert.ino @@ -4,7 +4,7 @@ This sketch can be used to generate a self signed certificate for a private key generated in an ECC508/ECC608 crypto chip slot. The issue and expired date, and signature are stored in another - slot for reconstrution. + slot for reconstruction. If the ECC508/ECC608 is not configured and locked it prompts the user to configure and lock the chip with a default TLS diff --git a/src/ECCX08.cpp b/src/ECCX08.cpp index a858668..0164343 100644 --- a/src/ECCX08.cpp +++ b/src/ECCX08.cpp @@ -62,7 +62,7 @@ int ECCX08Class::begin() void ECCX08Class::end() { - // First wake up the device otherwise the chip didn't react to a sleep commando + // First wake up the device otherwise the chip didn't react to a sleep command wakeup(); sleep(); #ifdef WIRE_HAS_END @@ -627,7 +627,7 @@ int ECCX08Class::challenge(const byte message[]) return 0; } - // Nounce, pass through + // Nonce, pass through if (!sendCommand(0x16, 0x03, 0x0000, message, 32)) { return 0; } @@ -807,7 +807,7 @@ int ECCX08Class::addressForSlotOffset(int slot, int offset) int ECCX08Class::sendCommand(uint8_t opcode, uint8_t param1, uint16_t param2, const byte data[], size_t dataLength) { - int commandLength = 8 + dataLength; // 1 for type, 1 for length, 1 for opcode, 1 for param1, 2 for param2, 2 for crc + int commandLength = 8 + dataLength; // 1 for type, 1 for length, 1 for opcode, 1 for param1, 2 for param2, 2 for CRC byte command[commandLength]; command[0] = 0x03;