From 6ac9e211e9b3ca11a8f22e91ee6848a98dccc4f0 Mon Sep 17 00:00:00 2001 From: B Manvitha <119921779+Manvitha3004@users.noreply.github.com> Date: Mon, 21 Apr 2025 16:05:40 +0530 Subject: [PATCH] Delete cli-interface directory --- cli-interface/.gitignore | 5 - cli-interface/Readme.md | 290 ------- cli-interface/bin/quantum-chain.js | 118 --- cli-interface/data/blockchain/.gitkeep | 0 cli-interface/data/blockchain/chain.json | 38 - cli-interface/data/blockchain/mempool.json | 12 - cli-interface/data/wallets/.gitkeep | 0 .../1b72e688-43f4-4eb6-b03c-3ac9842d37fd.json | 10 - .../27f26c43-c72c-4f8e-87d3-20021941d9aa.json | 10 - .../49782947-dacb-4ff0-a8a0-4c21c2fda82f.json | 10 - .../79873e07-7571-42f0-8995-e54865a517f2.json | 10 - .../98ba098e-8cc6-4860-a1bd-f8c68816bec3.json | 10 - cli-interface/lib/attack/simulator.js | 421 ---------- cli-interface/lib/blockchain.js | 514 ------------- cli-interface/lib/commands/attack.js | 273 ------- cli-interface/lib/commands/blockchain.js | 266 ------- cli-interface/lib/commands/mining.js | 89 --- cli-interface/lib/commands/transaction.js | 226 ------ cli-interface/lib/commands/wallet.js | 357 --------- cli-interface/lib/cryptography/classical.js | 191 ----- cli-interface/lib/cryptography/lattice.js | 278 ------- cli-interface/lib/cryptography/sphincs.js | 194 ----- cli-interface/lib/mining.js | 0 cli-interface/lib/transaction.js | 202 ----- cli-interface/lib/wallet.js | 351 --------- cli-interface/package-lock.json | 723 ------------------ cli-interface/package.json | 53 -- cli-interface/utils/config.js | 123 --- cli-interface/utils/formatting.js | 185 ----- cli-interface/utils/storage.js | 134 ---- 30 files changed, 5093 deletions(-) delete mode 100644 cli-interface/.gitignore delete mode 100644 cli-interface/Readme.md delete mode 100644 cli-interface/bin/quantum-chain.js delete mode 100644 cli-interface/data/blockchain/.gitkeep delete mode 100644 cli-interface/data/blockchain/chain.json delete mode 100644 cli-interface/data/blockchain/mempool.json delete mode 100644 cli-interface/data/wallets/.gitkeep delete mode 100644 cli-interface/data/wallets/1b72e688-43f4-4eb6-b03c-3ac9842d37fd.json delete mode 100644 cli-interface/data/wallets/27f26c43-c72c-4f8e-87d3-20021941d9aa.json delete mode 100644 cli-interface/data/wallets/49782947-dacb-4ff0-a8a0-4c21c2fda82f.json delete mode 100644 cli-interface/data/wallets/79873e07-7571-42f0-8995-e54865a517f2.json delete mode 100644 cli-interface/data/wallets/98ba098e-8cc6-4860-a1bd-f8c68816bec3.json delete mode 100644 cli-interface/lib/attack/simulator.js delete mode 100644 cli-interface/lib/blockchain.js delete mode 100644 cli-interface/lib/commands/attack.js delete mode 100644 cli-interface/lib/commands/blockchain.js delete mode 100644 cli-interface/lib/commands/mining.js delete mode 100644 cli-interface/lib/commands/transaction.js delete mode 100644 cli-interface/lib/commands/wallet.js delete mode 100644 cli-interface/lib/cryptography/classical.js delete mode 100644 cli-interface/lib/cryptography/lattice.js delete mode 100644 cli-interface/lib/cryptography/sphincs.js delete mode 100644 cli-interface/lib/mining.js delete mode 100644 cli-interface/lib/transaction.js delete mode 100644 cli-interface/lib/wallet.js delete mode 100644 cli-interface/package-lock.json delete mode 100644 cli-interface/package.json delete mode 100644 cli-interface/utils/config.js delete mode 100644 cli-interface/utils/formatting.js delete mode 100644 cli-interface/utils/storage.js diff --git a/cli-interface/.gitignore b/cli-interface/.gitignore deleted file mode 100644 index 8b28cc3..0000000 --- a/cli-interface/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -dist/ -coverage/ - -*.log \ No newline at end of file diff --git a/cli-interface/Readme.md b/cli-interface/Readme.md deleted file mode 100644 index 53a6353..0000000 --- a/cli-interface/Readme.md +++ /dev/null @@ -1,290 +0,0 @@ -
- - -

- - QUANTUM-CHAIN - -

- - - - ![image](https://github.com/user-attachments/assets/be7b757b-9b78-483d-b777-6c6b3b296c20) - - - - # Quantum-Resistant Blockchain Implementation - -

A breakthrough blockchain architecture that maintains security integrity in the face of emerging quantum computing threats. Our implementation protects digital assets through innovative cryptographic approaches that can withstand attacks from both classical and quantum adversaries.

- - [![Node.js](https://img.shields.io/badge/Node.js-v18.x-green.svg)](https://nodejs.org/) - -
- -## šŸ“‹ Overview - -

Quantum-Chain represents a paradigm shift in blockchain security, implementing a hybrid approach that combines traditional cryptography with advanced quantum-resistant algorithms. Unlike conventional blockchains that remain vulnerable to quantum computing advancements, our system preemptively addresses these security challenges while maintaining performance and compatibility with existing infrastructure.

-

The core innovation lies in our dual-signature system, allowing transactions to leverage either classical ECDSA for speed and compatibility or transition to SPHINCS+ and lattice-based algorithms for robust protection against quantum threats. This creates a future-proof blockchain that safeguards digital assets against both present and emerging computational attacks.

- -## šŸš€ Key Features - -- **Hybrid Cryptography System** - - Classical (ECDSA) for backward compatibility - - Quantum-resistant algorithms (SPHINCS+, Kyber) for future security - -- **Quantum Security Framework** - - Simulated quantum attack models using Shor's and Grover's algorithms - - Security metrics and vulnerability assessments - - Real-time risk analysis based on quantum-vulnerable assets - -- **Migration Utilities** - - Tools for transitioning from classical to quantum-resistant addresses - - Key management across multiple cryptographic schemes - -- **Educational Components** - - Visualization of quantum attack vectors - - Comparative security analysis between cryptographic methods - -## šŸ”§ Technical Stack - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Backend TechnologiesCryptographic Implementations
Node.jsšŸ”’ SPHINCS+🧩 Kyber Lattice
Commander.js npmšŸ” ECDSAšŸ”‘ SHA-256/512
Storage & DataDevelopment Tools
šŸ“ LevelDB Git
-
- -## šŸ” Cryptographic Comparison - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AlgorithmClassical SecurityQuantum SecuritySignature Size
ECDSA (Classical)128 bitsāŒ 0 bits~72 bytes
SPHINCS+256 bitsāœ… 128 bits~7 KB
Lattice (Kyber)256 bitsāœ… 128 bits~2.5 KB
-
- -## āš™ļø Installation - -```bash -# Clone the repository -git clone https://github.com/yourusername/quantum-chain.git - -# Change to project directory -cd quantum-chain - -# Install dependencies -npm install - -# Make the CLI executable -chmod +x bin/quantum-chain.js - -# Optional global installation -npm install -g . -``` - -## Command Reference - -### Wallet Management - -| Command | Description | Example | -|---------|-------------|---------| -| `wallet create` | Creates a new wallet with three key types | `quantum-chain wallet create --name "MyWallet" --password "securepassword"` | -| `wallet list` | Lists all wallets in the system | `quantum-chain wallet list` | -| `wallet info` | Displays detailed wallet information | `quantum-chain wallet info --id ""` | -| `wallet balance` | Shows balance for wallet or specific address | `quantum-chain wallet balance --id ""` | -| `wallet migrate` | Migrates funds from classical to quantum-resistant address | `quantum-chain wallet migrate --id "" --to-quantum sphincs` | - -### Transaction Operations - -| Command | Description | Example | -|---------|-------------|---------| -| `tx create` | Creates a transaction with specified signature type | `quantum-chain tx create --from "" --to "
" --amount --type ` | -| `tx info` | Retrieves transaction details and security assessment | `quantum-chain tx info --hash ""` | - -### Blockchain Operations - -| Command | Description | Example | -|---------|-------------|---------| -| `chain status` | Shows blockchain status with security metrics | `quantum-chain chain status` | -| `block info` | Provides detailed information about a specific block | `quantum-chain block info --index ` | -| `mine` | Mines a new block and processes pending transactions | `quantum-chain mine --reward-address "
"` | -| `security metrics` | Generates comprehensive security assessment | `quantum-chain security metrics` | - -### Attack Simulation - -| Command | Description | Example | -|---------|-------------|---------| -| `attack analyze` | Analyzes blockchain for quantum vulnerabilities | `quantum-chain attack analyze` | -| `attack simulate` | Simulates quantum attack on specific address | `quantum-chain attack simulate --qubits --target "
"` | -| `attack report` | Generates comprehensive attack impact report | `quantum-chain attack report` | - -## šŸ” Address Format - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
TypePrefixBased OnSecurity
Classical0x...ECDSA on secp256k1 (Ethereum-compatible)Vulnerable to quantum attacks
SPHINCS+qx...Stateless hash-based signaturesQuantum-resistant
Lattice-basedlx...Learning With Errors (LWE)Quantum-resistant
-
- -## Quantum Attack Vectors - -### 1. Against Classical Cryptography (ECDSA) -- Implementation of Shor's algorithm for the discrete logarithm problem -- Complexity reduction from O(2^n) to O(n^3) -- Successfully derives private key with sufficient qubits (≄512) - -### 2. Against Quantum-Resistant Cryptography -- **SPHINCS+**: Resistance due to security reduction to hash functions -- Grover's algorithm only provides quadratic speedup (256-bit → 128-bit security) -- Still requires 2^128 operations, computationally infeasible - -### 3. Lattice-Based Resistance -- Security based on shortest vector problem (SVP) and learning with errors (LWE) -- No known quantum algorithm provides exponential speedup -- Retains exponential hardness even under quantum computing - -## Security Metrics - -The system tracks: -- Transaction distribution by signature type -- Address distribution (classical vs. quantum-resistant) -- Token security categorization (vulnerable vs. secure funds) -- Real-time risk assessment based on quantum-vulnerable assets - -## Common Workflows - -### Setting Up a New Secure Wallet - -```bash -# Create wallet -quantum-chain wallet create --name "SecureWallet" --password "your-password" - -# Mine to get initial funds (using quantum-resistant address) -quantum-chain mine --reward-address "qx..." - -# Check balance -quantum-chain wallet balance --id "" -``` - -### Creating and Tracking Quantum-Resistant Transactions - -```bash -# Create quantum-resistant transaction -quantum-chain tx create --from "" --to "" --amount 10 --type sphincs - -# Mine to process transaction -quantum-chain mine --reward-address "" - -# Verify transaction and security status -quantum-chain tx info --hash "" -``` - -### Analyzing Blockchain Quantum Security - -```bash -# Check overall security metrics -quantum-chain security metrics - -# Run vulnerability analysis -quantum-chain attack analyze - -# Generate comprehensive attack report -quantum-chain attack report -``` - -### Testing Quantum Attack Resistance - -```bash -# Simulate attack on classical address -quantum-chain attack simulate --qubits 4000 --target "0x..." - -# Simulate attack on quantum-resistant address -quantum-chain attack simulate --qubits 4000 --target "qx..." - -# Migrate vulnerable funds if necessary -quantum-chain wallet migrate --id "" --to-quantum sphincs -``` - - - - - -
- Built with ā¤ļø by the Team Mysterious Pickles -
diff --git a/cli-interface/bin/quantum-chain.js b/cli-interface/bin/quantum-chain.js deleted file mode 100644 index 4b15d08..0000000 --- a/cli-interface/bin/quantum-chain.js +++ /dev/null @@ -1,118 +0,0 @@ - -const program = require('commander'); -const chalk = require('chalk'); -const figlet = require('figlet'); -const { version } = require('../package.json'); - -const walletCommands = require('../lib/commands/wallet'); -const transactionCommands = require('../lib/commands/transaction'); -const blockchainCommands = require('../lib/commands/blockchain'); -const miningCommands = require('../lib/commands/mining'); -const attackCommands = require('../lib/commands/attack'); - -// Display CLI banner -console.log( - chalk.cyan( - figlet.textSync('Quantum-Chain', { horizontalLayout: 'full' }) - ) -); - -program - .version(version) - .description('A quantum-resistant blockchain implementation with attack simulation capabilities'); - -program - .command('wallet') - .description('Wallet management commands') - .addCommand(walletCommands.create) - .addCommand(walletCommands.info) - .addCommand(walletCommands.list) - .addCommand(walletCommands.balance) - .addCommand(walletCommands.migrate); - -// Transaction Commands -program - .command('tx') - .description('Transaction operations') - .addCommand(transactionCommands.create) - .addCommand(transactionCommands.info); - -// Blockchain Commands -program - .command('chain') - .description('Blockchain operations') - .addCommand(blockchainCommands.status); - -program - .command('block') - .description('Block operations') - .addCommand(blockchainCommands.info); - -// Mining Commands -// program -// .command('mine') -// .description('Mining operations') -// .action(miningCommands.mine); - -program - .command('mine') - .description('Mine a new block and receive a mining reward') - .option('-r, --reward-address
', 'Address to receive the mining reward') - .action(async (options) => { - try { - // FIX: Change this line from options.rewardAddress to options.rewardAddress - if (!options.rewardAddress) { - throw new Error('Reward address is required (--reward-address)'); - } - - const ora = require('ora'); // Add this line to import ora - const { getBlockchain } = require('../lib/blockchain'); // Add this line to import getBlockchain - - const spinner = ora('Mining new block...').start(); - - const blockchain = await getBlockchain(); - const result = await blockchain.mineBlock(options.rewardAddress); - - spinner.succeed('Block mined successfully!'); - - console.log('\nāœ… Block #' + result.blockIndex + ' mined successfully!'); - console.log('Block Hash: ' + result.blockHash); - console.log('Transactions: ' + result.transactionCount); - console.log('Mining Reward: ' + result.reward + ' tokens to ' + result.minerAddress); - console.log('Nonce Found: After ' + result.miningAttemptsRequired + ' attempts'); - console.log('\nBlock added to the blockchain.'); - } catch (error) { - console.error('\nāŒ Error mining block:', error.message); - } - }); - -// Security Commands -program - .command('security') - .description('Security operations') - .addCommand(blockchainCommands.metrics); - -// Attack Simulation Commands -program - .command('attack') - .description('Quantum attack simulation') - .addCommand(attackCommands.analyze) - .addCommand(attackCommands.simulate) - .addCommand(attackCommands.report); - -// Add global help information -program.on('--help', () => { - console.log(''); - console.log('Examples:'); - console.log(' $ quantum-chain wallet create --name "MyWallet" --password "securepassword"'); - console.log(' $ quantum-chain tx create --from "wallet-uuid" --to "0x123..." --amount 10 --type classical'); - console.log(' $ quantum-chain mine --reward-address "qx456..."'); - console.log(' $ quantum-chain attack simulate --qubits 4000 --target "0x789..."'); -}); - -program.parse(process.argv); - -// If no arguments provided, show help -if (!process.argv.slice(2).length) { - program.outputHelp(); -} \ No newline at end of file diff --git a/cli-interface/data/blockchain/.gitkeep b/cli-interface/data/blockchain/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/cli-interface/data/blockchain/chain.json b/cli-interface/data/blockchain/chain.json deleted file mode 100644 index df50fa4..0000000 --- a/cli-interface/data/blockchain/chain.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "index": 0, - "timestamp": 1745061642724, - "transactions": [ - { - "timestamp": 1745061642724, - "from": "GENESIS", - "to": "GENESIS", - "amount": 0, - "txHash": "901131d838b17aac0f7885b81e03cbdc9f5157a00343d30ab22083685ed1416a", - "signatureType": "GENESIS", - "signature": "GENESIS" - } - ], - "previousHash": "0", - "nonce": 0, - "hash": "4dafd0b42798a627e1dd984bb5d2f9e9a1b7dc840c3a2f40360117c167063df2" - }, - { - "index": 1, - "timestamp": 1745062986103, - "transactions": [ - { - "timestamp": 1745062986103, - "from": "MINING_REWARD", - "to": "qx493f12369ed598feef7ab84fe374f8d959e88a7d", - "amount": 100, - "txHash": "cf79bc50532c7f2318ee6f66835492ee5314a186e598c6cfeb30878b12cfbd5a", - "signatureType": "SYSTEM", - "signature": "SYSTEM" - } - ], - "previousHash": "4dafd0b42798a627e1dd984bb5d2f9e9a1b7dc840c3a2f40360117c167063df2", - "nonce": 3231, - "hash": "00006af85660afc0208ef4b354c6089bfa4fd11383675ccaa1353253e66fa94e" - } -] \ No newline at end of file diff --git a/cli-interface/data/blockchain/mempool.json b/cli-interface/data/blockchain/mempool.json deleted file mode 100644 index 42cc611..0000000 --- a/cli-interface/data/blockchain/mempool.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "timestamp": 1745063230290, - "from": "qx493f12369ed598feef7ab84fe374f8d959e88a7d", - "to": "0x5e5e61fe4ae4852ff3a0c9eb55c37b466d57755e", - "amount": 5, - "nonce": "78586248", - "txHash": "5e9829f9dad315f21639250e2b6fbe487e28bd1a03bc1bdd165abb4daed0f1e0", - "signatureType": "sphincs", - "signature": "{\"sigIndex\":1432283442,\"wotsSignature\":[\"f043b446af15ae60914283ebdd1d76a49238f25d104440376234b22b4f76cddc\",\"f164e185d49e476f96aac84b35b6b377ae330291af56ead66ae26d6dab0bd05d\",\"f9a7f61ae4c5557ff4e08ebb6811d80ed7b18508d5c7cdc3a460ff51eab673ba\",\"116c064bddd49d63b303a0c32d835e08c55bd8d9905eed4636bdb44ce9140926\",\"d1ce36617e9aeb3767e460bb21801654f795130d738725c2312a794924284580\",\"28d7da2ba020a9de1f3f4a01c2b5378dc39fecbc1edaa4ad34ef1b2eed599d0a\",\"baa16275d7f2f3c7938f23969918b593f3dd7e2e2e7a27df50fcb8f04bee1886\",\"bc40c0f4dd3075d3a2a14053e4405d7b8a3a1fc11ad488b77d7374bb4f9eb806\",\"df118f2f89dde7737e2c1cfbf01827cb3325668f3a79c2c5400347e93bed9d2b\",\"882cee0ebec5099970a3b6309cb4a2771f1b211b3251f31e1ab25c6121ff0823\",\"a234bc1614620a1d55cc1747208602b43a9d49c41e58977f619ebdf77f617c94\",\"d9553c5e2ac8fd2f83eccbbd54f0a5ec6f2fe117d88c074374ab2629e3db6482\",\"89364bb23bc82a5b334b09433579b125642be723fa025e0e225dc0bcfacf367c\",\"6ba666e1b81621e46edc551faacc63cc6ed82de37b34c57ed030749e2f9f0ccb\",\"019e95ff098248795079a7f9cf93241e19556e496ad753fd03d55ed2cdd1eb92\",\"ebe33d8b49dd25df08f890aa4b089ae0254d7b72b0279dea974cb6feb4af13be\",\"1842af9461b2f12790db2cbd022f14e713722e3ccc384e3a713e5c32eba5d4a4\",\"174ad358779298b38d6e13c8b3dc8002d159936777f39d051b1908c38ab912a9\",\"d613d4c14102101cafd616a0e1a6216fbf0ee900c5b22eab8f3551ac11a50e3e\",\"f24aad2d21eb41b752f80dffddf738e09dc94f06ea460a3dc84b2c4386107a92\",\"92eff338507e1224adfcfcbbed3d519725bdfae15395e9544392b5d275861457\",\"7f52ad105669bc551524f7b29cf9c77e974733606badce1aae7926e26ab57f6a\",\"7342d5063da00fb60f2f5f8f5f8b8955c3e92af490835a489392872fb1c092e1\",\"4f582fc87a93232769d93e447d0e7726628965eecba4dd1d1919e23dd030050a\",\"cf4bc494cf88a3a91bf9267fe09da75e1ab7f637be8739e2bce877e0f0189e15\",\"b2763007d243e30968b14e822fe43a542ad9239752b027370b4227cd9aa9956b\",\"60c458f6078bf432e618644f54573c7af404f8ec86b2e1d2ae340a27f5758e5c\",\"c2cc6b072b6538795cd8c27041262c56b3177ad6d2a84f79fec26081a986c9a5\",\"4328fee2ad393acee27370fd125704d7ad881b6ac679a364f692ac1e0374b3d4\",\"02ccf8b18e4cddddfb40acbdf16c2f3cc019cafa21168e387fb18523ef23f4b3\",\"af8b148eec9e867f6e38ee737bbb769e66ae49c69e94d412942f183e4774a4a2\",\"91675fcef9e5d34d1f8a783c36632fd0296604432727a479db76db3bdf227b23\"],\"authPath\":[\"bcc83601b741228fbcc49d1ea8fd33f73bfe607d83a6ceb2d026302a82bd7864\",\"d8a940c9da2d492c4a82563131caa677bbac009f382597562417733538aa7cb9\",\"950d120b5d3a017e35b9e1d3622f6042413241215457c7be87755af8484f59cb\",\"0d0320e7f1dff98f50ecc32e7ff80165c0736d8b0cff7a97369da56cc471968b\",\"1fe6abbae248c6e91306727cc64a2623efd660e84373b34f3c511c470356a316\",\"b76f5e32d22caca15706705df8d6c534d8b5d222eac0eade07b46d88a825cd4a\",\"c0f3dfd03a102eef2cab4e90edeefec1f472af9d3e7cd65846fcb33a834f5a29\",\"547adef4de7f2da5d39e0ce48ff5147ff2fe84128b8f2e9e73cffdeed06ffce8\",\"03388f5be1682003a2bcc715b422053eb5396f239c6c1454de38604336f75cc1\",\"cda7042b7b734f9bfc7e01d940b9d79de88a43a7917bc6b8dea73bfabfb33168\",\"ec58bdc80ad775dbc5765f271cc97aea7d68a09a5256077aa940e8160dc6f0c9\",\"99e4372e118be28d92855e2d8062130eb75fd083342b3621b4c5de1f3ea5dd97\",\"588afcc70db637315b3fb9edcbc3a1c96b98eb6a1bf12df222deded8308127a1\",\"2eeb51992f054bfb4ed1d8d476725d686a67f61846e175455800e377bb3c3d0c\",\"2dadf91ae1c9fbb8ed3409cb45b0452dad765b1fea8205473f43f0da93ebca68\",\"7ba24f01d4638b4fddcda7e56da9f47442c6598d93ecd460c119389ba69c94a1\",\"2f9cdad84ad91f3fe92caa2e603ec3e993fe10aec47fac4c7669573c0cc12729\",\"fc57a343ae58ddcedcf5ce090622d8bdfb07a23059ba88f890759f9c3bc10249\",\"dd6ae853f36c3c55bfa6321b0eefd9bd645d849c0cf2c2fae74f5e096692f664\",\"62bc075b606e4aeeaa297659e3e901dde72c7891600d74664c2b272a532287f8\",\"1cd36aba02e4c2bfd8eb4736a7f477f2c49ea61f69de2bcaad7ac9a8f738aa59\",\"83a26fdc47a485a7295b76c7a0f490937e59b2a0015e89fbb0f76547dc9d0374\",\"c40e512c0d9c67dbac5267b8a362fd2c19f7c21282247eb8496d53e95f2184f0\",\"19c2c3197803f46163f27a22f9fa5ab787a12d3b1597558a41c86a1c6a6e47aa\",\"c296c4cbc631ffdc8de7de302143ea673d4742967966729b0131e18e265aa8eb\",\"7af41d1265163268622867d403e988c398ccfd9dfce75dc1bfeb7d4a700cdd38\",\"89b91c6dfd0798f304e6b2c2c540ed068ee91706ec2d1e7ebf3cec869cb97237\",\"452a104a506676385dbaf34baf4ad9327d4ff972d21e4da659e2f4aee4ed9601\",\"50a85bfb84d80fc302936fea3de5302aa452cea12616a0d8fe073ce2abd80b24\",\"b9c91ca48ef793fe9ca2d10d1cf21c03c207c688999677e43853d2c76ad1acc3\",\"bb05d847fa96bf3205265677607d739f72fe0ae650d0aa98a1d6da9b879c2423\",\"89d1a90187e6e709eec1399b05753293aeb2d8e5e56f336e2c76d68f6d23087d\",\"3e034f846867ae2542c98191e4f110bb71d57d1edb91a83aea4ca023df7a9cab\",\"dee666e46deccb9634e3fe4a90db3841a63c14b295d5d15af3d9f2418c68cca6\",\"49cc190d8393b2b0c8ec56b65521698e1c7ba922858ece8021bba192b2a59f49\",\"2175570651ff2832ef7304730f2aba372a5b27620d577516b84889db15b3808d\",\"eb7e1ddedab03ac3792a7868c00b1124232ac1b410b945e75f87ccf660fe78fc\",\"3aedb9110fae011f13deb5ee64786503c4d4cf58d43a0c48a228d84d54f06157\",\"52b64d8be223ee427bc31515a09ca0f00229bffa059cda5435700e2a936f18dd\",\"46a200356a5c5478504eff7da5c90235c2d6ff750cdeacc631b19259e977b782\",\"f5a55fd9444db28937c5b6e75ac5d757481e2cbb396efdf0c3de7cb42896b0a2\",\"ec3860ba22b277b83c828758f7a8991bec9554ec11600290b6ef436ad75968c3\",\"faa9db46db678136bdd76267029d715833f4868876fbe3810f672c53a84b6f85\",\"1dfda6336aaab9947301e94d4020add77610cb68db6f5d25c350495e90425b2b\",\"c9ab07c67a663369ca6c798ba1c705fff4a2f15d7d3bfed4601c8fe8afdffbc6\",\"de6ab19426a39a215c892cddc35052558cb493cb6706d6f3767382ef91f3797d\",\"f05dff496df9995b8b6ea5420fb304de313c1ecc9988e101e4397a1280e6cc8c\",\"74e278fe7bd8ff6682b40d1433cb19c156f4e0e652101051b318e68c09559296\",\"01744177225645a9866c5022c247c21e072244ae16fa899b99061e39d6d9c3e4\",\"ff0234c3d3f7dfc9ccd950edaa7a3b4bd60022505bee8af5a92738f1491265fe\",\"8ec2de649c3c88c7b333a1fc6e08c113fe20ce38cd6060a688b2fb6f9ae13aeb\",\"952068654261f4b082f986db760aaaeac5e85b8274abfcf521005b7f9b0dd4d1\",\"243e513bbbb5442447b71821d3c2a655b0d0c16a486ec70e15b7e2c9cc83d1df\",\"e1d863685499221556e0e0bd0108119e4ea2c7ea452544d4aedcbaf9c669987a\",\"5c07fd93f892f0bf7a20b0bcf358a257a37192b2f323d686110bfb3d5c38c3bc\",\"85cd337bbb6029eb844b8de7d2f4d5b26ed13a62aae2c44257c06ad33fea0a91\",\"5b9470b96b8da9734dd6b9ae83180fb3a705c2b989c5ba244c8254ed726d80f5\",\"4040ca31d95fc7556512554ce62ae7f460197f63d26bd000ea360a1c1b846266\",\"ce2b46144b5304bf7dfb040fd37a7ebb36ce820d5bc1d3fb6677e2fbcc33b22c\",\"2fe2ce64b044e4cc8b617733925b281147fd3e9c476545f96a0edc84e00c6f2c\",\"f808cd452a3e3330a366cd9225e36e1dc5e38fcf70e2b0fde2e2733c70218245\",\"c0aa5fa0c973007266e9b76292c93392eef63649686b6273f65bf682d159cc35\",\"67f16dbe25469eddf5efa26b2a5a99314a56aa76fcb6e97b840bf806d03870c4\",\"c9c2c0ff4f8fe9502fa77ea02a9b8d6a0f3d309a57a300d70016ced85ce807b1\",\"3a28915b6570c17342effe65beee16a6ee0756111b90cace927812395a462427\",\"172792a460de4b98a08001345e6504e4bb917ffec80d75cbaf66f92c10652949\"],\"publicSeed\":\"2a0f2975f144a7603bd18550db0550e0305fc9fafed583f5a444e9aaa2f85256\",\"randomizer\":\"e391e172e7dc72c56a60aa1ff0da47bd26fed0fe1b1db6533d1d576ba0607fe5\"}" - } -] \ No newline at end of file diff --git a/cli-interface/data/wallets/.gitkeep b/cli-interface/data/wallets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/cli-interface/data/wallets/1b72e688-43f4-4eb6-b03c-3ac9842d37fd.json b/cli-interface/data/wallets/1b72e688-43f4-4eb6-b03c-3ac9842d37fd.json deleted file mode 100644 index 6b09011..0000000 --- a/cli-interface/data/wallets/1b72e688-43f4-4eb6-b03c-3ac9842d37fd.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "1b72e688-43f4-4eb6-b03c-3ac9842d37fd", - "name": "AliceWallet", - "encryptedClassicalKey": "2842cb4807ec8bee2dd3c500c7e89793:57f83f483b960af67009c4c58a2ba7fa07e664dfc9769afedeccf43c57e3530bd69301343ca94b7e5d5c8e107dea9e455be1dfb9f70538ebf6c9a8f4fc898237322a838a154e5d9c7d4f3d7e58137616", - "encryptedSphincsPlusKey": "a7c4b8c1ad8bae34916e5ed9d781e54b:c99a50217aaa755e5e8a3842f47c69bbbeb6b7f1b6e433b1cf7a79625d8d40eb924f4c1c6e9a9161ec4174fcc979ea298104b897c366b269543a76876cdfe2ceb4b9568cba2178976641a273f630acd0e5506c0d052b7c0f5df9e85a37ad23d637221887b710e0a0b0e839ac9e3856167814d3b255ba24487c2670e0d29082829797c2828d338b02ec1a1db763523c9c204b0122d0e01eb054a5bd12e8e6584f938c094162a39fd61d84ea0ac5c6bd7621d03fd5d9ac366c9a579a094159999d1d88ad1c14fb4baa550fb43470e91386", - "encryptedLatticeKey": "323f82ef6f07db301e43b919aca4d14a:f5a161187f7cd364e99048b8dab0dbbea8291a1f431980816007a7f8774fcc2ad8d77ecf912b2163e1ddba3d769b79fe476085c47291ef268a58ef3d2727d91ec38cf4832d107ca63838e29773a6a8aeae991c20e8d2796ea5a543f4af666a862a9a59f7ffea00719b1c813a020ff7261cf92725eb6cb9c603250f2cc4c4c913475701958a814447d4bf360b98315ee09a1d0f3df977b1434420c4480e53ef9c07cf758742fe0de3a3b47d6bf77dcd6a90a515122d147103e117dbc0fe7c7e70b9ae2548d7a2eaa79dbf206a3c0ba0b80f523ae5b7722ef48e9a856c46ca7a9acea5fdec38cfb6eca26ed0a866554302c901eb42f15fd6b793e8b9d28fab9ccd4053d7dba6fbf7d33227626ee3a63ef08d47127595f5b6820a93a520bd7e45c8eb15c6ac26a334c0458a06f1398f290688a625a6cd52121ce743f1a7e5a579973bc9409aaa733601a8660d1e2d8cd4ee60bb7b543157c5f247dafe7ba18e395ee27b2448db096435c47e6dd6f8997f96a3e12294a8cbe4395a88a257b2a33f020b29949fd1e0746097e37f0a8b3eb4b5a33d74c57f551a07b74a8252817265f6d3f2fa294d44dabedcb7e9b7561e812a08dbb62bed5f8e346fa58b07b2efb1255951cea5a8d68813ec99d9a19b1e41eb7a25a929529980f7993951b909ecc5404b20045abca4e9ae82317922a12f76c19efd013283b2d57b77ac85fe7ba02267a3283381c75448d185af0828536621c87e3ff0c6c9ae565a340e97d375e1488bf943ad7f6a7435be1263f0cdbff8d596b318772c8ef9249ac374565d9b0b4839c685a88e8823062e0ca892c8107212076a4035c4dd3432f3a92d14cd59a7398610914dae6a9fd30672c5dd781c787abe7d64d9e69b44fc9af3bed3a1ea3854fe79d9cd722dea96a7aa0b7b058129a9037589b1f5a621c76fa4b8aeb7550973ad958caaac2d3e9ca94fcc7c825496d095594ab751349d0b06d7ac0fb5713255812fe6dd4dd9bdc43aa7c77af9bd949eaa80c510220a69479eb70ed25fb97c3297760351fed69107c6830bbfc825d2423dd2b79662335b3a5eb4cd6dac92b9f0ee9f110cd6f884e39ce5fa5578c988acdc60b6ff9173ebbdd6b6a719b21853e65e7084d73daff89bbac686b32da91c50079ac994776a6440eaf59a3f022d36110d801deeeed847c789302ec4b889fcbd530cac2a5a0846c55ccdf8ed1f1c140f915da2bcd2c12469d695bc8c3148ec25f80dc7fdccb77d46205aa6b9ee5fba59241ab078eebdd6c6e5547f581295fbe695553013cfaf702d78998f0b52cc4d57bc08201ee556a3584ac51d7a8766673884595e9665e15a9479670c17963524843d942db5456722650f565d7493a7fb7c7ce649135db4c01d161a608db3a16318f2416b26da5e9b626e659b074d5e561506260d70355746e3b6bb04025cf03f79201c235f4ae7d942de6871b50508eeb05a9d6dfab96d7fe927d94623f93aa7e5ee653c9defc9b7c4eef53ef165decb01ffff1d1917e107b32a53ae3343ec42c8bf244665bfa6bbadc155df476fc9df96bd6f91de51837dd68829efba95f59795baffa485bd496f199ab30eb3a51c471f38a86c31a6b5b78e1303d193410e5a233a8598c51376a59f02a9f20dbfc7302e355a004b3739ced41c6198981caee8c983de48c3f8e13d27aa1c67b729eeeac2e84b51899241bbdd942632ea8eb7b51228093b50a951862971ae76b409f7b23e35654011cfd24e0a50f7688dc4693ec6a3f7cde373d705460aea340f6e15b92303da0b465a21617ce1953dfc4d541c33970d17216e2864d9222fa62d5ccde60c010d1f429eddc3be96c87de75e68a90b9dcfde79186da052e214cd5fb357b68b7d6ac922a1657f91bd0c37e0f0bd06a73d4c0e464dcb93d8dbe215c6d479df4eb0926eee82eaa1f043787db8606a05293559d04f700170b4cc13f59f3c85a43f3eec68cb5c79d65b1e0bf85e3dcd91686d8c3af63ac701d940aa32335df5d066ea5e005c12b7bb2bfe57f4dce2bf0d9418dd2e196779fff89097c197eabb1099118fb3a5744746c4c07d62c684f0b79388063e62a7633e37651689c5ff9592164707814fd9b1cde08d5ea41ea0340746bab2a8224b4c2fa6e617d4cd5b0199a6a5b5f6ae7deedf19813e625d6bf8d61dd3158ad1f1a8aa4c3c10fe5c5dd5c04bb8cc93b59a826f20017fa8c4910de375d1413270bdc420b50690a435406230c5045bcee98a907ccef3ddaf66da14bfdf2d41000f59c84b5313ed526ae4fa493ea8ab90010f3899d0df423a77dfa587c1ec2921058822fbb744236e0fac45510daaccab42209789406a9415b028239c59a969b8b1bb7528f1c9c031a2d975d00d5132fad85efc163b8ad47635509d21177a9258806641960253eacd426761cf24dbf41351aefd3ab5dd4b5cd19374f1c67fdebd50a601390830a3d3102ed8d8e79fd42371df6bf16fd155830d0c1aeb035955f3e49ba5d71a31517d9c0f9b0b1a488666973245bbd0216b13f81ef2d3e1acb387f9ae3372b24acc2c755dd7848262a945159381985ed206d7a84cc67cb3e61588398db6c2c82d226f0c8a553ec9c9902e3d954ba7be21a530fbf5dc99ce32462bd387b1eb78f397f6b1cbc0e8cfaf2f071595f88e097f74d3f0d7050522882b4d8ed30479af3157811143ed23abf13d4259a61b4336020d77fa9e4e2b5b47b4cb590bb7b7f0b6a61e3f8b0b5c4149d4c5996c0a67a1e5f306828028391d12a42f3fee6df420a347f0d6d799809ad4b4e11330822baca6c8c98e340f16277655137baeefa247d0807e5b361d52c8024dc2ba581bdd044f17b1c30ea8e08abe752dea498070d9214e52eb7b159566f31d4ffb013731f35167b0af4cacf382a5a6d23130605b5edae474ca95e4cbf252a9f5d4f7aeb18d32494bac3cf2b2cdb3aa1409e9f371ecb1885d3314dbe403213c974c3004745a50c0346d8619bbb2f916da929bb8b1c03e1284f964eccb7f3cff1a58037df8c1acfeea8377f4359fa9640215ba01a98b585ccf2cf84909b85e6b35acfc97d659148fb17948d84e8ffcc0e50b1656dd84e5ff332863ad23dd9f3f0d462c6871eb19f33543e72585ffe1f38b4f7b0bbd2267844786a4eaf766ec4899f805c32b71d8385973092e57b2e851e289039bf062c997070778c492bfa9a44bda715c1a0abff2bc606e869f137206cb05af1d2fb9c28e01ed62fd7b8a13892f67054037200bc18993a74bc00144c1454882f3f302644e8f040ce78ed35fc7d3a8842be6f6beb185b498ac7198e6ecd45c9f984e23e87bae293eaae77e3726876a9911b4dbd5ecfb673eda516e75700f07d1091145da3d5c1d6e43f4e581d9e0656359b68efb048add1748d22cbee8bbdb40412786367af40df99857da1fac0d5f0e9824dc673bd7bb2fb440cc1c5d6453d97b02e76b26b2a4d1087c968a74cce6a953b0016f8e3176ae3511b87883b5f66eb8024866fee14d9e0c56ed999569284808dc950f0d99f7a153faefeb4111f634c48ac3d47323ce9b1c2054454fd6a574c8df6ce9e9181a267a1c1b19cf11bc4a02824d934c1bbe827e1a9b59323c5a36e99637856bd9c7c57b54695a3da119d460b2c99e24b65065bfbac8fed1f9f0a17fe031562ebaf4e39b61a2f21d7adae5b013f9cae2d0287035b6842b8d15a16f8542e959b1e2b0545f169ff3c959996b4fdf4466c1a6b747b2afdedb89d996e5e0a32c8a38f0feb4a93954302bedf7c05f051f457d84b6c943971e1d77030793df40b71fdd5ebbe1b9c5ddbc864e720e7947b2d5ae0e9d6d9e0fd2423cfd2422bd3d8a98a35c81772eb6e01de2cf0d87b3631612d8bfdd605d4a3176c5669a6e793d660113347f9e04ae70ddeea7e30e3e356eb6e4d52cbcb66c7ac3c93c1b07dd503ebad9f6955d465f6c3e4897f8bc686ac7e87a09187e040f1e344e64764c50a63ee2c847746d670ced71e36a97439072e3966fca7e4441e6e3c4cdd0ba06687d531876ecae91cc2e5384b3879b91825a47b281b2f3444a778642482b20918fb459bcbcf463fe1d504d788df3b46299c699ef5388dc03882498282a94790f52b69d0205b6bb020cb1fb391e3ae06a4c16461b050f47e10393df70eabcd8fab6d478a18c049f0fd0088addb96a573aac35d14131ae17e6f3dfcd1b8f37e4dd872b6be5bc0d89c704bc4bcf85be499fd737630b0e2c86434ff133ea311f6cd09da39aa56a05841f1ba754c1c65f7de7e7bfb6545129d3c214c2390b8942ee296bc57cc2b15e1672ec34daabd720e274b6b475e8edd045450aa45504b2dcfdc8934eac5d39ec1e55435a595896953a6bd040dc78a17c153713e72e435bdb17564d2f87636c4c3e77352dd8fd524aa2c28cd317c4704982ebd8671e5dea48ad6e812026936d7b671081be9686686d04ca788509a9d1c128142b49a013b2afd5d2c87c0bb1fa3ba8da2ff12897f347a17f00a14448f628c843ea0221394df5cd30848222824f3a0055c74b3be29181626a8b1e275d2fc936766ebe47e500d52cf6ebf73afd5db084dd23d3daac234dea2c23d4c37a8640a398738dca5dc62bcdce37abaf8e1b869fa6977c570c78e58aec5d51984caf691ebf4de3686fef15d73d4da8942364e4cc5eb1c2e778b5905739e1da68b57d144a5bbce4f477ea64f9609217aaaf03148fcb0473dfe6e4dec7848c6eb3d0f0e457bb81e837248bd19ab4692fbe57a0b36e874702f5cb4967c3efbc8b0cacebfafb3d899a0c6a3e381c8b897b1bf526b53754dad64c5c58e9245057e0bd2974476d266109e34408d83d19d05c912803b279897ff2b83c6e0d40a496fea55e3a42ad04b70b96d9758719a27c2ef66c83ad387a2c75b3924b6dba0c1243c8451805c0eef3e081122d6cf76b640ca7574b6e63caf67771d71e06e86031370430534121c7af6ac64e3cf180d3650e9a364700f5abebecabd6fd31f5a5aa6112087f72a4d40f7ae33ac192125575510196d35d6bb62bf51772a784d630b238122fa09c25112bc2097e1e68e4ba4fe7a0988db1a65a68c9622bc8c78603d41c5b0709a5862b9b135b16a05b4f71c5f735c7f7288bbd09f7a5bcb959ec5def745122b92798b7c8f98142080c3d45924417e5f2bab067ca4dead26fac1dcc22a7e34061a6571200be0c4c66987f5a8fc08d3f2763ccc7260c76abee11bcb5ccaf0813e4df96b4292229ee93be933507d2ea374edbe429de2b851c6cd370d25b6efda111d945bce0b0209bad29241fad1c2bcdbdff6de5321c5b5cd2cfff3547057b700dd55a089049920c7e5b1a3621905d78fd30b687b09ffc2f5279fd7853de26792639ac8a2f3f8abee64919aab25b8b8025b1165fa1749997e2723d2326a8d9ec075f564c9f5b20d55ad7d475178a9a7e58e407cd8df6c3fbb0defe4d70a7d86845cf606d7a5b2794b6a40e85edcd330a1c3ccffe0c96bab3b6a34fb2f73d5e56e6ce165b46988651a064b93a8fb43d0f06f473de5def2e1533f124e099e3432df618f18c15703ccb3031947d4c325fdeca7247ffdfc4f830cd6a161faeccc08585e7674db1e7eea3ea1244a13a940da2754b7b22ab79237d30c06aae1e619ce6f7f80c8759e8248a0bface4a4892cfe99ced715a7b03f1bbb296913a5748b3d748510ddcaf3c0deaa9ba07de1944e816e9f41a61e44d1fdfbbdea065241b5ed1fa5ba74322fd2974df3ce2f8919b5273ec0ad37a61aba17ce97849929b42bd17cca3bdb2cee9149a8e3f4db35e9d5b7add08e0ee60d7d72fdb9813f87cecd28b2f9e7b6d3d3b396e7c3153581a1ea4a369a78ee1799cf6a03a5dabeb090f9ef98a1596a444f747ae3a2626ec5010eb7f8d36e60aa8ee1aa48dee3c2aa87660854cfe43365a77104c3f2091a964b9f5ffe84c8d9bef8dfb48ce9cc672693adc7012d70ea0625052eef14a1c729c7e0517138d7c29ce1db29525e03edf9283ecf52f8ba041f94df27c2496e9619d3c6437836e986b0a47dd3e4357ab7bddfca0d132f7584ebc1373e9518380fcbb409948716e577947e3521f9768fc72f633019c434daf95b0bad1583794d91aa1238be9d26738f0daef07870729a48edf9f9fcdca4a1d80e853bdb39473435451bcfb8500fa95cdf64a6a07676e679efe9c27adf3bc7e17694e32a785bdadd8158f886a3893dfbd6a5f916a85568b2da00a95a8ea82190df798b7b6077b00c355685444885e44d13dbb77127678161096d072146840031140b1459d543c8f047a19e4e732032c4590c0f6ce9d73b90e09b8cd52ed3e4bdf17f4d3fb1aa6ba75b8028c08b8ecc59437d853394d10792b563a50f92f4fe7cc61aaf47f86b961b688adcfdbb70e29d1c0f27a89448843ac7fb376e601c5e75a6369299a30e6747c432cea381bffa2bd86f19171402113d67e7f1963ac5cf024834b572a62d7d1a9f03cc188265ea731416c204d5359c9f4f635a6b50947d07cf11854cb31fece0679116a76e4e3da24d290fcb5d533e355d2a278d3a95a3046379a7bb2c4602af2eea65491b66d53153c8a2e65709f0701f979d6e1f7672f40088fa14f52ff0dee0e3c95577c7053f021f572e3f0102891c60106f2ebdb57a7fe26c91bf311af490464ee56de27e9ce9b1b037d29cd40835b66ab22ba9e22bfc364d6040222e7bc1272a03ee1ab21d452fe022155d5cdf5d55ecaf1b8465ed190b61643be413cb93e06c9bec3cce117d1ca49d654c8012a1481f55ece65da5aa1aa9b690a16bcc83d851a22a91645676a7fc2dd8e86b3b6ce172e2e4b2076c8f85e3c66d545115bfa053ed6f9ac370387650a62e5c429a98d6f18432d0ff7e7c70099de955f81bf77b359404a2bcf8887e8688de87af2205e4ee7b6ac58e0c8aaaaac5d68aa48ed8d76b36b7273d501f152d4fc3454ca68caa38086ea1598b05ca924032c897b2358cff9a419c1b29428a2fd2371e956aacdf3cba846f89dc3c4c70790d04c045ae92a83e0ed3541d019355e9045ed2128e39c75a004db2d502033cfa8822052bb7b8c9717d9958f1d275ee4836332c3edcb6a8484324c706456d77dc7d2a026078b5f681b096e3f330e9967731bc508f82c4345238778bf0fb5bd50b5d26df143c9614c69958b88d15a539d4649f9f1a5f84f83ac588a1d4594984689f249d1decfe54eeedf2fb3bee2adf4d174f68e98bef589a59ded952f829a0a0b1977c44f14b8e034b034dcb5388b9fdb7a31d71be6a429a6cd32a16d7910292d02a354873b20b8016ac1a58bf2480ac98a1c2e6e32250959363688bdaf5069c0f0507bd70273cebdea10eaca817c44c9a82905ec7ae2bbda85014ab95ee095b553ab5d4b6d234a092706f254d04ef5fb0ea047b9ee66694393f0bdaf8a1ee51e7c8b2e0b35920e9defc6f588576b2b4750aa3262ee060849e46bfc99d60bdd0b46a7ff6f7edee84886e9652762a1989f79b0cf0f9552681bd50486558f42c7e2e912664d56c9cce072b9c78fc70dc72a2376a9fdd893e7eb17922e9fd215758ed30728c0765873767687c75e18bdebf43485e19659fa34cd28e511ffa802e37746088f567d849c4671c05ac673fcfc380ad38ba674ceaa6ee91a3a44d39e3e43ae9d55f77f136e3a5d155e15cfef0eb18a678c217c74652b9e0b67f89ba1b047ae38ffefffd43cc65c1c9ac0d320a4fbc8113fc5a4839172808545d1680a5ff0cec57818ba11bccc0422303c5357823c99d023c793c4ec30cbf1210fe3ecbb0e2624663175700a9be2e4cda8b4d07febd0ca4f62181e91d6648644232cff883e9295b6ffea08f94966e915b70d23298d104cc186b16d5f463772f462e84f690c58a41ff7a66f4f790fc2ab04d9a9bf36fa48e30ec156c7a1a6634511884a1598123a6977a66c602f62ecad1e6bed14f4db08b834c926220a9a537e98c6a816c8e7169c46c7e126ba65f87ec900abc0a71ced749c4adcbb51e651f6afdc2bd27626b1c39b2a77656ff157e265860de3852f56f27bb94029eec3c5dc741883b5ee38194f82eec9d3c48bca2732a6370f8499ad6810a33e04e3aaffc6b82f7255437a47693bf3e85fdd0295bad2c10ba1329d8f7f543da255ec5a1a30f2cf8749a32331b198a262f464f99a83558e8b96438a1523696c6b1c1eb32368e8a4f561cc2f16258e070a92b2e9ae3f5da48894b3862db63feb930016d7115a3a6edbeafd46b54cf81dd724bddf79a066b5fb6e6de191fc51bbc247cde7f32b26249c318ab2a75991a12af55bca4d3bb0d9d6a8d2e2e860c50059f42fef8536c4da9a7c78f82fc917f24661bdc4f689b667d31ea2dcc52d43520e8f648c5be7d8df81083704aed15e1a27ce1ada3da5dfeefee56f6d5dcd53b08d7737454e402931aff44b50f3b9315345b377c30f28f8354fb25ad0114f1c739eeb3380ec4098e0e45c00490e1926275d6a964cadd548c8c87c34ba4b97a8f800942d907c60798e15c4869229462119cb7e3b92f17f2e8e5df5ac644411844d77fd49ccc4e8c88842c55d6a5b3c7fb2a670c2e5f079d6c25ec4107687ebcb65b183e31769a0d12593c4a8a99beb8030a7e868ecdd10fae2414fa549d6cbea7763943a2aa9fb723e23956a642a12b1c5d62e94fcacae43cc22f7fe9ab9510e58e802a7f094633f539fe82af0c74aee439a030aaf518f3b605868219ce8a7eb998383108668ad9011c07f5504a9e2258da2ddb11ba5a9cf898f6d5c8d547030d838bce1891fe9d0ed780d083a4e229a41e9db235fb16b871ae457ebadb6e79793644a5f2b9e27306b67bc9e62555fca045d9bbe4fecad55d48dcc9979aabc8eb1c3356257619ba832aca94ea71bc5539c6ba8d22824f0906e2381e8e481c3c3b174539d39fc60918bab75eb2da65f218fe74a001732c7c0ea7b8eb5d1a36abf03bbbe8313eee158afcace1f7fb802f3656f6fde1ac269429d05a6f2105012d2c764506ccf9ba30f2b9671ad36fd1b5d3edeb374a6e0ebde1920499f59d5d6a1067329ced710821bb11e9b112e00466bed35495386a51c71b0498c4ce54d10cf0a841650352d907598d4d8755b731cf2c622a87a96ad33d0a24a7c215685806a3762bf21f8a933990f45045bf0670da3ea178152431b33ab2d8380941db432083d146d2dcf3b0ba79e4b594a58834fe5d56407f41fed694f45894cc12539f075d314c156a6765b870ef03d981bf924d72d17602a74037210bd1c3193bdd1f9019d1ac361f85d09dbb85364d7fc8489f134f458e2ce710929d28e63ad08b189ae1dac31ba9f52c2c3b45d7267a3acf16662f5c1f3db7916db69adeb440526bd4d2d0c588205aad7651e5979903b4aac20770bec6acd60b10ac07ba0934724f3cf2fc35d661880ba9d4847ff71c9500407e31773c7855f86a8fd76e8952373587186bba1c61e89c2ca279761269f0242aca331357a1cc197ec741b984ac82766fccc4111ed9da79d4c2fb5d274db25f91ecc614d3444c5a8d89141ee0bc0a0ad0b53257fdf9257a9a8eeb66ee632163f5c29a747737eacee9c52bd627892c37dc172d719e6e9382ab4b9cb92dfd60706352dfe6824cb78245111b1e22fdca6878391ff5317259ead1249a62098fafcc5b48e92399b642a37bf8c63248ebf486835e282a4dc3480cb9120ee7d2ccd1ba5c40764cba4be6877697a17996b3270b616010442fa6d659bc008e43a0d89c99b80d52d32a3b5e8a827fba87df0a5f8e4628938b4f2f8b389bf16d8d9dc396bec769f02a40998374dc4a65bb9c772fc00e8439f52c6ad531e43301d92ee083695517445cd7d9a23e643bc75d2fe0d00e10a61640426b1265c865bd59f1f20e12f52cb7f5b5f308bc2f031458557475d1790be2e4146a55a2e7e2e5a000ffff0138c2fe75c1f15c6f72dbffb411f06675a9cb0aba8fae68539588ccd530c92f1725ea36d4e04527c72827e09e246e914708393f1c86cf4d3aae3382585ce53154d6f0496f0ed9b8c1391fd5fcbfbcc539bc925d62065693718020ea7abfab656f32e66d30f55790e2c5eb885c82050070eb6761c2d0f4fdaf26266427e893b68c9f3c1925debb9f5170f4ef4c80f45a04e4aa0189f6b759cdb8c72cf2cc04a525d328c5e99fb4b3df2cf7101da597c282d9259bee4cc83d402df40c00e062c9d035e82410dbf2ee081ab44945a295a86593cd8d3a0168fac465e259057df92e17ea432b79d687fed223f530092bcf811510fe9b61bdd46c1d99119bde7730e2ac1176d14f5f53dcabb68f970d657f407ce0c5dad1c4b962d6cd3ddeaa0191d0887b30b1c09b946e3d9439439b70fb1323240f4d146364d6424fd075f0711fac127132022a74095d27531fb592f88d908e5b8e95fd953d3baa11399ed2a611190f6dbc74448b2c339c26d4aee8983ce4510821cd6fcfbd423ba2e80921f40836c8e44a526c0f038bec19a47f3583c034391a76d9322a885dcff65cb57d22768992cdb3e6a6045dd177be8b694ef82a3fe34400afce3de8dc4c0cc01aac9975841e7c6b6219f178a92728f56fc04dbbebce4604a91e9f0ed4ee934164bcedc2074067b950f85552ae42e13953bc325d549ab6d6148e714b7a6a2b2419de20408739cf3d2a38b290974c846d6c252cda1444c19c182ac11dac39f70747dd0129f135645ef78462d9ad631e5a8950758ad766c09e72c31d0548814c9ccdcca32c55dd68152c9e3d88715c9bc4d69b9c2fc82d4c56c51ee540b6b408221f8fb19e9e176a53627018bedb07b849834befb5b01c5b0cefeaa28b65fcad01530b8373fdf7068330291dd50f6700c2e2e9dab40a1e0e5c4872d81e515a22b52a970dba231e7065868aa662300635a6995031c00187878a89b5eddeb5eca063925cb569576b8587e7d6f1851a0a5fdf531f3caecb118e28c7780ad5ff2d2af2e26ca6e95e6ae13180fbfbecc0839abd27da5880d463d429f04d8c15d3ca68565f558eb481d42024ff51ed45434dcbc49dc8e4e633fc5472aa9a13a2923501d7305a858524d33775b4ae3fcd8e5e4edd6e4305813221e0be0471f1b5b6da15d0e6f850fdca0ff090a9acfa8dc3c8577abd02fed5fd5e12f25c710477efdfa54e64d5fcee5a89a0717b7772355dd89676d78390b80c13420d70465ea242082fc4ded28baaee21c50da4f3feae17757fa3ee102664dc3da38c03bab4058c9c0a37e15f7169b6f5991a63777f5a29b785ee4c4343982672ad190daf207adc6d5f04d8236a4abf2fee572612f7e2144114229e9d2e7332e4befc38c88b867dc0c70050faa3c05d2b9c3bb2b6b6cbd4543bb923691dd7a166e856a4d0aa6f4efb6328bc51312e9ed23523f7ba7acb7558077e2f85bc22d9d7a88d68748391eb45db346a55d37fca63673bc67ba56530b5dd51cb6df671af9b8d92df2b1f3910471a590d19f043582495b03f0f1386d928fb3a8e18010f0fa5bec1fca7c9e595a58f549f45661c46a2d51b0a598c89c8ae7bf68c8a7bd6c72cbbc27b3517a002577f8734cff57683e60b9e11e2f51e5df42ae1117e768002df8d8aa8a3ccbb2801181126fce5b3298bb30e68415602e425be3f3a420c55c1eeb4e3ed2c53bed711f1541a12059f68851537980917a0ab76821e96fbbd21fa0a2a2f7a70be7c807981cdde7ec3a5f00d8f51cc07cbb60319a629a67e01b785e31b3ba99ec99ac64c1b23e6a432cdc3d57361a9f94c3e3aabc3e42edc4627847a455b525db242bb07550c097811c96c52faf6c3e262f10fd39050804dbc0caa7d3bd4492a0a797f3b893b424ae9fda4c65e49b90e5adee5561204465d2da2c1982c593d55382405404660ccad0903079a3fe95d9fc336ecc96f5ee49238e34bc7e3fd0b1a40ed9e92b1e1617cc642697eac2a029914a233e853eb0b4abe6ca694b8baf3795dad44fb95056b4ecdf2c5879765736656f8ac4a51d03c3d28facd536f18201c595a850a0069abb6a4eb7f7ce0d3c0ed9baeddd083229dc55e2e77b491fba3366d85184c9375b6b3e449a9df592f216b749d7607f35c80fb19781d2e3b52b327c198134822b482795cf9923e01b35be4224f51bbe8437a0bd431f15e90d47702578890058a0cca0379dfce76027bcc9d662b768cd8400cc2eb125bd81ab18e364eb336f8a7b0a7ad3a4f778ea451acc617d3e8b2928fd6c3996b9cbc04885669001193d38d38bc1c26ba6ba7a59447ae3d697f30653d14402427143eb57bdb0e2c8e29e24dc26a03970816080e95669437b44cc28dee73ea21ff938b21954af0432eb3419f40db4b51aa4d68a33bde9c1574da5c4563206b5cb7167c0ce6cf57db03061fe8dd41f29582f79e5fca381dca37efd01434736d20c0caad9f49d573db1ba30d0b33d945bf4f2e445e3e8dada0b1caa9def64313726f4c7f210a77cac14675669fd769ad63d89cbe5b235e5bbd16d3895301b9acb6d0c8d6837573e1c89e2a1f411e6be8ef4a2ca1af6a96ccb5f50ddde3576bce23adad700955079b9f5d7d8c8a50575e5321152a5d683f85f76a89053066e92135f386ba175d2186cdf8be9e8b209e7bcdedc76118e9d6fb530d677ad32735fc3561c5faae0ff1223e24db4a5b1fdede7eaa2ffa29d4ca018975eb4c069cac1734b48e7eff8da33404074c54ae98ad46def509a58637cdad309096aa5c348d8f51ab7385aed1ec77466156662380a2c24ee00b2c0353fd55268ec65065c0c3a70125abe49a2d260c9c6c9551818f05ed0b216f960316bac69d08f03ad96c99c5cfd9f9c4bb4d30834a4ac8acd5ac89500e1c61a1726409f29b81abbc1a21459cb2def93af3adcedcfeba09956c5c918e6757c41a4f605949eaee5116ec7cd455d60ed1fd7bae3c6abba7ff5c622bf75db5ea7de43f6694e1850c3598bc241165afbf533e12d6ccf38f9523e943b8bab7a07eb062006c8f8608448c81d88847546728f6e23714d165b217831fd46a12f707e36a90a5cf0db7b2ff12b0c40a21df019a22d82a05bb0ae72e4f9a293628860d9c24d8fa4880460eb9b313d8223fdef4ed0f67675d46ae88ab756a932dd3254d15d7f79ba029e4b49cdf5c9d3c99d385a2312ccfceb2997319b606bf190a08cda24bb87dfe8d820572262c55101ee007bd9fd4ff1caa2887a070c4999d116886537b4f12f65a76a3ba8f453b211f81dabd6a946cba5cc910206ef96d1d40031d12bf3ba2fc9db5c97f5f1e60734fad063a04567f8b4e31fab04889a90547c3e64bfd5fdd966e7a58757f2c5ff059e0bf6cf691e7d59124b3a583c2f1dcdce7069f6f80c7bc212aa8523504b8ee81f8a6e3d079ae3750b6621f86c3c6e008ca9ab4078d762ccbb2704bcc5f4e96d8aa46968ff6149d0fcd31dc40cc83e2704434abdb244e4885ee0048f86795e9e9cf84acd08a6e0f02af1f40be3c95353602c26761adf39b052c38d0024562ccca0af562a21f5a58469cccb5e0909793dcd6789e718ca69916f044e15a13d887b56f62190f663510d3231c0613532c78cc33d809ed3f52c2675d79193ad78358276ea4417aeb097128dc7904275da2ada8b1c74d06034a47fa504e8f8aa980693588b525b09c9ef63c4fa9192dc8e1bea51579a", - "classicalAddress": "0x5e5e61fe4ae4852ff3a0c9eb55c37b466d57755e", - "sphincsPlusAddress": "qx493f12369ed598feef7ab84fe374f8d959e88a7d", - "latticeAddress": "lx435ba5d20f0a51f5060a5414d1d9a4d30252488e" -} \ No newline at end of file diff --git a/cli-interface/data/wallets/27f26c43-c72c-4f8e-87d3-20021941d9aa.json b/cli-interface/data/wallets/27f26c43-c72c-4f8e-87d3-20021941d9aa.json deleted file mode 100644 index 3d32bf4..0000000 --- a/cli-interface/data/wallets/27f26c43-c72c-4f8e-87d3-20021941d9aa.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "27f26c43-c72c-4f8e-87d3-20021941d9aa", - "name": "AliceWallet", - "encryptedClassicalKey": "80bc71c29fd905992d970b8cc77afdb8:dfa93324c821a7bc17959c7bcaeda16f8228f28886f6b2d79e41bee7aa1b0e99c912b93fb17cf0060d78180b5a0538fd8c9a77c89928acc406edf199a2bc47516b07a59aeeef27740d39e4b50fe9f618", - "encryptedSphincsPlusKey": "b44fa4accc298752b5c866e43cf5b965:23f9e85ceb81f95ec0f3eb8e4d41b151c79d19df42c15a48fe4daec1465305f7fe44da4633fe7df911c2ea27b415850cd32e93bcefcc2c11a4d7342cc039259f3d759668b30262bc061d339e2cba29070336f930ba9dc0b213c483d7d9d1a482e71ae7be79a1fb7697c890a2f610944ac5d1ab9a769465e1ee7ecfd70176971d691bb18e24d0080818569597cfd2a8c98f9dc30c73cc5e0cf3d1320f4999913fedd9a40c6cdda52e3638bfaf85936d55bbbed3552580dceeb71dc2cc407ceea8bf5e460d93a6d642d4b49faa00100837", - "encryptedLatticeKey": "2f55dffcdece64823cd19b5b35dc8109:8e44a9a2665bc00df2822002adb55ade7f6a5630dfecc5c2740479d9afab1bb4f8d6836d11a1bc95a130bc01ce0f9452fb88433c29e726f24ddc59b354f5afb1266129dd53f6460b40595b3d33fe1052098482206dd9f09c22ca0ba7dc372bd5e1f843c33522fa8efb426948342a8d23b6661cfa02154b99bd7fad0a1e774288e61fd84ca08f19e1cd75020eb36c38bb1df79cebc777f766df736a117f1c83648095134c4bda5d37ce6b3bef40ddeefb9ed0dca611a6a65cfe2c1d72f4c4dd3a51a598a438c2d007df0b602123c6bf2fe1315f919abd9e1a88b0f6789deeeb39a7b9d36ab05a608ff9c3536e545f34d05e125c288e282b54f4a459c26bca7285f6e82c85df9a5970971857d15305b9a22cf4b88d43b90dfb167838cae90479110fe89f4f14470290f5f52dcf709d154b4c4a697418016fd58bdbfe93c57dcdc297660a9f304819212d7d84afd5d8c3ebda74a212a98380a0c834fe745875cc22bf2b0429e130d14d5c260f3ce5c5b1884a66e2bb258074e7347fdaa3d1bdff595a8163c8a77bbf60b193407d82206a473539c6bbd16f8a0191c2b2c4a0f11b8e3eb482a8ebbe9cd595d17601d9872f98b3892d09f4e466e4c6af53edce63ee955467dece892f606646175477f7d589aba13d57e98925e7f3d4230276c57114aa550a5a1f2a3e4c6eaccb0b1773c064a60971422055a9f7c955aa0a130cc3e406167f676d4ae1d3e228242d918cd8e906d188498d0587f323f5fe3ed528d622cf88b5eb39d4fa660590dcbf16a5c6b0120ac6a140621e19bc7fc8b9f1d65ce570db1194881cb23ee124a3caac06a0e3fdca26de193af52e9b6fad043242aea2f92c5e78ef5c55f988c6dc7d1becacbd947e53c75be9cd487584b18fc9668b88a4d67c21cebf1bdac831bda6cdcddbaa0dc07aa7f4f930bedf28d5c124181fabe7de32674eaa262f4610f46192c2c6af23347015bc53e04645d2da8f6062280297e6e6125f5db9e2860b7e61b47329d45942d3ff44adf01ce1ee7ec975e39bd0f335e2052941cf63ab726b2d88b3f466a121cfc600846c02180f73859b8c9a49db87c23ca7a9c233118de6be5a9b5e193402b8e8ce7e4132f9cae9dd20c8fc9bdc3eb483f655a3a11d59df16433a55ff9b522357ce39c9fd2e0bcc92ea12f079a82701fe0f07df1c7896cf87c5ddddf4221a8a296b8e3ef9d4d5868729e7b07d2c3993ee61e6d20748f0bc50a3b93a36d9531e428b9c348a0d391fb1d71b7325a29dfc2fa995d7908884fab53dff8dc35ededcce856e66574854432bc2e42c21d4186da5aff2cb5faa1d7fb143fae912f3888cac769cbfd92854bc78c441cc9a829bef9336990a37af06cef6d8359fd93def373eb94c8003136f2f6ec9d1f140a22364e760b27b201a87113a60ef661315c328d8f22ea53d80fd31e320d66d887f943f12486e160d50e901e1e400cdcd655655eb185f0bcf6d42e36bf80284cf7cb7d0e2c7ec90d6be7129cb23fb3cdbbc9ba06b00ecaedea76b2e34bcfcb26fc88707844cdd1ca5a75463af7aeaafb6980a7f15aa90c55539e44b1f95e4c7d967aff3dafc12c05b6f2b1c39eec54d0ff884aed09c0ac855f4152fa7dd3feda8f1621cddd9d2268fbcf3096d326042a486915896328aec3ccb3dba211e52342b0d0067364de3dc9f6d6526a6a837912551a2d098c3664a6242ed8847000a9100c26646007def0852637a52102eb1387bc5ec2bd9846c66c7909e722c5749145ebeca10ac637068fae2f0afd8a342c2723daa5752af4c875e50a4e98bccbcba77f51e137b4c6bd5db04b2cc2e713e85e97133bd2020980d770bb54f454cb135f37f071db3388816b3debd750add58d839f8dfa81d1c963fca9cfcc9bcfa01f3b569a0482f62f9f3c83353fb1e8d071dc8ecd7039bcd8811aeab741ddc0e02d5d7cf6a638d794632df6ea73e7810a931824f67b89b8a8c19e7f4b2d037cc462e0c1e91455a49f3086845ae114c07492e000bf691a03a81ece8ae31c4624cdd338d26140d92d77aa382b619d0e13eba951d54b8ba6171267608fa5f09ca468879ac81014c482ac12058eec5df0a8896238f09d64884a6599a51ac7b731114938c869b376eaf7ffa9ae10ccae15a64e724b61f5458b705d1e1473c779260068c550f0528be6586bf25a7fced9e7aceec174f1df1c5e978d8fa37d18666ed613ec1a8682f4a7f83e5b0eb732e617965af688b34bb2e1a59d56e31d47fbfe96e02ca5c1175cbbe1161d5f3e2a1a7b5bebb537f466596e1b9b4833b179f954a15ec357744f7c672bb8497366ad8ee165c5e062a71260b5f81cb25f9f11f05b7af4b4b5f8f00c5f0345729fc2feb7a0ddad3085e32aec44645b2f0fcb3f9e23d8f81072915273d1eddd0022b665c36ef35c2bc56d512eff22746470bea00df5a1870a5c608d8400def342216187f04b6b9c64d7789f418d135cc61c0573524d66ce648ba4a335faf0a064a650d5f311f8a185bc391dba704b70cb61897dea9b6131284485fdb5f6912ec10d939d56a7c8625453aac0912808f15bb9431cc74f73a2bce873769586311e538aca2e761b2af1ca9e33ea210a6440f533eb983c228cd406ae237e366d05772fd7314d9b54f2282ea150fa1d777f671a3f7e19f70d992689faa834245769927014f71823891d7e067dfed59638659930640d4bd5ae445217b5c9ad1c70164883432b74cf4fe55a274832adffff36dc2ca13ab816951b907d4c8dde21ddc99857378cf8342c680f6142ac7d55ae870235076b876e2a3317c6f0c0aeeff1f386565f3aa36376b380c8ce5648f713ab41b89c51bd96c5afb2b4ba9385331d38b6c8cf37d6785633c2be0251195e493b434b005069af22f8d31df59063e70cee3d9829f5a9a4048854f7c7fd8a22be1493220a17f2b293687f5c33fbb8a79cc1d251997c4477fa977604aed81cd3b1746b52ce18a8deb73e6f747eb7ab0d194b84c010735ca10e58c420610281bbaf6077ca8c14b52525cc5aa70a14272a9effc2d198be42f14c421a1c6b332ed5fa4d860512f7378553d79deae170a9f8a3146e415de59743ea91a44147643381c44234e11705914fc8d800fe366af0a1064c0a7a77fd8f679d1b810ac1082c7a300ae91702a4c22c7765b0ed375caf1b1dab1f833686e43e3090440e271bb6f21e07c26c98fd12189ca51c8a0a8b960e8630588f57fa42b05b22e1d33ad585ec0c20e2a0f455907625d01cc4aef49ef82d3c6abc9eab7e1e1c7eb755572616f334f38d8ea991e0dc189fe101941fe7ffb56d1fa75a2fb43d8a7836715b395b2392863ad7154b6668d824c81d66d1a522e3af51773854d69fd27dc2acf1816c4a0556a97d76b4efba4a06d094d9a41c01023e9d5815ebb2aaa5ad46f1c14d9107e577abaefc7c7b281a0b82bfb5c1c7d784de88b0196563eb5b75ed25fa884f3ff257cd67cb6efb8f0650188b38ae0425d24b1a1a2a8fb56a5a87ac90e31a0d0f6b70081283e2bab7525cfce016d02229650c448687ccf8b6ffbc037f94117a5303509a453d16fcb0d449d89ec468a99dcdca886414d9966c40630a1bf62d1e47f4bc427eea6ec49bbe5552cef8a5d894d06fc57ab1e0e022a61506c650fb9deca643b1cecd7ed47c869fedafae49ebdd80b2bbbc32eb78fb359f75c39767e0d118f735886a5a20ae16c0ba601c669fcb9e237d4c8403f39a6a5cc36c9dca2c1042810c99bdab31ce5581454f75830478b0366cdef8bf0b91a80c412ce24eda71c29fceb69a2e056660c20390007244a46c1706910ea8822a67108b1199ba3cfbff88288129447152c9c40ae67720b3df67159b654aed7c927b03687018d8374801628ccdf1e75c664edda308ad70290579cef076bf15df2278970b36f53c538920acb7b06c8f7cf563af0c9c376513d6920482056f730686e2de24df6ff41a6faba13a6aa06819ff69df9d473f5371f72c9384bedfc79ac7cbe79e7b0e408db3b34e7c991b42d3c7a913d741878ed74821be91895e2f56ebf99fe6090c855702e6d485305663667eb7d0950c861c507e8f578b397e5c47e8f6bde4a8cb39a2d0101ba7fc22d82ea5e64fdf7982b3acdc1e4b8ac80decbcc34941b277f6d4395227574a2185c7e743a990c1aef193be83e61910d5b09c572e1a09c2ae82069c7260c4cfd6690d149c8d833c784640eef2456745d9d7a81b42bbfbe1ad969e8a0ab2b5605c7c4d90a7be4c392541bb56dfb17d7adbbaa08f9b4a114dc83abae19124bf2538d173defa85390d53769848eae3eeff4277fdc05fa3abc87d5f7a7b18bf231f54668ff128cc6625a2722418f64ecdbd7b77c4401f2bbc2f669787ca21264b9585cc3fc5bc7c884d9d81ea987f2ae0a94659a95a5c133cdc0fc72accf5ab24c69d302428e24d43d1227b57d9d30f7632b91b2e7d9a7cfa17fb40d91b660cc6bf44f6bef8f8a39d11402f5404bed54afb43e732214292ce8427bb0295f7fa5ad5596dd6586eb685a2287ef25221eaae8d9e8e62202d5ff5613c5612bac56879b45c42a818289fff7fa2b0fbca83e6ea34797f922976b71f46e120534f1e8e5c813b3aad6a1b97ccd00abd73e32d6ccfa81b129947cc63ca8991a3f9f6129cc8cf98b523f8a140d38a0a30356eb82f6a7746195eade97856aa7410f66b3bb3787d61fef2972fc91b3001fd0124e0e7f4e791627a58af528bec434ffd9585e1e7e7b334a25c12a4972555ae4cf64c3a01d5b5e8253c8c556ed09975db43d26349a1e0287b86531095b555c43adec8fe85479783f949217e260dab79ac5f9d80b8bf0f6d99041dec8af1a66ec37bf235d577832e09cf95dfa2268c72c50bf59626e56dd67cb3394255d66f8158692801f7d27b094648ca84df73542f5296ae2a1bd7e979e2433d41a8512373117ee7bf58ca005fb780ae226093cbee965444dd3c5df006cafefebb062907d28a23780a25dcbe1ac888410d0636bd7a6f66f028909adedc6cce3a32823e99bf0bd04981b95b955ae67872abb43d911630575a741c8e72ef9813f8102cdfd98646e11a296339bccf998fcc4f4ffaa89e17b080d1b19d0fc0a376be1d513e387d9fcfa926e1ceef802cd172b2092a3f7eb4ee45caae1ff9bc15b022dcea1639145a6c2bdbb350fa21020b12332aa331a0228b33788430a5dceb31673246fba9cbee5b5a992ca5e321e7babba2a8a644d7cfa7a1846275c643335bbcaeb04ffc6bac420b4fcc8e4baafefed7b5c8843a2dffa42b430d0637721cac09b79bd26f61b5f1e72622d8f6cc9d098a2eac0ffd783dab48ed54d2fde3151d79bee6328c0e0fb8444f62fc0d57e522b6a01ea88fdf16e13218f44c288dffe3b9e50e3c7587479ce84ad120cb501f37f34428014f22720fbbd724173fc485ff60b5ea7ed07a8efe701731ac8e983011e6fa0d9fe3221b3dfdf59210b5004f2ce9b1da1b7d115752cad1f1d9de21f56dfa734dfa1bbb8161e7a192fea998fda1520ffa2495eb008cd17675d3541e94ee8dd62aca3dca0d2c9696b9705393821f624bbc09371507667e52ab97c735735ae3858d64bf29fc1231418ef303d035a9ad85b89b0a176454c79f668d12d96cde64e14af9ad38d3be1e6dd571030f0546f5b6ccf88454cdca1e636b4ea591c2f5986141dcf33bb6c100bb913e2715dc958ed83eb6cd2091f99a823a15fd004d52b49ffa58104cec5c0335e3f5572b364d8109796e6c4a7785c724df6087455ae33c015773f2c317d09ce81234b0f3f31a99de2f5d7786cc41a2f0e739dbc03ccf18c61f24ac2991fb3089b078f004ea3f29e85d4331c5eb9303a0442652b49116b3109a03253d91885eec6537113636cd000a96feba4b497635cee0efa1b89c8cd9a35a4725af97ebcafab15715980f9efc57a48c06d6f02c250387b513599855a33e951e23b7185d50001cacfa494fb120d383657b86026e57b77c60e2eda192fbb76df6a3d49be7b71acbeb2a423e6017b4bbfb4e704324e4748fa8625b1c55d87aa7bf3c72573e1b5590f9a87e1d5007f73df6ae48fc7c7ca218c88c949697e628da654a3381313228424aad5bffa668cfce0e4d7ca0a595c74c4d9506dc0f4229f4b079a637c4d4e8a961de36ea1f405ece1e701507d03a9b0b4a2a4998f14ad4d961db006147b673e1e3e024a41d55b1876e1ac3c605dceb0df6238341dfa1990efb59ac193fab5c0542c3c3b6728bdac0fd5cb2637d4ed44aa4d1731d9585cedd189ee848e0dc9a529cbc54d9e37b81f4071b158993fef3c22c0f5f8cdd8a82e0f3e745493f0b689ba4b4c5096687a2359b6b97ab0ee9631b079eaf356b7d8fbdd9e8d55d5e74d0e6f1a7e589da2ccbedb229782f1eeb43258d50a557af8735bb03dd99b2b20dcb523e06eefe6bed71c0311fe6241fd9cc901cf05fe0de2a6d45bddd9e52f75c032147ee51b7fe1d5327752bfad8751ec51b9f7b87314909754fd388089f5d1938a97cda821bde095fb61741a331e4d607ee0ef5b950c0fd3b57c5a01501bb10b1893b391e9dd0b4452617734a60f3950326b5ddffe12dbf1a72e88cb36f84e11379cc240fe927a3cc6b98e939d667d3451b31af6bfb152e86ce8ce387f642a777ca0c61390c133e6022e92ce51b46bf0ce774765f3f67edaf2f9fcba860334f5b9be6f95356f37e13a119bb2c12c589e08f420d3b61790262b87c4c21b472ce4dfd33162fa0136333391a7a8d34cde815aa2637f2f78e9b7d5142ef2f633f9d732477b4c9af0dd5776e3492f33c7ef13c4a72913f555cbcd86d679e7ed0c2d80f913c5a2e337a21d6a06267a1d4339a6e1c160d0ce8db6878cd14b4b493d80012a6d871d05843039c4c89573847787cc5106e2b2a05f70408bda6bc406ba0e942dada213cac54400ad8cad7285b697cfff6bf641baeddc64117622b069f4b384022e7c6bc7a14899eaf3f6b32cd0e37f7e5182dde09ade2beb7bc79ae06cf1f0f5543f3b483402b7420b167deead4286c331ee9bced19ab66ae7a78dbd44a884ca39152a2bbc76e98bdbd9074d5a31e6c9f34dd5b9df37a0546d0ad57c45f1df8e74a9e671d7618ae2d10515229b59a413be8526e770390ccb2252b94507bb3d13f792abbed7f73d473e92d7ada96a4ad477c45862ed6968c117270fb45796e6f7ac3be45cc42ed35cab8d108c6cec54fe7b586a796b806158771d52f3e873eeef198637258d8445e465102d676b59adea8bde5e6d23e656ccac7630c020b2be5dfed9c5ef159dc250d960b3d2e6cd98d38b5521ff3580e01d5a4e307782282dab3478e31f090f0cb35bee02ca89ca92b1be3e567bdbb4d98a34b97a10ef911c2cb26d107e559bc45b06cef84abeb2353758c24a2b7438594f139d74fe40c39fe5385f4ffb7d8f0478038d31420e15dbe1a234bd29380fbfeaf4ba37f49289ca59282b979f2eab8f21ab9b80d33369e2e0a77b3c826b98300233f67f591b6bb5defaf731e950bd4fd42f9d4e42885b958f69d7d017a85b6e091f2a0397becfa0331581965658e913d711ba09f8a7e99f70d65477197f3102b231aaa6e32be46a21a573d07971d344cdc2b647680e3a7597bfef25afac1863f8202a2d14a205bb68dbed5c433c7ae557a58fbcd0a6d96cdd3323dc0ebdbf73e2385f7a5eeaf765a290f88ac88e26bdafcc74d43dfc200c630c804ad330a1e882e388aa2e65f0b1401ebceb2bcfa331542f5d1791594347f0d37df413244871ddb6ca2f9a002c3b4ca6b862583594f56a2443d0651bb9071d37e3e9d7dba04e56da377a7e7252c8c3052ed6e31b6578de90db4ffd90dbd53906f0c0ee42e37cbf38e1b4fad98e4a139756da0dee37f227ce85304b6f38533fc78d68b0781d62de8198352df89d02348223bd259a15c247991df4de580eaa33ce219ea8ace99f57c3177c59f1da34e8caf70185db405ba4e8a4b6f1c17e60887c03beec3b7bbd032903ebff1c7b1d1a6e40eec91dd0035c2f0ca120608f8ff3b839706de54d1a924b8731183cfd5751df3784b9318f31d81d92b41cf603aa24e6b8fcbe2865c4504d9fd6f00436711936660bf1be0bc1e3465f6537d8cb1d0fd920ce4bac6238fe1245045da595f79806dd92f56688b6429d0813330c4a40e64a65019f2c5f52ac7eb84a9ce2c417afb2bab2574d315da5edd5cab4af88773f3da467a1ca74b66dcdb145472a56e6b868dc26205ff42d318ce2b4e1fbdea1df06cdf83b7fe9c74a686efd21ecd3fc7d84290acc13e787e992795cf9cc2160e47355e321c19594603af637920771f13fa417df2bb8bc2110f184a44a495874ff9a629796a9aaf606c1869a385b6ea92faef4ecb00f571811d099e411acd97de7f00d5e7c3f51cd8c6335e38ad4fa3620a5eb727626504e833e21a9a6977ffa666cbbbcb54eb0030f93ecaf774d45ebc1cc9dc9c88a69bf16233835d044d486710c98d1d8b8d36b8603d6e1a6bd996621d6569e9db0591a0be8e97e2890ed51c4e7a13d54732606cab7ce62486d3c7817705a02060a086cf0987e35065a38a99b587f612401791c5ba2d7ec9f98138513e7cbcd1bf3b2029e3b5181fabe7dda61cc69d907572d0a1be802b5852ce12d0d90d9bdae3cbd054fb9ec991b4e19f0f1e1a2693252bf8c8e1be9c8aa8568e400fb5ab10e5f3861f848e3008c0910653bfc078f5dd9e109b366c6f45d85b9b6d6fdc4adebc4735c24b1e98ecf5e0c64d9a55d295546e39ab0a7ed13daae84aef58dcafbc874db2ce747b42460d12308ee8634badd9e75c412bb47da228a07c7dc42b52fb2a8ac4320c5f0e0de2ce063e869fc7116357937e0bfbf3ad9b7c58e75739f9ff2e7a89914c2ef0ab1f712489e67f2ed9dbf18d93322b3b4725ec7784c4b6daabba02ce3f12b5f21ab81304cbad1aeaa2eb24338a455f03a7645aa68a36807e327ae63e0e34dbe231c46de56d9d4685c55c0d0c6e088a41bddde93803e4322541242086fe64fb3ae4aa03d1f20c393298d99b7ba41224004e82c61104d343caee4e4864432fd56e633b0ec533fb86467e6a6c0716145089b262a905d530d6e12879131429d7c645384070f3a7a5d21b7525c53d8e0497c1dab1ff45ffab32ceb5b2e23355e62554dab34d1cee5df7d46bd708204c81cc09dd11bff73fbe4877531b836c59302117f44b64a786e3b48d9ac45cddc44fa423eef601bdc7e1d13e546bd95459d3bc9b96ce3082a74b196643b091fdb10f9a3c06e601bc35abc962e487912135e00ae0f5eef363f1364c3bf284213cdbac4de077a888460ce4e9afbcc3865bcf7885fd58d780853236cf650f807a31b9f3b89bb0403204a137b794a08fb56fd824fbb7b32f4ddbe3e0633e193e7293a8861aad08c0c4d39d36125a9b315c3190bb6fb33fb73dd2ec68e3198f6258d8afc1413a26c588d4ab0302a1b9e61eec11e432223b6293869d905efb6ae1ebed22043cbaa76456a2540e6ba9967d2e4dec6034e89bd8a9d25ed30a9d3184ff976844ccbe8f6f5f3240271eef8d4b3861504d70065e26b6164a2bede8094402d15aa683ed5372b268bf4e5b65ee621e3da31b8e1f655ae717a39c645d19f0d6cf2691e8ea29bd853c683970754425ded17d2e3966a0ff6375c7babf8ea973c2cee5dfa34fd1e3b05cdc345c0168a424ba971c7f8c182f68e61a2131839ea1e1f88809073c8273dc4263a5319aaa05153c419961cd39ccbf036babe31b9bebf2ff6f7c370fcbca431d40f8521bd46b35f6b1e0e3654c0cd5435903cbe846ecfee05e85d20ccfdc3b1b37f28f8cf8553cccfcdab4c36ddc9957463c50a520fe4cba0bd74d7ac064f685467f6ca6d4bcd39bd3fbe9f3e252dc4e0a42d4294da45950148713e18b5e6a210893ce3be62bf2e6deac1f078102d31c668c8301eb2eb441aeb6acf8e71085ba3509fcf59514e12e9a7bb1588794c3123724466eae08f668962011f08adf32390fac348b4ed2fac3a3e0a36773fa67a9120ba278ea2e84ec8c0a70955fd2e4258186dc13cdfdac74654570a2a05102f05d31e0eb280d9dfaeb303d2c5b579e98c19063459e8e42970cdcd833c1cb1c6a05b9fa3e5c1d3aa2bc2ac1a9ec10eb4aae0e3e407c1f6773678e9c41e5dbf0cdaeb6aa69fdf87488315fc1261299bd4a260f55dd854c67f03ee2df60dfc60166148ce6292538291bb0c14e85ee23dece3aa89490bfe568ae060df360617febc03b1a54995dd457d0231a7f10b416eb185cf430b39fc746cfc2d3576f4ab8243b0c5ee8ee2c2235b54a51918e90484b11f4df5a2a79a4784b4ce68616fe23784a70bcfb93030dc8dfdadab5406a7b0d3542cba49fbf7f191b15fa2e9cc643a12d3a3f7cbe558c1ae00f3f850a056c8b8aa1032c4aa66cc4276e22e51e482551040e5300723ae700d5380853bfcd3f3877038d8dcc8545edf48e3bd2df2c06ef9d636170b1104f1222639b01537373add63c63f8ac1710a674a8d2b0fd61bf6481a9c1c74c2f6cde9adc3df2470d49ef005be2e38ffc9e93cbdf32115ca75c8b3f74dd366eb51133c5eced7f0cc6e1c57d515f417f0509dfa623c1a7725eab17016d103e5a155b36c3e420413a1d15f5317bc02513583c0e7770df661a23fbbbf95ed565a473b00fe62425eea9ea2cfe86b8ecaa3791d6df6df11f55ed971ded5afd2567f8c19d7e7613c2da7512988e4afc155eb37c76dad40ff166814ba1e075c15c05e2094e6c40940b34025dda4320bad915ad77af6ee7b5c3038b3c86aaa67b928e8048777d18c1419cc1c2bcf845fb516f96cc6de89388e221f382a1f326528910bbcce9d7f6a07b3700742ef5bf6adb39b9a1681ee0f86f67d6cf265af21502775f8b23a88a81de367ea48dc1350fbc8dd12c6a0da6c1c684564f929bcc61269641d15f9c22365c40de39e05411680d009c3f077ec4a5a744e562ab0345b3fa1d77889c20d7c57be1a3db97c99c572b28fa3db4f1a05fa99bd802717d3db139f6cfd9b9ef82ec3a4bd2434d1b3a8019136422043280f9cce6a95fafa6964b4764cfc863b0c6617fe89b4d8b146d3580547757a3246fd7b904ebfd57573e1a3a977eb481f217708b9a85ba9f04c80bcfa51f1ef49ecbe9a4ffe5cc6f0c27a12a7416daef496a3bf03f3c37bae0aa563169620c7e0e51773e347598bb533a0195d1293d35902fa6fdd7ff27f8c781cc827afd7c7360d53cb011fe9cde753253c59aed5c862e1dbb65716d3c9d25868a4c342bd4eac009818e859ee26b45858951d478d415dbcfe994c8be08396ff6e31f475c8c45dd5d7c64226602358c9ae691dd7cb772db68d11b2bd4a4cecb68b66abe354ca194f8e37260aea94b6f8ee9112bb216248bc1c6c75cc500f1004df35452a2f6be904f11df9ed77573711b7f5c8bd42f4015e126e29092b6c1c8ddd919df7154c180cce2469c3a262b25d16f3c14908e73b812c762155fcbd9fbc9f00453d06df1f9ef7aaa2af4bf288ac3cb93f724171e9eeca7f5764c0d1bb0697c4c810a32b6788f9c1108b5620450b31a37eb6e58928689a09c8c96ca1912c6c176bf2313e3044b03d6e71e0a6342880e5965730196afc284341f13212ac2f8c598a2c0f37a25ee771fefa29b1ac99ff786cf353962ab358193eabe177e5d30523890cd5501be0d6b87bbf00558b98e5a0a34ecd986efd139f1e4ec2278ae749c0a6f7e3ba953206e5b741941c2f568436900515491f814253b1abde22ec2930daaa46924ca8fcc283c535cc29ea8355719d0b0013bed3b0b312580cc104bc83efe5d37d24ea6da1f268d51ee13be85e40868b8f62d15ba0b6fba4208b794d297adc39500ba6e4bebaa75fa5b4f94310421401813bf8c513b50d67bdd97e83d5c21bfc76e042f76d52dc69b2227b2406adef5494fabeb33c9874f6d695fd6715a2c34db2f424496e0b375da8abf83f151fe077d5a7bfa4136793cc386d2577bf52ebd57befd1b2bca22a94ea0835c692142bd2fb0550e2c139af6acf814cc96e62cfa57881d5014e9c78bc489453189c712f89a76e2462d1726170f31cc5ee7cdbfbf3f7c56576da34bc509d418fadfca00e469ba25eba60f883529a067f779d43f94edfec2a7181fd6eabdc5b4a179a44bc1054f05a5f5ae6bcb634c12196fbd82955f995ac04ba5d824c1db805c4ffbc969b59e1201aa05fdc9c5f81116cee7f1c04b700e16cfdeb8c6dbe6213276f71d4ed53b2a6f6e150b5abf756f6aea82144094d06542b5223e72687cbade46ee05c43cc097385cc9bb4da3a67126b212ede09414cb971125438f6c9755d0587c9e546dd07a93cb78489f5423495eb8baf74e893ce49babddcd1713c0d47c780d8c5016b56dbbe2c1eb52d6111115e9fa9c498abe9df8876fb53fdd9ffcfe8f1a8e0202c29e0a77519074f20cb57e4e9f28807fda08b3e8d3c3b3e274c0b240d147bdd1767c2f091992d033d3c5cfed7755d1eb4e20110ac265d0a4ae5e407817d28940e6157e313e9b420fda632eb150e31092ac551baa7a00ce295f8149122708e3d7ab84b5d0e361d8036c543f1952aa9e53621d8d3065e5663644339ed2389afd680fafd155b3c7ae90b9314442427b2b8c4836738e200b0535d9ac1e0297c52b68b9ceaa48b21991ba9b782c7c4c9f2954a651b05a7e8688273c52d01058a9438d9bacbcfe82efe65a28fc799c65e5b7e4f3b4b7776af11a66706682504c31a2e203a094b63134b5221aa2fff97440e9ab2512a9dc53a631550665f0d39f80bd0d3d9d917e22fb919ff579c6800c7144e8acb9802f743512334fb717a9ea7c0dfc4035cea4de55d6b36b2cecb0e417e84c4032543ccca3629aa1ed797923219c88ae7f9e988af3b9980b3a07eacca016ef6dc4b9174273cafd62f97b2925eac106c3367838fb3ecf2aef64f81c2a1026cff187bef1b42994bcf24ff9f772e7c0654cc0349219b21eb81e8c6b143eceabe758357fc9d375390bce00bc991f89e6884bdaa0fc946e6925146cb2de96ca140fc064edc807eded5b1fcdc1896d5f34a9d4a1816f92f8aa4f9cd1815d363283a9ab7ff016b129bd64957319c1b9a8fec90e2bd2117de4135dfdca36ade681537ed3a4ecad9337015c4c885d7714c5b8de1c744178ef571823cc37807cf4bccdcc7dde2f5374c58c4006b6b04a4e9c73c6d34c8916471c5985e4d92eab1aac64e35f34ccf6af23dc268dc99458b3d443426d5cd242375f799bcce00e9eedd21d1979b5f7da17c7b3795cf2b025c68bbde7169d4667bdd6e21e7b424bdd63edf6e7d02bcfdf9d1993dbe4237029b2541fb2e4aaf9808cbf39d17dcfd19befe3f6dd61e921f510488baee400fbe2fa83855ade35579e64dc88bea9a21d89670fae1c4f8cfb0d792935ed6017a337353f01f0ab6de6cd16ed88a767ddf6a488ac0ec359e375f7916ddbc1273dad18c675b856a941ac4ff0351f941e0b6f42113b41c0008c03397bbb8471c489b9a5ed688ec5cc59ab90368c53aaa1723b3cdc506373e0b75d87d1f862ec1cac319b56b0f2e0076095daee4dfde91751dbfa540aa81a5c73252a9b944bf0ff2d24b2541607b1dc9524c993bcbccbc4724d7bb782e6dd486e676975de2218a93a29e7aecd29fb2a36457dcff08e16362a21e13217122e474a229338a7787d44f18d00112db2e5882a1595cd93ab5f6f560", - "classicalAddress": "0xbc21f0a52b5aa4b294671945396d5a237ab69cd4", - "sphincsPlusAddress": "qxbd6c5e96904ea69585f828f298f55cd5c2eda6ae", - "latticeAddress": "lxdc8324c51339819d8ccdcc177bc348ca086afd9d" -} \ No newline at end of file diff --git a/cli-interface/data/wallets/49782947-dacb-4ff0-a8a0-4c21c2fda82f.json b/cli-interface/data/wallets/49782947-dacb-4ff0-a8a0-4c21c2fda82f.json deleted file mode 100644 index d821d0f..0000000 --- a/cli-interface/data/wallets/49782947-dacb-4ff0-a8a0-4c21c2fda82f.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "49782947-dacb-4ff0-a8a0-4c21c2fda82f", - "name": "MyWallet", - "encryptedClassicalKey": "49304ac48ba17bae1e777e99e0738951:67e9462a75e3ff6befd05b97c82c95cd34f5eda0ba3f49ab6c0d717edc7cb418a0b3b7fc5aac73f84aba550496a5a9364501142bbac11732191faac89fd7120743249118d1032d985e6f20885b2d5712", - "encryptedSphincsPlusKey": "835ea02eef4cc30c1bcdc3d003cf51d3:2a74995fd1625ee0756f80380998c4ce7ae052b8c4d954485da44c9baad389972a70c3bcbf5ac71e3736d68fe0a0039867ae39a5328bb854704f72f42a9ed9c6850bfe68089676d406c5ba0f45a5a30bc3e36f06e8542bc9b27819cbb78099413a67041ed26c88e3b4ffb7ce800febc32d5c46a4408d37e69bbe24377e02c0023245fa304afaeabab7445f74197f9361ce7f9cf58ae02f90602e2ff26bfbdc68792d0a536373c4c7946a8e055f5ded02667b44032f66d1f0dd6173f8e593491e5170a5f07d34d0d7fcaced6f0153e6c0", - "encryptedLatticeKey": "6769ae886a5f7a5fa23f91c80a294b99:13f3d6166c87481ed84835166fdabafefcddf5554f96e75384a8a7b65bf66b1db68fcea9aee0bc903adc172150a8d5ce9203557671e9567e29f2eb1b2c6a9d573df7d05f6dc3d646d8e759f8adb9096c47e51327a39ce13d63bd1400485c0666668c271bc3b7a20df7f65d00032fb7de4a9b1e46f1cd5806f2f2a88a8b1423cfb8a1554ac7406f47de8c6a86c9c193e4945a4127eda75ff436a721670a52b0f5271600ad5aef23cb939bb82dc188583478b0bebafee032b9d2c7a2796d10df601df825d1cd5995451eb91d85482fb2105fc8881f8dd6c0a4a8b93b43c079c563637e79e93df886f912b3675992ecf0798999d079839bec126eda0509d37a05630749f5fc5642394617089f0be2040df1ceb2e90ca3b14cbd65c2a03a1d340b41de4051659d7b5bb582e341d7131e45f1a755b748e22911f1bbcde2efc6f791ed93b7e109e3dd713128796e52d11aaaefc8b26ed25c3a920bef24fb3de1fb1648e82533fd9dfcae4242bddcca1b08af7b0126939d31296adaf47598d1c0c6d6b634e3c83771117a3a27e601343b9b3551560baa7d914f5a120228241ba414d408d7140351418de0a355a602bb072b9d45f91ee978ae9cfba296341d9b24bea7acbf947176a067d3d63f6efa03ae49ae52411b77a476bc4efbefda9e54e36c306c0799e19ecbb284830d8bcddf5e67238ed2160e19ecef9daeb4fb8db66287f5ae853e26ddaf280abc2a2b9716f5279c361c05eeee1ef65324e6decbb972021590b22750361fabc2cbf533598690e853d9cd7e7582499e92b272daf45aec3c36f5d0a9b7666638adec26cd4d5cf8032344e97138ba86b74e85ca8195702bcd34dfd318bf4b8168302788ec8e7c53f4c590968e4dbee4b5e141687fec8e6098a84f05d8c81775179c797ef0968adc894c46e5533f3e07d533c16b99f7ca12db987bef24598036442a52ed614d7c8a89a0e4443b8ed9904eac819449e7158c9801660efb2e862422f9f6a4d6eb9f6ba257bf30df67d80da1320dad75ff940b5c8d5fe88e8255e64c3c709ac9230e40e188b47029e02705d57905ac5d71e7ba90ad435f6a4448d7494939729c43d6ff9f2a22a860e3f4f5113bbf7b84c87c443bbf51064b11c8188643a0833b401766e53488ad7d26811ef9a331439600f878ec2b95ed64e8abd230a7307fbd1b00b6bc8853cc1847f639b4d5d4929bf30aeeb7d4042a89433fe775006fcd9da1ac4cf411028cdaa45d68451f1e78ef7683d13a253ee35bb0318b67d26bd05ec2624c63ffc3275379673e20cf7aa5a08d2a764cfc9a1640d276654f145f76dfc961fb5211d6c6b6f4345e58703b1454cd874ec0bd67fe0889df1433ac266594ffc9f506d14d735bfd2d81e24b3ebe7be1bc011e4feceebda5043cabdcd5738bb3c24b439dffbed56302bf8026aa5ff02d56b7c72f8fa00b00e33cf6577cc80107d423b2504560b013fd77f892eeb89ee81f320d21f1c540b3b2c1d49d5c01aa28e71e6d899dcf90e92cb7314bc64ccb99f3f160522bc8e66ccb351bdefeef68155e4bf3717b5b1994419448eace74e1ba82517e221b9270ac343c682e097fabb1dbdcc0e4cbc233b0fc5f35cb68fa152bdd991837a47d1a4aed670ad1485aebcf786c3113c9e0a9f7330732af1276a385b18ae3f139a65a92ea8e26aac931107219681fc8378e8139d6f795679b5611a170512f60e5b5dafe088ce8e6be6cda65511921bc162a3c4b80fbe182d273989eb3b18bab0293bdbe55fd63b8ac0c50cd337b900904cfbadcecd801ad93eaeb65ca34400d76e022016ba2515a366ef2e80cf480047fb2625b814151a778c76fcc46ad114cc7af82f8852c34a8f701b779f5929f1acb4e6567f565146e3f7483b0b342f926a97dc3ecc57535a2e3c3e16576c4362089e8e3900a3f6d706962f7bf78654e6cbb8f64e75a397746e52cffe2916446c71a98b4e95a753fab1d4e32022af2c7afb4232bf2c7586f78c3267ba5eb72928296758aa3fe9399fc7445535d7f9708cda43d0c822a9a7c5d3cbf2df186281da2c3c0721b9d7688033cf3d361469ba214a45ee45cfcfbd9472c25fd883ece7001c08f40fd50c997440fc69d1a88dc5b7e7c358cd163809476ba609af51326fbc06f311d8ea4998e00c574a9cc0f6792df40ce5988985826d5318d390abf78ca5eba149b1532b77e7fe72c1b0ddc7c101d2305e2fbce87cf0de822d9c08e5a5e1949b7d7f2fea7f05868a0ee38a9ec5dbc3ed08c0b2ef1aa203f3807221f9f5b24d7dcc6b1660438fa48fb708790bf5c816bcce8c7fdda338f41ccae38c9d2365e4a098dce378da292e110101eee3db0e62c66fc0fdce158ecf7f1cd5e0da46d5863df894d89e9c898c2375869ee6968c996f373b6a6135a5d01d132d0bb9f05aaadf525f54dd209d34e241e73e8654f1f0bbf963cf42cea7f0ca080fd90fd85906266bbdf3071988043f7f8aa983ea3c5c3e4751d3b930058e6d699718a8ae1f3781a58905b031e3fbc38142681a6fcd7fee04f58699b755776b15d64cee334e370dfcb998e610aefd47f87bd2d8dc873c20445f54d25a90da4f0f0ea54d724f44d45f3fcb76fa06385de208a1ab5e208aa18555a6787f2a8cd62fc19c2d66d6b19f62064e22f255aa146899ea1e1c112e39db7447904278653c216705aec95decdcf01a617a160ca4b65dd281f83a38e897111fbea087997dd8bb27a270fe2f983d982463673c5ae552b224e59e9d92558758e993b7b9bed9594d04f4d34f4b452ac1ee39c5a2c78296a4d63738177151e1c82413ae371ddf7fbbbfff212c5de01be60f34492f27aa2278cb0439bde413967199f391d3172c223ac2e53cd731ab0768bc2c42e78512a4361724d88d093c8e9713aa72c239e774b0c0cbe95e70dde9d3f629f8c4d08a6ce2388aa7e9635211e4d9fac2f16bbcf6a798aea46eb362311d5356b378d58d04ae13740a945077038f9e8b0beedfb434b94561953d3cab232504576a9f5934daf1e3ec842d07c4f49aafc93caf419f992a10b5df48e88d7e28bef6d9a5f68ba6506d07b3dd65501a930a321a2cb444dc6a17c4f3df71ad7cc61aa94cff0d54df4075696676e786788fb90c84c4d7413a0c4f957b0c2a9863103ab52ed507c48c66b533fae19fb8c949de7f41cc20886658f79461b34dc9c50ad1edfcc13b9b9779a8bc8513727b5977fa9d54a4073c4b45348525c255c72eb736a6a8ab11a54b68c43a969b8a2e9ac61fb7260473a6874e59d9721cd767df91332083a3580525f992ba8cd4629bcb9007224ea45b82d3995a35751205b5271bd574e6b965375ce3b2b414e9e5e6accf1f58edfdf495067ef4104f2d62d0f4782e8f352e4861b0ae3b30ffca0866f8cf736265251deb9927a06819cf7acfb01ae56754396087fa2ef6344dd4a4365a6429606ea8a355fd224b08f4137cfd94a882c014b061508ed198b8fac9833511e0ee99a9d66371d41c7c73d3001207ee79b2e41fdbea23692f3d03ab666fa1474fece26ab93fcf7e8ca3587d4d158854dec4a6e31129451466849bc31406489e7ec008b679127403d69d7ae4afdada9d17fce869753d13c3b633ad4f93561dc8e1b2e936deae2dde6ee2b17d56783b6f6bf949b6ec288652375e022cb7a60c8f6998a8b5da6b90e3076f842269b5f477b0c14a8efb238d23d0ce82bd342b4785c033c0d0ef8a4f14b912ea2fa301ad011bef81969f4c79296a892eee795add0774e1faca8bd7724601a9ac06ad812d73d5589dc61897b7f20312318326e1fefd03b377c56b92c2251a81588f6564a5b2abf0afb390293f06582dcdb294b565a0ab26736f8735c2a6a1464d6a0eac33c74135b7f2f53bfd78599b09d4c5019848da7c667a767e34b2ad661e87c998c10f0b2454a5972c104f0aa91f39dd99cb9e6808f8fa5d114d339bfde53bab90388b86854bb0cc6b0c736acc886544b117177ab0613420c0b4f5094d06b1de2383256e57407fc97e0c45981c87b1a7827b9d0747fb3b7a4291d8be73a4b6a4161d403bbd508841edca08ecdab8d31a5de5a1e8063c9577026bc816bb5a84e6c2c22dca0a38ed0ea39de8ca91e0a5708abb7913d0d21340499ff4d273a049036dd099ef8b4252a0809bfa6ff5c578e00ae40fa73bcb7cd54749b44572bcb6206c2fc2600cdcb1b367252d77f9e0145c9012b18c1053948a1ecee6f025b3785d8be2fd1f3a4e591bbc87654c95a2efbc47b842260faaada9428cbee1c3796e4723aed025a548997f06da9a284ef8e87d47863862351675e3cb66f7afd16401d29408fd3ec292da17cff9a44a1d376e81d58426e6a759ac6675cfe027d7718f1b67d4bce1c62e649b7b4abd011deed12a2ba659599bfc518a0ff72d13d69e220e29c851a0386fb78c31849a6d0f8e37f7d23d71931c31956afd75abe5b61164c4b45f1c9702d4f134e4db7c09978d5c5bd85c390973ae3f241781ddbdb24b29387bb522feded53a5f26e05a53477a4b31cf7dc2de2967bf926876fc09342bbbb9de327c258f0ec995c315eb7721394beae3e17742bc519a5c62c8051b4c7c8715b668f0c204883dfa2d7266904ef4f0009f1f527c04c214cf4c888c8fa441648f373ff3e7c096a0e3d9444ffcde0f48cf23ed9375af6d8c34f9704cc8c4f7b75042ec77ac2a52a683827cdb4cf95688d1ef6b20879a85d01b2a143bd60d0cc3a36188da1e7bba3b75c79b22e22b59b29409acc50978de303b0d8956c16dd6c724b0c6448d19d915bd9ec0b46218122f21f9d9975c1927a449d4ba50c5d2b34dcf2d9a2b3ebfec0ed70e71d6404ed6270f1300676afe80f6a4ada1482085ad6917e9c98952f063a6f17f25ff472e3422ed24aa21712349796abac9406821b99a425376f7a1b919694f1de64686e1b4b80f379dffabc07bcb796d4ebc6a7f89baf251ce95caf51ee7c9a67a0a857e2b774837f3a333ff2f1924131032a30bc35aa51c21cdf0d7ada906b1db1c31161eda89feed5676c89f51f147255f1d20ba30f32ff276384985511732f8ef997a57090cd39023ceb4852ca4634b2eb5008a7c533e4b6d20ccf24bf69c03b24f4c1b276139ca7e29395ac2f7429b3a297a44d05f873007289fd3a3f9dd28941ba9b506c9bfc9b117ce725f344176b33c2242032e1a2be5a615f16be1e2eb05310cbed4b3e5276b7175131affcd8be8e6127efe2b6acb8abd1e43edf3a69f54d607f636215d82eddb1c3c74fd68df527256525f7f4fc766a83a136ccefc156d2ba15f6612fa4053e68b7b6fedbc764a8e0eab1763abcef365f48031b932bcb004b27adbff7cd8c49035b119f082986521f5196e965d2bfb04ecf97d51751a38f7ae1503cf297a95aa02667db332f691bab8e74fc039f3ff10674b9d15b16732ea1a21fe9b2799fc943fcffac35998664863d86238a40d15b1b15e3bbfc313eee1b74b10eecd7aa23488ef305c813b938fa78ab934af5136f7a1b2d75d71cd58852679d64c03e979448c60add23787602de870f3f9ca13339c06b2304c48842f334fde007e161d24b88d7da812d659f1b7aa51d058f59daee79b56d3c5faa42e13584c894bc9e1666f0058e8dda33140914e07bd18f10d9292a339c247831b9b56d8f936273c418d5b979bda2e7e87dfdf443b6dc5b543969337fc32462825ad4f85ea8c9aeaea76bb53feb12f6616e3fc970b06d8ca825f110bf02951e1a9636db9a580ee6de403b1f7d226f83a962e2c4cc65459ebf1e821782c92b84d36594c53d9c396011fafafa695b34c87708a6c672cf886a8fcd800a4c6730272d6dd383818c3ae440bb3dd7b299f35feb98aa98fb6baae1a37ed704f447af02e8c2bbf4b43a157047c1757bb7b053a52e52a6eb03b05d01a1e15675d41eacfb6469f8b434924f6b355936b00ccfb2b11dc37d249b36a97b9f3d4aef299daa96feab47cd5c608cfe3d6045b1e6373dd67f0b83751b4a84bbe1de7ffe994c1c9341f1088e0bc7c292d47f90a25f383c7b073a00e129a8a4258023d20c3f45dd2a110f605ddc504b35ee83b58c48b423aae1dd912abb256c9c5c12e65f2ffbfeef2bb8987c09eee3e02242b2edf9c7819b9e3b8f2ee50ebf9106adc15a4a81803504f30a8385c63b16b2fb188d8bb2dd458644661e9231105ee9251faf8aeffa9c2bdfd61e3b8a9ab31308c297913314e37efca3596ed62c9a325c03c5149fed0457cd0292fc57a9e2d1c8c147e3c12150104a44577c54b496b7e7512ef191c74363f57c469ed0bfc2dca9644dd3866eb257e1066202ed10f4115275536addd45f8122338ac5f8e97345f34519c73217540169c57c43f88741a434af366b91a07ae4887f5b9f0bd05289410a4b8c5b9ee182047c17f84e7936ca6c352a1fc9feeb6c4c6205eb289eb2f0f151833c4dbff3c475e501ab788b7720d03f9033c42a57ca575375ee4b035c51faa776f64686bb6c65c8f65c33594eb7e8ceda6ae51c19bc367cbb9d8409bbbda86be8d99e99c9242e0dc455867e0bf20ab5b00e4e37414456aa76ca8dda7b055d285e6e67ae30f77dcfc6d842ae257d5d77df6bd294bb938ff2ba51c539fd2cfcb58bfd306889069ab1d6859230711725c6091b688ea5447d847f07570889d55be9da8a2c1db09eab8f86ad44a0ce18fbcaeb163fec173f3508845c71370ec95aa492365556bfcf4832f1fdc75ed2a787ac54a265409baf8581616063cd1109a285b445ec799cc16537e8a38278e15439947f39053bd6d8163d81f0f20ba7bc258d58827d33ea8513a4399ccc3aae120eb44af30eb2793cc3d697ea86b1c54cb34e252f70ecb99a165299e91dd9e1d8ee42ca65b49ffcadd63db6c61297ce7797681972a0832b2b07c8da26ad82122a79181e8d2474f28512cf4acdf65eb67c9f75be8900040e839efac6e0e20fe092aa37d85de466e03f43bc697e3178515177d60263a648cced4a216cf2dce465497bd9ab23985b7eda19652fa5d4f1c37f5aa81e6bb80aea9abd1320623eb7ddfa67d85f533c1c42c68f8f006332a47ab6bd47d5ca203103a28df2c6022957014aab918e5d05738eeaf9f9180cee737d1481770004305c572d625d64652cba1fcecc7895707b851f9802bf328c87091c3d52bf2b3703ea3ea3890be5d3a5b621ddc138ff854d528b93c8b98c4f7f0eea79a75a69177a45e2433729f8c2050cb826f8d2fdde3303494f4b756775d45f97a96ea2281ca689ab7af704f65d12000889f85abc2646fecc6fcdd12b1571281eaecb070ea0c9873f3543c37bf69fb7c3bed53e0a87259257db52f8d0c167626b181a7519b8cf7d5017b7be9816d25c3d192f2f409c3cdb4cbfcc72cc725c33988908a33d872bce0cb24f669c4628d986bb2afc1de018c4d8e34d014b1987e0174a138599d90c57098afb433d6c42fbd2e1e27fdac31c5b88a90862e04449db6f3399409a63f5d5af02c55ea345bdbdb91156f5b516d4c56f7d7a730310d190e629cff6b20061653c08c4a985ea5a8dc3a0100be5cc9954279d21f031dfc343ba255cf53eb1fb91eb51867cb20442d1f119c98d879378b61aae8586bba2f04cb0f166673f671ef22fac6c3aa8872b3c8a2555d15f169f0697a598a84b6697284dde687101482fd81e97356e12a1f19cb6e7299d845becd9b2fa172cec59450435447898d0c988067533369dde8df77385d6efd4c01e45d16d94fa040c07621c987c16927da0c765d1f468de717b806b1a82592c537bb564b825eff952eb2e883da5360cc6560ac3842eb0802465c4b1ec3cd565f4714fad927b57a0f620cebba8c5c34e62e4ff0978e13fceeac82c16852345aafe042c98e0f6a15bee7e352e4163a2d96597cedb751cdb5d7ae5ffe3e378f39ce617e555fdb164bfce3ddd7b7591365249ee1dea5780a89742fff12b65656926834304ec81443440b26f985d29f0efa5289f86909e251c3678d2769facfa1297803389e7d40e775cdfb378ade8268636831996b897869285d47c87a38d36eb1775f8284bfb8f7952a85ddc4477799a3b5b9e14fe0d969fa17cbe2aad417a5b1b8dbfced629d9ce368847746df3016fef599744729bdb83f5df7a3183f66b2e688d21dc7dceb80ae798c77f41d2f519d59fcb8873847b33897d102948e4e06a3f7d13c1a8fb54fd7b8b9d00332cdc63e5cefb6dc8ffee8c9c5aba910bd8498b1f3115e83aa8526aaf3f204e02da24de1c75b4b49234af952b3030e86f91131780e1a888d1a9517e2e6103a169d45ba5b48db615f635c9ecc5982db69ea63ff6963d04ea68daae01b66d202366c2d1429dd55bf892a43486588ad40a04b7e92f1189c1d603818ba371f700e6e9406d481ed9a000f99c97c358663ba081c98e4dbfea08915b9dc43779f7a76fc20af94df1989bbc93b5b072b0ec37d1607225af3a947bf890e6a1791b1751eb89730cfd951b87e87d1ea6c76a3cf42edf32cc114c508b201e6aa4568944f96af4ff1f7a3b986fe9ce1f38b732582d024bc63b6c4b45f24c83d72eb0126304df34326451dc4ac587aebe925e5a3a0824efb6f6f90c828467a037904cec0d3e14360437072702506dbb43ebc7e61bb50ae9a9dd73fdb71a0604723f0c4b8a2c0cfe86fda22ca82e123b29d843a53864e3781492b7c4805f1c94f6f3f8850efca4358f3a4ffc2e2737475bacd1d7fb238aa993687e55b5dbfd110cdd95802657fc5c756d1c98103701fd320f6946fcc0f5caf4d86d90a0d4cb1a2be573fb9a3bf106fce8dbaa66ac2f43ef54485eb86f07134fc50166ab0bf484b78ab8258948a87574c44360a2fd2753a630acc82699083a3f83784a6c5b4dc89f1aa291310fe68dabd20bdb4e41afe831d99d37f0dfa46b91b699f88c246ecfd570579def170e0c4acc339f46607633daa0a9172c0d2a0c208fcc406bf5e21c29b51a400305daaed5351a1dd7be38414d734a127748da3214caa25a69607e047954bbb7446c3fd106b5d23450d2cf545ad2d7ce7ed328ae6240db15e575abefb38b022db75effe4fa9cebfc2054d00d47ed53641a0d93a837adc5e7571562db51f802027dde9d4cb354a9c35f983a0d4d21fc3821ed9cea52ee0c01ef606ad488608b51ccbf94bd2600ce563a61d81f0473ddb691a2e30dd20f3e9d0b8b9bb31dd2796d8c3c875d169576c1f7fafb03ef1bf4fc9efe249f009d33a79c527ca0d6bdcdf2c0f548688678affad7e9b248af2a54d265d7fb0890d3cc0b2343f042af7dfca1f66c36c59e7341f7a9cd159fc4ac34ad7992c142a02a498dcff061186305b310ebca0ca8f52872c35fa53d89d2bac1100555ae8017f910d48112af8a7e162009875103a2b1c39644c7d35e48435785050462a32a619ead33d66d47a9e99d6995478ad51156b3c18bc43af5669f305d579a2ade0da15642b78b9eaf8db40b9a9d04318fbce717dde0ad68a68ab517391b66add89c650e97eb589d4f2757b08322b2d2b75e32f3062d1b2dd8252e26748b5992e067b63a3ce36245c0ea72cbd168682ff990350cab57a1212a2deadaa6c424d4c351f678dd19f90e537caaf42b2fc92485ad7ff8b6474c0c2d00764cfcf315737c00373fe11570882ae2c6e6e2327927f0cdd0db60017d0bb35cdbb9da5617f41f042676b5c42ac2dcd684bebe297156961c69e8556ed5dc4a8ad792d442b9bc90ec7b66c0af11074b831808ae012df4d1ef142d7ff812697214e61a1a6a6acbc078c66539cc9ab565cc467c27c58701df1b13355ba6ae57ba8ede9c531a0e32c09b02176d05a66569ab69d557bbdd4905b0049d3f6812e399b0c849e847999ec7c8c862dde4c143bb196fcf9780698e9ed775929a54584aaba84fe2dfd2b0b5e83bd8ba60cf67894a6dcf3e957d30c58f82d3ce03a8c02732ad20eb1c96f2707526863321122907e8f6644c2a87fcc54cf6967551b30580ba735775ef2a5245bb4c8ae9d064b7ee2de04a467c7ea2bfd2022f2b85a64c1010adbf69bd2d22b1a24e6b5019c7651581936fc0cc7aae230175f7f4874a0bae09953c388e229ffe0c73e9e0b497f9c755853725470b171fadcc0be1056189cbd0632fdb94c63525988207f479871f9ca1c3795fdf0f258ce1020c128b693a3a7a202a9a346cb29f72ab8aa915fbf8053c16da676926ec004157fd22cb5b7ffb38fc54ed86c0e71cf2467a4d940229205395f4193675b2764fe8782abcf28b756bb588b05baa7b7c832278b4017dffd4aa73cf993f9b7400e55cb1701991f5f921255ad5559e4c0c886a9d6c83a0d1b7be30d7627513ef955783d5514d26c1c5f31f91746f0b5755ef07778b39132f33f7f4f98e5e0e771f16deaa35975417968e7f5887c32787a10b7af3b40238efdfffe32c100b0766b0b836075b066daac926302171a8dba950a75cb98e5da099b37e1a2fa1aff810eb51abd47790b08c17c89c8467092a45c01718d62e91e10f66cce0e8316f10d22c426fa2226b921fd4da022729a2f7fa7414c3a8dfadcff20ecd5f455cbe93fbffdcff8fdbcd033e912b4e6271e39b6bc3308133876b3a4c80ece282f29a3dc892c8c7eda153ae1b04ca3c3d67ab09af1b444b24203beda7fbab5733d0bab6b87fd8554fa84b70fdcc360af56b248fc2785b8e20c34dbbd3580273e7ec7a09dc90bd2e8ddb71d194215a59d61d07a60deccb2b25445becf425e48e6346c7c397492e35fa2685e6d07802e912e25dac30d67186f11d58f28fa25bb6a93e16c24fb33f8f2920f1e3f1d25780b1bc6110b5e7e9a1034b61cc740f2f72e6cbcada803c3d1d670e098ec86b0fabb64222cc9e296e37a3fe5353ed00c2b02818551e4c05c3e151b2bdef36ce2507b701c15927f7112e16dab670cc453587b1fc522ba9f5ce9470ed611b94888037643b7345a4db865a55977e780ecf04a3e9a352b8e8d69f60e5e836970dd327733b49393949f0395181912e106f4b99e8d74482e299d1bd2603586a9cc4afd97e4641b020d09487f2e30908af88d3a698842c8090b7daa3868e323ed5a875da6188760a69dd3f459672a7c02990b4a007e2e6b47cc65080fa962525e9103d244af23db08d9892b6c4d50fbe0ab4b8aa2034caeb1869675221c63b9098f3fe91d4ccc22ba7a9f49a9f8923de9dbcee3cdd08c7a4355ce6095afedd4341113d0b018e10b3f8d9b09c23dc898461ae7fd30777925596bdd9f7a9a8abe0790e9a25a1f09f012a51010f3bfb9407ae3dd4be0061d94e8143698695b07b2ec691e7bfc71386969aa74e2b783e9e08ffc2ccf63e3a41159ab726f17bed63225c3f6c85d56ecc389d7b87a8a2f26478dd6aa0ac152568299d4a862cf4ae5c86373a1d5b989ee92103ca2238eae31d7f3eedd2e784533b5a6aabbcc87c7c4a5c60e466fba3c19f579841e82f7bb47e85125d7df68ed0d33359839011bba9adc9f003d696177a6263671612f85b81a6afb7c2fc6fee34d18cb685bb106fef68ccdecf55a083046758f7f0921a06e00de6748439a1a0606790d4cdc3c60d9dfab2765a5c896bbb2fbe1687933b78b0f3b8bb033d42693328ccd8321a9664d1d014fd9822e3aa49e5a188477b07528faf5ad06a6b031cf4cfdab61a4d6a0582965e7115165aef72fccd10e3751b83a0bcc1dcb219fe2f632947894ae1de086be386e727a9bf5c617c73d904bb32598d3a437d2ebf6e7d4982c294651754e9b4ef1822fb08303862fb3ad15197a31dfbf65c637ba91a5da25a42b8dfde8e94969679b92a9411ea91ca1e7801702cb5096fb1aa60184881309a5d827e4f6035f737a202be275e89bf619984d5d1e44a5e06c0f4c9ff5a3daef07dca909963cc6395c551f925f2330d45e838561d4c23fde9139eafe18342923cff6194b89b70665f54eae885c3972fc0e75ec677e42f87dfc9da5e14717fc5ae7158f23ebbd165a30e490ecf9660163d991325a426a6bfda380b510d36e75ca4d9a0a62a6343c0c3633d74b04afb5e148378a68f78ecb3a1509f4a50e585d476fb2c7303156f7e90c992b272a61851395861ca492689df6b9cc2cdb70a1016c210d4c4970d2e2bfe1db94b253cbe1db40e4a2c3a0212002644be3440b765ceebd9e5fb966fe04d7ddb162b9a835a2fd44dad43bf32a33c3b343c4c1077b31c0fd7b1b7819285969d558acd8fe173d159883e0281396b1f484cc88937a421db545e403e991a9a40d1545199187a5e9fdd52cbdf9e4b8216f68521b3768af46f6f9925ff75345e6a73a3e93dc3966185641907102112d952174a5b50da611b7fc016e9f474d37f8dee9dafd5e7fbb409dbedbe522bb79736e3fdf07a6520bd5486486dc3a136497d71bda78cf3fc46df6c542e4547fe802598c881be29004ec9d7ece0b096be44bc632c9864298f446cbd6b6b5f30ae55a41c966fe56c9e59d70c3fcd3719a2c468548c61645723fbd913261d74096af0ff54e6e3aa49fd5ccf408cf346386cb27ca66ac7b0dd5d68f85cb7f1b5a11a187fde48f0983d69c2d0ee8893da7ec440dd309989d5d6654957c06c3b90ac917b9269628aeb0827d16f04a9c54049cd04f521c10f8843e09d90452248e389f198f8fd8b5211ea49a772b255a60a576f8b367b8c01afd4b922a66cbdaf8fceea8e1398a523874fdda749d9c41bf36ac384516930dc2d4ed33fd246a501d66981103f716355cf1acfc5ba9e03c1a0ff9c002010634e067e40a252d8d229e97f14431e237293a41395b75ef3c0f0deb067d03bea61818999123695e074d786e8354ba73655cfa01a1b5c640700e2f9627d7519a457956f42226cdd323a1fd8d390b39b52c2a050a9d50de4b8b325fc702880f122abba22321f4f3aea6dea1cd6cddbf054ee214f5d1c180553602b1f975e1a6635aad69d8a5e0c9f8f4f3e80e7b9b47535ac64bb45f22e27c70d138e1f186ee9fb69ea13f95ed0618e557317d7e53c7c89eba31c143b681e347a92872a85a97fba4035bdfc3e1ec50a3348492b4bb8aab3b66b1cf1b1d4f5461f251802c372368650004c9208279fb2db1958cf85ae00df9316f6d378b60362903c4c583173e8468eb421807c5c20d9541dcd08e5d5a56a64f90e05ba227288b6d80b619c53c235a6bd0c8a4baa4337f6ab283fd2bdd42348436392e13fadbfc60cd939092b7f6619d91137c162e8fb4ca948681b04453127aa41c5bf14b3fa9854da0be3a03fc7a70bfd95e4c83798d83a6e9a765a27a14f4d071a16650c5b5ea44553f016ff9e7d3e9f7738cf752294b635ed36d1c09e054fbad414e6f6d13e2fd50bb4cb8dc07b5ea5727c314c73808452338c97a08dd8888e22931b547d4c495104aa7e2816ddb8d74a9a7c3542e53117871eb0d8a223edf5fe8c336e75651f9d048b1a218d81b2b5e4edd57d7814f9e7f296f910da1a3c4c8a4727eef4051b8ee8cb63cad44d7070198097ad4987d81518758156cb57c75431b4f6bd608db6227c3e6c4fba2d26a31dad95939fde6c806d0d6c03a41e0ccfdbd3a7855d9ae9577973a4b7b2959f44b4c00d82bcfd79a4f8de8648ee023fecf5f6342bc9ca6d367ce3d3ce70430ad42688ea349bbc3ffdfc6507431326d3685bc0cc305afbb81bad8a55c33756a4938594b20e74e24bd9562d2927ae88", - "classicalAddress": "0x1279cf32527fd8906144479581fee7b113b585c1", - "sphincsPlusAddress": "qx991a87528237b49757d0d83be16f1649940375b4", - "latticeAddress": "lx9fa56ec6f28a7eb3adf52ac5d271f6e3710e6ba2" -} \ No newline at end of file diff --git a/cli-interface/data/wallets/79873e07-7571-42f0-8995-e54865a517f2.json b/cli-interface/data/wallets/79873e07-7571-42f0-8995-e54865a517f2.json deleted file mode 100644 index 1df6eda..0000000 --- a/cli-interface/data/wallets/79873e07-7571-42f0-8995-e54865a517f2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "79873e07-7571-42f0-8995-e54865a517f2", - "name": "AliceWallet", - "encryptedClassicalKey": "19bace2f0674c7abff63f23c1b49be76:8c72d5fb1a02163157e23a8070a02502d6dac4ebe7e0e3fd7ddb7279da29a60e468b260db36ff5bd5bd25c399332b6fe74aab9e0693b3b22f6d9aada2db953602693ce4926b60946d0c6a778f4ae98d0", - "encryptedSphincsPlusKey": "5316944b6b29d6ead5ba202f95ac4491:0d9142f3c599a896137fbac477e9d150d0e3893129636283d72589a96616a7a2249cac318e62e0fbcc62337f1fd5531461c5387ecd7b190f4e7f5920cd2d1f42f5255ee18f8141cae6a99749c6c9df2b7110e980f81f79802040b510f23975636aed23a1ff1d0741a093c8ad9c88855be00b04275f1a5e51440763908dc4098338f98c9dd1a58525dc598503e783493462faff85dc219d0b18a2792b93bff57afa30a5f59cbb37e27985eef9f11e24868f16e61fd5e5f4abe15e663b30d1e3f2acd79695e44f91754c82a37cb1aedbae", - "encryptedLatticeKey": "a0ff1bd3aa62d2c58098e3bed11b5396:283cdf9a48982896a24daafee8523fbfe5acb5037960348fd047b597d182e416eb08f6233fd228abff3f2ca998363a1990dd623a1712ad2cf2a0f97246bc287d480220fb7df950cf6776e64a93783cfbd0125e677b51da421cdc906a0684628d128684f9a0a67f60d9754ac09b37662a8f0e2ecca543dbb1f0601fdea4c69967e28d6dfb7ff36c926e188bcb79bad00d11aa27e2f07ce7d455c42d4414cb7bcaf4b8f884839a9b5cfc66ae1d56b8e87d242f6846679089d642a51e1572a09ca7cf69ca1e932f29ac38b984c0875b88e00afb34fc37293767a7647d3c5ff1727c0c2405f306795153b6a813874fc1bd880f11cf330a5c226d872de9f228ef87ceff99310f4dd20789a448ba843791557617e96a939d454ac904559ff439b9d49d861def8a3be752e169b6e5afbdf92296f66f3d4f0f549405038d09de2e9e9ae080ea283cd368bd6d033dbd87c68caba1ecd70f5137e980b7e7ebf28aeb0247ce94923863f04a9359211f5de447610f5a1b3eb2e0678559926cedb2f8755755252bb6adb261b52cc5f54aa0b2dfc70b7619b02b362226e57265791b2b7939d39671d06f8daa5a4ff2cd6eea46d2794f6d9d1f44322e97803796aa0289598095e7028b9c5bf89c4b96b5a5fc191deaf8ea36245eee2062e7d565ac6fc6899bce701fa64e697e46f0085cf79e4f293c61eb603e4991d8d7e6e944b1ee698a053ea7d7e7092d551630b08b7748260a08f69074566ef9ca8063461725aa3daaa2d3d11e3ef7d806ef74cf13906d14a544ad2a1189cbd2962b030641c94370a5038337624e00fa992ab87958e9ec25d8d1f31bb9349b0e869f2f74c336a277217061ed78f4e240477bbaf46f7eba717dde014ac13774d775b23da905fe5c8a03123d1ef5d45f8f35f401612af9731dee774ebdf0e57a724f8d6b73c3c7a08dd0c927b8e9a99d527a2cf4eb89fcd7318dfe0f254e63e040f606f6cbd1ac3685d917b3b61fa37633e9085c33130865dafcf0a438f09848c6150bc6af00a46b1f2a7bf78c44c978b76535d02b1ad51ec504ae43b4a160f9f0b40cbd4bf6fa947b4719aca97582108deded29e694036f8466002463ccd2f7e4c523135224b1d02350b8ecc651c25b24e011d4d551243281152e75a3b54e57a535d623984b99c0b48686a0c4b8b22e4e1d96e531fb53c1ef161485e5004135318f8511a3da8626fc69bbab8f36cc28a70f6cb415b4a61293b7e81c529f63f2b944100042fba1a160e4909097bb35d9b640df1c967c79ce2988b7b6e248513537e84b865b29c98abdaf475f3dc84cb7f8b701c2f773cae0ef1ca6a948986804aadbc8778f29f15c1a1e2b90dc28e9cd1696540a77129d9d9d62176e7d54707e456ec3487d89fa909a0aa91638a7f08e02859d7745af9d3605533fa9846c564b334199ca2dcc1f226f2ff9d2cb67c199ec3918cb2169e62023b8c12e7c0ffff4577d8f110fc471f876fab4e028d226e0c2c3d5c6b1a20d0b1483c8905cb7e2194543ea88b2287e61a6b6c1da9bfd649898622e12640de95a4e71dd79d70acbe82ef15a8724d2c10c7bc9c62e0c564c8d3762944dbfd920a74aa779af0205b3f39e044fedea0b0cdf5df4394bdd8fc67e0680d814608cb871a5dc2af0bbeeb95c7aedd2e1e9b33da63dd949af33be30800afe28a8b1694958d57639598270f7756a7a9b1aa89b626876205ff4f632b234c802f914f172165bbac0b15e5b26b3fa8c5e57ec4d44b852ba85ff9d1a0c47152da406527a7bb9f156b21ed9819cf17952fceb38ace3dd2c41518276ad9c1175d8449c3b97babe2446be5c5b8729ec88456140d9ac06126f829e0d9c6a7582d0c685461d52ebceed04a1d13f2643c6dc7725dc8a11339859749db2347b8d1785108958e86c944da93a55cd66c8d0b5f5ef8c19e2fdc49b94b01cc67d0d088a7488ea5f9260032ec39c05159247c2c274d71100198c8ca89535cddfdcf8e87c968a4de5b144c9f883c96f58c39ae4065d3acbf6423e0d803c431c11d58d5f3acf2e1517a3b7fca15a155083b3c28ebe4b9f0ddd28569814b6c43e4cf0bf058b286c38ecf3fcfdd472c107a6e25371f209a0ebdd7f7fc2ffbb84f489dab26ac10e7bc264d87d0ead301317df03494ca8a18551025b4b69af6e73d9d0c618055c90878a0da1bf97675f958a472c97ea43802ed6b0798f52e1312f7c2b04bff969f3daf3075d063c1e5e9b4888944748312f1903f6b6452e3950fe433f162f671339bf9f7346b25422531c4d3bcab0c7464ac9923568df743619c693b3b2f3a01f1623cd60607378f4b1cc41de74f1cf88eae1c2c120539928ca408da1d79b775ab47a1bf24c6ac9fe1e67b57e292d05018943624ecada74339a6d1bf022a326b62ccc5a94f6a7d45e1669b4d31ab04e296067e14eebfc91c51890112e9151edf39fd92bb7a51947597b854d4ecf20b21ffaaa2d831226d6cc25ca5b450626d10d02192c104b32861b3be60f5e8d51378b2fac91db97d4aa173ece367382f61e152268be0e84b1e18db1d3dfe95714a3f94476b070341ab96ca7d5c892381e507117b53e277c51d396d0a9d8774189ca4d7f575d3e9fc1d5477a751d4f8d5415721b1e085a5dd5261e9ae990f1d18916d33ee37e0d4b5fa8552a15e3e6e2ab217068f82b1322ed88e81d951a6f0bfaccbf99bed127755e4cd84243d46fb986c4f0a7869dab60ba1ba9cd20018c57ce4bffa46e57c8ba30ce7a60665b80108bba13095616ecdb1701cef6c47b5a7de52dffc02776e5648d8a7166d7f6c465368b18e153ab97c5f1fc88ce926e4717de1317053f1708511858753d9de9e8e5f3e38191e549488c1f91ecfb5e32b6d9a9e57a3e45cba727c2427abe282d6faff8508a6d515d723b6aa7db9f1cfb0926e8fe10da12d20c8d6a13ed9a3e5788e8443e08a9f5dbf323110407c4ac35cc88cb5aa82a65d781d1840a30e6ef3cf134efdaae4a14f6715a36cb903af5ed5d7c67123f0f6f6503a4ebca01d687fce92c78ca473613d7587e34ad4fe443f6538e53a899a41e45445cc188d72e099aa2264bff9c2bbffaccffe29146eb6918f3e950c57a5d271f520659db9a4cfe1f32fa0e6885f7b71735ede64dc95fee492ee0dab82dc7e2d4751a2c8239dcbc74909d65aa563553e2536efd56678e6cf57ad1efec07961ce65ff2d2f6a0a54494a96b019ca59c6c87056bf54c2f57accbb438096d2f3bfef73ff6c8a5491aafab74774d1f17514fc0a8870947d15bab85225aec182d376630b6e9fed4e8f9415a1a764c04dc29c439b5eae793d526e0d4efd9aea36f70c8829eb6c636d5fab2dbe357bae778845dfaf23be3d40fc265b3436cfbdebadac78187d91d9e37d21cc1a82686049803b644bf4c0967b6f8d20a2560c96a82b746e7c124ed1c97ab97cf3a407bf6fffe5ed9e8b229bb5ceb631237db764c00d494db06680ed1d22fbae612e5dd21e02ba0f10b4b9dcacab4fe9a485d5f8a6202d6ea9418f2f86a2a3a375f9fd6dbb092bd7f171f83c2c1b7ac7121af470c20703828c12f6ba3f1f9cf63cf724fd2200e19b2ac4622ade40630823fa14e0b7a236f6c6ef46ac15d23ed08d5c28c5a102ceee1cd4171d848c0776837bc5abb42c9b3e09b1b4f7224db64601715e9f3e6a5ab539aa5c1423cb6a7902ef0e0547651975e91b879781a787c47fde63d432fe5d3c7bf14e1e7e0ab78f593a9331e4e524c7d04be20a27d3491e7cb1a1734fcb7c8e25f1ba97b2ac510310d7ab446c2588edb4808fd674f5bdecff2a43bae814c74d6e4ab7c2889429b783eb8a4ce93d1e12a939d80b5cf57188e6f41fbc77af2a6d7f62f107cb873d354827e91a330e80394060065b114fd2570a4f68beaa5773c6aecb74a8c7e7971b0cb298297e9b208977b403e09c6ff62f8e1f02fe8ceecb1aca5e9a5e38e2d596ccc69aac250e0240fc1b9d744221dcd229e325489837af537c35e5054d49f70cabc260dc190dc8f4d1e614dd5569655db73e336cc7d2ede68e097aa68b3b287922f0930d3f8d497a9c855995303f8e030a91103b24bf593e0172e96af5cbe1b9ba81f88115d4e895ab82dd79ad5095fe1549ff663b7e24bf0d8163ab428581997cbf2e624d0f797fbc5370ca6e68d6b8e09a245f97845b25006dbe4ac8b64c122774ee346118ff309c03adcff16c6fbd18ad3a1e4195328b741c7078316cc9354952acb245480598ced453d9a1e3b6ccb335a66016e7e7921f4d16722d9e784c9a391a12545c904fc11d99a88b63237b95787feb4a5cc5c50b0e681793d8f0a04a039f640d19a43c17996303654f419ea2c81df30fcf77ae2029b4cf1568d938cff2d2da4fc63833fcd594cc8daa20b5c4907d2c864c016a557d8a01d7b0000088b83deef8289bfb7df31c265de6e6a61b9c569d333baf17d7dfc9d1af5c936364b4e0304c7671837a02eef54966f22c2810d33ea19406fb87ce3da47960924f419c9549b6011d1f99fb383f2f644fc39816daf608eea15b95cc802fc7e4ec981cd6d3113c5b43664531902ee5098bf25f829206972178b92d6060aa1a156c95a79b94a51f38a25dc753531b3fbbfdce274ea0e365def7ef75403bed2315b29e80c564430ba32c60788d6c96807f6c0cc8285b7a985c0df2b0a96a584c3584443659b659b5a09decc946bb01f776cf00a00480a701ac6f9f775f1296a94a19204aa8e7bfd489d3cd572764a61fbe3889bc94c7849583cd030356ca22434ce3134210adbee20697aad24a0ec06626823ee9e6f9101ffe50835834144bdbfef4858ad5ea51544607342db38212b024b2206f86b6ead074a6c4389e584d3fd99fffe7dd965db482f0d097bbf1df1d0e88831e18fc3a42ff1499393a645fdeafdf223ba563adb7b266ea5b05037e9a283ac33fd2782f3ea4b9ec3c7b219eaac2c006df1b8951a74873a9c7f829e98618232c2da3f536d7a52e869e0768f6d53ee29ac5bd71e819549dc270651ec4dcf8bc56a42daf2cc8c54db384759224b86ad5dd77620bd8ed2371ec6ffb2ed7ab6715e8b6157b51bbcaf072de4257f7d85048ca8d22bfa030a4e7126f7a8c24bd6547557700992a2c790a485132f6dcccd65135277d8a7e8932912496e486b4a35b90b65e7bfdb91373a5d2b41d08fd14bb07e1b0e3ebbf49f8a18791b80cefb7a292e17c5d65dcee933486ce1100707de37a2c35fa308c3da89b97f29c610de6185d8e2acb8f15d92498bd25a53babcedb40409e8ab541a44d71b96aa4c52a332952ba2ac2b13eca8cdca279b8204008ec6ef430e028058d96b6511aadded1567e638a97c19bab9ac4e923ea9f8163d4687fb6f5e1e5e0e2f20e5449ab0c332a6598cad7ced3af176573a5d08fd016168e1ac1aefac3a7377e01110198eec225476814da49779ac68592bc43a23db7c3b6f713d8bef24a83a161ce36117bb1b356a067cdbb090bcd49067824a71fcbf8555fb40ff759e100653425c35fbde5459351b2dd182933bf7f89b5b440a65b04941d4d0f0df7959cebe0a4815d76f323e03a92376d4e6d836db0db2280350cfc8e9929277ae2f7acb6b12d5c37dc36ff6f102c8d4bf866832d83a0a620f062538882ad0936ab1f7b1994cc990949fd116736b72acf749c7da0727040b52733ade1bcbdde94fa8e190bc8cd4887986c6bad7962ef0fb9c3fdbaec2271b83117a0da79a09fd052c8c0bee65338310768a60a931c2c007144f6da53efc21095dbeadeb729731b713533d32210f5758ca56e71ae16c81f98ce567d24ca84da042503d455c29d3a64bdcf5838a4af0176d97ddc809632c75a5874acc84a6c63a6d91c17a6e10b0f40852b799fd9a37d1365f3b30d624daa9f4fb9ec91efff28f6bf6e91741eff7ba1056b816d212d1e1b5140a753296494a898c3dc7506ebf133ab945713190c2ddb59c83716dad7ec68b3dea721c5fb91614b9a854d20a3cc6dc0f180feca92d8a8c453a45e7784c580c85b28cd25a1202a028085fc19322fc71c20584ddc06418883c89edead1db74cc35a70a05cab6ad802936eae5d52f6cf13bd217f1a2f12bdf435f9d36f70e099620f2031220ed8f42df81e8b6c609e57b3178b7d4f12ce1e5d4d8acfc74e9fdf5802813b15baf10348282e13c2c0c710028048a2588e4a5840ed77375eabbb4bf2c3be0b4e5616a5d7341b85d07c127e46b7a02b5f4027034c25e5a51338024ff8bfd2b93944e69e6cd76bd7888b87c8ab33b03f81c26620d2765f9d51441711f12d1470e1c9b63ffab2b2abab6c38aa01384f45f8436c7427353fd416c2a648491fbbd1a350c49d350fcb54deace006e8b78f4f96b4882c2fc59831feb22579749f61c8128f2613246ba6d50b5ec246b22d8cc5a36a2121ae681a5cb51427ea84d1a3c9d227517b176883a3d7a0bd5db5d2a9739809d4fe7044973da67855419b365c8fdbef20b12dfe383c7a15d3d2f90657c28155ea7ecd7d46c5c1e4b8b562a062896163c4416ba7d5df771279f27d23f2918198a8833c59cc5605ed0da73ea58a95d52c4ece79623175dec937d602eb112666c64e9fe4a565525bb35b082855cefc29cebac601ced6f2e403d2b906ea7ebe9d0bf14ff5b6af1d37cabab67234a50c5baaa846912ef8e3ee70f4aba2306a9a21baa667013431209f495cc572c2bb9e474442c2a4dce0b730578b9a076240fdadca1c5720439dd761593c8d131d7c120989663962692002e00533148e895bcc36c0b7d4c61250446500bec0a8405dc30145c3aa190e6a4c8f18845bb42ef86fc19229178ca00f1b9e1d283b7a3263f0dfbd7047d9508e3ae035f45f31ebe1388f92fbc0b377d9c181630a3c0030b38fccf00db1bcf7ef5742fd7520f2c8d5d1573303bb8fee61f002f14d81ba50d596badd735a1e8a394b4c3679a8bc49227d4ef669455f3656911d9e957ba0b6ea8adebf880bb8088c2ca36db7d7fca51d528efc23d7109e03d22a17f8d03cd4de063c17d6db7f2988b343741521196fa8208e67d1cd45d65f11136d9cc6b6c1a6e41c65fca2ba6f2dac23853624cb480b96068c8fbf9182e0ae593e98a546525ab97c74a231a4e8cb4a17d5fac7aba447d85f8f4a1abd67917f32dbc62643af55f7b345622690404b4bece404b27b412d28404b17e4c5d743b0952f15d08f2a4d900ffa8f53d98f92c5ceddb7d99b36aa344a86b84149948e946c1873d1cfa24cb1fb022418333071191e68b40a289889f496db4043ede9988c598a6c4e8c88922846e7df1243943843fdd6dc0fde6d4b69fc705b13cbcbd6453652fe8c82ea72ebc4626bbeb128d4067016f9e9ad84a760b6fe850b99e5f2c0fb14e327b1ad67638f07163b9dfbadca8765dd70f821e3653b8928e7bf1ce4bd56f1b5c7c5ce59d36e8144c425bb9dc5b6198fafdd3150a8dc7bc73a48189fedb3821a25192bf477e6a14f02621a95bb1af196b24eb22f6c33b7f5273f574545e106025d9f2b210c0be77dd0fddd6caf53d32a2246d3fb8a49302e1d0b5298139a3e1c6d5d13494e16f7da98d709c26e5534fecd9eee57e68dc5c76fe03de92bdadbe5b8e21bfc8681d60e16902597a7f0a42da15d6ac4ec47632601c185b70526545bc727c1d499be9e425241e50101f445b2ba7b95133d3655a40019478c2d461404d895344b885f55b94f68cc0828b1ef6645a0500024d04562a643c25ab9286eaf79f19f192be3536f523d472242bc69a6ec4cc17fcd20a549ab6fdaf984eaae10fc70f548541e2dc710f1fc97b5732e59c967ecc4650dd5f0e2e942b8e6905362c8cfaedcb4c712a13869986fa0abd05f3e167f83c4c95dceb34771aa33b0c7b9fadd06fe3a0e6ea74767e0ee978fea1799237a6a3033a428da70218dfcce3eaa2fa427e41b18070f54fcad3a540dbbdcac6e8c18ec64a41f0ac64b65fd97173f06cdcdb375fdcafbeefb789fa91b918e3240c1e1e0e0d7d70aee0b2a4c9cf5119990bfdfaa3b916ade6a13796c29080f8db201072678a8b6e1abbdaaea3ea33c18f68e5ee35a09cda31fd1a5340fdc4b5f5857da94bfc19f255251c0d76cd9cf71b6200a05e2ee1649ecab600f17f39b37c06eed91a69fc1ac87969112ed4abfb213632c77d0f91d7df0d4326cb7899536fb2715420feb84641d184a63ddc771a07362afe1787c08d21c77ea13ed7e8a97ccdb1918a673fcf0b92f408d119d2cba1275cd8bd6cb4ef15728c373b17313bc8efad0e3e05bea743d39882abbf2f8b90d3460b1c8b7085b4009a945068385f652488c9998e927452025741aaa8a57b993de4e05d6f747d16e9d3e087ca7d6e42e5235ef7cb8d0926f99f3aa17a3505c4121dc98b10723d68cb15758a4803bc288c444d1cd1b5701600319665721d8af251643f88b1c638182f1459f1aa8863934560c1b8e8fd48adac3e999e6131942286339aa3998521b65fc978e3ea5889e195e41d4685ea695d8222e6e566a0c826bf663e6e3b790e7468c0b9a2922f34a4704f0f355dd54d4e8e80bee1ebd261527adcb7cb2f92e8c8052a573936b196a4ca37f01a841257538c94fc4ff35a3abf93fedb3c7349478ff9804b37bc063ffea5e1988d2d08df575b913b7fded840852595bdbfc07c93871f76ff9b0583c3d42715853abc661f88ef8973ff897aafe404cb6190e5453a3636ff6a9f05621e82aa3aecdf6bc805a4869aeb8ae755a677c4f9e02a429cb05b7efa9ba1eb4d7aa5ecbc30a1dccd05980b046f4cc014efc17f5ff0568bcbf16edd9bb211143d6f5fb57e41845e5bfdc4840be4b8036a959a4557ac8435ed9982dc8149564ad590df6f33d0c45d9a61cae8a7fbfc40b9f021d41862b4563971d1e2b98451699d64c326ce79e038403e8e1f53d803aa7ad7a7b4ab1d460d5762a043ca401cce92ab78ebaf37e203ffdd908e67502b40fd8bc65d7e1b911ddd70d8b7db22f18540864b8a1716c37b68e206e0e69c032a7d9c2a77ce53ef2e009f9dfc6bbbe24f6551c36686e074fbc091ab4953fbf4b9b91b9fc81b76c3b14f4f1664c146aec972856cabe1705310376a8a410a3b7fa2ac29ba35e2d9e85876b1b8f1fef28dc179b03dc91620010482a5879a163e578fb4014f09034eab65001d51c4475e26c54dca9e4edcb550816312130a6f37b41c20bf653cc17e0e92e08aad66260ef93d3aba7033f00cd6cbf4293ef57750f2fb25b81fd1adfd29d43846601c7763993ce17c0aeceaa3021924dcac87fb15eb92c8ecc9763a1d83f8c6ea242adb94e26ba03a1f83cf4d7c912eacc32461920f8b88eee9286417296219abc89839898d5686c68a6474592953be12a71acb9e184e12dd7fbc7d09b0c071228c6fc3cd68f946d10ac19b87e9555cb04f5d76340fcd693ed36057d9205bbd93283706613ded7ce03743112c36adc5250c789c9b8f019af570950439aeeebef1558705eefe01efa4316178061f0bcedac1c33a9ad64d00664950d5b31df48863f6bf32980899e8bd584e3e8a8fb901a38f762d9e9dba204edf24e5e594cf6dc2f4325548e3bc613f6325f83306c167aae5b75d8bf16fd8c27ca4e81dbbe3e2e219734c154185b690bd4e6e10dbff64066d4ab3f024d505b52ed7f2f7d9c413105724ada73ccdfc5a0dcc8eb93f6b5c72226a3bf12f95ba20669e7dff97e6de40f687ee606a06a3e5fba17f643655006d054843b964b7427772fcd39bafb2f24c5078e293f617a782765d84816f9b4f9aa0bc07adc1fb3059952be4d4654098ea3b0a95642e95be302a7afcba893c3045b9487902b1650fe4ff68b4bf1b3c961f9354e879f164952aba3ca204f54b8f118b99d2fa1e8cfb51ef823ac3c6b42fb42dc0be0e2aa48021f361e4874dfb2721d64a0b32ffc68d602312642b529c027cb7ef53cb159d730877f3b4697ec8e6c3bc43cd5be122d3958696a66d542d6cecbb139f5baeeb6a541424849339afddc264764e751f5b422895ef9c0027ee89aed20954efa244742dc8d06eca5797ba58beb32fb98839582a2a912014258b6ae2c9f27a3b9a680462c97e95a6f93f123056e92fc8fdb1d1ccb7028a7448cfff373008a729bd227e1a9c91dac13d7881cc0a6bd493dbe2b000aaa834047f3f5bc859d1103f87833013644a613e40da1f2af535e00602d5b14147b9c02b8e041e8999521b2faaa232065c488955821a1731080674a03209ba9be841c3e93e5766bbd488f83279b8fdd670b6bc8e5a27958ffb6ca18f720b2d1ce94bab989386d1acb323ee4e513698a458c44a03ab8fa67df03609d54028eb38b1fbc74a7ce772f7160e72841168c59a5e03067a5ead78906ea08be017ae44f10018beee46ee2133dbbe39f3bda227acfebf57d6c81020234caf7703b788edee8fac0e3e8499ff11d34de820d0d89e7656dbd967b2542c0d29cde1975b349e08e663580828fc0725e7a8bcbd7e1f2d15b3c56752fc2c44997599700301d1ebed34041ca18cbf968469f59a155ccc66fdf9229308f95be6a0cabdd82d465f6ed310fdee453c5c46653b52fff83ec41450807ccdd557b1aa5ca163c8f40895268d7e25ebc051e0dab1371a9cc126695ba2c4fac62b6462b020aa95619dadcc744ebe2f6e040a75507c7883846180dc233a7744037dff21f8a23517d2d9218db1fb287ef720c364d089a80c769e4e08214335b973aabe4463650f2abf52b9e51d8d18c142e8ce4104125c6c2be344150d724cc6e8f04135398b00cc96e02b332459a0ea88766171fc51aa44510db1bbe40f7800fa7f17a3e14d4142a73c1425e448709ba8e78bf3fa8a84bca1ad281f9c22126bc46169fdcdc9e3853a71b27283c0771b14e4e8f6879abc7f05bb0e7037eae792f86523e19c25b5b0d6d5ba2aca82541404b3bd3d5e2d96b013f53fd2427df044046f480e5b074063b89e28318462be7abfa4292ebb9ca7e5985d95a377eb5f89d33a51cf96bca4546da3d5411b67afa503b2474ae8d799c3f3bcdd0f89aa79f18db1d22af982613727fb5cec3af64f17210511186c59589e39cbafdd780bc751108953b421f299871a5a7328b06e3c636c269dde00623c07741a9e3d78aadd339e540f138b8ba8cf3174284f042ea36fdbf15c9abe09ce02cbba5498def0a37e6adcf663c322925567309dcb9fd44f5c09cb7e4ac1824180ea1463f11873c161c11834dad822f24007924337e796a3f217be55af390f7bf9d0bf67cc4e2dedd704c85f5528bc8e893821aee8700714e976fc07446d52d8c906296af22cbf2f8cf709bc3e963bde704c871be78996240eb5bc0ec47f34653be5e5a69249e0cb39faea3458b81af3cbb99fa9e24c59041baedaf884ef81a025fa7d126086fd54c0c36165ac69f10d52f77397cc77adcfe70dcebb59fbe1ebf77f87a3aa79eba3f5be567e7211d97548c9accb35965356b3e32600b61bbe45b1169035a540db9c2a1a58d6a418ca0fc23a23a897095319dcec357fcd68d6f3318ee02b9945111b49136e8c3f4614c8281e3b5d63e11dd7507dc55450619aa8b10ca98f9809f8683903c901ab523b18b65e8e85c6f0c6573ce746553180c4b417ce9e2e3ae78ba734c58e3913317e6a1dd3601de8503ffc825db1b59318f46d18374f21b1e9b09f18136afc6b84619b3dd3ac8181494ad56e3e8d9c820e327bca3d175c9f213f91ae658e07832a06534814e2536a9158c62e57b8df18b2f533d8f9cf6b91a5d3ad191da2966df25a977b5b2c4213ba94a6b74d6967ff4e65c6705686a401d3631ae231adf4a099ce59ca9dfb8a15bfb0d8fa3bb4509cc6ecce2b85987238d5409899308c3c3f5ec1ac9df9bae1e837f68a16ccf8dc1bd820d4f2655bc0e03286d5f1739d62710b57781be6352769a7a6b03b0261c2e4825c5cca7bd68911760e184e5c44ff49cd6d13f510ec3154b95248f7886542ac94d4a032bf54ae8de14aa077f23cf873bbaf6c7c16220d6abdd1d1e0496b34a0bf14193546a70c415a8fc8343044142a18842afaf16eeb0e0a7945c645665e45bba7eef028c23050fe63329ee4621e91022cd8ff6d01fc6972ecd3c4deb07a199f5643b0922281dad9ff3352ba767bd2d9c60e5a509de2b90ba906342ee63230c970227c212a7363ad2b708508c123f413c0266cb40d22c968adb1ddb1f8c4cff8520076a7d30f4a0d9b99c187b1cc14f47ebc2d334c395717fb8ac61751846674494a9c8402ef11576c162a042c1292e2cf0be53cbf74bbbbdb16fb78623505adc4795e215e4dbdcd7e2998f86d62439048a442bda081c228a73f691ca4f8d663de5a19c370867e27846b41f0dbb73bec593f8a9ae7210cae29735a3258dd62c00d0d48f21a0374d53aa1931aafe4736e71186d107c388bc708c44f62c918348a15e2fec6ccdadb7792d806da7f8b6b6dc78e3e71fe951b144b2c0940a695bd8886c126ecd3c413550f8a3aaae8a8889815a23251feef0a357db16116daea56cfdafb0f5bfca1a14f540a2f9da6691e734dd3aa335353f9c4ca5bd64208cc78727903fe5575b7e407961e45f03c15f370613f18d0495526ae113fe5d1f1f63f17c1102f59331934aed9ee1f727a3942fc038c0ad16c8781553fceca1de20231cb41930def6c61c00397db80ed655540d6aee96671b12f6778383faa9d53e8fbdabbbc67f26212357f0845486bf1d01422d0e63d57e04cf61d2624313b68a375c4e50942a4b4ea1e698d7fa155b8e7ea0c5edfd030641ebf20f5927182dbed80750c117041d25bb983442fe09ecb218c4c0149bce8557ff929fe80282edca37911cf7b5000f0ea2c15b09f3f4539c88dbf7e34637ccbbdb776b6eafe120aeaec86f5fc6c8efcf251978f5077e1a92e827e77252c4f32a0ad63c929cf8236249351ac8f4f909baba5e1b8deaaa702fe3946be81ef8565465cb7c766526abfbb1f5f745dab6ab594d555d45a4275adc26a6c401e716e64e1f4c24b03de11f9d9678a47f1f0aae6a81866e7b19b46cb6731a39f068fd5681ad25b1e991d706676d098050cf1ae355067fa3e52a3736c2d8590c2c7b89c49129e05a124b15ac74d2d0b85c288b13951c46932bed98f58acf12ea67ac5274ba50725c39b3ff33c045719bac1de04817e474bce8f5aed3c7e98feeca6a7ed9dd2a4ebf6289f9aaa4a021f15fce071be9f5a3f057348393691e6aa034bdddbcbe18fea21887782bfd7589de62c6e34e1f55eff9080e21dfb3bcd51a0c40f05475619c6895d992b69a512a97790bdbd3c9fa0696f9d44ac7613ba9ee2a231d71b46f446170fe6f46c9e716096096fe33118fe02d0a1ab2599c000550f79f49ff74fa9a687ea472c92215812a8fd16eed98dec355360f6069359e346c682728449c4aaed08a017948396f8c36d7a81fd83841b71f73016289b9ad077b0d5ab2829ce84edd159572e3c1e5bf51f52fef6acb62db8f3f73cd76261d15eb347404bba4068e4279a54b963813fcdfc8ab74808e0acbc13416e41c612aea4defb02a8423885a3b8121b1c985c7e75c8164b35ac358a606a2b7fb8d558b33cc683aec071cbc9b24b5b06320299b060674418ac026ec7b0e236d7e8dde440cb258dcec54e2b851cee6dfaa7ae2dc9a72396bfbaa607978de2d09f025d53d40f30c3", - "classicalAddress": "0x8664988c62413c9fb1ea74e90d45ee5e6d3897a8", - "sphincsPlusAddress": "qxeb6e7f3b8f1fc9f7678a4d31838bb195b58559c8", - "latticeAddress": "lx8772022bec32dcaf042b998ba34ce65fa7b21a53" -} \ No newline at end of file diff --git a/cli-interface/data/wallets/98ba098e-8cc6-4860-a1bd-f8c68816bec3.json b/cli-interface/data/wallets/98ba098e-8cc6-4860-a1bd-f8c68816bec3.json deleted file mode 100644 index e1dba10..0000000 --- a/cli-interface/data/wallets/98ba098e-8cc6-4860-a1bd-f8c68816bec3.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "98ba098e-8cc6-4860-a1bd-f8c68816bec3", - "name": "AliceWallet", - "encryptedClassicalKey": "313f1b98f640ffa433879aacb3573ccf:62e86711d681c4d6a51aae9312057da3de8f3ef5daa003a229baee80d687ab173afeba78025827ad82ce229a2fb853b8ae4397604d7718ffaebcb59870d782d28c623a3d3f8a73a1c2e070703cc8d7a0", - "encryptedSphincsPlusKey": "e932fe7a5488dac4c444e3e560c0e754:0717dee6f522490caee890f6aa2c02ad399a69766eff61ad361e2bbad361ce8b1625673970e2f9a91c5243620d3c1448ffe8ecf2c9f664bce7e25ca5ecd7925c0f6e42cc38b0071d1f3b2c1415a994096d0fb08072a7f0860763de11ee3a04d33b414e9218587857c25721d530c89e1b3013424d5c4773e6c33e4350b714a96714e99be5b600fb03d33ec9164a99b03d3fb4b463180deb1350b3cb49cc88275c428c67a0c922d644c175789887f11e6fdd2257ed9a39e21395577e3f3a53c6b831d088e956eed48a53719e017167e79f", - "encryptedLatticeKey": "664f4c125b0bd3ff5b3240c68df43366:99d0c6bf122f79ce52dcf5141c44557b2f26907e3282ff03939e4511722427f26bf1b74fe36601bb2a1ad082e8d77f074cc2776a97fddea6a4a24590004702e36d7327a6dea6c9293dc2fe566a39dd264655a9cedbb0335769952459c07e7cc708b4916a67d7e84cda36246e8d7b8b406755d01fb86f40c4bc14495f1fd593c5948ced5ff218fcc79e35dea8ecbe8bbeedf73193d36690f10f541c6ce162546236a7582de28269a4de5a9c869d63ba878c8ec1b0ce3d2802f7377e531c6984c4098f054a0d8c6c499472d37f401088c882fc147e1f0c19bd3dbcc1d6a4b420cafa3a8fcf9c3a4b6ce254c55a2b16d28854030eabd76e12f6fb10de210f27d3bbf65ee4c9153aae9e28c4fb60e3ef00ab6fc6ecdf74f72017c7ba4e77c6c42b3027c03ce65fa84a7a2fb5a7b280eec65a301716bbddc1e5a71a793abe95338d0eddb29632c63a80557ad95f2a9419a8012f8751716afe9b030a01c479497f5818b917116fc13b67479330802374309150e2eef8b96c468553425d3360bbaf475fc751c6700288bb654af14b05a2bf8ce2ba757425ff6a42bc6d3cb19c7c13f33b8cc88c2f8f3ca4181b4f3bfe04da3bd12dd68dd4a6eeb38cdbb3273ee000b7c3e0b56dd12adad23bdf8ed4f02c0b0e21641abfd9c0fee9b65748c00f18c75a944985bd67cd3de509a50104a62446667ec87348bcc30b846ff3b103055710baea7cc19f1517c6dd04553f18e41fee07fa3861a6e2e1087e151be09b99077922729709f64100ced66902b26dc6e5cefe53d4886f1c38a4df5416b6895e89ef00cfc7d6454eb4b2b3a903b3b1f97fbce01c536d7e7788a5c15951458bbf1e300b35e00d1209b15af70bf9374b40c58cb1cfd4c23beb85e34ffd0206d6f932769de76d9e4e3133ff6c45d8b2fcc20b2d53808f8d442889b6c1c0d77811a8410287c88a090fb3d0e75b9a6b95f6d6de3051318f8d36a50848ed84327509c145351f8192d6711391a5764c9a75b9a48eb4386d322bef2065a082935aad1ba4694bd4d14328e807101008a50efb770dd0a4d625aeec30b6f8bfeedccaaa4019e7cb27d02fdb4e3eededfa3bdd71739d7c5d774466eb0deccc01b97eb07cfd2b2e5d3f9af0d933e795b619883e494deaee4e524a4087483b66128a9ca378db403013e495bf503570fed9f1535f9354f85f264307cfcdcb15fe018356701f14f8edabb2b4a9a22dd6702451f77c78ce8ecb3204fed38719b7fbfb5559f385bc7d6a1842c9ac6ad8719e310e1b8da818780a807c044d6a11e90e7a64f6a5d87e1f2764281cfdfc50cc7d1624231a3f194813779ad7c1d6b5f4c4adadbd68813acaceb4c6bd23e2e2a329df5c032d275feaa55b8814bde5fa3b7de1f748196c0f8e30030d14865e4cf30714c600f9528a55b47e3d039cd6136ff1d11ac283c54cb8b023cfe1add45383c351eb346ef2229ce49900a6e6a05a21e91f4086c6ad3413ffccad68390f5169c0f7f358895a40275da28fdafcc9ca770ecc2c4d769138c2bc33d1536a349da4bdfafff15cdb4d2ef56cc17c7917fa940ae72b1866482341c9e33934f481549345f2ca972ad8cb3c0e5e52690c3aa904314bfbf8c8a16e3061d7574dac2181d3b62be0828fd44e7dc1daeab90d712c55f09f0ee8c0b766e0b7e4ce5cc610e7c2bf3a9a1eb6de6a85cfd9e8f9aa8826ef5b3b20f5a5e79e7e445230184cbdf6f2bafc40e7c2882a063fcb5347862848b521f743378c055aa34f16f0e4ba50608e1d5e3e665c9f5420158023f5f9713bf8b4b8c0662a231978e3fc7bf2c94e58235f220b26864c1ed59117561e33714095eabb327c9f331d035ae68420278e73361f394119acfeaa9d27e018b7d1209fce7913dbbed09369c2ca38a4c30ac0e15b0e805d39bde0e9a0c9a079ce7482f3048a59bf914b4847f0c8b25cdf530b536062136e30cc1f9b8a65e4742545d9c93296b3b51513b6e9075f13cfb7248fcb3382be395d068c71f657ecfb10ae1b6364b6590f84f03593d3d1e05411dd7c5ccf05f71270063c1e38de0f6aee6d0fc6550a7852de59a36ae4f561f79e19a3734251efcc10cab775564655202c08521043368aa16188e64e3aa0d93010cfd89f70e84b37dc58e250df6ed367369089a73ee676813e5214b58f025381bfd3403e7a073f4b179e2b3c553c1922313aec89a3ecfcda9c63d1d6cda0aa4e4b8375e349d4260be838cf9d122c8eb26ae320809f2cf41060519795b118c2015b36811b797a8e86a6f82d264daa3ecea266e36ebf1a7210ab91e5a4ec387133b958cb711f46a502a0e809464ebd5953f6f096290f1313ae93fa8675d8646687faf53ad1d5ecb5eb632c552e3c4793af293eacbd93640cda0a2fd6f2e2ddf71a51ff5479b4a376ae5cf60a333f09ae3dc2e6708e1fcbb0b7b1f3edf6f2f62d34230d5f9b53fedc4a70682540edbd291aedfccb70d6587ae96de0fbcff33176584aff08fa89c5fa0d752433d84abafbe8b1768fe3b86aff4b6774ed7e39f22091ad44cbb4db54e2ebee1a87c274ca41fee37a994f87317734080324040c14db052210e7d2c07c93a963fa5af8dff4d0b3a4d8bf36c4b1bfb9ad943c730c43081d683ee1d9250b154fc3e69a66e30b103832c0527bff7ac2cd6abd58f502c64c36e1176203716486cedd1c3401379804cadc09622abb3a63e012ad0311f77ea91053a639b3ba8178273e76bc8b366ccd98d01994279ea90e5d76275b7ba66577d0f7252dd9ee3d5ef753032742264b754973f2fde52281257a224a239e2c71203b64100c41b43c542e58c214e49a2f5c54f8f177c3805c677c85357e05d2baa1ff8ea0a1c1349d85e288b93513e2f05784956701ffb963a4969090fcc05918702776c2667ca46f683a93218fe7689b45555a67e507ec5b0d14ce13fbee20191aa127957aaff016f71d402bdb34b26bf1319599e38125a25799b60069f148f40fd15235290e343bf584540cb2db2a28103815ccb29e0704eed2838e3688e9bcf51b868a7735ff806d7b552dbc77eff283c03f54d973c74e4aca673000436f92d60020e27f5364a250f6fba8b866efd2fda39e9fe8ecfc0b591b1915b1e4fee24274931c3a04e640559dad9eaefce978448cbface320b24cfca1743f716a2fdecc589391ae03ce7d8499ac45f784dcc94245614598b414f8cbbb93305363c12b47f4c6c0049bbce9107788ec1383fdc10adf884239151c7d6230684bc89e8d7d6de110354be02abf35c392b7b42aadc8519543e18ae0e3a19d59fb4dc0dc799a6660b810ad94d4fd4cf5043e05787d75eced127e5194ec9df84d131653ede4a2249436b3863015d0d9a337f6255d86d31098758de7936194a55352b86e5a7a397fcbf59e2b87be6dd14cfeb38ad065965799a80adca726f88360af70b438317b324abfe06745547253abc5e6e70ab605aa7c06ac02676cb19fd4e07304227a9b35a8a23cb3699b7910b20705142d6aab5f5f539c303d8195aaf1f341837165232aa711e93bb31a274616b8f3a4df8b19c045df49503eafe114f612b2bc7c43d0550c3b6ae3e47a422a0bf736602bf0e25347b9e9c75dd1ef8695c3e3c7ff45d9080fd7db07cc30f07b87f56776fda26236133d33b83b3423aa02234accbad9e7504047c6f2de97bd0ae8ff16a940de45acf129a0b5171569ad82af8c30b1c72b7401dffc808ac14fee1da5bef404e69d0eca54f27fd5f28955df36722d3acff9c6048e705374f8825c4d0ed081e5366c80948df4e00ecffcfaa17e6defd608af56a3e7a5bdc380e676377305f5be108b673873f06476f4cff14f0eeb684e5c149d2a9c116c9aa887658b8a1475fa807fcb724f5b7cf835918e2f460471674fcdc289467449d686b8d94c73eb61cec3f4d08fe0134aa5762cfbfb9061c0a4f01b029c4b7d4ef2943e3aa439246e6017bf7c32dec6440145f6c98c495c4b9333ca41dc59042300e8e2b6bc33e0b30c24768ef4dcbd195e18ba480c233a6d6776468430a135a480cf3a00cb35f2ae1d7f931479d775f3a73f8f282831ceee661209fb33b8aa44f48c73a5264053675170b0b9f1f807a0bef0cc2535566991ed87581e8240d53783e1e3ffeb6ce0f0d815d16dc93af9ec625de13b7fe21a38518cb252a13408d65e0b5da389fbd89939a78fe53dbd272eb8f8ca9f6653d68b8331ffb66a035eb4331c3ea6d99930e8b1684a4180ca98f4a955e12fb595b0b0ceb56feb55c7cea2fc6c85fdd218eb14295cb253520363a67cd31289c4da387905e41d6da57afc81a47e91a65168cc9a54d7e62e31f554b10884cf2fc65cdba3dfeeefc82e907d0051a2d6a6c9242ada7a2d33246b560d0547e7b340723542d4a546f8469f45ece0c6aef7fdf4592882e52e5c685b516d44df576185df23a6d6cce3b4539d2f33432408b8421e00723f7e6afef372e2ad95fa50cc8b4bf8214fbd66d91b975adae808fb18ebe1f01361c6e69e182ae2966dd75c210283226c1a3339a26b25243d15bc82e804d3460797e65964f30e5fb1a692f76d9391effbcad6d6a5a68edae7e0d88f5ca1d53b23aa07ee8efc5407f61979cd738f9335e6f1653dea1c214193a9c97113d164cf82294430917be5b400f5c7ad4045c37358684bd41a30cbb2de5689665ab026f56cac490baf29664614fdf72f66cf2efe83c7aa460909a11d3de631cad353468a380ebdd8421216756623e4c99f0baa365262e87e6a3bb0148fab4b397c98ddf65c0da8576db30c9d056b827c7cea86ddb598310bf172543b49b5ed3e7437885ea577e6b1c3fc18889574878f73e308a8c74cbdab43ffcb16c5334419c4f9e1cd5ca29aec82c0b66a3f1ce691d43d6c62fcb1c8844c1e8ec20d1db2b2aa97e275d3d62bc0fceab11d1a1e0b515eef905f225d23224b5d9bbaed8505af39a8f0f4d2ea44eae6769a5ce17c182baffd5a47721373750a441b5a1cf6566ed4e8542b2dcf25d34790b0f29bb4519aae054541ee87391967094c77137bc3dd937e23e6bfa9e18c0a055ee94ba91de75a4aff2ff4ed760fd4e6066606b11db64a1e7f1c2d746ca4d9a9f9464437ef2d59bb8bcc2cf374737c835e00dea90e55a3650a0216b6a67c83c5390bfa16202e452f69fe61e6ee76289c23bb49fe175d61d67f2ca82950c8da0408bb36b82711a38705b6fa410ade2d2e8be3eaf0055b306a642451199712c7da04e2fadf245697bee263a47ca098a1a14ba4c2054e4f94365776397628cf2e9caa68d5d490b4bd858382ffcf1b23f67641835b5d43109a5360126377be36240771f96f1cc995e2397a8901a4f07bc78680b9739e153dc4163713c6347668683f8dac323b8ca006a4ad21083750ae7a507a2c90ddf61ef3848488ab20c2c46428537b9207a9e1033e13903046ad13a9abb816eccf8e0fbeb763c3248b123c6407bc1de78f92725b496c6dcdff0572a77b468d6f4ea91b675bcb28f1b7510a17ce2007b4338c9ff5fceebb5deb56ad9c7d896ce9f710967bd93e6c7f04323772e6f6c3f4dfa539e63d787cd4f66a8eb51185d3228d9d66226721d4be729718abe23747d93cb74e96e702efef094fdfe719f889ce294f26a112269fbc9a7f0527044a21f08b368fef956e8134489acb29889fa90666ce5508aa06792780581eec028fcc655bcba6b9d386f3d009b655dc6a463c98e03f8ca5a3efb6bf7912641330d23cc11b0a6f7a156fe15e8fabccd213d6a032e0c1e3ad77339ee3a9c1af2d8ce83e032c998c4fbc0d8a4ecdfbe7d3296f90dc33c80dc6c6e00884ea2c2937594b610dbba19b49cc005b8c53153009710373d7d83467fc1bfee33e092eca6c86ae6ef84c2ad09cfbb58657891b8b94c71426423c2e8bca71fe220ed20e7b63fbfc2f929f993a04266c05dbe506aa6087cea07102305c129f19910b033dba02cd7461bf3ffdf3cb5c4590135b521863551dcaf040da404c1204d18d00e89a3604bc58ea400aae72502610498ddd0e18bb4e7c8f970c70dc03d8410e69f795de6e304051ecf6312e162532891ec7f327a989aeda3175cdda3c1e1e123c7784cbf54b75a6fcb04af927357524938bded2bc1ad877ae14de6526c45cb45bcb1fd6c8c586af77592c36ccc16cb19c8d65ea0d643a06f441ea370e998905e63cc177418846683f6caa8a4941aee1aec0368a7cdb08fc2a7db3934301250543ce6df8825d498943da3236f0ebd953163ecc806572f85dc6460e6ad1a7bf513707cee80913c021a08e4c66d27655b5abcae39a72a3b1209a5ac95a40eede24b6fe29756c088625042c6bb4d8739d96571fe61b729a16c0583162d8b5cb1a8c6accf868801ec31e7c984aacfdb5ae2cd67905d6de43125c7377257677b2dde6644a6602a245e8bd764dd0bc8911072e71b0667ca7a3e9ff951ca9768a80d5196b77c2b45ff87721d2ec0b0032f65e14bb1cf41423f601496a61249dc3174c32b2716dde48b28abf018a44e151f34097ad50ed07ad36dd14452e0266743ade03b9032c5989061e40a38c3abbb740f66125e3b4f2b68c2bb08aa49238c0a21b0f95988d6fb51e1bff45cab9e93c5e184b9ed4f8ccd92586e2d2582074a2d5c2864d6aecaaf0f901ae1de93335c25a10fe524174fd0caab15ff4359725bfa5d8d1322eace5a2452097501eee8532aabf77e6d89da226caf7e4c1938879fc429d5ee3eae1537c225bbfe437534a6afd86e88fc4cdf0c48ac3371643cbe7fbffe88686147237a41ba73b4f5bc4e75502267a538a3547b02cefdb88c7f4636506cef13f026fc2c760c62d7453be4e71ca2c71429be824d98b337cbcf0f20031a0e7980f186339f619341fb925d828512a1eb86275b4c10553f3ba2004bffe7162e54840b19133ac8e1c9b69e6f51840497aa6cf5665606fdd09527362c569a97e896643b431a4d16d0c63e3ffe08fd02d3ed2929dd7a1eb96daf9b18c1903e3ea6af514f34698aced2586ae2f18ee9988098bce87ba6e041cc610cc0bd955e7ecaf08195a92fb1c8fc76f7458c32eb64c86748d2854e75f6305b311d98f68dff10ab4028b64db3badb9c9c5ae90ab9d343e881a3a1b6fa9ee243ae09a722f5db68100d1b5e2af61ed55c3e18df693af4e8caea4c523eb5f4d76c081fea7f9590f2959076608f322900998ac8d44af17e87cedc20bd23451bf364013dfc56698b804b6ca3b487bab606875572f862f79179f3b0e3be803051912424c7d6004dd418e96ff527887925a85365e14084ad9e4f665197864c14f35cc3d2547cfd6cff5424c7e7d7004cb74f228d877d0b11bd4319aab48e8c78b9137ff8caec265e7ca9d7db40b84f0c76c6bafc7150eb0572e215d9a66e35cb63bf989682f862cf3bbc2fe8a6aa4536d32c04dd5cbccb86feeaf74027193545c4653d7f215c834964761176989703674817d63fc28c0f7c4d21db4df521bb11f27b3fdc12c63c47bba539625c42d05203854fa3be558f5608b72a2b8191e782911761db9dadcf200555515f384e9a45efa50078c520e4ca57cb63849bc74f4e992305578f65a9bf905aee56e500906775812ad51ca4b81480198407884adfb3dd9ad7d47b8b61a03a442b671898cd1c68f71423f975314cf052825b084e349b259ff81471b33e5a4d84e89d322acce96361cfcd1ddb22183a4805ba30f4ac5604b899084669ef260aa6bdf9a089b5348bfb8b835db8758068eb2c2f97a28a0dc77cbd64407e97a018beaf4776e1683ea00d8db137dd4edf9a564619583da006912f1aacbf29b9c36a48afd0d1be84cf1a74f4283edb59400490e38a2782500742815c27bcbde27c33a061fd41b55b00b500671ce1198121daa4debd1dd9adc8501f20d73a28712b8359d808035d915a78db7048c960e388b50df3622c307e26fc954ea589464ab9338fd8d27ec4c6a5c6b7a209ae06f5373deee81859458272466ce7c4128720bda90e4121e95203a650b699feac09381767f317d8e1e8b3cf3c1501655104a4c8819109746056d6f7f1d62076027c0ce2e220cb8bb5197d23cdaf8df2054270d3a8a1a0a255cf188140fbbde0734d042e0f2a11bac90a487cffaf3e4597ded258f4e9f2ddb3f9df82e54bde4415ed91630707543f5323545b2109270b86e436dafac9af14c8babce2a771338d1109b502814cb40e966fbbacba50898a39ddaba18d61e1ffd4840c7da1f4557edcc74ef73aaeb6e38ed082ccd6ac0c8ed78e6413b27b3aaa136441f933b043339bbcc883b258ca1b69bc28d8bd030342091131cc395782a0fa6455d95fb7ad7305965c92e95440237df46c395950b46da19834a57795de5e4dfc94114a6338c6064e085e4099b1549315eccf704507d17f2bc1939bea8a74c214ca853fdf6e1216f0f0e194d2945bc0f9e2c45c9998d3b925586fb61693de7160a18cad7e9de1aefdd8663fe645d0e3380a6e60e3fda694033126d3375d9fa0a07c8e2b76c7bad7794c8694f74e2fbaf09c74fd9877ee7454a1b9ddf26a0d761f4ad392e83153537379bcb4c6fd00a6e3cae72834d14fe8b2c18ba640c6afaf2eb557ba1056de51aad76292567ec30c66309182568b1c7c396a40cae5252e9fef74e8cd9e5f7c63c647c0060d0deefc3211c640002a232b2613dc59838ee20d1704567574f39dd4065c1a3ed4502965fbb6edc5824d144117d73037bcc53b2ba82276048d87a042824b69d914e4a82c6cb367c072dc997e9aed3e86539b042ef7c1ce7cf80320607dfba5b61c864848b02e3d840883e4777d17fc3c7d64baf43857b420257ed92b354d33c9e9eb0c86a81d6de23951f00554a2d48bb13f04d0f12fe0cbc8bdf097ea5c89ff3852e1bdd389e99e1c2a3536d13dd6bcdb73cad2aa639aec4a3680573e434818dab68a3510b39a5942e75727196a6ab08083a7a29cbe69d5ed065a91dcd5cf6bd08ba4522c0504761b86c501411db4f66b478a40614b8d9a5d25819349877114a534ccc914d10a13de1e790d19bc5a00ef630b5c703128d46026fb85be91e791443b1b30b9077c7549f4605606fedd830b1735906549a71cb8c14893b28c390ea09322a1074d1e48260e36087fc4f24c9ef18f0f78e27dbd203210e14f22d780ae2dd4ec0e176da6750944042e6c0f6e3c322a7f8d3a98924193b0d3f695075a01a4ac1da4137873964d3a98273e3441a75c6046d9cc4d864990f545d754e0f8ca610025dcd57c3d114181fb1ff78e8d153e049d91d32145b22599277df20b478e1c484286bfcde56d883afa420713140a483a518a2a342101353a5bf21a7c535ec03ff4e43b221def5f6f3cf31e51a17fb1164fc75b057211fec953059ea636f40ff76cdebdeea4c8cfd30337f503728072c3471b1b6a0c9c7c1a3da4ac5ed2851697af2d73b5ad751d392195ed8f30d4d99421cdbc57729798f4b167f8d7a77b0d2a4731b669fa87aded4699c9e3086b7f274cc91ea0e6ca5443a11964ea5876952b01014f653eab89d43efa8eca170da9ab15ed1293c70cf6bf61479d7548c846cdc651c685367ec0d7582cdba5ed1e8f6ae0bd604afd5beff5a424cbfb4c721cdf20d16ebcda64771d90cdadfa83018ea61d092df38fae60401056b3e42b3aec83757fcb8935c7c70208d1c1aaca7e0b7213b26a1dd55d97c0c52aab8c360e9e7c74c40d99427e2d6c349f83dfa527f1e146377040f70b08ee54b1e0d515fa495b81a9a729fdc9019279864f5a32a19e7d28ffa4e0a34adc7db24aaed581d0b5f6f9981b8d20c7b6e4d73550329e7609afda9f2d8442fa400b00a33054c296b7660593db15d712be97ea0e152ca56578eae1229b1468876f2c2a8cd290bb37cba17db02b3df54b394ce0f1fde4afc366db61902179d9c575b06af2b2e487af988acd6cff937905f346ec3befc0d378cc61f5f28f85cb653a26b621d243ed9a6dcaf7de70b12593ad0883f7fecf829836ff2592e8da4c9c2f25287dbac23699abb1d447ab80ba021d512b6ca9ee98732e7ff31744d3421207832a337b1440fdfb6d81270e9f4059db2b45eb5f2e8682cb9dbae3adb63fc7a14c5e2bbfc6e36b79247df42f8917c545f4e3f65091db56e020a539379f805a4dce98d1c2096ab8143022ec1b568694dbaaaad98afb332359c3ed4572b200681842e0c88c438795c8ca1e22fda5da2fc713bd08b7f6e065497e8513e3ad526135dcf999a9df385c10acbb52dd82189a59f786965cb83c9cea10ecf779525051ed068ec88b4f825857845a9f47d75b364048f9fa397796bd26474f7658d957c4e831ffc03a18befe51965d994c0cc58b14863f8db71a91a116dec5dc7280efe571559a1387b71eb068f0bbd5964b978b0eb8bfdb5c0a8b3b6e6e75c4c325449737eefefe8b7597d3a66b014e7b9cf7c1e492e0672fe5692e5d0541653e5e20af2791dfe8e8e3da0152e900baded578d7736be6b141e98062eef083b83b092009d398c1c972ace8be849a233b069883e6e82152cc65cb8f0772e23b3026aa08550cb3633f55e8c34a2848aba9fd71cd051fceba10a4974bb258b1cd88c1377c172a45030decf0af759248e3d35ed119386effa079b61d871cc304a67a016e569c8471e29785e2cc376d13d47a533cffea37811bfc568b50cb3bd5364a4b1b3f3953e04d19afb6e86b1e267fda3ab8e56d0bc4c8e2c80c33e557760fef31338873c418ccac591bd9ef9af7badad088cbe30b26d506180150a5bc42055359ba863a5874b942b3c5afb5e7f4beb1557827994c1e3bdde14fb6edfe09359c14aa2b29ed735b137737e71e862e325377663c1fbc6db447b028cbc6d0ec70e91342b6b24fb511b3b226ed1f01e1a3d982d94e363f956dae267f92701acc813450ca8da817a7f04146b26e4379811d5eb2f2036688f585d6145a14d7d95a5642edcfc1920b17cb53db3696d1a5ed17017301d6dfdbc4edf884d1078db292b174f454eb8a748db527da15cb4ba5414a308342c6f8ae7a8948fec79b655beaab45284c23551ee64a7c048c849dfe15f1fd403924d8ee167d505d8a001dca56cda5e7dc9ed8243d0fc9a05700395e3b0999eb8621a64bd808abf04e804de31a40c8a288ce3ade632f02382282864717486f52f0966e65e99e78610a513832a982e5ddb5f1eb4d89e9e6145844b39737491100ffd565eb0c87c6a62d62f9faed31a82fa27d5ff990ed8e4edb96452c5c6cc48fe649e43db579375a4b9dc58ed9657c20b81fca5d103c28441f980f779028c212b65fd14c1ec4a0f57cd5f0d8375791fbb1cfa41c32abf35eaffedf22f4a5e5c291682dba876dc0e961f695fb07d9d608400d76e514e0b026a115d30aef37620f1f7c4aaa14899230e286e7ad67c2b3bcfb0f5b58c2f7c793fbc682b8819f67b9f2674cf216a26d9dc9f4b8b94c852d20ce8b8ed96d72184f2bcc35c51f068e02a3163842b7a5e7ebb4465b1461d9fe947b2a80fc3655f4dbb7537b20f13e2d5f017bec292d4a1b090d36520833ae7b53eaa197101447b82b4bdff53a1138aca060295890e75cddac3b8be7facf222a89599304c7beeee22a01c78388b66ea4b6b59101dc5af047830fef7fa83ab5437c3905f1e3450e90f69dd2c2441fa248c96baa429727eb4cdd3915b809b4b10983eb7778951a5ff6857ca8c51691ff2e0b29287b81062368e5036ec082091b770f895173fa728ef05a7d97ef0c4a1ba7529c8fa079a8d032daa0c11bd070b28d28049a78aff5c37ef5fb341f4319bb4e392a47fb6eb2c373c33ce2702fe07c3431c8b2aee94bdb812c55e02ded82ffeb78027e2703cb93d2f34b1dad7809a8f13a62c8c22f9c3f07a9f45c7bfd1b7e0e3dff3e6a1328f6a951952041a94213a95c8a614528c958e985014e7a71d249b8c85ce734393d39efc64a70511a9cab288b487fa86c6099ec02c7f04d59bc92bbbc488d8103eb6ad70a6eec3a7c8e59485a6aaf555ece3eddfc1bd88904027f61460daadb409427fa194898bda412bde03c1101dd383dfa1f447646e5cbd753b57bdf8d59efe8c1cf6ea1744ef1ac1893cb4c6efdb3fec7c55afe8ce9da463f473b9dae90cac6b83d7a44f0db47196f5eb519c3913d225024178b0420bc70e96c05535d488e686e157559ef35c926a3c4b6aecd032c46f33cbec8d49feb3ed8acdaf426f264882438cf1995bb45d758d055f673cd36f637ecaf485ffbdd8808c3596c8028fc63786563e59a1da6844dba8a3a7f4013aafaebf87a189e7c94f0184bba0f1562e1fefac703e4a812a64066de9318d6826e7682b3f037a623b2e6769be05078771c02e57d87f3c87d116467d855fefeb234da52eca466bbe12cbbbd12f1c53b748f292b06950bc834383fe21a3bc67ed9c2b34a3c06258812ffbb339324f4949903ae6126a1c7bdf9e936ca3d921409e752139153b3cbfcb9394202c3794d04f14cccf52d98500b50e8bd48b54e0c9648b4787f00c5e3bc84952761112bcac78019ae49e1311e01584835485051e5905b15ed0dad24519d0c3b7bc4061d562daa69858d2aaa6b7967ae1751e784b0396355871cb9a08384e57fae91605bb5e871ddc860c783d50e5e5d55163a5d19cc8c8ff974cac02d6b0324c3debbeb212f79a80d092a687904c856a047344f49fdeebcb2ec15b3a6b4d133df775fd3926a93b1490f34df63a6aa914e7c503a89f7ed67aca32b20304087877419a8b1adc9278869b7e72b00ac41c7ca12c97526deb43614b09e98b0312738f721c6d4c663b581fc8964b378167f6a557b2189c0f35fdd38c1faa67dfd94aa262b04aed3d02611598a8eb88c4ea07f09dc6ff39a20198d8dfe45bfc195dc90d081a9231af6ae25a85ed5a636d30b0563977ea1d28fec49818be96dbdabcfa21d7b76f180476f862d9ce0978cb488c1dd7d4314248283ab97cb1a0db4fc2f86a469ec19c9a2d3512d76fe32b50fa4ddf4fb2ae0b56353bbbd937e90b352a8f50126b2ee9d0abefaf1c9eb3f98f2f5b0f6a4edd9dce750c4e8eaa75c0285951cacc0e3f68483da9f3cc5e3863cc32d585874d0b3e81841b9eb0924a9df7c511048853c748e1e8a5e8ac0fa43c8b6b731d4001b7ae13206092f914cb3244f3df950061d626c89f584d7b1998848b863622d4fdbc688f9637e8656156051d703b37860524a58093e5781e4ea7a0e41e4b724eaf79577d1ecdc284c85fb95cb62d7a3233397b42d173a4b70dff13d3cac519582da15a6acb2e671fdda266dd45daaba005c0f3e355c9122246ac5e6f6fa6f31648dcc425fc4baf7c9475dd8295117c7bc48a13a197977eb63e04729f8fb08af2f04f82238feae2fbbb5e90200d86c5ebb3b7cb93f400deb7d41173bd3d521265943f13c119c94a4fa7ff68a5fb2af767afe44d74ea5c94110f13187264791e0c73d3af40bd9e35680d3bdd0671aebf0ecbce23d8215758e13407415fa19d945da90259c066c8e5546dcbb6c504e2212b37351db5f2f2ee6c931cc7ccd677f80b8272863c626517d47ccd3231adaa40999942ced1ea3718aa34446426e061a4cf449906fa58123d3a460a7d5dcc68a5effeb23a19d85663f1dec87c2238535e8ef13213dc6f", - "classicalAddress": "0xbba66946645061ef8f3f372f8197a482f75615d3", - "sphincsPlusAddress": "qx94e4b30e802a0660ad79f6c21693435133e298d1", - "latticeAddress": "lx9f965a240b0b730dd17148b44a5a55b3e3a427d0" -} \ No newline at end of file diff --git a/cli-interface/lib/attack/simulator.js b/cli-interface/lib/attack/simulator.js deleted file mode 100644 index a7165df..0000000 --- a/cli-interface/lib/attack/simulator.js +++ /dev/null @@ -1,421 +0,0 @@ -const crypto = require('crypto'); -const { getBlockchain } = require('../blockchain'); -const classicalCrypto = require('../cryptography/classical'); -const sphincsCrypto = require('../cryptography/sphincs'); -const latticeCrypto = require('../cryptography/lattice'); - -/** - * Quantum Attack Simulator - * - * This module simulates quantum attacks against different cryptographic schemes - * to demonstrate the security differences between classical and quantum-resistant - * cryptography. - */ - -/** - * Simulate Shor's algorithm attack on classical ECDSA - * @param {number} qubits - Number of qubits in simulated quantum computer - * @param {string} targetAddress - Address to attack (0x...) - * @returns {Object} - Attack results - */ -async function simulateQuantumAttack(qubits, targetAddress) { - // Determine the type of address - let addressType, algorithm; - - if (targetAddress.startsWith('0x')) { - addressType = 'classical'; - algorithm = 'ECDSA (secp256k1)'; - } else if (targetAddress.startsWith('qx')) { - addressType = 'sphincs'; - algorithm = 'SPHINCS+ (hash-based)'; - } else if (targetAddress.startsWith('lx')) { - addressType = 'lattice'; - algorithm = 'Lattice-based'; - } else { - throw new Error('Invalid address format.'); - } - - // Get blockchain instance to check balance - const blockchain = await getBlockchain(); - const balance = await blockchain.getAddressBalance(targetAddress); - - // Prepare result structure - const result = { - targetAddress, - addressType, - algorithm, - balance, - qubits, - attackStartTime: Date.now(), - completed: false, - successful: false, - simulationSteps: [] - }; - - // Simulate attack based on address type - switch (addressType) { - case 'classical': - return simulateShorsAttack(qubits, targetAddress, balance, result); - - case 'sphincs': - return simulateHashBasedAttack(qubits, targetAddress, balance, result); - - case 'lattice': - return simulateLatticeAttack(qubits, targetAddress, balance, result); - - default: - throw new Error('Unknown address type'); - } -} - -/** - * Simulate Shor's algorithm attack on ECDSA - */ -function simulateShorsAttack(qubits, targetAddress, balance, result) { - // Check if we have enough qubits for Shor's algorithm - const requiredQubits = 512; // For 256-bit ECC - - // Record simulation steps - result.simulationSteps.push({ - step: 1, - name: "Initialize quantum circuit", - description: `Attempting to initialize a quantum circuit with ${qubits} qubits for Shor's algorithm.`, - details: `Shor's algorithm requires approximately 2n qubits for an n-bit discrete logarithm problem. For 256-bit elliptic curve, we need about 512 qubits.` - }); - - if (qubits < requiredQubits) { - result.simulationSteps.push({ - step: 2, - name: "Circuit initialization failed", - description: `Failed to initialize quantum circuit - insufficient qubits.`, - details: `This attack requires at least ${requiredQubits} logical qubits, but only ${qubits} were provided.` - }); - - result.completed = true; - result.successful = false; - result.failureReason = "Insufficient qubits"; - result.attackEndTime = Date.now(); - result.attackDuration = result.attackEndTime - result.attackStartTime; - - return result; - } - - // Simulate the quantum period-finding process - const quantumSpeedup = qubits / requiredQubits; - const operationsPerSecond = 1000000 * quantumSpeedup; // Fictional operations per second - const totalOperations = 2 ** 20; // Simplified - real number would be much higher - const simulatedAttackTime = totalOperations / operationsPerSecond; - - result.simulationSteps.push({ - step: 2, - name: "Quantum Fourier Transform", - description: "Applying quantum Fourier transform to find the period in the elliptic curve discrete logarithm problem.", - details: "Converting the ECDLP into a period-finding problem that quantum computers can solve efficiently." - }); - - result.simulationSteps.push({ - step: 3, - name: "Period estimation", - description: `Estimating the period using ${qubits} qubits.`, - details: `Processing approximately ${totalOperations.toLocaleString()} quantum operations at ${operationsPerSecond.toLocaleString()} operations per second.` - }); - - // Simulate success (in a real attack, success is highly likely with enough qubits) - const success = true; - - if (success) { - // Generate a fake private key (for simulation only) - const fakePrivateKey = crypto.randomBytes(32).toString('hex'); - - result.simulationSteps.push({ - step: 4, - name: "Period found", - description: "Successfully found the period in the elliptic curve discrete logarithm.", - details: "Quantum Fourier Transform successfully extracted the private key from the public key." - }); - - result.simulationSteps.push({ - step: 5, - name: "Key extraction", - description: "Extracted private key from quantum calculation results.", - details: "Private key corresponds to the period of the function representing the discrete logarithm problem." - }); - - result.completed = true; - result.successful = true; - result.attackEndTime = Date.now(); - result.attackDuration = result.attackEndTime - result.attackStartTime; - result.simulatedAttackDuration = simulatedAttackTime; - result.privateKeyRecovered = fakePrivateKey.substring(0, 10) + '...'; // Only show part of the key - result.balanceAtRisk = balance; - } else { - result.simulationSteps.push({ - step: 4, - name: "Attack failed", - description: "Failed to find the period in the discrete logarithm problem.", - details: "Quantum algorithm did not converge to a correct value, possibly due to noise or inadequate quantum resources." - }); - - result.completed = true; - result.successful = false; - result.attackEndTime = Date.now(); - result.attackDuration = result.attackEndTime - result.attackStartTime; - result.simulatedAttackDuration = simulatedAttackTime; - result.failureReason = "Algorithm did not converge"; - } - - // Mathematical explanation of the attack - result.mathematicalExplanation = { - algorithm: "Shor's Algorithm for Elliptic Curve Discrete Logarithm", - steps: [ - "1. Convert the problem of finding k where Q = kP to finding the period of a function f(x) = P^x", - "2. Create a quantum superposition of states |x⟩|f(x)⟩", - "3. Apply quantum Fourier transform to obtain period r", - "4. Use continued fractions to recover private key k from period r" - ], - complexity: { - classical: "O(2^(n/2)) with best algorithms (exponential)", - quantum: "O(n^3) with Shor's algorithm (polynomial)", - speedup: "Exponential" - }, - securityImplications: "ECDSA is broken when large-scale quantum computers become available. All funds secured only by ECDSA signatures would be at risk." - }; - - return result; -} - -/** - * Simulate attack on hash-based signatures (SPHINCS+) - */ -function simulateHashBasedAttack(qubits, targetAddress, balance, result) { - result.simulationSteps.push({ - step: 1, - name: "Analyzing SPHINCS+ structure", - description: "Examining the hash-based signature scheme structure to find attack vectors.", - details: "SPHINCS+ uses a hash tree with many one-time signatures, creating a stateless signing mechanism resistant to quantum attacks." - }); - - result.simulationSteps.push({ - step: 2, - name: "Applying Grover's algorithm", - description: `Attempting to use Grover's algorithm with ${qubits} qubits to find hash collisions.`, - details: "Grover's algorithm provides at most a quadratic speedup for searching, reducing security from n bits to approximately n/2 bits." - }); - - // Calculate the security level after Grover's algorithm - const classicalSecurity = 256; // SPHINCS+ with 256-bit security - const quantumSecurity = classicalSecurity / 2; // With Grover's algorithm - - result.simulationSteps.push({ - step: 3, - name: "Security level assessment", - description: `SPHINCS+ retains approximately ${quantumSecurity} bits of security against quantum attacks.`, - details: `Even with Grover's algorithm, breaking a 256-bit hash function would require 2^128 quantum operations, which remains computationally infeasible.` - }); - - // Simulate the computational requirements - const requiredOperations = BigInt(2) ** BigInt(quantumSecurity); - - result.simulationSteps.push({ - step: 4, - name: "Computational feasibility analysis", - description: "Calculating resources required to break the SPHINCS+ signature.", - details: `Would require approximately ${requiredOperations.toString()} quantum operations, which is infeasible regardless of quantum computer speed.` - }); - - // Attack always fails for SPHINCS+ - result.simulationSteps.push({ - step: 5, - name: "Attack conclusion", - description: "Attack on SPHINCS+ signature is unsuccessful.", - details: "The post-quantum security of SPHINCS+ effectively resists even the most powerful quantum algorithms currently known." - }); - - result.completed = true; - result.successful = false; - result.attackEndTime = Date.now(); - result.attackDuration = result.attackEndTime - result.attackStartTime; - result.failureReason = "Quantum-resistant algorithm"; - - // Mathematical explanation of why the attack fails - result.mathematicalExplanation = { - algorithm: "SPHINCS+ Resistance to Quantum Attacks", - steps: [ - "1. SPHINCS+ security is based on the pre-image resistance of cryptographic hash functions", - "2. Best quantum attack is Grover's algorithm, which provides quadratic speedup", - "3. For a hash function with n bits of security, Grover reduces it to n/2 bits", - "4. With n=256, quantum security is still 128 bits, requiring 2^128 operations" - ], - complexity: { - classical: "O(2^n) for finding hash pre-images", - quantum: "O(2^(n/2)) with Grover's algorithm", - securityMaintained: "Yes, 128-bit quantum security is still beyond computational feasibility" - }, - securityImplications: "SPHINCS+ remains secure against quantum attacks, making it suitable for long-term security." - }; - - return result; -} - -/** - * Simulate attack on lattice-based signatures - */ -function simulateLatticeAttack(qubits, targetAddress, balance, result) { - result.simulationSteps.push({ - step: 1, - name: "Analyzing lattice problem", - description: "Examining the underlying lattice problem structure.", - details: "Lattice-based cryptography relies on the hardness of problems like finding shortest vectors in high-dimensional lattices." - }); - - result.simulationSteps.push({ - step: 2, - name: "Quantum algorithm assessment", - description: "Evaluating quantum algorithms applicable to lattice problems.", - details: "Neither Shor's algorithm nor other known quantum algorithms provide exponential speedup for lattice problems." - }); - - // Calculate approximate security level - const classicalSecurity = 256; // Lattice scheme with 256-bit security - const quantumSecurity = 128; // Conservative estimate with quantum attacks - - result.simulationSteps.push({ - step: 3, - name: "BKZ lattice reduction simulation", - description: `Simulating BKZ lattice reduction algorithm enhanced with quantum computing.`, - details: `BKZ algorithm with quantum enhancements may achieve better approximation factors but still requires exponential time.` - }); - - // Simulate computational requirements - const requiredOperations = BigInt(2) ** BigInt(quantumSecurity); - - result.simulationSteps.push({ - step: 4, - name: "Computational feasibility analysis", - description: "Calculating resources required to break the lattice-based signature.", - details: `Would require approximately ${requiredOperations.toString()} operations, which remains computationally infeasible.` - }); - - // Attack always fails for lattice-based cryptography - result.simulationSteps.push({ - step: 5, - name: "Attack conclusion", - description: "Attack on lattice-based signature is unsuccessful.", - details: "The post-quantum security of lattice-based cryptography effectively resists even the most powerful quantum algorithms currently known." - }); - - result.completed = true; - result.successful = false; - result.attackEndTime = Date.now(); - result.attackDuration = result.attackEndTime - result.attackStartTime; - result.failureReason = "Quantum-resistant algorithm"; - - // Mathematical explanation of why the attack fails - result.mathematicalExplanation = { - algorithm: "Lattice-Based Cryptography Resistance", - steps: [ - "1. Security is based on the hardness of finding short vectors in lattices (SVP or LWE problems)", - "2. Best classical algorithms (BKZ) require exponential time", - "3. Known quantum algorithms provide at most polynomial speedup for specific sub-problems", - "4. The core lattice problems remain exponentially difficult even for quantum computers" - ], - complexity: { - classical: "O(2^(cĀ·n)) for lattice reduction, where c is a constant and n is the dimension", - quantum: "Still O(2^(c'Ā·n)) with potentially smaller constant c'", - securityMaintained: "Yes, exponential complexity is preserved" - }, - securityImplications: "Lattice-based cryptography remains secure against quantum attacks, making it suitable for long-term security." - }; - - return result; -} - -/** - * Generate comprehensive attack report for the blockchain - */ -async function generateAttackReport() { - try { - const blockchain = await getBlockchain(); - const metrics = blockchain.securityMetrics(); - - // Calculate vulnerable funds - const vulnerableFunds = metrics.balances.classical; - const secureFunds = metrics.balances.quantum; - const totalFunds = vulnerableFunds + secureFunds; - - // Calculate vulnerable addresses - const vulnerableAddresses = metrics.addresses.classical; - const secureAddresses = metrics.addresses.quantum; - - // Estimate time to compromise all vulnerable addresses - const compromiseTimePerAddress = 120; // seconds, simulated - const totalCompromiseTime = vulnerableAddresses * compromiseTimePerAddress; - - // Create attack report - const report = { - timestamp: Date.now(), - blockchainState: { - blocks: blockchain.chain.length, - transactions: metrics.transactionCounts.total - }, - vulnerabilityAssessment: { - vulnerableFunds, - vulnerablePercentage: totalFunds > 0 ? (vulnerableFunds / totalFunds) * 100 : 0, - secureFunds, - securePercentage: totalFunds > 0 ? (secureFunds / totalFunds) * 100 : 0, - vulnerableAddresses, - secureAddresses - }, - attackProjection: { - estimatedTimeToCompromiseAll: totalCompromiseTime, - estimatedTimeFormatted: formatTime(totalCompromiseTime), - potentialLoss: vulnerableFunds, - requiredQubits: 512 - }, - mitigationStrategy: { - recommendedAction: "Migrate all funds from classical to quantum-resistant addresses", - timeToMigrate: vulnerableAddresses * 30, // 30 seconds per migration - costToMigrate: vulnerableAddresses * 0.001 // 0.001 tokens per migration - }, - transactionDistribution: { - classical: { - count: metrics.transactionCounts.classical, - percentage: metrics.percentages.classical - }, - sphincsPlus: { - count: metrics.transactionCounts.sphincsPlus, - percentage: metrics.percentages.sphincsPlus - }, - lattice: { - count: metrics.transactionCounts.lattice, - percentage: metrics.percentages.lattice - } - } - }; - - return report; - } catch (error) { - console.error('Error generating attack report:', error); - throw error; - } -} - -/** - * Format seconds into human-readable time - */ -function formatTime(seconds) { - if (seconds < 60) { - return `${seconds.toFixed(0)} seconds`; - } else if (seconds < 3600) { - return `${(seconds / 60).toFixed(0)} minutes`; - } else if (seconds < 86400) { - return `${(seconds / 3600).toFixed(1)} hours`; - } else { - return `${(seconds / 86400).toFixed(1)} days`; - } -} - -module.exports = { - simulateQuantumAttack, - generateAttackReport -}; \ No newline at end of file diff --git a/cli-interface/lib/blockchain.js b/cli-interface/lib/blockchain.js deleted file mode 100644 index 6decf17..0000000 --- a/cli-interface/lib/blockchain.js +++ /dev/null @@ -1,514 +0,0 @@ -const crypto = require('crypto'); -const fs = require('fs'); -const path = require('path'); -const { promisify } = require('util'); -const writeFile = promisify(fs.writeFile); -const readFile = promisify(fs.readFile); -const mkdir = promisify(fs.mkdir); - -const { validateTransaction } = require('./transaction'); -const config = require('../utils/config'); -const { formatDateTime } = require('../utils/formatting'); - -class Block { - constructor(index, timestamp, transactions, previousHash = '', nonce = 0) { - this.index = index; - this.timestamp = timestamp; - this.transactions = transactions; - this.previousHash = previousHash; - this.nonce = nonce; - this.hash = this.calculateHash(); - } - - calculateHash() { - return crypto - .createHash('sha256') - .update( - this.index + - this.timestamp + - JSON.stringify(this.transactions) + - this.previousHash + - this.nonce - ) - .digest('hex'); - } - - // Find a nonce that gives a hash with the required difficulty - mineBlock(difficulty) { - const target = Array(difficulty + 1).join('0'); - - while (this.hash.substring(0, difficulty) !== target) { - this.nonce++; - this.hash = this.calculateHash(); - } - - return { - hash: this.hash, - nonce: this.nonce, - attemptsRequired: this.nonce - }; - } - - // Analyze security of the block (classical vs quantum transactions) - securityMetrics() { - const total = this.transactions.length; - if (total === 0) return { classical: 0, quantum: 0, lattice: 0 }; - - const classical = this.transactions.filter(tx => tx.signatureType === 'classical').length; - const sphincsPlus = this.transactions.filter(tx => tx.signatureType === 'sphincs').length; - const lattice = this.transactions.filter(tx => tx.signatureType === 'lattice').length; - - return { - classical, - sphincsPlus, - lattice, - classicalPercentage: (classical / total) * 100, - sphincsPlusPercentage: (sphincsPlus / total) * 100, - latticePercentage: (lattice / total) * 100 - }; - } -} - -class Blockchain { - constructor() { - this.chain = []; - this.mempool = []; // Pending transactions - this.difficulty = 4; // Mining difficulty - this.miningReward = 100; // Mining reward in tokens - this.dataDir = path.join(process.cwd(), 'data', 'blockchain'); - - this.initialize(); - } - - async initialize() { - // Create necessary directories - try { - await mkdir(this.dataDir, { recursive: true }); - - // Try to load existing blockchain - try { - await this.loadBlockchain(); - } catch (error) { - // If loading fails, create genesis block - this.createGenesisBlock(); - await this.saveBlockchain(); - } - } catch (error) { - console.error('Error initializing blockchain:', error); - throw error; - } - } - - createGenesisBlock() { - const genesisBlock = new Block( - 0, - Date.now(), - [ - { - timestamp: Date.now(), - from: 'GENESIS', - to: 'GENESIS', - amount: 0, - txHash: crypto.createHash('sha256').update('GENESIS').digest('hex'), - signatureType: 'GENESIS', - signature: 'GENESIS' - } - ], - '0', - 0 - ); - - this.chain.push(genesisBlock); - console.log('Genesis block created.'); - return genesisBlock; - } - - getLatestBlock() { - return this.chain[this.chain.length - 1]; - } - - async addTransaction(transaction) { - // Validate transaction - if (!validateTransaction(transaction)) { - throw new Error('Invalid transaction'); - } - - // Add to mempool - this.mempool.push(transaction); - await this.saveMempool(); - - return transaction.txHash; - } - - async mineBlock(minerAddress) { - // Create mining reward transaction - const rewardTransaction = { - timestamp: Date.now(), - from: 'MINING_REWARD', - to: minerAddress, - amount: this.miningReward, - txHash: crypto.createHash('sha256').update(`REWARD-${Date.now()}-${minerAddress}`).digest('hex'), - signatureType: 'SYSTEM', - signature: 'SYSTEM' - }; - - // Get pending transactions and add reward - const transactions = [...this.mempool, rewardTransaction]; - - // Create new block - const lastBlock = this.getLatestBlock(); - const newBlock = new Block( - lastBlock.index + 1, - Date.now(), - transactions, - lastBlock.hash - ); - - // Mine the block - console.log('ā›ļø Mining new block...'); - const miningResult = newBlock.mineBlock(this.difficulty); - - // Add block to the chain - this.chain.push(newBlock); - - // Clear mempool - this.mempool = []; - - // Save blockchain state - await Promise.all([ - this.saveBlockchain(), - this.saveMempool() - ]); - - return { - blockIndex: newBlock.index, - blockHash: newBlock.hash, - transactionCount: transactions.length, - miningAttemptsRequired: miningResult.attemptsRequired, - minerAddress, - reward: this.miningReward - }; - } - - async getAddressBalance(address) { - let balance = 0; - - // Check all transactions in all blocks - for (const block of this.chain) { - for (const transaction of block.transactions) { - if (transaction.from === address) { - balance -= transaction.amount; - } - - if (transaction.to === address) { - balance += transaction.amount; - } - } - } - - // Also check pending transactions in mempool - for (const transaction of this.mempool) { - if (transaction.from === address) { - balance -= transaction.amount; - } - - if (transaction.to === address) { - balance += transaction.amount; - } - } - - return balance; - } - - getTransactionHistory(address) { - const history = []; - - // Check all blocks - for (const block of this.chain) { - for (const transaction of block.transactions) { - if (transaction.from === address || transaction.to === address) { - history.push({ - ...transaction, - blockIndex: block.index, - blockHash: block.hash, - confirmed: true - }); - } - } - } - - // Add pending transactions - for (const transaction of this.mempool) { - if (transaction.from === address || transaction.to === address) { - history.push({ - ...transaction, - confirmed: false - }); - } - } - - // Sort by timestamp (newest first) - return history.sort((a, b) => b.timestamp - a.timestamp); - } - - getTransactionByHash(txHash) { - // Check mempool first - const pendingTx = this.mempool.find(tx => tx.txHash === txHash); - if (pendingTx) { - return { - ...pendingTx, - confirmed: false, - blockIndex: null, - blockHash: null - }; - } - - // Check all blocks - for (const block of this.chain) { - const tx = block.transactions.find(tx => tx.txHash === txHash); - if (tx) { - return { - ...tx, - confirmed: true, - blockIndex: block.index, - blockHash: block.hash - }; - } - } - - return null; // Transaction not found - } - - getBlockByIndex(index) { - if (index < 0 || index >= this.chain.length) { - return null; - } - - return this.chain[index]; - } - - getBlockByHash(hash) { - return this.chain.find(block => block.hash === hash); - } - - securityMetrics() { - // Count classical vs quantum-resistant transactions - let classicalTxCount = 0; - let sphincsTxCount = 0; - let latticeTxCount = 0; - - // Addresses and their balances by type - const classicalAddresses = new Map(); - const quantumAddresses = new Map(); // Combined for both SPHINCS+ and lattice - - // Analyze blockchain - for (const block of this.chain) { - for (const tx of block.transactions) { - // Skip system transactions - if (tx.from === 'GENESIS' || tx.from === 'MINING_REWARD') { - continue; - } - - // Count by signature type - if (tx.signatureType === 'classical') { - classicalTxCount++; - } else if (tx.signatureType === 'sphincs') { - sphincsTxCount++; - } else if (tx.signatureType === 'lattice') { - latticeTxCount++; - } - - // Track balances by address type - if (tx.to.startsWith('0x')) { // Classical address - const currentBalance = classicalAddresses.get(tx.to) || 0; - classicalAddresses.set(tx.to, currentBalance + tx.amount); - } else if (tx.to.startsWith('qx') || tx.to.startsWith('lx')) { // Quantum address - const currentBalance = quantumAddresses.get(tx.to) || 0; - quantumAddresses.set(tx.to, currentBalance + tx.amount); - } - - // Deduct from sender - if (tx.from.startsWith('0x')) { - const currentBalance = classicalAddresses.get(tx.from) || 0; - classicalAddresses.set(tx.from, currentBalance - tx.amount); - } else if (tx.from.startsWith('qx') || tx.from.startsWith('lx')) { - const currentBalance = quantumAddresses.get(tx.from) || 0; - quantumAddresses.set(tx.from, currentBalance - tx.amount); - } - } - } - - // Calculate total tokens in each address type - let classicalTokens = 0; - let quantumTokens = 0; - - for (const balance of classicalAddresses.values()) { - if (balance > 0) { - classicalTokens += balance; - } - } - - for (const balance of quantumAddresses.values()) { - if (balance > 0) { - quantumTokens += balance; - } - } - - const totalTokens = classicalTokens + quantumTokens; - const totalTx = classicalTxCount + sphincsTxCount + latticeTxCount; - - return { - transactionCounts: { - classical: classicalTxCount, - sphincsPlus: sphincsTxCount, - lattice: latticeTxCount, - total: totalTx - }, - percentages: { - classical: totalTx > 0 ? (classicalTxCount / totalTx) * 100 : 0, - sphincsPlus: totalTx > 0 ? (sphincsTxCount / totalTx) * 100 : 0, - lattice: totalTx > 0 ? (latticeTxCount / totalTx) * 100 : 0 - }, - addresses: { - classical: classicalAddresses.size, - quantum: quantumAddresses.size - }, - balances: { - classical: classicalTokens, - quantum: quantumTokens, - total: totalTokens - }, - vulnerability: { - vulnerablePercentage: totalTokens > 0 ? (classicalTokens / totalTokens) * 100 : 0, - securePercentage: totalTokens > 0 ? (quantumTokens / totalTokens) * 100 : 0 - } - }; - } - - isValid() { - for (let i = 1; i < this.chain.length; i++) { - const currentBlock = this.chain[i]; - const previousBlock = this.chain[i - 1]; - - // Verify hash - if (currentBlock.hash !== currentBlock.calculateHash()) { - return false; - } - - // Verify chain links - if (currentBlock.previousHash !== previousBlock.hash) { - return false; - } - } - - return true; - } - - async saveBlockchain() { - try { - const data = JSON.stringify(this.chain, null, 2); - await writeFile(path.join(this.dataDir, 'chain.json'), data); - } catch (error) { - console.error('Error saving blockchain:', error); - throw error; - } - } - - async loadBlockchain() { - try { - const filePath = path.join(this.dataDir, 'chain.json'); - - if (!fs.existsSync(filePath)) { - throw new Error('Blockchain file not found'); - } - - const data = await readFile(filePath, 'utf8'); - const parsedData = JSON.parse(data); - - if (!Array.isArray(parsedData) || parsedData.length === 0) { - throw new Error('Invalid blockchain data format'); - } - - this.chain = parsedData.map(blockData => { - const block = new Block( - blockData.index, - blockData.timestamp, - blockData.transactions, - blockData.previousHash, - blockData.nonce - ); - block.hash = blockData.hash; - return block; - }); - - if (!this.isValid()) { - console.warn('Warning: Loaded blockchain has validation issues. Creating a new genesis block.'); - this.chain = []; - this.createGenesisBlock(); - await this.saveBlockchain(); - } else { - console.log(`Blockchain loaded with ${this.chain.length} blocks.`); - } - } catch (error) { - console.error('Error loading blockchain:', error); - - this.chain = []; - this.createGenesisBlock(); - await this.saveBlockchain(); - } - } - - async saveMempool() { - try { - const data = JSON.stringify(this.mempool, null, 2); - await writeFile(path.join(this.dataDir, 'mempool.json'), data); - } catch (error) { - console.error('Error saving mempool:', error); - throw error; - } - } - - async loadMempool() { - try { - const data = await readFile(path.join(this.dataDir, 'mempool.json'), 'utf8'); - this.mempool = JSON.parse(data); - console.log(`Mempool loaded with ${this.mempool.length} pending transactions.`); - } catch (error) { - console.log('No existing mempool found. Starting with empty mempool.'); - this.mempool = []; - } - } - - getStatus() { - const latestBlock = this.getLatestBlock(); - - return { - chainLength: this.chain.length, - latestBlockIndex: latestBlock.index, - latestBlockHash: latestBlock.hash, - latestBlockTimestamp: latestBlock.timestamp, - formattedTimestamp: formatDateTime(latestBlock.timestamp), - pendingTransactions: this.mempool.length, - miningDifficulty: this.difficulty, - isValid: this.isValid() - }; - } -} - -// Singleton instance -let blockchainInstance = null; - -const getBlockchain = async () => { - if (!blockchainInstance) { - blockchainInstance = new Blockchain(); - await blockchainInstance.initialize(); - } - - return blockchainInstance; -}; - -module.exports = { - Block, - Blockchain, - getBlockchain -}; \ No newline at end of file diff --git a/cli-interface/lib/commands/attack.js b/cli-interface/lib/commands/attack.js deleted file mode 100644 index 1d78ddc..0000000 --- a/cli-interface/lib/commands/attack.js +++ /dev/null @@ -1,273 +0,0 @@ -const { Command } = require('commander'); -const chalk = require('chalk'); -const ora = require('ora'); -const { getBlockchain } = require('../blockchain'); -const { simulateQuantumAttack, generateAttackReport } = require('../attack/simulator'); - -// Command to analyze blockchain vulnerability -const analyze = new Command('analyze') - .description('Analyze blockchain for quantum vulnerabilities') - .action(async () => { - try { - const spinner = ora('Analyzing blockchain for vulnerabilities...').start(); - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Get security metrics - const securityMetrics = blockchain.securityMetrics(); - - spinner.succeed('Blockchain analysis complete'); - - // Display analysis results - console.log(); - console.log(chalk.cyan('šŸ” Blockchain Vulnerability Analysis:')); - console.log('-'.repeat(60)); - - console.log(chalk.cyan('Blockchain State:')); - console.log(`Total Blocks: ${chalk.green(blockchain.chain.length)}`); - console.log(`Total Transactions: ${chalk.green(securityMetrics.transactionCounts.total)}`); - console.log(); - - console.log(chalk.cyan('Transaction Security:')); - console.log(`Classical (ECDSA) Transactions: ${chalk.yellow(securityMetrics.transactionCounts.classical)} (${securityMetrics.percentages.classical.toFixed(1)}%)`); - console.log(`Quantum-Safe (SPHINCS+) Transactions: ${chalk.green(securityMetrics.transactionCounts.sphincsPlus)} (${securityMetrics.percentages.sphincsPlus.toFixed(1)}%)`); - console.log(`Quantum-Safe (Lattice) Transactions: ${chalk.green(securityMetrics.transactionCounts.lattice)} (${securityMetrics.percentages.lattice.toFixed(1)}%)`); - console.log(); - - console.log(chalk.cyan('Address Security:')); - console.log(`Vulnerable Addresses: ${chalk.yellow(securityMetrics.addresses.classical)}`); - console.log(`Secure Addresses: ${chalk.green(securityMetrics.addresses.quantum)}`); - console.log(); - - console.log(chalk.cyan('Value Security:')); - console.log(`Total Value in Vulnerable Addresses: ${chalk.yellow(securityMetrics.balances.classical)} tokens`); - console.log(`Total Value in Quantum-Safe Addresses: ${chalk.green(securityMetrics.balances.quantum)} tokens`); - console.log(); - - // Risk assessment - const riskPercentage = securityMetrics.vulnerability.vulnerablePercentage.toFixed(1); - console.log(chalk.cyan('RISK ASSESSMENT:')); - if (riskPercentage > 50) { - console.log(chalk.red(`${riskPercentage}% of funds are vulnerable to quantum attacks`)); - console.log(chalk.red('HIGH RISK - Immediate migration recommended')); - } else if (riskPercentage > 20) { - console.log(chalk.yellow(`${riskPercentage}% of funds are vulnerable to quantum attacks`)); - console.log(chalk.yellow('MEDIUM RISK - Migration recommended')); - } else { - console.log(chalk.green(`${riskPercentage}% of funds are vulnerable to quantum attacks`)); - console.log(chalk.green('LOW RISK - Maintain quantum-resistant usage')); - } - - // Recommendations - console.log(); - console.log(chalk.cyan('Recommendations:')); - console.log('1. Use quantum-resistant signatures (SPHINCS+ or Lattice) for all new transactions'); - console.log('2. Migrate funds from classical to quantum-resistant addresses'); - console.log('3. Monitor quantum computing advancements'); - - // Simulation options - console.log(); - console.log(chalk.cyan('Simulation Options:')); - console.log(`Run ${chalk.yellow('quantum-chain attack simulate --qubits 4000 --target "0x..."')} to simulate a quantum attack`); - console.log(`Run ${chalk.yellow('quantum-chain attack report')} to generate a comprehensive vulnerability report`); - } catch (error) { - console.error(chalk.red(`Error analyzing blockchain: ${error.message}`)); - process.exit(1); - } - }); - -// Command to simulate a quantum attack -const simulate = new Command('simulate') - .description('Simulate quantum attack on specific address') - .requiredOption('-q, --qubits ', 'Number of qubits in simulated quantum computer', parseInt) - .requiredOption('-t, --target ', 'Target address to attack') - .action(async (options) => { - try { - // Validate inputs - if (isNaN(options.qubits) || options.qubits <= 0) { - console.error(chalk.red('Error: Qubits must be a positive number')); - process.exit(1); - } - - if (!(options.target.startsWith('0x') || options.target.startsWith('qx') || options.target.startsWith('lx'))) { - console.error(chalk.red('Error: Invalid address format. Must start with 0x, qx, or lx')); - process.exit(1); - } - - // Display simulation info - console.log(); - console.log(chalk.cyan(`šŸ”¬ Initializing quantum attack simulation with ${options.qubits} qubits...`)); - console.log(); - console.log(`Target Address: ${chalk.yellow(options.target)}`); - console.log(`Signature Algorithm: ${options.target.startsWith('0x') ? - chalk.yellow('ECDSA (secp256k1)') : - options.target.startsWith('qx') ? - chalk.green('SPHINCS+ (hash-based)') : - chalk.green('Lattice-based')}`); - - // Create spinner for simulation progress - const spinner = ora('Simulating quantum attack...').start(); - - // Run attack simulation - const simulationResult = await simulateQuantumAttack(options.qubits, options.target); - - spinner.succeed('Simulation completed'); - - // Display simulation results based on address type - console.log(); - console.log(chalk.cyan('āš™ļø Simulating quantum attack:')); - - // Display simulation steps - simulationResult.simulationSteps.forEach(step => { - console.log(); - console.log(chalk.cyan(`Step ${step.step}: ${step.name}`)); - console.log(step.description); - console.log(chalk.gray(step.details)); - }); - - console.log(); - console.log(chalk.cyan('[ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ] 100% Complete')); - console.log(); - - // Display result based on success/failure - if (simulationResult.successful) { - console.log(chalk.red('šŸ”“ COMPROMISED: Private key successfully derived!')); - console.log(`Time Required: ${simulationResult.simulatedAttackDuration.toFixed(1)} seconds (simulated)`); - console.log(`Balance at Risk: ${simulationResult.balanceAtRisk} tokens`); - console.log(); - console.log(chalk.red('RESULT: This address would be compromised by a sufficiently powerful quantum computer.')); - console.log(chalk.yellow('RECOMMENDATION: Migrate funds to quantum-resistant address immediately.')); - } else { - console.log(chalk.green('āœ… SECURE: Attack unsuccessful!')); - console.log(`Reason: ${simulationResult.failureReason}`); - if (options.target.startsWith('qx')) { - console.log('Estimated time to break: 2^128 quantum operations (infeasible)'); - } else if (options.target.startsWith('lx')) { - console.log('Estimated time to break: Exponential complexity (infeasible)'); - } else { - console.log(`Required qubits: At least 512 (you provided ${options.qubits})`); - } - console.log(`Balance Protected: ${simulationResult.balance} tokens`); - console.log(); - if (options.target.startsWith('qx') || options.target.startsWith('lx')) { - console.log(chalk.green('RESULT: This address is secure against quantum attacks.')); - console.log(); - if (options.target.startsWith('qx')) { - console.log('SPHINCS+ successfully protects against quantum computing threats.'); - } else { - console.log('Lattice-based cryptography successfully protects against quantum computing threats.'); - } - } else { - console.log(chalk.yellow('RESULT: This address would be vulnerable with a more powerful quantum computer.')); - } - } - - // Display mathematical explanation - console.log(); - console.log(chalk.cyan('Mathematical Explanation:')); - console.log('-'.repeat(80)); - - if (simulationResult.mathematicalExplanation) { - console.log(`Algorithm: ${simulationResult.mathematicalExplanation.algorithm}`); - console.log(); - console.log('Steps:'); - simulationResult.mathematicalExplanation.steps.forEach(step => { - console.log(` ${step}`); - }); - console.log(); - console.log('Computational Complexity:'); - Object.entries(simulationResult.mathematicalExplanation.complexity).forEach(([key, value]) => { - console.log(` ${key}: ${value}`); - }); - console.log(); - console.log('Security Implications:'); - console.log(` ${simulationResult.mathematicalExplanation.securityImplications}`); - } - } catch (error) { - console.error(chalk.red(`Error simulating attack: ${error.message}`)); - process.exit(1); - } - }); - -// Command to generate attack impact report -const report = new Command('report') - .description('Generate comprehensive attack impact report') - .action(async () => { - try { - const spinner = ora('Generating attack impact report...').start(); - - // Generate report - const report = await generateAttackReport(); - - spinner.succeed('Attack impact report generated'); - - // Display report - console.log(); - console.log(chalk.cyan('šŸ›”ļø Quantum Attack Impact Report')); - console.log('='.repeat(80)); - - // Blockchain state - console.log(chalk.cyan('Blockchain State:')); - console.log('-'.repeat(80)); - console.log(`Total Blocks: ${chalk.green(report.blockchainState.blocks)}`); - console.log(`Total Transactions: ${chalk.green(report.blockchainState.transactions)}`); - - // Vulnerability assessment - console.log(); - console.log(chalk.cyan('Vulnerability Assessment:')); - console.log('-'.repeat(80)); - console.log(`Vulnerable Funds: ${chalk.yellow(report.vulnerabilityAssessment.vulnerableFunds)} tokens (${report.vulnerabilityAssessment.vulnerablePercentage.toFixed(1)}%)`); - console.log(`Secure Funds: ${chalk.green(report.vulnerabilityAssessment.secureFunds)} tokens (${report.vulnerabilityAssessment.securePercentage.toFixed(1)}%)`); - console.log(`Vulnerable Addresses: ${chalk.yellow(report.vulnerabilityAssessment.vulnerableAddresses)}`); - console.log(`Secure Addresses: ${chalk.green(report.vulnerabilityAssessment.secureAddresses)}`); - - // Attack projection - console.log(); - console.log(chalk.cyan('Attack Projection:')); - console.log('-'.repeat(80)); - console.log(`Estimated Time to Compromise All Vulnerable Addresses: ${chalk.red(report.attackProjection.estimatedTimeFormatted)}`); - console.log(`Potential Loss: ${chalk.red(report.attackProjection.potentialLoss)} tokens`); - console.log(`Required Quantum Resources: ${chalk.yellow(report.attackProjection.requiredQubits)} logical qubits`); - - // Mitigation strategy - console.log(); - console.log(chalk.cyan('Mitigation Strategy:')); - console.log('-'.repeat(80)); - console.log(`Recommended Action: ${chalk.green(report.mitigationStrategy.recommendedAction)}`); - console.log(`Estimated Time to Migrate: ${report.mitigationStrategy.timeToMigrate} seconds`); - console.log(`Migration Cost: ${report.mitigationStrategy.costToMigrate} tokens (transaction fees)`); - - // Transaction distribution - console.log(); - console.log(chalk.cyan('Transaction Distribution:')); - console.log('-'.repeat(80)); - console.log(`Classical (ECDSA): ${chalk.yellow(report.transactionDistribution.classical.count)} (${report.transactionDistribution.classical.percentage.toFixed(1)}%)`); - console.log(`Quantum (SPHINCS+): ${chalk.green(report.transactionDistribution.sphincsPlus.count)} (${report.transactionDistribution.sphincsPlus.percentage.toFixed(1)}%)`); - console.log(`Quantum (Lattice): ${chalk.green(report.transactionDistribution.lattice.count)} (${report.transactionDistribution.lattice.percentage.toFixed(1)}%)`); - - // Risk assessment - console.log(); - console.log(chalk.cyan('Risk Assessment:')); - console.log('-'.repeat(80)); - if (report.vulnerabilityAssessment.vulnerablePercentage > 50) { - console.log(chalk.red(`HIGH RISK: ${report.vulnerabilityAssessment.vulnerablePercentage.toFixed(1)}% of funds are vulnerable`)); - console.log(chalk.red('Immediate action recommended')); - } else if (report.vulnerabilityAssessment.vulnerablePercentage > 20) { - console.log(chalk.yellow(`MEDIUM RISK: ${report.vulnerabilityAssessment.vulnerablePercentage.toFixed(1)}% of funds are vulnerable`)); - console.log(chalk.yellow('Action recommended')); - } else { - console.log(chalk.green(`LOW RISK: Only ${report.vulnerabilityAssessment.vulnerablePercentage.toFixed(1)}% of funds are vulnerable`)); - console.log(chalk.green('Continue monitoring')); - } - } catch (error) { - console.error(chalk.red(`Error generating attack report: ${error.message}`)); - process.exit(1); - } - }); - -module.exports = { - analyze, - simulate, - report -}; \ No newline at end of file diff --git a/cli-interface/lib/commands/blockchain.js b/cli-interface/lib/commands/blockchain.js deleted file mode 100644 index 4b16c23..0000000 --- a/cli-interface/lib/commands/blockchain.js +++ /dev/null @@ -1,266 +0,0 @@ -const { Command } = require('commander'); -const chalk = require('chalk'); -const ora = require('ora'); -const { getBlockchain } = require('../blockchain'); -const { formatDateTime } = require('../../utils/formatting'); - -// Command to display blockchain status -const status = new Command('status') - .description('Display blockchain status') - .action(async () => { - try { - const spinner = ora('Loading blockchain status...').start(); - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Get blockchain status - const blockchainStatus = blockchain.getStatus(); - - spinner.succeed('Blockchain status loaded'); - - // Display blockchain information - console.log(); - console.log(chalk.cyan('Blockchain Status:')); - console.log('-'.repeat(60)); - console.log(`Chain Length: ${chalk.green(blockchainStatus.chainLength)} blocks`); - console.log(`Latest Block: #${chalk.green(blockchainStatus.latestBlockIndex)} (${blockchainStatus.latestBlockHash.substring(0, 10)}...)`); - console.log(`Block Time: ${chalk.green(blockchainStatus.formattedTimestamp)}`); - console.log(`Pending Transactions: ${chalk.yellow(blockchainStatus.pendingTransactions)}`); - console.log(`Mining Difficulty: ${chalk.cyan(blockchainStatus.miningDifficulty)} (${Math.pow(16, blockchainStatus.miningDifficulty)} hashes on average)`); - console.log(`Chain Validation: ${blockchainStatus.isValid ? chalk.green('Valid') : chalk.red('Invalid')}`); - - // Get security metrics - const securityMetrics = blockchain.securityMetrics(); - - console.log(); - console.log(chalk.cyan('Security Metrics:')); - console.log('-'.repeat(60)); - console.log('Transaction Distribution:'); - console.log(` Classical: ${chalk.yellow(securityMetrics.transactionCounts.classical)} (${securityMetrics.percentages.classical.toFixed(1)}%)`); - console.log(` SPHINCS+: ${chalk.green(securityMetrics.transactionCounts.sphincsPlus)} (${securityMetrics.percentages.sphincsPlus.toFixed(1)}%)`); - console.log(` Lattice: ${chalk.green(securityMetrics.transactionCounts.lattice)} (${securityMetrics.percentages.lattice.toFixed(1)}%)`); - - console.log(); - console.log('Address Distribution:'); - console.log(` Classical: ${chalk.yellow(securityMetrics.addresses.classical)}`); - console.log(` Quantum-Resistant: ${chalk.green(securityMetrics.addresses.quantum)}`); - - console.log(); - console.log('Token Security:'); - console.log(` Vulnerable: ${chalk.yellow(securityMetrics.balances.classical)} tokens (${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}%)`); - console.log(` Secure: ${chalk.green(securityMetrics.balances.quantum)} tokens (${securityMetrics.vulnerability.securePercentage.toFixed(1)}%)`); - - // Overall security assessment - console.log(); - console.log('Security Assessment:'); - if (securityMetrics.vulnerability.vulnerablePercentage > 50) { - console.log(chalk.red(`āš ļø HIGH RISK: ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - } else if (securityMetrics.vulnerability.vulnerablePercentage > 20) { - console.log(chalk.yellow(`āš ļø MEDIUM RISK: ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - } else { - console.log(chalk.green(`āœ… LOW RISK: Only ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - } - } catch (error) { - console.error(chalk.red(`Error getting blockchain status: ${error.message}`)); - process.exit(1); - } - }); - -// Command to display information about a specific block -const info = new Command('info') - .description('Display information about a specific block') - .option('-i, --index ', 'Block index', parseInt) - .option('-h, --hash ', 'Block hash') - .action(async (options) => { - try { - if (!options.index && !options.hash) { - console.error(chalk.red('Error: Either block index or hash must be provided')); - process.exit(1); - } - - const spinner = ora('Loading block information...').start(); - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Find block by index or hash - let block; - if (options.index !== undefined) { - block = blockchain.getBlockByIndex(options.index); - } else { - block = blockchain.getBlockByHash(options.hash); - } - - if (!block) { - spinner.fail('Block not found'); - console.error(chalk.red(`Block ${options.index !== undefined ? `#${options.index}` : `with hash ${options.hash}`} not found.`)); - process.exit(1); - } - - spinner.succeed('Block information loaded'); - - // Calculate security metrics for the block - const blockMetrics = block.securityMetrics(); - - // Display block information - console.log(); - console.log(chalk.cyan(`Block #${block.index} Information:`)); - console.log('-'.repeat(60)); - console.log(`Block Hash: ${chalk.green(block.hash)}`); - console.log(`Previous Block: ${chalk.yellow(block.previousHash)}`); - console.log(`Timestamp: ${chalk.cyan(formatDateTime(block.timestamp))}`); - console.log(`Nonce: ${block.nonce}`); - console.log(`Transactions: ${block.transactions.length}`); - - // Display security metrics - console.log(); - console.log(chalk.cyan('Block Security Metrics:')); - console.log('-'.repeat(60)); - console.log(`Classical Transactions: ${chalk.yellow(blockMetrics.classical)} (${(blockMetrics.classicalPercentage || 0).toFixed(1)}%)`); - console.log(`SPHINCS+ Transactions: ${chalk.green(blockMetrics.sphincsPlus)} (${(blockMetrics.sphincsPlusPercentage || 0).toFixed(1)}%)`); - console.log(`Lattice Transactions: ${chalk.green(blockMetrics.lattice)} (${(blockMetrics.latticePercentage || 0).toFixed(1)}%)`); - - // Display transactions - console.log(); - console.log(chalk.cyan('Transactions:')); - console.log('-'.repeat(60)); - - if (block.transactions.length === 0) { - console.log('No transactions in this block.'); - } else { - block.transactions.forEach((tx, i) => { - const isMiningReward = tx.from === 'MINING_REWARD'; - const isGenesis = tx.from === 'GENESIS'; - - if (isGenesis) { - console.log(`${i + 1}. ${chalk.cyan('GENESIS TRANSACTION')}`); - } else if (isMiningReward) { - console.log(`${i + 1}. ${chalk.cyan('MINING REWARD')} -> ${tx.to} (${tx.amount} tokens)`); - } else { - const securityLabel = tx.signatureType === 'classical' ? - chalk.yellow('[CLASSICAL]') : - tx.signatureType === 'sphincs' ? - chalk.green('[SPHINCS+]') : - chalk.green('[LATTICE]'); - - console.log(`${i + 1}. ${securityLabel} ${tx.from.substr(0, 10)}... -> ${tx.to.substr(0, 10)}... (${tx.amount} tokens)`); - console.log(` TX: ${tx.txHash.substr(0, 15)}...`); - } - }); - } - - // Block verification - console.log(); - const validHash = block.calculateHash() === block.hash; - console.log(`Block Verification: ${validHash ? chalk.green('Valid āœ“') : chalk.red('Invalid āœ—')}`); - } catch (error) { - console.error(chalk.red(`Error getting block info: ${error.message}`)); - process.exit(1); - } - }); - -// Command to display security metrics -const metrics = new Command('metrics') - .description('Display blockchain security metrics') - .action(async () => { - try { - const spinner = ora('Analyzing blockchain security...').start(); - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Get security metrics - const securityMetrics = blockchain.securityMetrics(); - - spinner.succeed('Security analysis complete'); - - // Display detailed security metrics - console.log(); - console.log(chalk.cyan('Quantum Security Analysis:')); - console.log('='.repeat(80)); - - // Transaction metrics - console.log(chalk.cyan('Transaction Metrics:')); - console.log('-'.repeat(80)); - console.log(`Total Transactions: ${chalk.green(securityMetrics.transactionCounts.total)}`); - console.log(); - console.log('By Signature Type:'); - console.log(` Classical (ECDSA): ${chalk.yellow(securityMetrics.transactionCounts.classical)} (${securityMetrics.percentages.classical.toFixed(1)}%)`); - console.log(` Quantum (SPHINCS+): ${chalk.green(securityMetrics.transactionCounts.sphincsPlus)} (${securityMetrics.percentages.sphincsPlus.toFixed(1)}%)`); - console.log(` Quantum (Lattice): ${chalk.green(securityMetrics.transactionCounts.lattice)} (${securityMetrics.percentages.lattice.toFixed(1)}%)`); - console.log(` Combined Quantum: ${chalk.green(securityMetrics.transactionCounts.sphincsPlus + securityMetrics.transactionCounts.lattice)} (${(securityMetrics.percentages.sphincsPlus + securityMetrics.percentages.lattice).toFixed(1)}%)`); - - // Address metrics - console.log(); - console.log(chalk.cyan('Address Metrics:')); - console.log('-'.repeat(80)); - console.log(`Total Addresses: ${chalk.green(securityMetrics.addresses.classical + securityMetrics.addresses.quantum)}`); - console.log(); - console.log('By Address Type:'); - console.log(` Classical (0x...): ${chalk.yellow(securityMetrics.addresses.classical)} (${((securityMetrics.addresses.classical / (securityMetrics.addresses.classical + securityMetrics.addresses.quantum)) * 100).toFixed(1)}%)`); - console.log(` Quantum-Resistant (qx/lx...): ${chalk.green(securityMetrics.addresses.quantum)} (${((securityMetrics.addresses.quantum / (securityMetrics.addresses.classical + securityMetrics.addresses.quantum)) * 100).toFixed(1)}%)`); - - // Balance metrics - console.log(); - console.log(chalk.cyan('Balance Security Metrics:')); - console.log('-'.repeat(80)); - console.log(`Total Tokens: ${chalk.green(securityMetrics.balances.total)}`); - console.log(); - console.log('By Address Security:'); - console.log(` Vulnerable (Classical): ${chalk.yellow(securityMetrics.balances.classical)} tokens (${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}%)`); - console.log(` Secure (Quantum-Resistant): ${chalk.green(securityMetrics.balances.quantum)} tokens (${securityMetrics.vulnerability.securePercentage.toFixed(1)}%)`); - - // Security assessment - console.log(); - console.log(chalk.cyan('Overall Security Assessment:')); - console.log('-'.repeat(80)); - - if (securityMetrics.vulnerability.vulnerablePercentage > 50) { - console.log(chalk.red(`āš ļø HIGH RISK: ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - console.log(chalk.red(` ${securityMetrics.balances.classical} tokens in ${securityMetrics.addresses.classical} classical addresses are at risk.`)); - console.log(); - console.log(chalk.yellow('Recommendation: Urgent migration of funds to quantum-resistant addresses is required.')); - } else if (securityMetrics.vulnerability.vulnerablePercentage > 20) { - console.log(chalk.yellow(`āš ļø MEDIUM RISK: ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - console.log(chalk.yellow(` ${securityMetrics.balances.classical} tokens in ${securityMetrics.addresses.classical} classical addresses are at risk.`)); - console.log(); - console.log(chalk.yellow('Recommendation: Gradual migration of funds to quantum-resistant addresses is recommended.')); - } else { - console.log(chalk.green(`āœ… LOW RISK: Only ${securityMetrics.vulnerability.vulnerablePercentage.toFixed(1)}% of funds are vulnerable to quantum attacks.`)); - console.log(chalk.green(` ${securityMetrics.balances.classical} tokens in ${securityMetrics.addresses.classical} classical addresses are at risk.`)); - console.log(); - console.log(chalk.green('Recommendation: Continue using quantum-resistant addresses for new transactions.')); - } - - // Trend analysis (simulated) - console.log(); - console.log(chalk.cyan('Security Trend Analysis:')); - console.log('-'.repeat(80)); - - // Simulate some trend data based on the current metrics - const classicalTrend = securityMetrics.percentages.classical > 50 ? 'increasing' : 'decreasing'; - const quantumTrend = securityMetrics.percentages.sphincsPlus + securityMetrics.percentages.lattice > 50 ? 'increasing' : 'decreasing'; - - console.log(`Classical Usage: ${classicalTrend === 'decreasing' ? chalk.green('Decreasing ↓') : chalk.red('Increasing ↑')}`); - console.log(`Quantum-Resistant Usage: ${quantumTrend === 'increasing' ? chalk.green('Increasing ↑') : chalk.red('Decreasing ↓')}`); - - // Mitigation advice - console.log(); - console.log(chalk.cyan('Quantum Attack Mitigation:')); - console.log('-'.repeat(80)); - console.log('1. Use SPHINCS+ or Lattice-based signatures for all new transactions'); - console.log('2. Migrate existing funds from classical to quantum-resistant addresses'); - console.log('3. Monitor the development of quantum computing capabilities'); - console.log(`4. Use the attack simulation tool to assess specific vulnerabilities: ${chalk.cyan('quantum-chain attack simulate')}`); - } catch (error) { - console.error(chalk.red(`Error analyzing security metrics: ${error.message}`)); - process.exit(1); - } - }); - -module.exports = { - status, - info, - metrics -}; diff --git a/cli-interface/lib/commands/mining.js b/cli-interface/lib/commands/mining.js deleted file mode 100644 index b43cbf7..0000000 --- a/cli-interface/lib/commands/mining.js +++ /dev/null @@ -1,89 +0,0 @@ -const chalk = require('chalk'); -const ora = require('ora'); -const { getBlockchain } = require('../blockchain'); - -/** - * Mine a new block - * @param {Object} options - Command options - * @param {string} options.rewardAddress - Address to receive mining reward - */ -async function mine(options) { - try { - // Validate reward address - if (!options.rewardAddress) { - console.error(chalk.red('Error: Reward address is required (--reward-address)')); - process.exit(1); - } - - if (!(options.rewardAddress.startsWith('0x') || - options.rewardAddress.startsWith('qx') || - options.rewardAddress.startsWith('lx'))) { - console.error(chalk.red('Error: Invalid address format. Must start with 0x, qx, or lx')); - process.exit(1); - } - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Check if there are pending transactions - const pendingCount = blockchain.mempool.length; - - console.log(); - console.log(chalk.cyan(`ā›ļø Mining new block with ${pendingCount} pending transaction(s)...`)); - - // Check security of reward address - let securityWarning = false; - if (options.rewardAddress.startsWith('0x')) { - console.log(); - console.log(chalk.yellow('āš ļø Warning: You are mining to a classical address (0x...) that is vulnerable to quantum attacks.')); - console.log(chalk.yellow(' Consider using a quantum-resistant address (qx... or lx...) for better security.')); - securityWarning = true; - } - - // Start mining spinner - const spinner = ora('Mining in progress...').start(); - - // Periodic updates for the spinner - let dots = 0; - const updateInterval = setInterval(() => { - dots = (dots + 1) % 4; - spinner.text = `Mining in progress${'.'.repeat(dots)}`; - }, 500); - - // Start mining - const startTime = Date.now(); - const miningResult = await blockchain.mineBlock(options.rewardAddress); - const endTime = Date.now(); - const miningTime = (endTime - startTime) / 1000; // in seconds - - // Stop spinner updates - clearInterval(updateInterval); - spinner.succeed(`Block #${miningResult.blockIndex} mined successfully in ${miningTime.toFixed(2)} seconds!`); - - // Display mining results - console.log(); - console.log(chalk.green(`āœ… Block #${miningResult.blockIndex} mined successfully!`)); - console.log(`Block Hash: ${chalk.cyan(miningResult.blockHash)}`); - console.log(`Transactions: ${chalk.cyan(miningResult.transactionCount)} (${pendingCount} pending + 1 mining reward)`); - console.log(`Mining Reward: ${chalk.yellow(miningResult.reward)} tokens to ${options.rewardAddress}`); - console.log(`Nonce Found: After ${chalk.cyan(miningResult.miningAttemptsRequired)} attempts`); - console.log(`Time Required: ${chalk.cyan(miningTime.toFixed(2))} seconds`); - console.log(`Hash Rate: ${chalk.cyan(Math.floor(miningResult.miningAttemptsRequired / miningTime))} hashes/second`); - console.log(); - console.log(chalk.green('Block added to the blockchain.')); - - // Security reminder if mining to classical address - if (securityWarning) { - console.log(); - console.log(chalk.yellow('Remember: Quantum computers may eventually be able to break classical cryptography.')); - console.log(chalk.yellow('Consider migrating your mining rewards to a quantum-resistant address.')); - } - } catch (error) { - console.error(chalk.red(`Error mining block: ${error.message}`)); - process.exit(1); - } -} - -module.exports = { - mine -}; \ No newline at end of file diff --git a/cli-interface/lib/commands/transaction.js b/cli-interface/lib/commands/transaction.js deleted file mode 100644 index 1fc60b2..0000000 --- a/cli-interface/lib/commands/transaction.js +++ /dev/null @@ -1,226 +0,0 @@ -const { Command } = require('commander'); -const chalk = require('chalk'); -const inquirer = require('inquirer'); -const ora = require('ora'); -const { Wallet } = require('../wallet'); -const { getBlockchain } = require('../blockchain'); -const { formatTransaction } = require('../transaction'); -const { formatDateTime } = require('../../utils/formatting'); - -// Command to create a new transaction -const create = new Command('create') - .description('Create a new transaction') - .requiredOption('-f, --from ', 'Wallet ID to send from') - .requiredOption('-t, --to
', 'Recipient address (0x... or qx... or lx...)') - .requiredOption('-a, --amount ', 'Amount to send', parseFloat) - .option('-y, --type ', 'Signature type (classical, sphincs, lattice)', 'classical') - .action(async (options) => { - try { - // Validate amount - if (isNaN(options.amount) || options.amount <= 0) { - console.error(chalk.red('Error: Amount must be a positive number')); - process.exit(1); - } - - // Validate address format - if (!(options.to.startsWith('0x') || options.to.startsWith('qx') || options.to.startsWith('lx'))) { - console.error(chalk.red('Error: Invalid address format. Must start with 0x, qx, or lx')); - process.exit(1); - } - - // Validate signature type - if (!['classical', 'sphincs', 'lattice'].includes(options.type)) { - console.error(chalk.red('Error: Invalid signature type. Must be classical, sphincs, or lattice')); - process.exit(1); - } - - // Load wallet - const spinner = ora('Loading wallet...').start(); - const wallet = await Wallet.load(options.from); - - // Check wallet balance - spinner.text = 'Checking balance...'; - const balance = await wallet.getBalance(); - - let availableBalance; - switch (options.type) { - case 'classical': - availableBalance = balance.classical; - break; - case 'sphincs': - availableBalance = balance.sphincsPlus; - break; - case 'lattice': - availableBalance = balance.lattice; - break; - } - - if (availableBalance < options.amount) { - spinner.fail(`Insufficient balance in ${options.type} address`); - console.error(chalk.red(`Error: Insufficient balance. Available: ${availableBalance}, Required: ${options.amount}`)); - process.exit(1); - } - - spinner.succeed('Wallet loaded and balance verified'); - - // Get from address based on signature type - let fromAddress; - switch (options.type) { - case 'classical': - fromAddress = wallet.classicalAddress; - break; - case 'sphincs': - fromAddress = wallet.sphincsPlusAddress; - break; - case 'lattice': - fromAddress = wallet.latticeAddress; - break; - } - - // Display transaction information - console.log(); - console.log(chalk.cyan('Transaction Information:')); - console.log('-'.repeat(60)); - console.log(`From: ${chalk.yellow(fromAddress)}`); - console.log(`To: ${chalk.green(options.to)}`); - console.log(`Amount: ${chalk.cyan(options.amount)} tokens`); - console.log(`Signature Type: ${options.type === 'classical' ? chalk.yellow('Classical (ECDSA)') : - options.type === 'sphincs' ? chalk.green('Quantum-Resistant (SPHINCS+)') : - chalk.green('Quantum-Resistant (Lattice)')}`); - - // Security warning for classical signatures - if (options.type === 'classical') { - console.log(); - console.log(chalk.yellow('āš ļø Security Warning:')); - console.log(chalk.yellow('This transaction uses classical cryptography that may be vulnerable to quantum attacks.')); - } - - // Prompt for password - const { password } = await inquirer.prompt([ - { - type: 'password', - name: 'password', - message: 'Enter wallet password:', - validate: input => input ? true : 'Password is required' - } - ]); - - // Sign and create transaction - spinner.text = options.type === 'classical' ? - 'Signing transaction with ECDSA (classical)...' : - options.type === 'sphincs' ? - 'Signing transaction with SPHINCS+ (quantum-resistant)...' : - 'Signing transaction with Lattice (quantum-resistant)...'; - spinner.start(); - - const tx = await wallet.createTransaction(options.to, options.amount, options.type, password); - - spinner.succeed('Transaction created and signed!'); - - // Display transaction results - console.log(); - console.log(chalk.green('Transaction created and signed!')); - console.log(`Transaction Hash: ${chalk.cyan(tx.txHash)}`); - console.log(`Status: ${chalk.yellow('Pending')} (waiting to be mined)`); - console.log(); - console.log(`Type '${chalk.cyan(`quantum-chain tx info --hash ${tx.txHash.substring(0, 8)}...`)}' to check status.`); - } catch (error) { - console.error(chalk.red(`Error creating transaction: ${error.message}`)); - process.exit(1); - } - }); - -// Command to display transaction information -const info = new Command('info') - .description('Show transaction information') - .requiredOption('-h, --hash ', 'Transaction hash') - .action(async (options) => { - try { - const spinner = ora('Looking up transaction...').start(); - - // Get blockchain instance - const blockchain = await getBlockchain(); - - // Find transaction - const tx = blockchain.getTransactionByHash(options.hash); - - if (!tx) { - spinner.fail('Transaction not found'); - console.error(chalk.red(`Transaction with hash ${options.hash} not found.`)); - process.exit(1); - } - - spinner.succeed('Transaction found'); - - // Format transaction data - const formattedTx = formatTransaction(tx); - - // Display transaction information - console.log(); - console.log(chalk.cyan('Transaction Information:')); - console.log('-'.repeat(60)); - console.log(`Transaction Hash: ${chalk.cyan(tx.txHash)}`); - console.log(`Status: ${tx.confirmed ? chalk.green('Confirmed') : chalk.yellow('Pending')}`); - - if (tx.confirmed) { - console.log(`Block: #${chalk.cyan(tx.blockIndex)} (${tx.blockHash.substring(0, 10)}...)`); - } - - console.log(`Timestamp: ${chalk.cyan(formattedTx.formattedTimestamp)}`); - console.log(); - console.log(`From: ${chalk.yellow(tx.from)}`); - console.log(`To: ${chalk.green(tx.to)}`); - console.log(`Amount: ${chalk.cyan(tx.amount)} tokens`); - console.log(); - console.log(`Signature Type: ${formattedTx.signatureSecurity}`); - - // Display security information based on signature type - console.log(); - console.log(chalk.cyan('Security Information:')); - console.log('-'.repeat(60)); - - if (tx.signatureType === 'classical') { - console.log(chalk.yellow('āš ļø This transaction uses classical ECDSA signatures.')); - console.log(chalk.yellow(' It is potentially vulnerable to attacks from quantum computers.')); - console.log(chalk.yellow(' Consider using quantum-resistant signatures for future transactions.')); - - const classicalCrypto = require('../cryptography/classical'); - const securityLevel = classicalCrypto.getSecurityLevel(); - console.log(); - console.log(`Classical Security: ${chalk.green(securityLevel.classical)} bits`); - console.log(`Quantum Security: ${chalk.red(securityLevel.quantum)} bits`); - console.log(); - console.log('Vulnerability: High - Shor\'s algorithm can break ECDSA efficiently on a quantum computer.'); - } else if (tx.signatureType === 'sphincs') { - console.log(chalk.green('āœ… This transaction uses quantum-resistant SPHINCS+ signatures.')); - console.log(chalk.green(' It is secure against known quantum computing attacks.')); - - const sphincsCrypto = require('../cryptography/sphincs'); - const securityLevel = sphincsCrypto.getSecurityLevel(); - console.log(); - console.log(`Security Level: ${chalk.green(securityLevel)} bits`); - console.log(); - console.log('Vulnerability: Low - SPHINCS+ is designed to be secure against quantum computers.'); - console.log('Algorithm: Hash-based signature scheme, resistant to Shor\'s algorithm.'); - } else if (tx.signatureType === 'lattice') { - console.log(chalk.green('āœ… This transaction uses quantum-resistant lattice-based signatures.')); - console.log(chalk.green(' It is secure against known quantum computing attacks.')); - - const latticeCrypto = require('../cryptography/lattice'); - const securityLevel = latticeCrypto.getSecurityLevel(); - console.log(); - console.log(`Security Level: ${chalk.green(securityLevel)} bits`); - console.log(); - console.log('Vulnerability: Low - Lattice-based cryptography is designed to be secure against quantum computers.'); - console.log('Algorithm: Based on the hardness of lattice problems, resistant to Shor\'s algorithm.'); - } - } catch (error) { - console.error(chalk.red(`Error getting transaction info: ${error.message}`)); - process.exit(1); - } - }); - -module.exports = { - create, - info -}; \ No newline at end of file diff --git a/cli-interface/lib/commands/wallet.js b/cli-interface/lib/commands/wallet.js deleted file mode 100644 index 45b421a..0000000 --- a/cli-interface/lib/commands/wallet.js +++ /dev/null @@ -1,357 +0,0 @@ -const { Command } = require('commander'); -const chalk = require('chalk'); -const inquirer = require('inquirer'); -const ora = require('ora'); -const { Wallet } = require('../wallet'); -const { formatDateTime } = require('../../utils/formatting'); - -// Command to create a new wallet -const create = new Command('create') - .description('Create a new wallet with classical and quantum-resistant keys') - .option('-n, --name ', 'Wallet name') - .option('-p, --password ', 'Wallet password (not recommended for production use)') - .action(async (options) => { - try { - // Prompt for name if not provided - if (!options.name) { - const answers = await inquirer.prompt([ - { - type: 'input', - name: 'name', - message: 'Enter a name for your new wallet:', - validate: input => input.trim() ? true : 'Wallet name is required' - } - ]); - options.name = answers.name; - } - - // Prompt for password if not provided - if (!options.password) { - const answers = await inquirer.prompt([ - { - type: 'password', - name: 'password', - message: 'Enter a password to encrypt your wallet:', - validate: input => input.length >= 8 ? true : 'Password must be at least 8 characters' - }, - { - type: 'password', - name: 'confirmPassword', - message: 'Confirm your password:', - validate: (input, answers) => input === answers.password ? true : 'Passwords do not match' - } - ]); - options.password = answers.password; - } - - // Create wallet with spinner - const spinner = ora('Creating wallet with quantum-resistant keys...').start(); - - const wallet = await Wallet.create(options.name, options.password); - - spinner.succeed('Wallet created successfully!'); - - // Display wallet info - console.log(); - console.log(chalk.green('āœ… Wallet created successfully!')); - console.log(); - console.log(`Wallet ID: ${chalk.cyan(wallet.id)}`); - console.log(`Name: ${chalk.cyan(wallet.name)}`); - console.log(); - console.log(`Classical Address: ${chalk.yellow(wallet.classicalAddress)}`); - console.log(`Quantum Address (SPHINCS+): ${chalk.green(wallet.sphincsPlusAddress)}`); - console.log(`Quantum Address (Lattice): ${chalk.green(wallet.latticeAddress)}`); - console.log(); - console.log(chalk.yellow('Your wallet has been encrypted and saved.')); - console.log(chalk.yellow('Keep your password and Wallet ID safe!')); - } catch (error) { - console.error(chalk.red(`Error creating wallet: ${error.message}`)); - process.exit(1); - } - }); - -// Command to display wallet info -const info = new Command('info') - .description('Display wallet information') - .requiredOption('-i, --id ', 'Wallet ID') - .action(async (options) => { - try { - const spinner = ora('Loading wallet information...').start(); - - // Load wallet - const wallet = await Wallet.load(options.id); - - // Get balance - const balance = await wallet.getBalance(); - - // Get transaction history - const txHistory = await wallet.getTransactionHistory(); - - spinner.succeed('Wallet information loaded'); - - // Display wallet info - console.log(); - console.log(chalk.cyan('Wallet Information:')); - console.log('-'.repeat(40)); - console.log(`Wallet ID: ${chalk.cyan(wallet.id)}`); - console.log(`Name: ${chalk.cyan(wallet.name)}`); - console.log(); - - // Display addresses - console.log(chalk.cyan('Addresses:')); - console.log(`Classical (ECDSA): ${chalk.yellow(wallet.classicalAddress)}`); - console.log(`Quantum (SPHINCS+): ${chalk.green(wallet.sphincsPlusAddress)}`); - console.log(`Quantum (Lattice): ${chalk.green(wallet.latticeAddress)}`); - console.log(); - - // Display balances - console.log(chalk.cyan('Balances:')); - console.log(`Classical: ${chalk.yellow(balance.classical)} tokens`); - console.log(`Quantum (SPHINCS+): ${chalk.green(balance.sphincsPlus)} tokens`); - console.log(`Quantum (Lattice): ${chalk.green(balance.lattice)} tokens`); - console.log(chalk.cyan('-'.repeat(20))); - console.log(`Total: ${chalk.cyan(balance.total)} tokens`); - console.log(); - - // Display recent transactions - console.log(chalk.cyan('Recent Transactions:')); - if (txHistory.length === 0) { - console.log('No transactions found.'); - } else { - // Display the 5 most recent transactions - const recentTx = txHistory.slice(0, 5); - - recentTx.forEach(tx => { - const isIncoming = tx.to === wallet.classicalAddress || - tx.to === wallet.sphincsPlusAddress || - tx.to === wallet.latticeAddress; - - const amount = isIncoming ? chalk.green(`+${tx.amount}`) : chalk.red(`-${tx.amount}`); - const status = tx.confirmed ? chalk.green('Confirmed') : chalk.yellow('Pending'); - const date = formatDateTime(tx.timestamp); - - console.log(`${date} | ${amount} | ${status}`); - console.log(` ${isIncoming ? 'From' : 'To'}: ${isIncoming ? tx.from.substring(0, 10) + '...' : tx.to.substring(0, 10) + '...'}`); - console.log(` Type: ${tx.signatureType === 'classical' ? chalk.yellow('Classical') : chalk.green('Quantum')}`); - console.log(` TX: ${tx.txHash.substring(0, 10)}...`); - console.log(); - }); - - if (txHistory.length > 5) { - console.log(`... and ${txHistory.length - 5} more transactions`); - } - } - - // Display security warning for classical balance - if (balance.classical > 0) { - console.log(); - console.log(chalk.yellow('āš ļø Security Warning:')); - console.log(chalk.yellow(`You have ${balance.classical} tokens in a classical address that is vulnerable to quantum attacks.`)); - console.log(chalk.yellow(`Consider migrating these funds to a quantum-resistant address using:`)); - console.log(chalk.cyan(`quantum-chain wallet migrate --id "${wallet.id}"`)); - } - } catch (error) { - console.error(chalk.red(`Error getting wallet info: ${error.message}`)); - process.exit(1); - } - }); - -// Command to list all wallets -const list = new Command('list') - .description('List all wallets') - .action(async () => { - try { - const spinner = ora('Loading wallets...').start(); - - // Get all wallets - const wallets = await Wallet.listWallets(); - - spinner.succeed(`Found ${wallets.length} wallet(s)`); - - // Display wallets - console.log(); - console.log(chalk.cyan('Available Wallets:')); - console.log('-'.repeat(80)); - - if (wallets.length === 0) { - console.log('No wallets found. Create one with "quantum-chain wallet create"'); - } else { - console.log(chalk.cyan('ID | Name | Classical Address | Quantum Addresses')); - console.log('-'.repeat(80)); - - for (const wallet of wallets) { - const classicalShort = wallet.classicalAddress.substring(0, 10) + '...'; - const sphincsShort = wallet.sphincsPlusAddress.substring(0, 10) + '...'; - - console.log(`${wallet.id} | ${wallet.name.padEnd(19)} | ${classicalShort} | ${sphincsShort}`); - } - } - } catch (error) { - console.error(chalk.red(`Error listing wallets: ${error.message}`)); - process.exit(1); - } - }); - -// Command to show wallet balance -const balance = new Command('balance') - .description('Show wallet balance') - .option('-i, --id ', 'Wallet ID') - .option('-a, --address
', 'Address to check (0x... or qx... or lx...)') - .action(async (options) => { - try { - if (!options.id && !options.address) { - console.error(chalk.red('Error: Either wallet ID or address must be provided')); - process.exit(1); - } - - const spinner = ora('Retrieving balance...').start(); - - let balance; - - if (options.id) { - // Load wallet and get its balance - const wallet = await Wallet.load(options.id); - balance = await wallet.getBalance(); - - spinner.succeed('Balance retrieved successfully'); - - // Display balances - console.log(); - console.log(chalk.cyan(`Balance for wallet "${wallet.name}" (${wallet.id}):`)); - console.log('-'.repeat(40)); - console.log(`Classical (${wallet.classicalAddress.substring(0, 10)}...): ${chalk.yellow(balance.classical)} tokens`); - console.log(`Quantum SPHINCS+ (${wallet.sphincsPlusAddress.substring(0, 10)}...): ${chalk.green(balance.sphincsPlus)} tokens`); - console.log(`Quantum Lattice (${wallet.latticeAddress.substring(0, 10)}...): ${chalk.green(balance.lattice)} tokens`); - console.log('-'.repeat(40)); - console.log(`Total: ${chalk.cyan(balance.total)} tokens`); - - // Security warning - if (balance.classical > 0) { - console.log(); - console.log(chalk.yellow('āš ļø Security Warning:')); - console.log(chalk.yellow(`${balance.classical} tokens (${((balance.classical/balance.total)*100).toFixed(1)}% of your funds) are in a classical address vulnerable to quantum attacks.`)); - } - } else { - // Get balance for a specific address - const { getBlockchain } = require('../blockchain'); - const blockchain = await getBlockchain(); - const addressBalance = await blockchain.getAddressBalance(options.address); - - spinner.succeed('Balance retrieved successfully'); - - // Display balance - console.log(); - console.log(chalk.cyan(`Balance for address ${options.address}:`)); - console.log('-'.repeat(40)); - console.log(`Balance: ${chalk.cyan(addressBalance)} tokens`); - - // Security warning for classical addresses - if (options.address.startsWith('0x')) { - console.log(); - console.log(chalk.yellow('āš ļø Security Warning:')); - console.log(chalk.yellow('This is a classical address vulnerable to quantum computing attacks.')); - } - } - } catch (error) { - console.error(chalk.red(`Error retrieving balance: ${error.message}`)); - process.exit(1); - } - }); - -// Command to migrate from classical to quantum address -const migrate = new Command('migrate') - .description('Migrate funds from classical to quantum-resistant address') - .requiredOption('-i, --id ', 'Wallet ID') - .option('-t, --to-quantum ', 'Type of quantum address (sphincs, lattice)', 'sphincs') - .action(async (options) => { - try { - // First get wallet info - const spinner = ora('Loading wallet information...').start(); - const wallet = await Wallet.load(options.id); - const balance = await wallet.getBalance(); - - spinner.succeed('Wallet information loaded'); - - // Check if there are funds to migrate - if (balance.classical <= 0) { - console.log(chalk.yellow('No funds to migrate. Classical address balance is 0.')); - process.exit(0); - } - - // Confirm migration - console.log(); - console.log(chalk.cyan('Migration Information:')); - console.log('-'.repeat(60)); - console.log(`From: ${chalk.yellow(wallet.classicalAddress)} (Classical)`); - - let toAddress; - if (options.toQuantum === 'sphincs') { - toAddress = wallet.sphincsPlusAddress; - console.log(`To: ${chalk.green(toAddress)} (Quantum SPHINCS+)`); - } else if (options.toQuantum === 'lattice') { - toAddress = wallet.latticeAddress; - console.log(`To: ${chalk.green(toAddress)} (Quantum Lattice)`); - } else { - console.error(chalk.red(`Invalid quantum type: ${options.toQuantum}. Use 'sphincs' or 'lattice'.`)); - process.exit(1); - } - - console.log(`Amount: ${chalk.cyan(balance.classical)} tokens`); - console.log(); - - // Prompt for confirmation - const confirm = await inquirer.prompt([ - { - type: 'confirm', - name: 'proceed', - message: 'Do you want to proceed with the migration?', - default: true - } - ]); - - if (!confirm.proceed) { - console.log(chalk.yellow('Migration cancelled.')); - process.exit(0); - } - - // Prompt for password - const { password } = await inquirer.prompt([ - { - type: 'password', - name: 'password', - message: 'Enter your wallet password:', - validate: input => input ? true : 'Password is required' - } - ]); - - // Perform migration - spinner.text = 'Migrating funds...'; - spinner.start(); - - const result = await wallet.migrateToQuantum(password, options.toQuantum); - - spinner.succeed('Migration initiated successfully'); - - // Display result - console.log(); - console.log(chalk.green('āœ… Migration transaction created!')); - console.log(`Transaction Hash: ${chalk.cyan(result.transactionHash)}`); - console.log(`From: ${chalk.yellow(result.from)}`); - console.log(`To: ${chalk.green(result.to)}`); - console.log(`Amount: ${chalk.cyan(result.amount)} tokens`); - console.log(); - console.log(chalk.yellow('The transaction has been added to the mempool and will be mined in the next block.')); - console.log(chalk.yellow(`Check status with: quantum-chain tx info --hash "${result.transactionHash}"`)); - } catch (error) { - console.error(chalk.red(`Error migrating funds: ${error.message}`)); - process.exit(1); - } - }); - -module.exports = { - create, - info, - list, - balance, - migrate -}; \ No newline at end of file diff --git a/cli-interface/lib/cryptography/classical.js b/cli-interface/lib/cryptography/classical.js deleted file mode 100644 index da335d3..0000000 --- a/cli-interface/lib/cryptography/classical.js +++ /dev/null @@ -1,191 +0,0 @@ -const crypto = require('crypto'); -const { ec: EC } = require('elliptic'); -const ec = new EC('secp256k1'); // Same curve as Ethereum - -/** - * Classical Cryptography Implementation (ECDSA) - * - * This implements standard elliptic curve digital signature algorithm (ECDSA) - * using the secp256k1 curve (same as Bitcoin and Ethereum). - * - * ECDSA is vulnerable to quantum computers running Shor's algorithm, - * which can solve the discrete logarithm problem efficiently. - */ - -/** - * Generate an ECDSA keypair - */ -function generateKeypair() { - // Generate a new key pair - const keyPair = ec.genKeyPair(); - - // Get private and public keys - const privateKey = keyPair.getPrivate('hex'); - const publicKey = keyPair.getPublic('hex'); - - // Generate Ethereum-style address from public key - const address = generateAddress(publicKey); - - return { - privateKey, - publicKey, - address - }; -} - -/** - * Generate an Ethereum-style address from a public key - */ -function generateAddress(publicKey) { - // Remove '04' prefix if it exists (uncompressed public key format) - const pubKey = publicKey.startsWith('04') ? publicKey.slice(2) : publicKey; - - // Keccak-256 hash of public key - const pubKeyBuffer = Buffer.from(pubKey, 'hex'); - const addressBuffer = crypto.createHash('sha256').update(pubKeyBuffer).digest(); - - // Take last 20 bytes and format as hex address with 0x prefix - return '0x' + addressBuffer.slice(-20).toString('hex'); -} - -/** - * Sign a message using ECDSA - */ -function sign(message, privateKey) { - // Create a keyPair from the private key - const keyPair = ec.keyFromPrivate(privateKey, 'hex'); - - // Hash the message - const msgHash = crypto.createHash('sha256').update(message).digest('hex'); - - // Sign the hash - const signature = keyPair.sign(msgHash); - - // Return the signature in DER format - return signature.toDER('hex'); -} - -/** - * Verify an ECDSA signature - */ -function verify(message, signature, publicKey) { - try { - // Create a key from the public key - const key = ec.keyFromPublic(publicKey, 'hex'); - - // Hash the message - const msgHash = crypto.createHash('sha256').update(message).digest('hex'); - - // Verify the signature - return key.verify(msgHash, signature); - } catch (error) { - return false; - } -} - -/** - * Recover public key from message and signature - * Note: This is not always possible with ECDSA, but this simulates the concept - */ -function recoverPublicKey(message, signature) { - // This is a simplified simulation - in reality, ECDSA recovery is complex - // and requires additional information (recovery ID) - - try { - // Hash the message - const msgHash = crypto.createHash('sha256').update(message).digest('hex'); - - // In reality, we would use ec.recoverPubKey(), but we need a recovery ID - // For simulation, just return a warning - return { - recovered: false, - reason: "Public key recovery requires recovery ID which standard ECDSA signatures don't provide" - }; - } catch (error) { - return { - recovered: false, - error: error.message - }; - } -} - -/** - * Get the security level of ECDSA in bits - */ -function getSecurityLevel() { - return { - classical: 128, // Against classical computers - quantum: 0 // Effectively no security against quantum computers with Shor's algorithm - }; -} - -/** - * Get the signature size in bytes - */ -function getSignatureSize() { - // ECDSA signatures are typically 70-72 bytes in DER format - return 72; -} - -/** - * Estimate the time needed to break ECDSA with quantum computers - */ -function estimateQuantumBreakTime(qubits) { - // This is a very rough approximation - // Breaking 256-bit ECDSA requires about 2n = 512 qubits for Shor's algorithm - - if (qubits < 512) { - return { - possible: false, - reason: `Shor's algorithm requires at least 512 logical qubits for 256-bit ECDSA, only ${qubits} provided.` - }; - } - - // Very rough estimate of time (completely fictional for simulation purposes) - // In reality, this depends on gate speed, error rates, and many other factors - const baseTime = 100; // seconds - const speedFactor = qubits / 512; - const estimatedTime = baseTime / speedFactor; - - return { - possible: true, - timeSeconds: estimatedTime, - description: `With ${qubits} qubits, Shor's algorithm could break 256-bit ECDSA in approximately ${estimatedTime.toFixed(2)} seconds.`, - explanation: "Shor's algorithm can efficiently solve the discrete logarithm problem on which ECDSA is based." - }; -} - -/** - * Explain the vulnerability of ECDSA to quantum computing - */ -function explainQuantumVulnerability() { - return { - name: "Shor's Algorithm Vulnerability", - description: "ECDSA security relies on the difficulty of the elliptic curve discrete logarithm problem (ECDLP). Shor's algorithm, running on a sufficiently powerful quantum computer, can solve this problem efficiently.", - impact: "A quantum computer with enough stable qubits could derive the private key from a public key, allowing the attacker to forge signatures for any message.", - mathematicalExplanation: [ - "1. ECDSA security relies on the hardness of finding k where Q = kP (where P is a generator point and Q is a public key)", - "2. Shor's algorithm converts this to a hidden period finding problem", - "3. Quantum Fourier Transform can find this period efficiently", - "4. The algorithm completes in polynomial time instead of exponential time" - ], - quantumResourcesNeeded: { - logicalQubits: "Approximately 2n for n-bit security (512 qubits for 256-bit ECC)", - physicalQubits: "Millions, due to error correction requirements", - gateOperations: "Billions to trillions", - estimatedTimeframe: "Not feasible with current technology, but potentially achievable in the future" - } - }; -} - -module.exports = { - generateKeypair, - generateAddress, - sign, - verify, - recoverPublicKey, - getSecurityLevel, - getSignatureSize, - estimateQuantumBreakTime, - explainQuantumVulnerability -}; \ No newline at end of file diff --git a/cli-interface/lib/cryptography/lattice.js b/cli-interface/lib/cryptography/lattice.js deleted file mode 100644 index 1510927..0000000 --- a/cli-interface/lib/cryptography/lattice.js +++ /dev/null @@ -1,278 +0,0 @@ -const crypto = require('crypto'); - -/** - * Lattice-Based Cryptography Implementation - * - * This is a simplified simulation of a lattice-based cryptography scheme like NTRU or CRYSTALS-Dilithium. - * In a real implementation, you would use a proper library like: - * - liboqs (C library with Node.js bindings) - * - CRYSTALS-Dilithium implementation - * - * Lattice-based cryptography relies on the hardness of certain lattice problems, - * such as the Learning With Errors (LWE) problem or the Short Integer Solution (SIS) problem, - * which are believed to be secure against quantum computer attacks. - */ - -// Simulated parameters for lattice-based scheme -const PARAMS = { - n: 1024, // Lattice dimension - q: 8380417, // Modulus (typically a prime) - sigma: 3.0, // Standard deviation for error sampling - k: 4, // Number of vectors in public key - l: 4, // Number of hint vectors - d: 13, // Dropped bits in hint - gamma1: 131072, // Range for sampling - gamma2: 95232, // Range for challenge - tau: 39, // Number of +/- 1's in challenge - beta: 7095, // Rejection bound - omega: 80 // Maximum number of 1's in hint -}; - -/** - * Generate a keypair for lattice-based cryptography - * - * In real lattice-based schemes: - * - The private key would be a set of short vectors (often denoted as s1, s2) - * - The public key would be a matrix A and vector t = As1 + s2 - */ -function generateKeypair() { - // Generate a seed for deterministic key generation - const seed = crypto.randomBytes(32); - - // In a real implementation, we would: - // 1. Expand the seed into a random matrix A - // 2. Sample small secret vectors s1, s2 - // 3. Compute t = As1 + s2 (public key) - - // For simulation, we'll create dummy values - const privateMatrix = []; - for (let i = 0; i < PARAMS.k; i++) { - const row = []; - for (let j = 0; j < PARAMS.n; j++) { - // Generate small coefficients for private key - row.push(Math.floor(crypto.randomInt(-1, 2))); - } - privateMatrix.push(row); - } - - // Create some representation of the public key - const publicMatrix = []; - for (let i = 0; i < PARAMS.k; i++) { - const row = []; - for (let j = 0; j < PARAMS.n; j++) { - // Generate uniform random elements for public key - row.push(crypto.randomInt(0, PARAMS.q)); - } - publicMatrix.push(row); - } - - // Generate a deterministic address from the public components - const publicKeyBuffer = Buffer.from(JSON.stringify(publicMatrix)); - const addressHash = crypto.createHash('sha256').update(publicKeyBuffer).digest('hex'); - const address = 'lx' + addressHash.substring(0, 40); - - // For our simulation, serialize keys as strings - const privateKey = seed.toString('hex') + ':' + JSON.stringify(privateMatrix); - const publicKey = JSON.stringify(publicMatrix); - - return { - privateKey, - publicKey, - address - }; -} - -/** - * Sign a message using lattice-based signature scheme - * - * In real lattice-based schemes like Dilithium: - * 1. The message determines a challenge c (a sparse polynomial) - * 2. Generate a masking vector y - * 3. Compute w = Ay - * 4. Compute challenge c based on w and message - * 5. Compute z = y + c*s1 - * 6. Check if z is not too large and w - c*s2 doesn't reveal s1 - * 7. If checks pass, signature is (z, h), where h is a hint to help verify - */ -function sign(message, privateKey) { - // Parse private key - const [seedHex, privateMatrixJson] = privateKey.split(':'); - const privateMatrix = JSON.parse(privateMatrixJson); - - // In a real implementation, this would be complex lattice-based arithmetic - // For simulation, we'll create a structure that resembles a Dilithium signature - - // Generate a challenge vector based on message (sparse vector with {-1,0,1} entries) - const challenge = []; - const messageHash = crypto.createHash('sha256').update(message).digest(); - - for (let i = 0; i < PARAMS.n; i++) { - const val = messageHash[i % 32] % 3 - 1; // Maps to {-1, 0, 1} - challenge.push(val); - } - - // Generate a masking vector (normally distributed around 0 with standard deviation gamma1) - const maskingVector = []; - for (let i = 0; i < PARAMS.n; i++) { - // Simple approximation of normally distributed values - const sum = crypto.randomBytes(12).reduce((a, b) => a + b, 0) - 1530; - maskingVector.push(Math.floor((sum / 100) * PARAMS.gamma1)); - } - - // Compute the response vector z = y + c*s1 - const responseVector = []; - for (let i = 0; i < PARAMS.n; i++) { - let sum = maskingVector[i]; - for (let j = 0; j < PARAMS.k; j++) { - sum += challenge[j] * privateMatrix[j][i]; - } - responseVector.push(sum % PARAMS.q); - } - - // Generate hint vector (in real Dilithium, this depends on w - c*s2) - const hintVector = []; - for (let i = 0; i < PARAMS.n; i++) { - if (crypto.randomInt(0, 100) < 10) { // Approximately 10% of positions have hints - hintVector.push(i); - } - } - - // Combine components into a signature - const signature = { - challenge: challenge.slice(0, 32), // Only need to store the seed for the challenge - responseVector, - hintVector, - nonce: crypto.randomBytes(16).toString('hex') // Randomizer for signature - }; - - // For our CLI simulation, convert to string - return JSON.stringify(signature); -} - -/** - * Verify a lattice-based signature - * - * In real schemes like Dilithium: - * 1. Recompute the challenge c from message and hint - * 2. Check if z is small enough - * 3. Compute w' = Az - c*t using the public key - * 4. Check if w' is consistent with the hint - */ -function verify(message, signature, publicKey) { - try { - // Parse signature and public key - const sig = JSON.parse(signature); - const publicMatrix = JSON.parse(publicKey); - - // Regenerate the full challenge vector from the seed - const fullChallenge = []; - const messageHash = crypto.createHash('sha256').update(message).digest(); - - for (let i = 0; i < PARAMS.n; i++) { - const val = messageHash[i % 32] % 3 - 1; // Maps to {-1, 0, 1} - fullChallenge.push(val); - } - - // In a real implementation, we would: - // 1. Check if z is small enough (|z| < gamma1 - beta) - // 2. Compute w' = Az - c*t - // 3. Check if the hint is consistent with w' - - // For simulation, do some basic checks - - // Check 1: Response vector elements should be in a valid range - for (const val of sig.responseVector) { - if (val < -PARAMS.gamma1 || val > PARAMS.gamma1) { - return false; - } - } - - // Check 2: Hint vector should have a reasonable number of elements - if (sig.hintVector.length > PARAMS.omega) { - return false; - } - - // Check 3: Simulate verification computation (in reality, this would involve lattice operations) - let checkSum = 0; - for (let i = 0; i < PARAMS.k; i++) { - for (let j = 0; j < PARAMS.n; j++) { - checkSum = (checkSum + publicMatrix[i][j] * sig.responseVector[j]) % PARAMS.q; - } - } - - // In a real implementation, we would check if this checksum is consistent with the challenge and hint - // For simulation, we'll just check if it's a plausible value - return checkSum >= 0 && checkSum < PARAMS.q; - } catch (error) { - return false; - } -} - -/** - * Get address from a lattice-based public key - */ -function getAddressFromPublicKey(publicKey) { - const publicKeyBuffer = Buffer.from(publicKey); - const addressHash = crypto.createHash('sha256').update(publicKeyBuffer).digest('hex'); - return 'lx' + addressHash.substring(0, 40); -} - -/** - * Get the security level of the lattice-based scheme in bits - */ -function getSecurityLevel() { - // Security level depends on parameters - // Common levels are 128, 192, or 256 bits - return 256; // This is approximate for our parameter set -} - -/** - * Get the signature size in bytes - */ -function getSignatureSize() { - // In a real implementation, this would depend on the parameters - // For Dilithium, signature size is typically around 2-3 KB - return PARAMS.n * 4 + PARAMS.omega * 2 + 32; // Rough approximation -} - -/** - * Estimate the time needed to verify a signature - */ -function estimateVerificationTime() { - return { - milliseconds: 0.8, // Very rough estimate - operations: PARAMS.n * PARAMS.k // Number of multiplications - }; -} - -/** - * Provide mathematical explanation of the security - */ -function explainSecurity() { - return { - problem: "Module Learning With Errors (M-LWE)", - quantumResistance: "Secure against Shor's algorithm and known quantum attacks", - securityReduction: "Can be reduced to worst-case hardness of finding short vectors in lattices", - bestKnownAttack: "Lattice basis reduction (e.g., BKZ algorithm)", - estimatedBits: getSecurityLevel(), - performance: { - keyGeneration: "Fast (milliseconds)", - signing: "Fast (milliseconds)", - verification: "Fast (milliseconds)", - keySize: "~1.5 KB for public key", - signatureSize: "~2.5 KB" - } - }; -} - -module.exports = { - generateKeypair, - sign, - verify, - getAddressFromPublicKey, - getSecurityLevel, - getSignatureSize, - estimateVerificationTime, - explainSecurity, - PARAMS -}; \ No newline at end of file diff --git a/cli-interface/lib/cryptography/sphincs.js b/cli-interface/lib/cryptography/sphincs.js deleted file mode 100644 index ec497e5..0000000 --- a/cli-interface/lib/cryptography/sphincs.js +++ /dev/null @@ -1,194 +0,0 @@ -const crypto = require('crypto'); -const { v4: uuidv4 } = require('uuid'); - -/** - * SPHINCS+ Implementation - * - * This is a simplified simulation of SPHINCS+ for demonstration purposes. - * In a real implementation, you would use a proper SPHINCS+ library like: - * - sphincs (JavaScript implementation) - * - liboqs (C library with Node.js bindings) - * - * SPHINCS+ is a stateless hash-based signature scheme that is believed to be - * secure against quantum computer attacks. It's based on hash functions and - * doesn't rely on the hardness of factoring or discrete logarithm problems. - */ - -// Simulated parameters for SPHINCS+ -const PARAMS = { - n: 32, // Security parameter (32 bytes = 256 bits) - h: 66, // Total tree height - d: 22, // Number of layers - w: 16, // Winternitz parameter - digestSize: 32, // Output size of hash function (SHA-256) -}; - -/** - * Generates a key pair for SPHINCS+ - * - * In a real implementation, this would generate: - * - A seed for the private key (SK.seed) - * - A public seed (PK.seed) - * - A root node for the hash tree (PK.root) - */ -function generateKeypair() { - // Generate private key seed (a random 32-byte value) - const privateKeySeed = crypto.randomBytes(PARAMS.n).toString('hex'); - - // Derive public key components (in real SPHINCS+, this would involve building a Merkle tree) - const publicSeed = crypto.createHash('sha256').update('public-' + privateKeySeed).digest('hex'); - const rootNode = crypto.createHash('sha256').update('root-' + privateKeySeed).digest('hex'); - - // Create a deterministic address from the public components - const address = 'qx' + rootNode.substring(0, 40); - - // For this simulation, we'll store the private key as a simple string - // In reality, it would be a more complex structure - const privateKey = `${privateKeySeed}:${publicSeed}:${rootNode}`; - - return { - privateKey, - publicKey: { publicSeed, rootNode }, - address - }; -} - -/** - * Signs a message using SPHINCS+ - * - * In a real implementation, this would: - * 1. Select a leaf of the hash tree based on message - * 2. Generate a WOTS+ signature for the leaf - * 3. Provide authentication path to the root - */ -function sign(message, privateKey) { - // Parse private key components - const [privateKeySeed, publicSeed, rootNode] = privateKey.split(':'); - - // In a real implementation, this would be a complex SPHINCS+ signature - // For simulation, we'll create a structure that resembles SPHINCS+ signature format - - // Generate a random signature ID (in real SPHINCS+, this would be derived from the message) - const sigIndex = crypto.createHash('sha256').update(message + privateKeySeed).digest().readUInt32BE(0) % (2 ** PARAMS.h); - - // Create a simulated Winternitz One-Time Signature (WOTS+) - const wotsSignature = []; - for (let i = 0; i < PARAMS.n; i++) { - wotsSignature.push(crypto.createHash('sha256').update(`wots-${sigIndex}-${i}-${message}-${privateKeySeed}`).digest('hex')); - } - - // Create a simulated authentication path - const authPath = []; - for (let i = 0; i < PARAMS.h; i++) { - authPath.push(crypto.createHash('sha256').update(`auth-${sigIndex}-${i}-${privateKeySeed}`).digest('hex')); - } - - // Combine all components into a signature - const signature = { - sigIndex, - wotsSignature, - authPath, - publicSeed, - randomizer: crypto.randomBytes(PARAMS.n).toString('hex') // Randomizer for signature - }; - - // For our CLI simulation, convert to string (in reality, this would be a binary format) - return JSON.stringify(signature); -} - -/** - * Verifies a SPHINCS+ signature - * - * In a real implementation, this would: - * 1. Reconstruct the WOTS+ public key from the signature - * 2. Verify the authentication path to the root - * 3. Compare with the expected root value - */ -function verify(message, signature, publicKey) { - try { - // Parse signature and public key - const sig = JSON.parse(signature); - const { publicSeed, rootNode } = publicKey; - - // Check that public seed matches - if (sig.publicSeed !== publicSeed) { - return false; - } - - // Simulate verification process (in reality, this would be much more complex) - // Reconstruct WOTS+ public key - const wotsPubKey = []; - for (let i = 0; i < PARAMS.n; i++) { - wotsPubKey.push(crypto.createHash('sha256').update(`verify-wots-${sig.sigIndex}-${i}-${sig.wotsSignature[i]}`).digest('hex')); - } - - // Simulate authentication path verification - let node = crypto.createHash('sha256').update(wotsPubKey.join('')).digest('hex'); - - for (let i = 0; i < PARAMS.h; i++) { - if (sig.sigIndex & (1 << i)) { - node = crypto.createHash('sha256').update(sig.authPath[i] + node).digest('hex'); - } else { - node = crypto.createHash('sha256').update(node + sig.authPath[i]).digest('hex'); - } - } - - // Check if the computed root matches - return node === rootNode; - } catch (error) { - return false; - } -} - -/** - * Generates an address from a SPHINCS+ public key - */ -function getAddressFromPublicKey(publicKey) { - const { rootNode } = publicKey; - return 'qx' + rootNode.substring(0, 40); -} - -/** - * Get the mathematical security level of SPHINCS+ in bits - */ -function getSecurityLevel() { - // SPHINCS+ parameters can be configured for different security levels - // Common configurations are for 128, 192, or 256 bits of security - return PARAMS.n * 8; // 32 bytes * 8 = 256 bits -} - -/** - * Calculate the size of a SPHINCS+ signature in bytes - */ -function getSignatureSize() { - // In a real implementation, signature size depends on the parameters - // This is an approximation based on typical SPHINCS+ parameters - const wotsSize = PARAMS.n * PARAMS.n; // WOTS+ signature size - const authPathSize = PARAMS.n * PARAMS.h; // Authentication path size - const metadataSize = 16; // Additional metadata - - return wotsSize + authPathSize + metadataSize; -} - -/** - * Estimate the time needed to verify a SPHINCS+ signature - */ -function estimateVerificationTime() { - // This would depend on hardware and implementation - // Just a rough estimate based on typical performance - return { - milliseconds: PARAMS.h * 0.5, // Very rough estimate - hashFunctionCalls: PARAMS.h * 2 + PARAMS.w * PARAMS.n - }; -} - -module.exports = { - generateKeypair, - sign, - verify, - getAddressFromPublicKey, - getSecurityLevel, - getSignatureSize, - estimateVerificationTime, - PARAMS -}; \ No newline at end of file diff --git a/cli-interface/lib/mining.js b/cli-interface/lib/mining.js deleted file mode 100644 index e69de29..0000000 diff --git a/cli-interface/lib/transaction.js b/cli-interface/lib/transaction.js deleted file mode 100644 index 4dc6301..0000000 --- a/cli-interface/lib/transaction.js +++ /dev/null @@ -1,202 +0,0 @@ -const crypto = require('crypto'); - -/** - * Create a new transaction - * @param {string} fromAddress - Source address - * @param {string} toAddress - Destination address - * @param {number} amount - Amount to transfer - * @param {string} privateKey - Private key for signing - * @param {string} signatureType - Type of signature (classical, sphincs, lattice) - * @param {Function} signingFunction - Function to sign the transaction - * @returns {Object} - Signed transaction object - */ -async function createTransaction(fromAddress, toAddress, amount, privateKey, signatureType, signingFunction) { - // Create transaction data - const timestamp = Date.now(); - const txData = { - timestamp, - from: fromAddress, - to: toAddress, - amount, - nonce: crypto.randomBytes(4).toString('hex') - }; - - // Create string representation for signing - const txString = JSON.stringify(txData); - - // Sign the transaction - const signature = signingFunction(txString, privateKey); - - // Generate transaction hash - const txHash = crypto.createHash('sha256') - .update(txString + signature) - .digest('hex'); - - // Return complete transaction - return { - ...txData, - txHash, - signatureType, - signature - }; -} - -/** - * Validate a transaction - * @param {Object} transaction - Transaction object to validate - * @returns {boolean} - True if valid, false otherwise - */ -function validateTransaction(transaction) { - // Check required fields - const requiredFields = ['timestamp', 'from', 'to', 'amount', 'txHash', 'signatureType', 'signature']; - const hasAllFields = requiredFields.every(field => transaction.hasOwnProperty(field)); - - if (!hasAllFields) { - return false; - } - - // Check address formats - if (transaction.from !== 'GENESIS' && transaction.from !== 'MINING_REWARD') { - if (transaction.from.startsWith('0x')) { - if (transaction.from.length !== 42) return false; - } else if (transaction.from.startsWith('qx') || transaction.from.startsWith('lx')) { - if (transaction.from.length !== 42) return false; - } else { - return false; - } - } - - if (transaction.to.startsWith('0x')) { - if (transaction.to.length !== 42) return false; - } else if (transaction.to.startsWith('qx') || transaction.to.startsWith('lx')) { - if (transaction.to.length !== 42) return false; - } else { - return false; - } - - // Check signature type - if (!['classical', 'sphincs', 'lattice', 'GENESIS', 'SYSTEM'].includes(transaction.signatureType)) { - return false; - } - - // Skip signature verification for special transactions - if (transaction.from === 'GENESIS' || transaction.from === 'MINING_REWARD') { - return true; - } - - // For real transactions, we would verify the signature here - // But in this simulation, we'll assume all signatures are valid - return true; -} - -/** - * Format transaction for display - * @param {Object} transaction - Transaction to format - * @returns {Object} - Formatted transaction - */ -function formatTransaction(transaction) { - const { signatureType } = transaction; - let securityLevel; - - // Determine security level based on signature type - switch (signatureType) { - case 'classical': - securityLevel = 'Classical (vulnerable to quantum attacks)'; - break; - case 'sphincs': - securityLevel = 'Quantum-Resistant (SPHINCS+ hash-based)'; - break; - case 'lattice': - securityLevel = 'Quantum-Resistant (Lattice-based)'; - break; - case 'GENESIS': - securityLevel = 'GENESIS (system)'; - break; - case 'SYSTEM': - securityLevel = 'SYSTEM (mining reward)'; - break; - default: - securityLevel = 'Unknown'; - } - - return { - ...transaction, - formattedTimestamp: new Date(transaction.timestamp).toLocaleString(), - signatureSecurity: securityLevel, - amountFormatted: `${transaction.amount} tokens` - }; -} - -/** - * Calculate transaction fees - * @param {Object} transaction - Transaction to calculate fee for - * @returns {number} - Fee amount - */ -function calculateTransactionFee(transaction) { - // In this simulation, fees depend on the signature type - // Real-world fees might be based on transaction size or other factors - - switch (transaction.signatureType) { - case 'classical': - return 0.001; // Lowest fee for smallest signatures - case 'sphincs': - return 0.01; // Higher fee for larger SPHINCS+ signatures - case 'lattice': - return 0.005; // Medium fee for medium-sized lattice signatures - case 'GENESIS': - case 'SYSTEM': - return 0; // No fee for system transactions - default: - return 0.01; // Default fee - } -} - -/** - * Get the quantum security status of a transaction - * @param {Object} transaction - Transaction to analyze - * @returns {Object} - Security analysis - */ -function getQuantumSecurityStatus(transaction) { - switch (transaction.signatureType) { - case 'classical': - return { - isQuantumSecure: false, - securityLevel: 'Vulnerable', - algorithm: 'ECDSA', - attackVector: 'Vulnerable to Shor\'s algorithm', - recommendation: 'Migrate to quantum-resistant address' - }; - case 'sphincs': - return { - isQuantumSecure: true, - securityLevel: 'Secure', - algorithm: 'SPHINCS+ (hash-based)', - attackVector: 'Resistant to known quantum attacks', - recommendation: 'Maintain current security' - }; - case 'lattice': - return { - isQuantumSecure: true, - securityLevel: 'Secure', - algorithm: 'Lattice-based', - attackVector: 'Resistant to known quantum attacks', - recommendation: 'Maintain current security' - }; - default: - return { - isQuantumSecure: true, - securityLevel: 'System', - algorithm: 'N/A', - attackVector: 'N/A', - recommendation: 'N/A' - }; - } -} - -module.exports = { - createTransaction, - validateTransaction, - formatTransaction, - calculateTransactionFee, - getQuantumSecurityStatus -}; \ No newline at end of file diff --git a/cli-interface/lib/wallet.js b/cli-interface/lib/wallet.js deleted file mode 100644 index 1f8f6aa..0000000 --- a/cli-interface/lib/wallet.js +++ /dev/null @@ -1,351 +0,0 @@ -const crypto = require('crypto'); -const fs = require('fs'); -const path = require('path'); -const { promisify } = require('util'); -const writeFile = promisify(fs.writeFile); -const readFile = promisify(fs.readFile); -const mkdir = promisify(fs.mkdir); -const { v4: uuidv4 } = require('uuid'); -const { ec: EC } = require('elliptic'); -const ec = new EC('secp256k1'); - -// Import cryptography implementations -const classicalCrypto = require('./cryptography/classical'); -const sphincsCrypto = require('./cryptography/sphincs'); -const latticeCrypto = require('./cryptography/lattice'); -const { getBlockchain } = require('./blockchain'); -const { createTransaction } = require('./transaction'); - -class Wallet { - constructor(id, name, encryptedClassicalKey, encryptedSphincsPlusKey, encryptedLatticeKey) { - this.id = id; - this.name = name; - this.encryptedClassicalKey = encryptedClassicalKey; - this.encryptedSphincsPlusKey = encryptedSphincsPlusKey; - this.encryptedLatticeKey = encryptedLatticeKey; - this.classicalAddress = null; - this.sphincsPlusAddress = null; - this.latticeAddress = null; - this.dataDir = path.join(process.cwd(), 'data', 'wallets'); - } - - static async create(name, password) { - try { - const id = uuidv4(); - const dataDir = path.join(process.cwd(), 'data', 'wallets'); - - // Create wallets directory if it doesn't exist - await mkdir(dataDir, { recursive: true }); - - // Generate classical keypair (ECDSA) - const classicalKeypair = classicalCrypto.generateKeypair(); - const classicalPrivateKey = classicalKeypair.privateKey; - const classicalAddress = classicalKeypair.address; // 0x... - - // Generate SPHINCS+ keypair - const sphincsPlusKeypair = sphincsCrypto.generateKeypair(); - const sphincsPlusPrivateKey = sphincsPlusKeypair.privateKey; - const sphincsPlusAddress = sphincsPlusKeypair.address; // qx... - - // Generate lattice-based keypair - const latticeKeypair = latticeCrypto.generateKeypair(); - const latticePrivateKey = latticeKeypair.privateKey; - const latticeAddress = latticeKeypair.address; // lx... - - // Encrypt private keys with password - const encryptedClassicalKey = encryptPrivateKey(classicalPrivateKey, password); - const encryptedSphincsPlusKey = encryptPrivateKey(sphincsPlusPrivateKey, password); - const encryptedLatticeKey = encryptPrivateKey(latticePrivateKey, password); - - // Create wallet instance - const wallet = new Wallet( - id, - name, - encryptedClassicalKey, - encryptedSphincsPlusKey, - encryptedLatticeKey - ); - - wallet.classicalAddress = classicalAddress; - wallet.sphincsPlusAddress = sphincsPlusAddress; - wallet.latticeAddress = latticeAddress; - - // Save wallet to file - await wallet.save(); - - return { - id, - name, - classicalAddress, - sphincsPlusAddress, - latticeAddress - }; - } catch (error) { - console.error('Error creating wallet:', error); - throw error; - } - } - - static async load(id) { - try { - const dataDir = path.join(process.cwd(), 'data', 'wallets'); - const filePath = path.join(dataDir, `${id}.json`); - const data = await readFile(filePath, 'utf8'); - const walletData = JSON.parse(data); - - const wallet = new Wallet( - walletData.id, - walletData.name, - walletData.encryptedClassicalKey, - walletData.encryptedSphincsPlusKey, - walletData.encryptedLatticeKey - ); - - wallet.classicalAddress = walletData.classicalAddress; - wallet.sphincsPlusAddress = walletData.sphincsPlusAddress; - wallet.latticeAddress = walletData.latticeAddress; - - return wallet; - } catch (error) { - console.error(`Error loading wallet ${id}:`, error); - throw new Error(`Wallet not found or corrupted: ${id}`); - } - } - - static async listWallets() { - try { - const dataDir = path.join(process.cwd(), 'data', 'wallets'); - - // Create wallets directory if it doesn't exist - await mkdir(dataDir, { recursive: true }); - - const files = await promisify(fs.readdir)(dataDir); - const walletFiles = files.filter(file => file.endsWith('.json')); - - const wallets = []; - - for (const file of walletFiles) { - try { - const data = await readFile(path.join(dataDir, file), 'utf8'); - const walletData = JSON.parse(data); - - wallets.push({ - id: walletData.id, - name: walletData.name, - classicalAddress: walletData.classicalAddress, - sphincsPlusAddress: walletData.sphincsPlusAddress, - latticeAddress: walletData.latticeAddress - }); - } catch (error) { - console.error(`Error reading wallet file ${file}:`, error); - } - } - - return wallets; - } catch (error) { - console.error('Error listing wallets:', error); - throw error; - } - } - - async save() { - try { - const filePath = path.join(this.dataDir, `${this.id}.json`); - - // Create directory if it doesn't exist - await mkdir(this.dataDir, { recursive: true }); - - const data = JSON.stringify({ - id: this.id, - name: this.name, - encryptedClassicalKey: this.encryptedClassicalKey, - encryptedSphincsPlusKey: this.encryptedSphincsPlusKey, - encryptedLatticeKey: this.encryptedLatticeKey, - classicalAddress: this.classicalAddress, - sphincsPlusAddress: this.sphincsPlusAddress, - latticeAddress: this.latticeAddress - }, null, 2); - - await writeFile(filePath, data); - } catch (error) { - console.error(`Error saving wallet ${this.id}:`, error); - throw error; - } - } - - async getBalance() { - const blockchain = await getBlockchain(); - - const classicalBalance = await blockchain.getAddressBalance(this.classicalAddress); - const sphincsPlusBalance = await blockchain.getAddressBalance(this.sphincsPlusAddress); - const latticeBalance = await blockchain.getAddressBalance(this.latticeAddress); - - return { - classical: classicalBalance, - sphincsPlus: sphincsPlusBalance, - lattice: latticeBalance, - total: classicalBalance + sphincsPlusBalance + latticeBalance, - addresses: { - classical: this.classicalAddress, - sphincsPlus: this.sphincsPlusAddress, - lattice: this.latticeAddress - } - }; - } - - async getTransactionHistory() { - const blockchain = await getBlockchain(); - - const classicalHistory = blockchain.getTransactionHistory(this.classicalAddress); - const sphincsPlusHistory = blockchain.getTransactionHistory(this.sphincsPlusAddress); - const latticeHistory = blockchain.getTransactionHistory(this.latticeAddress); - - // Combine and sort by timestamp (newest first) - return [...classicalHistory, ...sphincsPlusHistory, ...latticeHistory] - .sort((a, b) => b.timestamp - a.timestamp); - } - - async createTransaction(toAddress, amount, type, password) { - try { - // Decode private key based on transaction type - let privateKey, fromAddress, signatureType, signer; - - switch (type) { - case 'classical': - privateKey = decryptPrivateKey(this.encryptedClassicalKey, password); - fromAddress = this.classicalAddress; - signatureType = 'classical'; - signer = classicalCrypto.sign; - break; - - case 'sphincs': - privateKey = decryptPrivateKey(this.encryptedSphincsPlusKey, password); - fromAddress = this.sphincsPlusAddress; - signatureType = 'sphincs'; - signer = sphincsCrypto.sign; - break; - - case 'lattice': - privateKey = decryptPrivateKey(this.encryptedLatticeKey, password); - fromAddress = this.latticeAddress; - signatureType = 'lattice'; - signer = latticeCrypto.sign; - break; - - default: - throw new Error(`Invalid signature type: ${type}`); - } - - // Check balance - const blockchain = await getBlockchain(); - const balance = await blockchain.getAddressBalance(fromAddress); - - if (balance < amount) { - throw new Error(`Insufficient balance in ${type} address. Available: ${balance}, Required: ${amount}`); - } - - // Create and sign transaction - const tx = await createTransaction(fromAddress, toAddress, amount, privateKey, signatureType, signer); - - // Add to blockchain - await blockchain.addTransaction(tx); - - return tx; - } catch (error) { - console.error('Error creating transaction:', error); - throw error; - } - } - - async migrateToQuantum(password, quantumType = 'sphincs') { - try { - // Check classical balance - const blockchain = await getBlockchain(); - const classicalBalance = await blockchain.getAddressBalance(this.classicalAddress); - - if (classicalBalance <= 0) { - throw new Error('No balance to migrate from classical address'); - } - - // Determine target quantum address - let toAddress; - if (quantumType === 'sphincs') { - toAddress = this.sphincsPlusAddress; - } else if (quantumType === 'lattice') { - toAddress = this.latticeAddress; - } else { - throw new Error(`Invalid quantum type: ${quantumType}`); - } - - // Create migration transaction - const privateKey = decryptPrivateKey(this.encryptedClassicalKey, password); - const tx = await createTransaction( - this.classicalAddress, - toAddress, - classicalBalance, - privateKey, - 'classical', - classicalCrypto.sign - ); - - - - - - await blockchain.addTransaction(tx); - - return { - transactionHash: tx.txHash, - from: this.classicalAddress, - to: toAddress, - amount: classicalBalance - }; - } catch (error) { - console.error('Error migrating to quantum address:', error); - throw error; - } - } -} - -// Helper functions for encryption/decryption -function encryptPrivateKey(privateKey, password) { - // Create a key from the password (using a proper key derivation) - const key = crypto.scryptSync(password, 'salt', 32); - // Generate a random initialization vector - const iv = crypto.randomBytes(16); - // Create cipher using the key and iv - const cipher = crypto.createCipheriv('aes-256-cbc', key, iv); - - let encrypted = cipher.update(privateKey, 'utf8', 'hex'); - encrypted += cipher.final('hex'); - - // Return both the IV and encrypted data - return iv.toString('hex') + ':' + encrypted; -} - -function decryptPrivateKey(encryptedKey, password) { - try { - const [ivHex, encryptedData] = encryptedKey.split(':'); - - // Convert IV from hex to Buffer - const iv = Buffer.from(ivHex, 'hex'); - - // Create key from password (using same method as encrypt) - const key = crypto.scryptSync(password, 'salt', 32); - - // Create decipher using the key and iv - const decipher = crypto.createDecipheriv('aes-256-cbc', key, iv); - - let decrypted = decipher.update(encryptedData, 'hex', 'utf8'); - decrypted += decipher.final('utf8'); - return decrypted; - } catch (error) { - throw new Error('Invalid password or corrupted data'); - } -} - -module.exports = { - Wallet, - encryptPrivateKey, - decryptPrivateKey -}; \ No newline at end of file diff --git a/cli-interface/package-lock.json b/cli-interface/package-lock.json deleted file mode 100644 index 04c5c02..0000000 --- a/cli-interface/package-lock.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "name": "quantum-chain", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "quantum-chain", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "commander": "^9.4.0", - "elliptic": "^6.5.4", - "figlet": "^1.5.2", - "inquirer": "^8.2.4", - "ora": "^5.4.1", - "uuid": "^8.3.2" - }, - "bin": { - "quantum-chain": "bin/quantum-chain.js" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "license": "MIT" - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT" - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "license": "MIT" - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "license": "ISC", - "engines": { - "node": ">= 10" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/figlet": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.1.tgz", - "integrity": "sha512-kEC3Sme+YvA8Hkibv0NR1oClGcWia0VB2fC1SlMy027cwe795Xx40Xiv/nw/iFAwQLupymWh+uhAAErn/7hwPg==", - "license": "MIT", - "bin": { - "figlet": "bin/index.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/inquirer": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", - "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^6.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "license": "ISC" - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "license": "MIT" - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - } - } -} diff --git a/cli-interface/package.json b/cli-interface/package.json deleted file mode 100644 index 6c84a43..0000000 --- a/cli-interface/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/package.json", - "name": "quantum-chain", - "version": "1.0.0", - "description": "Quantum-resistant blockchain implementation with attack simulation capabilities", - "main": "bin/quantum-chain.js", - "bin": { - "quantum-chain": "./bin/quantum-chain.js" - }, - "scripts": { - "start": "node bin/quantum-chain.js", - "test": "echo \"Error: no test specified\" && exit 1", - "wallet": "node bin/quantum-chain.js wallet", - "wallet:create": "node bin/quantum-chain.js wallet create", - "wallet:list": "node bin/quantum-chain.js wallet list", - "wallet:info": "node bin/quantum-chain.js wallet info", - "wallet:balance": "node bin/quantum-chain.js wallet balance", - "wallet:migrate": "node bin/quantum-chain.js wallet migrate", - "tx": "node bin/quantum-chain.js tx", - "tx:create": "node bin/quantum-chain.js tx create", - "tx:info": "node bin/quantum-chain.js tx info", - "chain": "node bin/quantum-chain.js chain", - "chain:status": "node bin/quantum-chain.js chain status", - "block": "node bin/quantum-chain.js block", - "block:info": "node bin/quantum-chain.js block info", - "mine": "node bin/quantum-chain.js mine", - "security": "node bin/quantum-chain.js security", - "security:metrics": "node bin/quantum-chain.js security metrics", - "attack": "node bin/quantum-chain.js attack", - "attack:analyze": "node bin/quantum-chain.js attack analyze", - "attack:simulate": "node bin/quantum-chain.js attack simulate", - "attack:report": "node bin/quantum-chain.js attack report" - }, - "keywords": [ - "blockchain", - "quantum", - "cryptography", - "post-quantum", - "SPHINCS+", - "lattice" - ], - "author": "", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "commander": "^9.4.0", - "elliptic": "^6.5.4", - "figlet": "^1.5.2", - "inquirer": "^8.2.4", - "ora": "^5.4.1", - "uuid": "^8.3.2" - } - } \ No newline at end of file diff --git a/cli-interface/utils/config.js b/cli-interface/utils/config.js deleted file mode 100644 index f24a250..0000000 --- a/cli-interface/utils/config.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Configuration settings for Quantum-Chain - */ - -const path = require('path'); -const fs = require('fs'); -const os = require('os'); - -// Default configuration -const defaultConfig = { - // Blockchain settings - blockchain: { - difficulty: 4, // Mining difficulty (number of leading zeros) - miningReward: 100, // Mining reward in tokens - blockTimeTarget: 60 * 5, // Target block time in seconds (5 minutes) - maxTransactionsPerBlock: 100, // Maximum transactions per block - }, - - // Cryptography settings - cryptography: { - // SPHINCS+ parameters - sphincs: { - securityLevel: 256, // Security level in bits - h: 66, // Total tree height - d: 22, // Number of layers - w: 16, // Winternitz parameter - }, - - // Lattice parameters - lattice: { - securityLevel: 256, // Security level in bits - n: 1024, // Lattice dimension - q: 8380417, // Modulus (typically a prime) - }, - - // Classical (ECDSA) parameters - classical: { - curve: 'secp256k1', // Elliptic curve - } - }, - - // Storage settings - storage: { - dataDir: path.join(process.cwd(), 'data'), - walletDir: path.join(process.cwd(), 'data', 'wallets'), - blockchainDir: path.join(process.cwd(), 'data', 'blockchain'), - }, - - // CLI settings - cli: { - colors: true, // Use colors in CLI output - debug: false, // Enable debug output - } -}; - -// User config location -const userConfigPath = path.join(os.homedir(), '.quantum-chain', 'config.json'); - -/** - * Load configuration - * Merges default config with user config if it exists - * @returns {Object} Merged configuration - */ -function loadConfig() { - let userConfig = {}; - - try { - if (fs.existsSync(userConfigPath)) { - const userConfigData = fs.readFileSync(userConfigPath, 'utf8'); - userConfig = JSON.parse(userConfigData); - } - } catch (error) { - console.warn(`Warning: Could not load user config from ${userConfigPath}. Using default settings.`); - } - - // Create a deep merge of default and user configs - return deepMerge(defaultConfig, userConfig); -} - -/** - * Deep merge two objects - * @param {Object} target - Target object - * @param {Object} source - Source object - * @returns {Object} Merged object - */ -function deepMerge(target, source) { - const result = { ...target }; - - for (const key in source) { - if (source[key] instanceof Object && key in target) { - result[key] = deepMerge(target[key], source[key]); - } else { - result[key] = source[key]; - } - } - - return result; -} - -/** - * Save user configuration - * @param {Object} config - Configuration to save - */ -function saveConfig(config) { - try { - // Create config directory if it doesn't exist - const configDir = path.dirname(userConfigPath); - if (!fs.existsSync(configDir)) { - fs.mkdirSync(configDir, { recursive: true }); - } - - // Save config - fs.writeFileSync(userConfigPath, JSON.stringify(config, null, 2), 'utf8'); - } catch (error) { - console.error(`Error saving user config: ${error.message}`); - } -} - -module.exports = { - loadConfig, - saveConfig, - defaultConfig -}; \ No newline at end of file diff --git a/cli-interface/utils/formatting.js b/cli-interface/utils/formatting.js deleted file mode 100644 index 5e08dbd..0000000 --- a/cli-interface/utils/formatting.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Formatting utilities for Quantum-Chain CLI - */ - -/** - * Format a timestamp to a human-readable date/time - * @param {number} timestamp - Unix timestamp (milliseconds) - * @returns {string} Formatted date/time string - */ -function formatDateTime(timestamp) { - const date = new Date(timestamp); - return date.toLocaleString(); - } - - /** - * Format a large number with commas - * @param {number} number - Number to format - * @returns {string} Formatted number with commas - */ - function formatNumber(number) { - return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); - } - - /** - * Format an address for display (truncate with ellipsis) - * @param {string} address - Address to format - * @param {number} length - Length to display from start (default: 10) - * @returns {string} Truncated address - */ - function formatAddress(address, length = 10) { - if (!address) return ''; - if (address.length <= length * 2) return address; - - return `${address.substring(0, length)}...${address.substring(address.length - 4)}`; - } - - /** - * Format a hash for display (truncate with ellipsis) - * @param {string} hash - Hash to format - * @param {number} length - Length to display from start (default: 10) - * @returns {string} Truncated hash - */ - function formatHash(hash, length = 10) { - if (!hash) return ''; - if (hash.length <= length * 2) return hash; - - return `${hash.substring(0, length)}...`; - } - - /** - * Format an amount with token name - * @param {number} amount - Amount to format - * @param {string} tokenName - Token name (default: "tokens") - * @returns {string} Formatted amount with token name - */ - function formatAmount(amount, tokenName = 'tokens') { - return `${parseFloat(amount).toFixed(2)} ${tokenName}`; - } - - /** - * Format a security risk level - * @param {number} percentage - Risk percentage - * @returns {Object} Risk info with level and description - */ - function formatRiskLevel(percentage) { - if (percentage > 50) { - return { - level: 'HIGH', - description: 'Immediate action recommended', - color: 'red' - }; - } else if (percentage > 20) { - return { - level: 'MEDIUM', - description: 'Action recommended', - color: 'yellow' - }; - } else { - return { - level: 'LOW', - description: 'Continue monitoring', - color: 'green' - }; - } - } - - /** - * Format time duration in seconds to human-readable format - * @param {number} seconds - Duration in seconds - * @returns {string} Formatted duration - */ - function formatDuration(seconds) { - if (seconds < 60) { - return `${seconds.toFixed(1)} seconds`; - } else if (seconds < 3600) { - return `${(seconds / 60).toFixed(1)} minutes`; - } else if (seconds < 86400) { - return `${(seconds / 3600).toFixed(1)} hours`; - } else { - return `${(seconds / 86400).toFixed(1)} days`; - } - } - - /** - * Format a list of items for display - * @param {Array} items - Array of items to format - * @param {Function} formatter - Function to format each item - * @param {number} maxItems - Maximum number of items to display - * @returns {string} Formatted list - */ - function formatList(items, formatter = item => item, maxItems = 5) { - if (!items || items.length === 0) { - return 'None'; - } - - const displayItems = items.slice(0, maxItems); - let result = displayItems.map(formatter).join('\n'); - - if (items.length > maxItems) { - result += `\n... and ${items.length - maxItems} more`; - } - - return result; - } - - /** - * Format a percentage - * @param {number} value - Value to format as percentage - * @param {number} decimals - Number of decimal places - * @returns {string} Formatted percentage - */ - function formatPercentage(value, decimals = 1) { - return `${value.toFixed(decimals)}%`; - } - - /** - * Format a signature type with security description - * @param {string} type - Signature type (classical, sphincs, lattice) - * @returns {Object} Formatted info with description and security level - */ - function formatSignatureType(type) { - switch (type) { - case 'classical': - return { - name: 'ECDSA (secp256k1)', - description: 'Classical cryptography', - security: 'Vulnerable to quantum attacks', - color: 'yellow' - }; - case 'sphincs': - return { - name: 'SPHINCS+ (hash-based)', - description: 'Post-quantum cryptography', - security: 'Resistant to quantum attacks', - color: 'green' - }; - case 'lattice': - return { - name: 'Lattice-based', - description: 'Post-quantum cryptography', - security: 'Resistant to quantum attacks', - color: 'green' - }; - default: - return { - name: type, - description: 'Unknown', - security: 'Unknown', - color: 'white' - }; - } - } - - module.exports = { - formatDateTime, - formatNumber, - formatAddress, - formatHash, - formatAmount, - formatRiskLevel, - formatDuration, - formatList, - formatPercentage, - formatSignatureType - }; \ No newline at end of file diff --git a/cli-interface/utils/storage.js b/cli-interface/utils/storage.js deleted file mode 100644 index 1984c73..0000000 --- a/cli-interface/utils/storage.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Storage utilities for Quantum-Chain - */ - -const fs = require('fs'); -const path = require('path'); -const { promisify } = require('util'); -const { loadConfig } = require('./config'); - -// Promisify filesystem functions -const readFile = promisify(fs.readFile); -const writeFile = promisify(fs.writeFile); -const mkdir = promisify(fs.mkdir); -const readdir = promisify(fs.readdir); -const stat = promisify(fs.stat); - -// Get config -const config = loadConfig(); - -/** - * Ensure a directory exists - * @param {string} dir - Directory path - * @returns {Promise} - */ -async function ensureDir(dir) { - try { - await mkdir(dir, { recursive: true }); - } catch (error) { - if (error.code !== 'EEXIST') { - throw error; - } - } -} - -/** - * Initialize storage directories - * @returns {Promise} - */ -async function initStorage() { - try { - // Create data directories - await ensureDir(config.storage.dataDir); - await ensureDir(config.storage.walletDir); - await ensureDir(config.storage.blockchainDir); - - console.log('Storage directories initialized'); - } catch (error) { - console.error(`Error initializing storage: ${error.message}`); - throw error; - } -} - -/** - * Save data to a JSON file - * @param {string} filepath - Path to file - * @param {Object} data - Data to save - * @returns {Promise} - */ -async function saveJSON(filepath, data) { - try { - // Ensure parent directory exists - await ensureDir(path.dirname(filepath)); - - // Write data - const jsonData = JSON.stringify(data, null, 2); - await writeFile(filepath, jsonData, 'utf8'); - } catch (error) { - console.error(`Error saving data to ${filepath}: ${error.message}`); - throw error; - } -} - -/** - * Load data from a JSON file - * @param {string} filepath - Path to file - * @param {Object} defaultData - Default data if file doesn't exist - * @returns {Promise} Loaded data - */ -async function loadJSON(filepath, defaultData = null) { - try { - // Check if file exists - try { - await stat(filepath); - } catch (error) { - if (error.code === 'ENOENT' && defaultData !== null) { - return defaultData; // Return default data if file doesn't exist - } - throw error; - } - - // Read and parse data - const data = await readFile(filepath, 'utf8'); - return JSON.parse(data); - } catch (error) { - console.error(`Error loading data from ${filepath}: ${error.message}`); - throw error; - } -} - -/** - * List files in a directory - * @param {string} dir - Directory path - * @param {string} extension - Filter by file extension (optional) - * @returns {Promise} Array of file paths - */ -async function listFiles(dir, extension = null) { - try { - // Ensure directory exists - await ensureDir(dir); - - // Read directory - const files = await readdir(dir); - - // Filter by extension if provided - if (extension) { - return files - .filter(file => file.endsWith(extension)) - .map(file => path.join(dir, file)); - } - - return files.map(file => path.join(dir, file)); - } catch (error) { - console.error(`Error listing files in ${dir}: ${error.message}`); - throw error; - } -} - -module.exports = { - initStorage, - saveJSON, - loadJSON, - listFiles, - ensureDir -}; \ No newline at end of file