{"_id":"@eliza-dot-aes/sr25519-aes","_rev":"6-461ed3b4776a0719a1b2584d290a474c","name":"@eliza-dot-aes/sr25519-aes","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.0","keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/sr25519-aes@1.0.0","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"homepage":"https://github.com/weimeme/eliza-dot-aes#readme","bugs":{"url":"https://github.com/weimeme/eliza-dot-aes/issues"},"dist":{"shasum":"7d6f8c0aeef3e15a08fedf06657c67496f2d6eeb","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.0.tgz","fileCount":6,"integrity":"sha512-NVRFgls27np0NbMl0P6f+Z24GRbpg+ahWJKW44dPr5RmHyYR58eKmLs4nX1EY7vRusXRjrkI1HS77oVYL4ByvA==","signatures":[{"sig":"MEQCIAKhoza9+YrdhDXBfYkzhQKZiJjFqPo7J9ArXjsrxAuRAiAEYZhMy69YaK+BXqShVtnYXlsm9iQ3ZTdP6Qx5nmTCcg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19028},"main":"lib/index.js","_from":"file:eliza-dot-aes-sr25519-aes-1.0.0.tgz","types":"lib/index.d.ts","scripts":{"test":"vitest run","build":"tsc","clean":"rimraf lib","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"_resolved":"/private/var/folders/3m/smd11mdj437cp8hygdkk7d6h0000gn/T/07834d15f8328586ac09984615bca115/eliza-dot-aes-sr25519-aes-1.0.0.tgz","_integrity":"sha512-NVRFgls27np0NbMl0P6f+Z24GRbpg+ahWJKW44dPr5RmHyYR58eKmLs4nX1EY7vRusXRjrkI1HS77oVYL4ByvA==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with SR25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/sr25519":"^0.3.0","@eliza-dot-aes/common":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@vitest/coverage-v8":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr25519-aes_1.0.0_1761467894962_0.5248290003899538","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.1","keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/sr25519-aes@1.0.1","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"homepage":"https://github.com/weimeme/eliza-dot-aes#readme","bugs":{"url":"https://github.com/weimeme/eliza-dot-aes/issues"},"dist":{"shasum":"aa8b57957f84acef6ba8dd9bee8c53ab3dfe2d2f","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.1.tgz","fileCount":9,"integrity":"sha512-A5i3Z+qaWrWj3RWDgitHvGOFUTz3QhkCWq/Q/k1sHj5jgL0b23CZqAbbsjuswz/SJCLwNwWLIIRQMgBC86LjVg==","signatures":[{"sig":"MEUCIQDCLcuktVhRD66PWmozpfFaorbeLSz5kopAYoGBHmSmKQIgTXmWmwq4zpN5nqGr6ThbAETeXJI4mDS3n2ovhNxg0DM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25620},"main":"lib/index.js","_from":"file:eliza-dot-aes-sr25519-aes-1.0.1.tgz","types":"lib/index.d.ts","scripts":{"test":"vitest run","build":"tsc","clean":"rimraf lib","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"_resolved":"/private/var/folders/3m/smd11mdj437cp8hygdkk7d6h0000gn/T/9d4c61fd3df077259bfe6d5f0f939355/eliza-dot-aes-sr25519-aes-1.0.1.tgz","_integrity":"sha512-A5i3Z+qaWrWj3RWDgitHvGOFUTz3QhkCWq/Q/k1sHj5jgL0b23CZqAbbsjuswz/SJCLwNwWLIIRQMgBC86LjVg==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with SR25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/sr25519":"^0.3.0","@eliza-dot-aes/common":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@vitest/coverage-v8":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr25519-aes_1.0.1_1761476028787_0.7389126977138372","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.2","keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/sr25519-aes@1.0.2","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"homepage":"https://github.com/weimeme/eliza-dot-aes#readme","bugs":{"url":"https://github.com/weimeme/eliza-dot-aes/issues"},"dist":{"shasum":"91760f9ec81355ff937ea80d14064ae69e99ed96","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.2.tgz","fileCount":6,"integrity":"sha512-4DqhZ8InkDHPADdVEy1VVXC81pyD2eeGTRUSP9qoQ62q1+alITMf/o0slmzzmusuTvMRSBOp//R+7Sf1/5gSsQ==","signatures":[{"sig":"MEYCIQD4mxZ469u6rzU9YOdC3sNVvzfu2AR3iFICqTCr4QmjggIhANXtww7GAYga1Ny3aNawW+v8xEN/Wi6fYGxlJRTxw0GG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19166},"main":"lib/index.js","_from":"file:eliza-dot-aes-sr25519-aes-1.0.2.tgz","types":"lib/index.d.ts","scripts":{"test":"vitest run","build":"tsc","clean":"rimraf lib","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"_resolved":"/private/var/folders/3m/smd11mdj437cp8hygdkk7d6h0000gn/T/85646a83440f3153b5d31e0a03ef7fe2/eliza-dot-aes-sr25519-aes-1.0.2.tgz","_integrity":"sha512-4DqhZ8InkDHPADdVEy1VVXC81pyD2eeGTRUSP9qoQ62q1+alITMf/o0slmzzmusuTvMRSBOp//R+7Sf1/5gSsQ==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with SR25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/sr25519":"^0.3.0","@eliza-dot-aes/common":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@vitest/coverage-v8":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr25519-aes_1.0.2_1761478995536_0.8255665077388077","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.3","keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/sr25519-aes@1.0.3","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"homepage":"https://github.com/ChainSupport/eliza-dot-aes#readme","bugs":{"url":"https://github.com/ChainSupport/eliza-dot-aes/issues"},"dist":{"shasum":"3d1204529b8139ade1ec89967f6d5ea2d2ebf01e","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.3.tgz","fileCount":3,"integrity":"sha512-DLBXzdQyc7l0YXuG1bIw8qUKNWANUXOpvEC76aXWiFUHATkzCiyVqAi4H5TdQHjAFRtlWJlNrVEZ+qNJlj1efQ==","signatures":[{"sig":"MEUCIG+GrPg6ssX58sSWHLTAol96TOAIHnUh4NXHq7R1LkvvAiEA46MnSQqNXaXoySpHF4BRHfOzO2Pl5QaXi8RmWWBthf0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4886},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"29bb7db386f2096df83ae3f3006658d2dfe378c2","scripts":{"test":"vitest run","build":"tsc","clean":"rimraf lib","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"repository":{"url":"git+https://github.com/ChainSupport/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with SR25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/sr25519":"^0.3.0","@eliza-dot-aes/common":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@vitest/coverage-v8":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr25519-aes_1.0.3_1762505831256_0.37415557527789134","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.4","keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/sr25519-aes@1.0.4","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"homepage":"https://github.com/ChainSupport/eliza-dot-aes#readme","bugs":{"url":"https://github.com/ChainSupport/eliza-dot-aes/issues"},"dist":{"shasum":"20545287250ab7404e420e266c7c1f3c64e853b3","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.4.tgz","fileCount":3,"integrity":"sha512-4vgbvvZgDWwBXuv8D+CGm7uDo8M/Xr47ufaBvqy3UJSNCCTpon8nhWoxQHrSmiVmdvtLHhhCfFwuqTg8iuowfA==","signatures":[{"sig":"MEQCIFDg++DfS0AJL41UowZa1q3C2aHX+7aAmLwponhuzC5aAiAIhDgwjqGNiUQP14rlA3KknyDMjosl0EoQl/5ZFaryKw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4886},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"f447442b00fa8e6307d0db33e7c0848eaa2c6fa0","scripts":{"test":"vitest run","build":"tsc","clean":"rimraf lib","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"repository":{"url":"git+https://github.com/ChainSupport/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with SR25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/sr25519":"^0.3.0","@eliza-dot-aes/common":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@vitest/coverage-v8":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr25519-aes_1.0.4_1762508917298_0.8074062285432888","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@eliza-dot-aes/sr25519-aes","version":"1.0.5","description":"AES encryption with SR25519 cryptographic backend","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","clean":"rimraf lib","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run clean && pnpm run build"},"publishConfig":{"access":"public"},"keywords":["crypto","aes","sr25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/ChainSupport/eliza-dot-aes.git"},"dependencies":{"@eliza-dot-aes/common":"^1.0.0","@scure/sr25519":"^0.3.0"},"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.0.0","vitest":"^1.0.0","@vitest/coverage-v8":"^1.0.0"},"_id":"@eliza-dot-aes/sr25519-aes@1.0.5","gitHead":"c17aeb128964e0ad3a27d7899467c08c7c5d228e","bugs":{"url":"https://github.com/ChainSupport/eliza-dot-aes/issues"},"homepage":"https://github.com/ChainSupport/eliza-dot-aes#readme","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-g+EZ8Pl7ygN4hXVGb73rz7fZ6AlHtRWK8O9fQoYJVZ/+UAkGyZ0GPQdUJgNrq/2qypXaRtyRIOFZp9dz0AJzZw==","shasum":"7e4c4d6c6ca7792fc6ed80b865737c2cf1036ace","tarball":"https://registry.npmjs.org/@eliza-dot-aes/sr25519-aes/-/sr25519-aes-1.0.5.tgz","fileCount":7,"unpackedSize":9519,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFZacNToTSMWgldrQCRjM9XtNvSYzpZXlEk+Cu74GmYlAiEAy1olbss6T69h9ZW6LKFtZGwma8iUJR2s4xQ/+8HOdk0="}]},"_npmUser":{"name":"weimeme","email":"weimeme067@gmail.com"},"directories":{},"maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sr25519-aes_1.0.5_1762509379993_0.5022803103905762"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-26T08:38:14.906Z","modified":"2025-11-07T09:56:20.360Z","1.0.0":"2025-10-26T08:38:15.176Z","1.0.1":"2025-10-26T10:53:48.975Z","1.0.2":"2025-10-26T11:43:15.732Z","1.0.3":"2025-11-07T08:57:11.441Z","1.0.4":"2025-11-07T09:48:37.474Z","1.0.5":"2025-11-07T09:56:20.177Z"},"bugs":{"url":"https://github.com/ChainSupport/eliza-dot-aes/issues"},"author":{"name":"weimeme"},"license":"Apache-2.0","homepage":"https://github.com/ChainSupport/eliza-dot-aes#readme","keywords":["crypto","aes","sr25519","encryption"],"repository":{"type":"git","url":"git+https://github.com/ChainSupport/eliza-dot-aes.git"},"description":"AES encryption with SR25519 cryptographic backend","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"readme":"\n# @eliza-dot-aes/sr25519-aes\n\nAES encryption implementation using SR25519 for key exchange.\n\n## Features\n\n- SR25519-based key exchange\n- AES-CBC encryption with HMAC-SHA512\n- Secure message padding and random prefix generation\n- TypeScript support with full type definitions\n\n## Installation\n\n```bash\npnpm add @eliza-dot-aes/sr25519-aes\n```\n\n## Usage\n\nHere's a complete example showing how to encrypt and decrypt messages between two parties:\n\n```typescript\nimport { SR25519AES } from '@eliza-dot-aes/sr25519-aes';\n\nasync function main() {\n    // Initialize Alice and Bob with their private keys\n    const alice = await SR25519AES.build(\n        \"0x9d61b19deffd5020afb5b1a7877f2e1e0a4f5c5e0a4f5c5e0a4f5c5e0a4f5c5e\"\n    );\n    const bob = await SR25519AES.build(\n        \"0x9d61b19deffd5020afb5b1a7877f2e1e0a4f5c5e0a4f5c5e0a4f5c5e0a4f5c5d\"\n    );\n\n    // Wait for initialization (key generation)\n    // await new Promise(resolve => setTimeout(resolve, 100));\n\n    // Alice encrypts a message for Bob\n    const message = \"Hello Bob! This is a secret message from Alice.\";\n    const encryptedMessage = await alice.encryptMessage(message, bob.publicKey);\n    console.log(\"Encrypted:\", encryptedMessage);\n\n    // Bob decrypts Alice's message\n    const decryptedMessage = await bob.decryptMessage(encryptedMessage);\n    console.log(\"Decrypted:\", decryptedMessage);\n\n    // Bob sends a reply to Alice\n    const reply = \"Hi Alice! Got your message, here's my secret reply.\";\n    const encryptedReply = await bob.encryptMessage(reply, alice.publicKey);\n    console.log(\"Encrypted Reply:\", encryptedReply);\n\n    // Alice decrypts Bob's reply\n    const decryptedReply = await alice.decryptMessage(encryptedReply);\n    console.log(\"Decrypted Reply:\", decryptedReply);\n}\n\nmain().catch(console.error);\n```\n\n## API\n\n### SR25519AES\n\nMain class for handling encrypted message operations.\n\n#### Constructor\n\n```typescript\nconstructor(seedOrprivateKey: string)\n```\n\n- `seedOrprivateKey`: Hexadecimal string of seed for SR25519 key generation\n\n#### Methods\n\n```typescript\n// Encrypt a message\nasync encryptMessage(message: string, toPublicKey: Uint8Array): Promise<string>\n\n// Decrypt a message\nasync decryptMessage(message: string): Promise<string>\n```\n\n## Security Features\n\n- Uses SR25519 for secure key exchange\n- AES-256-CBC for symmetric encryption\n- HMAC-SHA512 for message authentication\n- Random padding for message length obfuscation\n- Secure key derivation from shared secrets\n\n## License\n\nApache License 2.0\n","readmeFilename":"README.md"}