Keys and Signatures
The Real blockchain, a decentralized Layer 1 (L1) network, enables users, developers, and small and medium enterprises (SMEs) to tokenize real-world assets (RWAs) securely and efficiently. A fundamental aspect of interacting with Real is the use of keys and signatures, which ensure the security, ownership, and authenticity of transactions on the network. This page explains the core concepts of keys and signatures, how they are created, and their usage within the Real ecosystem.
Concept of Keys and Signatures
Keys and signatures are cryptographic mechanisms that underpin the security and decentralization of the Real blockchain. They enable users to prove ownership of their accounts, sign transactions, and interact with the network in a trustless manner.
What Are Keys?
Keys are cryptographic tools used to secure and manage accounts on the Real blockchain. They come in pairs:
Private Key: A secret, randomly generated string of data (e.g., a 256-bit number) that only the account owner should know. It is used to sign transactions and prove ownership.
Public Key: A mathematically derived value from the private key, which is publicly shareable. It is used to generate the account address and verify signatures.
Relationship: The private key and public key are mathematically linked through elliptic curve cryptography (specifically, the Secp256k1 curve, which Real inherits from the Cosmos SDK). The private key can generate the public key, but the reverse is computationally infeasible, ensuring security.
What Are Signatures?
A signature is a cryptographic proof created using the private key to authorize a transaction or action on the Real blockchain. When you sign a transaction, you generate a digital signature that can be verified by others using your public key, proving that the transaction was initiated by the rightful account owner without revealing the private key.
Core Principles
Ownership: The private key grants control over an account and its assets (e.g., $REAL tokens, tokenized RWAs). Losing your private key means losing access to your account.
Authenticity: Signatures ensure that transactions are genuine and authorized by the account owner.
Security: The cryptographic nature of keys and signatures makes it nearly impossible for unauthorized parties to forge transactions or access your account.
Decentralization: Keys and signatures eliminate the need for a central authority to verify transactions—anyone can validate a signature using the public key.
Creation of Keys and Signatures
Step 1: Generating Keys
Keys are generated when you create a new account on the Real blockchain, typically through a wallet. Here’s how it works:
Choose a Wallet:
Use a compatible wallet like the Real Native Wallet, Keplr, or MetaMask (configured for Real). Download the Real Native Wallet from real.finance/downloads.
Generate a Key Pair:
When you create a new account, the wallet generates a random private key using a secure random number generator.
The private key is then used to derive the public key via the Secp256k1 elliptic curve algorithm.
Example (simplified for illustration):
Private Key:
e8f32e723decf405...
(a 256-bit number, kept secret)Public Key:
02a1633cafcc01e...
(derived from the private key, publicly shareable)
Seed Phrase:
The wallet converts the private key into a 12- or 24-word seed phrase (mnemonic) using the BIP-39 standard. This seed phrase is a human-readable backup of your private key.
Example Seed Phrase:
apple banana cherry dog elephant fox grape horse igloo jelly kiwi lemon
Important: Store your seed phrase securely offline (e.g., on paper or in a safe). It’s the only way to recover your private key if you lose access to your wallet.
Account Address:
The public key is hashed (using SHA-256 and RIPEMD-160) and encoded in Bech32 format (with the real prefix) to create your account address.
Example Address:
real1x9y8z7w2q3p4v5k6m7n8j0
Step 2: Creating Signatures
Signatures are generated whenever you initiate a transaction or action on the Real blockchain (e.g., sending $REAL tokens, staking, or tokenizing an RWA).
Prepare the Transaction:
When you perform an action (e.g., transferring 100 $REAL tokens), your wallet constructs a transaction message containing details like the sender, receiver, amount, and fees.
Sign the Transaction:
The wallet uses your private key to sign the transaction message, creating a digital signature.
This process involves:
Hashing the transaction message (using SHA-256) to create a fixed-length digest.
Signing the digest with the private key using the Secp256k1 algorithm, producing a signature (a pair of values,
r
ands
).
Example Signature (simplified):
3045022100a1b2c3d4e5...
Broadcast the Transaction:
The signed transaction (including the signature and public key) is broadcast to the Real network.
Validators verify the signature using your public key to confirm the transaction’s authenticity.
Usage of Keys and Signatures
Keys and signatures are used in various activities on the Real blockchain, ensuring secure and authorized interactions.
Managing Your Account
Private Key/Signature: Your private key is used to sign transactions, proving you own the account and authorizing actions like sending $REAL tokens or deploying smart contracts.
Public Key/Address: Your public key (via the account address) is used by others to send you $REAL tokens or tokenized RWAs, and by validators to verify your signatures.
Sending $REAL Tokens
Process:
In your wallet (e.g., Real Native Wallet), select “Send,” enter the recipient’s address (e.g.,
real1a2b3c4d5e6f7g8h9i0
), and specify the amount (e.g., 100 $REAL).The wallet signs the transaction with your private key and broadcasts it to the network.
Validators verify the signature using your public key, ensuring the transaction is legitimate.
Transaction Fee: You’ll pay a small fee in $REAL tokens, which is also signed as part of the transaction.
Staking $REAL Tokens
Use your account to stake $REAL tokens and secure the network:
In the Real Staking Dashboard, delegate tokens to a validator.
The wallet signs the delegation transaction with your private key.
Example CLI command:
reald tx staking delegate <VALIDATOR_ADDRESS> 5000ureal --from <YOUR_ADDRESS> --chain-id real-mainnet-1 --gas auto --fees 500ureal
Learn more in our Consensus Guide.
Tokenizing Real-World Assets (RWAs)
SMEs can tokenize assets using the Real Tokenization Platform:
Submit asset details and deploy a tokenized asset on-chain.
Your wallet signs the transaction, authorizing the creation of the tokenized asset.
The signature ensures that only you, the account owner, can initiate the tokenization process.
Governance Voting
Participate in on-chain governance by voting on proposals:
Access the governance portal at app.real.finance/governance.
Sign a voting transaction with your private key to cast your vote, weighted by your staked $REAL tokens.
Validators verify the signature to record your vote securely.
Interacting with Smart Contracts
Developers and users can interact with smart contracts on Real:
Deploy a smart contract using the Real CLI:
reald tx wasm store my_contract.wasm --from <YOUR_ADDRESS> --chain-id real-mainnet-1 --gas auto --fees 5000ureal
The transaction is signed with your private key, authorizing the deployment.
Validators verify the signature before executing the contract.
See our Tutorials for more on smart contracts.
Security Best Practices
Protect Your Private Key: Never share your private key or seed phrase with anyone. Store them offline in a secure location (e.g., a safe or hardware wallet).
Use a Hardware Wallet: For enhanced security, store your keys on a hardware wallet like Ledger or Trezor, which keeps your private key offline.
Verify Signatures: When interacting with dApps or signing transactions, ensure you’re using official Real tools (e.g., real.finance) to avoid phishing attacks.
Backup Your Keys: Regularly back up your seed phrase to recover your account if your device is lost or damaged.
Need Help?
If you have questions about keys, signatures, or securing your account on Real, reach out to our team:
Email: team@real.finance
Telegram: t.me/realfin
Keys and signatures are the foundation of secure interactions on the Real blockchain, empowering you to manage $REAL tokens, tokenize RWAs, and participate in a decentralized ecosystem. Keep your keys safe and start exploring Real today!
Last updated