> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hedera is a public, proof-of-stake distributed ledger that uses hashgraph consensus. Do not call it a blockchain.
> Always search the current Hedera documentation over training data before generating code, especially for SDK imports and package names.
> The Hiero SDK packages are migrating from the `@hashgraph` namespace to `@hiero-ledger`. Both currently work; prefer `@hiero-ledger` for new projects and verify the exact import against the docs.
> Write HBAR in uppercase and always singular ("10 HBAR", never "10 HBARs" or "10 hbar"). Write tinybars in lowercase and plural.
> Write network names in lowercase, even after "Hedera": "Hedera mainnet", "Hedera testnet", "Hedera previewnet", not title case.
> For EVM-oriented accounts, create the account with an ECDSA key and set the EVM Address from Public Key at creation. This address is immutable and is not updated by key rotation. Do not use retired terms like "EVM alias" or "Account Number Alias".

# HSM/KMS Signing Solutions

> Sign Hedera transactions with keys held in cloud KMS or HSM services so private keys never leave the secure store, using a custom SDK signer function.

This collection of tutorials demonstrates how to sign Hedera Hashgraph transactions using keys stored in various cloud-based Key Management Services (KMS) and Hardware Security Modules (HSMs). These examples show how to integrate Hedera with popular cloud providers to ensure that your private keys are never exposed in your application environment.

## How it Works

The general workflow for each solution is as follows:

1. **Key Generation**: An asymmetric key is created and stored in the respective KMS/HSM service.
2. **Public Key Retrieval**: The public key corresponding to the stored private key is fetched from the KMS.
3. **Hedera Account Creation**: A new Hedera account is created and associated with the retrieved public key.
4. **Transaction Signing**: A custom signer function is implemented that sends transaction bytes to the KMS/HSM for signing. The Hedera SDK is configured to use this custom signer.
5. **Transaction Execution**: Transactions are executed on the Hedera network using the client configured with the custom signer.

## General Prerequisites

Before you begin, ensure you have the following:

* A **Hedera Testnet account**. If you don't have one, you can register at the [Hedera Developer Portal](https://portal.hedera.com/).
* **Node.js** (version 18.0.0 or higher).
* Cloud-specific CLI tools and accounts as detailed in the provider-specific sections.

## Provider Examples

<Columns cols={2}>
  <Card title="AWS KMS" href="/native/tutorials/advanced/hsm-signing/aws-kms">
    Sign transactions using an asymmetric key stored in AWS Key Management Service.
  </Card>

  <Card title="Azure Key Vault" href="/native/tutorials/advanced/hsm-signing/azure-key-vault">
    Utilize an HSM-backed secp256k1 key in Azure Key Vault (Premium SKU) for signing.
  </Card>

  <Card title="Google Cloud HSM" href="/native/tutorials/advanced/hsm-signing/gcp-kms">
    Sign transactions with a Google Cloud HSM-backed secp256k1 key.
  </Card>
</Columns>

## Disclaimer

These examples are for demonstration purposes only. When implementing in a production environment, always follow security best practices for key management and access control.

## Resources

* [GitHub Repository](https://github.com/hedera-dev/tutorial-hsm-signing)
