{"id":16834831,"url":"https://github.com/dchest/xaes","last_synced_at":"2026-03-16T20:31:41.878Z","repository":{"id":246422814,"uuid":"821088019","full_name":"dchest/xaes","owner":"dchest","description":"JavaScript XAES-256-GCM implementation using Web Cryptography API","archived":false,"fork":false,"pushed_at":"2024-07-09T18:13:05.000Z","size":44,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T08:11:15.453Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dchest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-27T19:37:46.000Z","updated_at":"2025-03-16T07:43:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"26608322-fc52-49a1-8637-0041f07f8d0b","html_url":"https://github.com/dchest/xaes","commit_stats":null,"previous_names":["dchest/xaes"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchest%2Fxaes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchest%2Fxaes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchest%2Fxaes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchest%2Fxaes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dchest","download_url":"https://codeload.github.com/dchest/xaes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244907420,"owners_count":20529850,"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-10-13T12:08:01.285Z","updated_at":"2026-03-16T20:31:41.829Z","avatar_url":"https://github.com/dchest.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xaes\n\nImplementation of XAES-256-GCM as defined in \u003chttps://c2sp.org/XAES-256-GCM\u003e\nbased on the Web Cryptography API \u003chttps://www.w3.org/TR/WebCryptoAPI/\u003e.\n\nIt uses a 256-bit AES-CBC CryptoKey and a 192-bit nonce to derive\na 256-bit key and a 96-bit nonce for AES-GCM.\n\nDue to the use of the standard CryptoKey and Web Cryptography API operations,\nthis implementation is fully compatible with other parts of the Web Cryptography API.\nFor example, keys can be stored in IndexedDB and be non-extractable. The only\nadditional requirement is that the key must have 'encrypt' usage even for decryption,\nhowever, there's no real distinction between encryption and decryption operations\nfor AES-GCM anyway (you can simulate decryption by encrypting the ciphertext).\n\n## Installation\n\n```\nnpm install xaes\n```\n\n## Example\n\n```javascript\nimport { encrypt, decrypt, importKey } from 'xaes';\n\n(async () =\u003e {\n  const keyBytes = new Uint8Array(32).fill(0x1);\n  const key = await importKey('raw', keyBytes, true);\n\n  const iv = new Uint8Array(24).fill(0x2);\n  const plaintext = new TextEncoder().encode('Hello, World!');\n  const additionalData = new TextEncoder().encode('Additional Data');\n\n  const ciphertext = await encrypt({ iv, additionalData }, key, plaintext);\n  const decrypted = await decrypt({ iv, additionalData }, key, ciphertext);\n  console.log(new TextDecoder().decode(decrypted)); // Hello, World!\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchest%2Fxaes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdchest%2Fxaes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchest%2Fxaes/lists"}