Web3 Learning

How Should Businesses Secure Crypto Wallet API Keys?

By Safeheron Team

How should businesses secure crypto wallet API keys? There are four essentials. Grant each key only the permissions its system needs. Keep keys out of code and config files, store them in a dedicated key management service, and rotate them regularly. Restrict who can use them with IP allowlists and request signing. And back everything up with limits, approvals, and an address whitelist, so that even if a key is stolen, the attacker cannot move the money.

Why Are API Keys a High-Risk Point for Business Wallets?

An API key is the credential a business’s systems use to prove their identity when calling a WaaS API. Whoever holds it is “you” as far as the system is concerned. Keys often end up in code, logs, or chats, and once one leaks, transfers initiated by an attacker look no different from normal business activity.

How Should API Key Permissions Be Assigned?

Follow the principle of least privilege: each key gets only the permissions it strictly needs. Systems that only reconcile or query balances should get read-only access, systems that generate deposit addresses should not be able to transfer funds, and keys that can initiate transfers should not be able to approve them or change risk rules. Different systems and environments should use different keys, and test keys must never touch production funds. That way, if one key leaks, the damage is limited to the small set of things it can do.

How Should API Keys Be Stored and Rotated?

Keys should be kept in a dedicated key management service or hardware security module and read by services at runtime, never written into code or config files. They should be rotated regularly, and revoked and reissued immediately when someone leaves or a leak is suspected.

How Can You Limit the Damage From a Stolen API Key?

Use IP allowlists and request signing to restrict who can call the API, then have a policy engine apply limits and approvals to transfers initiated through the API, with destinations restricted to addresses on an address whitelist. Even if a key is stolen, the attacker will find it very hard to move funds, which is also key to preventing transfer approvals from being bypassed.

How Does Safeheron Help Secure Wallet API Keys?

Safeheron gives each API Key its own permissions and its own IP allowlist, and a key becomes active only after the team approves it. When a business creates an API Key in Safeheron, it uploads its own RSA public key and grants only the permissions the use case needs, following the principle of least privilege. It also lists the outbound IP addresses its servers call from, and Safeheron rejects requests from any other IP. Each key serves one use case and cannot be shared or reused across use cases. The key takes effect only after team members approve it in the Safeheron mobile app.

Every call is signed. Under Safeheron’s API authentication scheme, the business signs each request with its API RSA private key (SHA256WithRSA), and the request data is encrypted with AES-256 and Safeheron’s RSA public key. Only the business’s RSA public key is set up in the Safeheron Console.

On the transaction side, Safeheron’s policy engine can limit which API Keys may initiate transactions, and its policy matching runs in a TEE. Approval can be automated with an API Co-Signer that the business deploys on its own server. The Co-Signer asks the business’s approval callback service about each pending transaction and submits that decision before MPC signing goes ahead. In production the callback is required: approving every request without one is allowed only in testing environments.

Frequently Asked Questions

How Does Safeheron Protect Wallet API Keys?

Safeheron protects wallet API keys with least-privilege permissions for each key, IP allowlists, RSA-signed requests, and team approval before any new key goes live. Its policy engine can also limit which API Keys may initiate transactions, and an API Co-Signer can automate approvals by checking each transaction with the business’s own callback service.

Conclusion

API keys are the most overlooked entry point into business wallets. Assign them with least privilege, store them securely and rotate them regularly, then add layers of protection with IP allowlists, request signing, limits, approvals, and address whitelists, so that even a leaked key causes only limited, acceptable losses. Safeheron’s MPC Wallet-as-a-Service provides MPC key management and a policy engine for businesses.

Want to check whether your API integration is secure? Contact Safeheron’s Sales Team to Book a 1:1 Demo

Share

Looking for a secure way to manage digital assets?

Talk to our experts and find the right solution for your business.

Request a Demo