{"_id":"@eliza-dot-aes/ed25519-aes","_rev":"5-9004d79189baab8c091dbb25500038f9","name":"@eliza-dot-aes/ed25519-aes","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@eliza-dot-aes/ed25519-aes","version":"1.0.0","keywords":["crypto","aes","ed25519","x25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/ed25519-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":"415fd6dda844d23ccccf11a159a151eaf62ffaff","tarball":"https://registry.npmjs.org/@eliza-dot-aes/ed25519-aes/-/ed25519-aes-1.0.0.tgz","fileCount":10,"integrity":"sha512-4gpOJ2lYHPV97iSOdbAwfwPCxddTWiGMCU0jfcv8Nwu1KAp8MRb9pSGvBnceRSbdOzOqvgSBmE89L8V/4KrfkA==","signatures":[{"sig":"MEUCIHLy9crUy15PLowGoKl/RhxG8xJzgLHpMemtTzJHN31FAiEA8SAEb5CrngPWcv27umXlMrdLl4XV14v0RQ3WrGP/0oI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24724},"main":"lib/index.js","_from":"file:eliza-dot-aes-ed25519-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/74ab2283d30522c7955e60e887fd7574/eliza-dot-aes-ed25519-aes-1.0.0.tgz","_integrity":"sha512-4gpOJ2lYHPV97iSOdbAwfwPCxddTWiGMCU0jfcv8Nwu1KAp8MRb9pSGvBnceRSbdOzOqvgSBmE89L8V/4KrfkA==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with Ed25519/X25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@noble/curves":"^1.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/ed25519-aes_1.0.0_1761467911277_0.6038666699845825","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@eliza-dot-aes/ed25519-aes","version":"1.0.1","keywords":["crypto","aes","ed25519","x25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/ed25519-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":"9396f89e46f8bf7224912f6b64edcf86cad9fd56","tarball":"https://registry.npmjs.org/@eliza-dot-aes/ed25519-aes/-/ed25519-aes-1.0.1.tgz","fileCount":9,"integrity":"sha512-wzLr20OWZxMrIcZttBTXZ/afnRS8yvuaZRchxPO/Qqln5v5ZzAUxoRnxtwsOJTmzf8UrdVEz6z9gqt44BemoUw==","signatures":[{"sig":"MEUCIQDjDkd5vLNA8/ooKmK324DPV6rfWWx63F7J52NvEPkaGQIgSMke6K+OvmO+TFUqqXS7v73kpGFh4mD3+Wz6W+UpsM8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25977},"main":"lib/index.js","_from":"file:eliza-dot-aes-ed25519-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/90cc4abbbe27ca1d241b6663e54a32db/eliza-dot-aes-ed25519-aes-1.0.1.tgz","_integrity":"sha512-wzLr20OWZxMrIcZttBTXZ/afnRS8yvuaZRchxPO/Qqln5v5ZzAUxoRnxtwsOJTmzf8UrdVEz6z9gqt44BemoUw==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with Ed25519/X25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@noble/curves":"^1.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/ed25519-aes_1.0.1_1761476016822_0.7723765803286085","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@eliza-dot-aes/ed25519-aes","version":"1.0.2","keywords":["crypto","aes","ed25519","x25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/ed25519-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":"00160e4bb642bac69814b75362bceee845679c14","tarball":"https://registry.npmjs.org/@eliza-dot-aes/ed25519-aes/-/ed25519-aes-1.0.2.tgz","fileCount":6,"integrity":"sha512-NAzyzEoY6pl5Xe98zHmRXqMwRUCz0IzCE7FQsuMoQn5dnRfXd+SCv064sV3l+aNHficzuSGVqUr15PTT73gYFA==","signatures":[{"sig":"MEUCIQDPu8qsYnos5WGa+x5VDLlcXLw1wxu+dySQD4m+29EDqQIgbrkx3/PieHIqbLHwvLDtDEP49jD91TmD9XicVsZZe5c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18728},"main":"lib/index.js","_from":"file:eliza-dot-aes-ed25519-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/778fe5d6137922d1b45bcd6b01905ec7/eliza-dot-aes-ed25519-aes-1.0.2.tgz","_integrity":"sha512-NAzyzEoY6pl5Xe98zHmRXqMwRUCz0IzCE7FQsuMoQn5dnRfXd+SCv064sV3l+aNHficzuSGVqUr15PTT73gYFA==","repository":{"url":"git+https://github.com/weimeme/eliza-dot-aes.git","type":"git"},"_npmVersion":"10.9.3","description":"AES encryption with Ed25519/X25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@noble/curves":"^1.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/ed25519-aes_1.0.2_1761478978237_0.14043960688438828","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@eliza-dot-aes/ed25519-aes","version":"1.0.3","keywords":["crypto","aes","ed25519","x25519","encryption"],"author":{"name":"weimeme"},"license":"Apache-2.0","_id":"@eliza-dot-aes/ed25519-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":"a894f30d4efe3f2dee74b9f7b1c01a79e3ff56f0","tarball":"https://registry.npmjs.org/@eliza-dot-aes/ed25519-aes/-/ed25519-aes-1.0.3.tgz","fileCount":3,"integrity":"sha512-E54jEbCGreoypd3wvpWPcI3v3t7b4knek9NiOmD8t5puzHCTTvEFZxYqgwtip7AVbg3/u28j1yiCDqOkBigbJQ==","signatures":[{"sig":"MEUCIQDz6vRWuieh/HLZTkJl3TdbAwyiWpjsfQl8kRSC7IMvAQIgEONkKccYBftW23CnNK12gkROFZvRfSm7DSMiGPqtMBw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5517},"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 Ed25519/X25519 cryptographic backend","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@noble/curves":"^1.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/ed25519-aes_1.0.3_1762505815756_0.36543231352000416","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@eliza-dot-aes/ed25519-aes","version":"1.0.4","description":"AES encryption with Ed25519/X25519 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","ed25519","x25519","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","@noble/curves":"^1.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/ed25519-aes@1.0.4","gitHead":"57c0be6fde7c4df5933f74a78c75170346e37659","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-x7EdEBnGECHj3aEVIRwosUWTjikBbHepm7CIEm1KLMv58b/esft7EICke64WUHhNXtvn0azqKZy5ZU85s5yC2w==","shasum":"a8f8d822cc1acf625e6783f9d281adf4d1a64c7c","tarball":"https://registry.npmjs.org/@eliza-dot-aes/ed25519-aes/-/ed25519-aes-1.0.4.tgz","fileCount":7,"unpackedSize":9077,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICz4Qph5gzUJkEBVY56DGdMmiraPF77oojPIrpSjWg7MAiBU0cvEVC0CLocPDTM6WclwMDDNQ7HfO6SSsDcNrMZyBQ=="}]},"_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/ed25519-aes_1.0.4_1762509567282_0.7296792364927838"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-26T08:38:31.170Z","modified":"2025-11-07T09:59:27.642Z","1.0.0":"2025-10-26T08:38:31.499Z","1.0.1":"2025-10-26T10:53:37.007Z","1.0.2":"2025-10-26T11:42:58.443Z","1.0.3":"2025-11-07T08:56:55.945Z","1.0.4":"2025-11-07T09:59:27.469Z"},"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","ed25519","x25519","encryption"],"repository":{"type":"git","url":"git+https://github.com/ChainSupport/eliza-dot-aes.git"},"description":"AES encryption with Ed25519/X25519 cryptographic backend","maintainers":[{"name":"weimeme","email":"weimeme067@gmail.com"}],"readme":"# @eliza-dot-aes/ed25519-aes\n\nAES encryption implementation using Ed25519/X25519 for key exchange.\n\n## Features\n\n- Ed25519 key generation with X25519 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/ed25519-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 { ED25519AES } from '@eliza-dot-aes/ed25519-aes';\n\nasync function main() {\n    // Initialize Alice and Bob with their private keys\n    const alice = await ED25519AES.build(\n        \"0x9d61b19deffd5020afb5b1a7877f2e1e0a4f5c5e0a4f5c5e0a4f5c5e0a4f5c5e\"\n    );\n    const bob = await ED25519AES.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### ED25519AES\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 Ed25519 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## Technical Details\n\n1. Key Generation:\n   - Uses Ed25519 for initial key generation\n   - Converts Ed25519 keys to X25519 format for Diffie-Hellman\n   - Public keys are automatically converted to Montgomery form\n\n2. Key Exchange:\n   - Uses X25519 for Diffie-Hellman key exchange\n   - Automatically handles conversion between Ed25519 and X25519 formats\n   - Generates shared secrets using Montgomery ladder\n\n## Security Features\n\n- Uses Ed25519/X25519 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- Automatic key format conversion\n\n## License\n\nApache License 2.0\n","readmeFilename":"README.md"}