> For the complete documentation index, see [llms.txt](https://docs.xrpl-commons.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xrpl-commons.org/core-dev-bootcamp/module04/homeworks/homework1.md).

# Homework 1: Signature Verification Discovery

[← Back to Cryptography I: Blockchain Security and Cryptographic Foundations](/core-dev-bootcamp/module04.md)

***

### Objective

This homework deepens your understanding of how **Rippled verifies transaction signatures**. You will explore the codebase to trace the signature verification pipeline and analyze cryptographic operations step by step.

**Format**: Written report (PDF or Markdown) including diagrams, code snippets, and explanations.

***

### Task

Perform a hands-on exploration of Rippled’s transaction processing code and trace how a transaction’s signature is verified from submission to final cryptographic validation.

#### Requirements

1. **Setup**
   * Optionally run Rippled in standalone mode for testing
   * Select a transaction to analyze (e.g., Payment, OfferCreate)
   * Trace the transaction through the signature verification process in the codebase
2. **Code Exploration**
   * Identify the entry point: `Transactor::apply()`
   * Document the call to `preflight()` and its parameters
   * Follow the verification chain to `checkSign()` functions
     * Distinguish between `Transactor::checkSign()` and `STTx::checkSign()`
     * Identify which function performs actual cryptographic verification
   * Explore `STTx::checkSign()` and trace the call to `verify()`
   * Determine how the signature algorithm (secp256k1 or ed25519) is detected
   * Document differences in the verification flow for each algorithm
3. **Documentation**
   * Create a call chain diagram from `Transactor::apply()` to the final `verify()` function
   * Prepare a function analysis table including:
     * Function name
     * File location
     * Purpose
     * Key parameters
     * Return values
   * Explain error handling for failed signature verification
   * Include relevant code snippets (5–10 lines) for:
     * Signature verification calls
     * Algorithm detection logic
     * Final cryptographic verification

***

### Deliverable

A written report containing:

* Call chain diagram
* Function analysis table
* Explanation of algorithm handling (secp256k1 vs ed25519)
* Error handling details
* Code snippets illustrating the verification process

### Tips

* Use `grep` or your IDE to locate function definitions
* Follow `#include` statements to understand dependencies
* Check return types to understand success/failure patterns
* Use `git log` to examine history of cryptographic changes

#### Learning Goals

By completing this homework, you should be able to:

* Navigate Rippled’s transaction processing code
* Understand the signature verification pipeline
* Identify where cryptographic operations occur
* Explain the difference between permission checks and signature verification
