Skip to content

change signatures to cosi #1

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

Open
wants to merge 1 commit into
base: v2.1.0-ncs3-branch
Choose a base branch
from

Conversation

TychoVrahe
Copy link

This PR simplifies image_validation and only leaves custom, CoSi based signatures.

Dev keys are hardcoded for now.

@TychoVrahe TychoVrahe requested a review from Copilot May 16, 2025 13:19
@TychoVrahe TychoVrahe self-assigned this May 16, 2025
@TychoVrahe TychoVrahe changed the base branch from main to v2.1.0-ncs3-branch May 16, 2025 13:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the image validation signatures to use a custom CoSi-based implementation by replacing previous signature mechanisms with Trezor-crypto’s ed25519-donna sources and by hardcoding development keys for the time being.

  • Added several new Trezor-crypto source files in boot/zephyr/CMakeLists.txt.
  • Updated boot/bootutil/zephyr/CMakeLists.txt to include the new Trezor-crypto directory.
  • Added a new file in boot/bootutil/trezor-crypto containing a relative path reference.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
boot/zephyr/CMakeLists.txt Introduced new source files for Trezor-crypto and disabled precomputation for Ed25519.
boot/bootutil/zephyr/CMakeLists.txt Added an include directory pointing to the Trezor-crypto sources.
boot/bootutil/trezor-crypto Added a file with a relative path reference to the crypto directory.
Comments suppressed due to low confidence (1)

boot/bootutil/zephyr/CMakeLists.txt:12

  • Ensure that the relative path '../trezor-crypto' correctly resolves to the intended directory across all build configurations to prevent potential include path issues.
+  ../trezor-crypto

@@ -0,0 +1 @@
../../../../../crypto
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file in boot/bootutil/trezor-crypto only contains a relative path reference. Consider using a symbolic link or adding documentation to clarify its purpose, as the current approach may lead to issues if the directory structure changes.

Suggested change
../../../../../crypto
# This file has been replaced with a symbolic link to the crypto directory.
# Purpose: To provide a stable reference to the crypto directory without relying on fragile relative paths.
# Run the following command to create the symbolic link:
# ln -s ../../../../../crypto boot/bootutil/trezor-crypto

Copilot uses AI. Check for mistakes.

@TychoVrahe TychoVrahe force-pushed the tychovrahe/sig/cosi branch from 26353ac to 96cf6ac Compare May 16, 2025 13:21
@TychoVrahe TychoVrahe force-pushed the tychovrahe/sig/cosi branch from 96cf6ac to 19134f0 Compare May 16, 2025 13:26
@TychoVrahe TychoVrahe requested a review from hiviah May 19, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant