{"id":21659086,"url":"https://github.com/cryptocoinjs/aes","last_synced_at":"2025-07-17T21:32:22.593Z","repository":{"id":14350761,"uuid":"17060349","full_name":"cryptocoinjs/aes","owner":"cryptocoinjs","description":"A JavaScript component for the Advanced Encryption Standard (AES). Important for BIP38","archived":false,"fork":false,"pushed_at":"2017-01-04T07:07:55.000Z","size":232,"stargazers_count":22,"open_issues_count":0,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-13T16:24:13.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptocoinjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-21T15:26:22.000Z","updated_at":"2024-01-02T22:20:06.000Z","dependencies_parsed_at":"2022-09-12T19:10:19.987Z","dependency_job_id":null,"html_url":"https://github.com/cryptocoinjs/aes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Faes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Faes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Faes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Faes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptocoinjs","download_url":"https://codeload.github.com/cryptocoinjs/aes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305143,"owners_count":17603748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T09:30:24.008Z","updated_at":"2024-11-25T09:30:41.460Z","avatar_url":"https://github.com/cryptocoinjs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"aes\n===\n\nA JavaScript component for the [Advanced Encryption Standard (AES)](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard). Fully compatible with Node.js and the browser (via Browserify).\n\n(Note, more optimizations may need to be made)\n\n\nWhy?\n----\n\nAES is currently one of the most popular block ciper encyrption algorithms. It is relevant to the Bitcoin private key encryption scheme [BIP38](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki).\n\n\nUsage\n-----\n\n### Installation\n\n    npm install --save aes\n\n\n### Example\n\nNote, that as version 0.1.x, you must be concerned with the endianess of your input data. It expects that the `key` is a regular JavaScript array of 4,6,8 or 32-bit unsigned values. The encrypt function is a regular JavaScript array of 4 32-bit big endian unsigned integers.\n\n```js\nvar AES = require('aes')\n\nvar key = [0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffffff8];\nvar pt = [0x00000000,0x00000000,0x00000000,0x00000000];\nvar ct = [0xd241aab0,0x5a42d319,0xde81d874,0xf5c7b90d];\n\nvar aes = new AES(key);\nconsole.dir(aes.encrypt(pt)); // =\u003e [0xd241aab0,0x5a42d319,0xde81d874,0xf5c7b90d]\nconsole.dir(aes.decrypt(ct)); // =\u003e [0x00000000,0x00000000,0x00000000,0x00000000]\n``` \n\n### Testing\n\n1. Clone the git repo.\n2. `npm install --development`\n\n#### Node.js\n\n    Make node-test\n\n#### Browser\n\n    npm install --production selenium-standalone -g start-selenium\n\n(source your shell or open a new one), edit file `.min-wd`\n\n    start-selenium\n    Make browser-test\n\n\n### Bundle for Browser\n\n    npm install -g browserify\n    browserify \u003c lib/aes.js \u003e lib/aes.bundle.js\n\n\nReferences\n----------\n- https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js\n- https://github.com/bitwiseshiftleft/sjcl/blob/master/core/aes.js\n- https://github.com/mdp/gibberish-aes\n- http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n- http://www.differencebetween.com/difference-between-stream-cipher-and-vs-block-cipher/\n- http://en.wikipedia.org/wiki/Cipher_block_chaining\n- http://opensource.apple.com/source/OpenSSL/OpenSSL-46/openssl/crypto/aes/aes_core.c\n\n\n\nCredits\n-------\n\nExtracted from the [Stanford JavaScript Crypto Library](https://github.com/bitwiseshiftleft/sjcl).\n\n\nLicense\n-------\n\nBSD License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptocoinjs%2Faes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptocoinjs%2Faes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptocoinjs%2Faes/lists"}