{"id":33916664,"url":"https://github.com/vcsjones/xaes-256-gcm-ruby","last_synced_at":"2025-12-12T07:26:49.840Z","repository":{"id":322336413,"uuid":"825968986","full_name":"vcsjones/xaes-256-gcm-ruby","owner":"vcsjones","description":"XAES-256-GCM for Ruby","archived":false,"fork":false,"pushed_at":"2025-11-21T15:27:48.000Z","size":501,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T16:23:44.448Z","etag":null,"topics":["cryptography","ruby","xaes-256-gcm"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/xaes_256_gcm","language":"Ruby","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/vcsjones.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-08T21:23:22.000Z","updated_at":"2025-11-21T15:27:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vcsjones/xaes-256-gcm-ruby","commit_stats":null,"previous_names":["vcsjones/xaes-256-gcm-ruby"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vcsjones/xaes-256-gcm-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcsjones%2Fxaes-256-gcm-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcsjones%2Fxaes-256-gcm-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcsjones%2Fxaes-256-gcm-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcsjones%2Fxaes-256-gcm-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vcsjones","download_url":"https://codeload.github.com/vcsjones/xaes-256-gcm-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcsjones%2Fxaes-256-gcm-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27478431,"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","status":"online","status_checked_at":"2025-12-03T02:00:06.367Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cryptography","ruby","xaes-256-gcm"],"created_at":"2025-12-12T07:26:48.880Z","updated_at":"2025-12-12T07:26:49.834Z","avatar_url":"https://github.com/vcsjones.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"XAES-256-GCM for Ruby\n========\n\nThis is an implementation of XAES-256-GCM as proposed by Filippo Valsorda, for Ruby.\n\nResources:\n* Original post by Filippo: https://words.filippo.io/dispatches/xaes-256-gcm/\n* The XAES-256-GCM specification: https://github.com/C2SP/C2SP/blob/main/XAES-256-GCM.md\n* Reference implementations for Go and OpenSSL: https://github.com/C2SP/C2SP/tree/main/XAES-256-GCM\n\n\n# Using\n\nGet from rubygems.org: https://rubygems.org/gems/xaes_256_gcm\n\n```ruby\nrequire \"xaes_256_gcm\"\n\nkey = # assign to some key.\nplaintext = \"Hello XAES-256-GCM from Ruby\"\n\nxaes = Xaes256Gcm::Xaes256GcmCipher.new(key)\n\n# Seal, or encrypt\nciphertext = xaes.seal(plaintext)\n\n# Open, or decrypt\ndecrypted = xaes.open(ciphertext)\n```\n\nOptionally, AAD (additional authenticated data) can be passed as a 2nd argument to `seal` and `open`.\n\nThis implementation of XAES-256-GCM will generate secure nonce for you automatically when using `seal` and `open`.\nIf low-level control over the nonce is required, `encrypt` and `decrypt` accept a nonce independently. It is recommended\nthat the high-level `seal` and `open` that create a nonce for you is used unless strict control over the nonce is required.\n\nThe \"simple\" nonce managed APIs are not formally specified in by C2SP. Here we define them simply as\n\nEncryption:\n\n```plain\nN = CSPRNG_bytes(24)\nciphertext = encrypt(N, plaintext, aad)\nsealed = N || ciphertext\n```\n\nDecryption:\n\n```plain\nN = sealed[:24]\nciphertext = sealed[24:]\nplaintext = decrypt(N, ciphertext, add)\n```\n\n# Tests\n\nTests can be run with `bin/bundle exec rspec`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcsjones%2Fxaes-256-gcm-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvcsjones%2Fxaes-256-gcm-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcsjones%2Fxaes-256-gcm-ruby/lists"}