Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in documentation #46

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/ECCX08HMAC/ECCX08HMAC.ino
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/ECCX08RandomNumber/ECCX08RandomNumber.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/ECCX08Signing/ECCX08Signing.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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 :(");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/ECCX08.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down