{"_id":"@ars9/kalyna","name":"@ars9/kalyna","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.4":{"name":"@ars9/kalyna","version":"0.1.4","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"li0ard"},"repository":{"type":"git","url":"git+https://github.com/ars9/kalyna.git"},"bugs":{"url":"https://github.com/ars9/kalyna/issues"},"homepage":"https://github.com/ars9/kalyna#readme","description":"CommonJS build of @li0ard/kalyna - Kalyna (DSTU 7624:2014) cipher implementation in pure TypeScript","license":"MIT","scripts":{"build":"rm -rf dist/ && tsc --project tsconfig.build.json","docs":"typedoc --options .config/typedoc/config.cjs"},"devDependencies":{"@types/bun":"latest","typedoc":"^0.28.9"},"peerDependencies":{"typescript":"^5.0.0"},"dependencies":{"@ars9/gost3413":"^0.1.6"},"publishConfig":{"access":"public"},"keywords":["dstu","crypto","kalyna","dstu7624"],"gitHead":"39424ff62557180b84f3ebe2e496cee2a4987e4b","_id":"@ars9/kalyna@0.1.4","_nodeVersion":"22.7.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-qzNOMi4uNI9xgBD1KnhKpLrg7l2QhwQ/DCONHCSNPzyPMbaDxiuENebrrMElRebs2UTtbbFnVnGiZNkGUFYEdQ==","shasum":"f57c4ca64066a6ef98b3a9b51433659ee9bc0364","tarball":"https://registry.npmjs.org/@ars9/kalyna/-/kalyna-0.1.4.tgz","fileCount":33,"unpackedSize":157556,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA0abnMDVGIyWRlts3xPiuzRPzmlWYmcdyDwi1JiZHL5AiEAvEu9b7QUoznky/okw+EEdI4/YTfi/k2AWf4A7vCxrb4="}]},"_npmUser":{"name":"ars9","email":"ars9@pm.me"},"directories":{},"maintainers":[{"name":"ars9","email":"ars9@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kalyna_0.1.4_1761562999224_0.3683739344129857"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-27T11:03:19.118Z","0.1.4":"2025-10-27T11:03:19.442Z","modified":"2025-10-27T11:03:19.748Z"},"maintainers":[{"name":"ars9","email":"ars9@pm.me"}],"description":"CommonJS build of @li0ard/kalyna - Kalyna (DSTU 7624:2014) cipher implementation in pure TypeScript","homepage":"https://github.com/ars9/kalyna#readme","keywords":["dstu","crypto","kalyna","dstu7624"],"repository":{"type":"git","url":"git+https://github.com/ars9/kalyna.git"},"author":{"name":"li0ard"},"bugs":{"url":"https://github.com/ars9/kalyna/issues"},"license":"MIT","readme":"<p align=\"center\">\n    <b>@ars9/kalyna</b><br>\n    <b>CommonJS build of @li0ard/kalyna - Kalyna (DSTU 7624:2014) cipher implementation in pure TypeScript</b>\n    <br>\n    <a href=\"https://ars9.is-cool.dev/kalyna\">docs</a>\n    <br><br>\n    <a href=\"https://github.com/ars9/kalyna/actions/workflows/test.yml\"><img src=\"https://github.com/ars9/kalyna/actions/workflows/test.yml/badge.svg\" /></a>\n    <a href=\"https://github.com/ars9/kalyna/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/ars9/kalyna\" /></a>\n    <br>\n    <a href=\"https://npmjs.com/package/@ars9/kalyna\"><img src=\"https://img.shields.io/npm/v/@ars9/kalyna\" /></a>\n    <a href=\"https://jsr.io/@ars9/kalyna\"><img src=\"https://jsr.io/badges/@ars9/kalyna\" /></a>\n    <br>\n    <hr>\n</p>\n\n> [!CAUTION]\n> **Disclaimer:** This package is merely a repackage of the original `@li0ard/kalyna` module. All intellectual property, development, and maintenance credit belongs to the original author, li0ard. This version is provided as a CommonJS build for specific compatibility needs and does not introduce any new features or modifications beyond the build configuration.\n\n## Installation\n\n```bash\n# from NPM\nnpm i @ars9/kalyna\n\n# from JSR\nbunx jsr i @ars9/kalyna\n```\n\n## Supported modes\n- [x] Electronic Codebook (ECB)\n- [x] Cipher Block Chaining (CBC)\n- [x] Output Feedback (OFB)\n- [x] Counter (CTR)\n- [x] Cipher Feedback (CFB)\n- [x] Cipher-based Message Authentication Code (CMAC/OMAC)\n- [x] Cipher Block Chaining-Message Authentication Code (CCM)\n- [x] Galois Message Authentication Code (GMAC)\n- [x] Galois/Counter Mode (GCM)\n- [x] Key wrapping (KW)\n- [x] XEX Tweakable Block Ciphertext Stealing (XTS)\n\n## Features\n- Provides simple and modern API\n- Most of the APIs are strictly typed\n- Fully complies with [DSTU 7624:2014](https://online.budstandart.com/upload/documents/121/109736_2.pdf) standard\n- Supports Bun, Node.js, Deno, Browsers\n\n## Examples\n### ECB mode\n```ts\nimport { Kalyna128, encryptECB, decryptECB } from \"@ars9/kalyna\";\n\nconst cipher = new Kalyna128(hexToBytes(\"000102030405060708090A0B0C0D0E0F\"));\nconst ct = hexToBytes(\"81BF1C7D779BAC20E1C9EA39B4D2AD06\");\nconst pt = hexToBytes(\"101112131415161718191A1B1C1D1E1F\");\n\nconsole.log(encryptECB(cipher, pt));\nconsole.log(decryptECB(cipher, ct));\n```\n\n### CBC mode\n```ts\nimport { Kalyna128, encryptCBC, decryptCBC } from \"@ars9/kalyna\";\n\nconst cipher = new Kalyna128(hexToBytes(\"000102030405060708090A0B0C0D0E0F\"));\nconst iv = hexToBytes(\"101112131415161718191A1B1C1D1E1F\");\nconst ct = hexToBytes(\"a73625d7be994e85469a9faabcedaab6dbc5f65dd77bb35e06bd7d1d8eafc8624d6cb31ce189c82b8979f2936de9bf14\");\nconst pt = hexToBytes(\"202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F\");\n\nconsole.log(encryptCBC(cipher, pt, iv));\nconsole.log(decryptCBC(cipher, ct, iv));\n```","readmeFilename":"README.md","_rev":"1-f95ce14e317a90637527bc61a472c632"}