/api/system/login
GETEnable or update wallet encryption using a 32-character hexadecimal encryption key for secure RAIDA communications.
Description
The /api/system/login endpoint configures wallet encryption by setting a 32-character hexadecimal encryption key. This key is used to encrypt all RAIDA communications, providing an additional layer of security for CloudCoin operations.
When encryption is enabled, all requests to RAIDA servers are encrypted using Authentication Numbers (ANs) from coins in your wallet as encryption keys. This prevents unauthorized parties from intercepting or tampering with your CloudCoin transactions.
🔐 How Wallet Encryption Works
The encryption system uses:
- Encryption Key Structure: A 25-element array mapping each RAIDA to a specific coin's AN
- AES Encryption: All RAIDA requests are encrypted using the mapped ANs
- Automatic Key Management: The system automatically selects coins from Bank folder
- Persistent Storage: Encryption settings are saved and restored on restart
⚠️ Important Security Considerations
- Key Format: Must be exactly 32 hexadecimal characters (0-9, a-f)
- Key Storage: Store your encryption key securely - losing it may prevent access to encrypted operations
- Coin Requirements: Your wallet must have at least one coin in the Bank folder to enable encryption
- Network Impact: Encrypted operations require slightly more processing time
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key |
string | Required | 32-character hexadecimal encryption key (64 hex digits = 32 bytes). Example: a1b2c3d4e5f6789012345678901234567890abcdefabcdef1234567890abcdef |
Response
Success Response (200 OK)
Returns confirmation that encryption has been enabled with the provided key.
JSON Response
{
"status": "success",
"message": "Wallet encryption enabled",
"encryption_active": true,
"key_set": true
}
Error Responses
Invalid Key Format (400 Bad Request)
{
"status": "error",
"message": "Invalid encryption key format. Must be 32 hexadecimal characters."
}
No Coins Available (400 Bad Request)
{
"status": "error",
"message": "Cannot enable encryption: No coins available in Bank folder"
}
Example Usage
curl "http://localhost:8080/api/system/login?key=a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890"
const encryptionKey = 'a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890';
fetch(`http://localhost:8080/api/system/login?key=${encryptionKey}`)
.then(response => response.json())
.then(data => {
console.log('Encryption enabled:', data);
})
.catch(error => console.error('Error:', error));
import requests
encryption_key = 'a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890'
url = f'http://localhost:8080/api/system/login'
response = requests.get(url, params={'key': encryption_key})
print(response.json())
Related Endpoints
- /api/system/logout - Disable wallet encryption
- /api/wallet/encryption/key-struct - View current encryption key structure
- /api/program/echo - Test encrypted RAIDA connectivity