{"id":17635930,"url":"https://github.com/mohawk2/crypt-rfc8188","last_synced_at":"2025-03-30T03:43:06.487Z","repository":{"id":56833829,"uuid":"268922572","full_name":"mohawk2/Crypt-RFC8188","owner":"mohawk2","description":"RFC 8188 HTTP Encrypted Content Encoding","archived":false,"fork":false,"pushed_at":"2020-09-09T20:07:53.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T06:14:21.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/mohawk2.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2020-06-02T22:35:28.000Z","updated_at":"2020-09-09T20:07:41.000Z","dependencies_parsed_at":"2022-09-08T07:42:25.370Z","dependency_job_id":null,"html_url":"https://github.com/mohawk2/Crypt-RFC8188","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FCrypt-RFC8188","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FCrypt-RFC8188/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FCrypt-RFC8188/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FCrypt-RFC8188/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohawk2","download_url":"https://codeload.github.com/mohawk2/Crypt-RFC8188/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273515,"owners_count":20750904,"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-23T02:24:40.388Z","updated_at":"2025-03-30T03:43:06.470Z","avatar_url":"https://github.com/mohawk2.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nCrypt::RFC8188 - Implement RFC 8188 HTTP Encrypted Content Encoding\n\n# PROJECT STATUS\n\n| OS      |  Build status |\n|:-------:|--------------:|\n| Linux   | [![Build Status](https://travis-ci.org/mohawk2/Crypt-RFC8188.svg?branch=master)](https://travis-ci.org/mohawk2/Crypt-RFC8188) |\n\n[![CPAN version](https://badge.fury.io/pl/Crypt-RFC8188.svg)](https://metacpan.org/pod/Crypt-RFC8188) [![Coverage Status](https://coveralls.io/repos/github/mohawk2/Crypt-RFC8188/badge.svg?branch=master)](https://coveralls.io/github/mohawk2/Crypt-RFC8188?branch=master)\n\n# SYNOPSIS\n\n    use Crypt::RFC8188 qw(ece_encrypt_aes128gcm ece_decrypt_aes128gcm);\n    my $ciphertext = ece_encrypt_aes128gcm(\n      $plaintext, $salt, $key, $private_key, $dh, $auth_secret, $keyid, $rs,\n    );\n    my $plaintext = ece_decrypt_aes128gcm(\n      # no salt, keyid, rs as encoded in header\n      $ciphertext, $key, $private_key, $dh, $auth_secret,\n    );\n\n# DESCRIPTION\n\nThis module implements RFC 8188, the HTTP Encrypted Content Encoding\nstandard. Among other things, this is used by Web Push (RFC 8291).\n\nIt implements only the `aes128gcm` (Advanced Encryption Standard\n128-bit Galois/Counter Mode) encryption, not the previous draft standards\nenvisaged for Web Push. It implements neither `aesgcm` nor `aesgcm128`.\n\n# FUNCTIONS\n\nExportable (not by default) functions:\n\n## ece\\_encrypt\\_aes128gcm\n\nArguments:\n\n### $plaintext\n\nThe plain text.\n\n### $salt\n\nA randomly-generated 16-octet sequence. If not provided, one will be\ngenerated. This is still useful as the salt is included in the ciphertext.\n\n### $key\n\nA secret key to be exchanged by other means.\n\n### $private\\_key\n\nThe private key of a [Crypt::PK::ECC](https://metacpan.org/pod/Crypt::PK::ECC) Prime 256 ECDSA key.\n\n### $dh\n\nIf the private key above is provided, this is the recipient's public\nkey of an Prime 256 ECDSA key.\n\n### $auth\\_secret\n\nAn authentication secret.\n\n### $keyid\n\nIf provided, the ID of a key to be looked up by other means.\n\n### $rs\n\nThe record size for encrypted blocks. Must be at least 18, which would\nbe very inefficient as the overhead is 17 bytes. Defaults to 4096.\n\n## ece\\_decrypt\\_aes128gcm\n\n### $ciphertext\n\nThe plain text.\n\n### $key\n\n### $private\\_key\n\n### $dh\n\n### $auth\\_secret\n\nAll as above. `$salt`, `$keyid`, `$rs` are not given since they are\nencoded in the ciphertext.\n\n# SEE ALSO\n\n[https://github.com/web-push-libs/encrypted-content-encoding](https://github.com/web-push-libs/encrypted-content-encoding)\n\nRFC 8188 - Encrypted Content-Encoding for HTTP (using `aes128gcm`).\n\n# AUTHOR\n\nEd J, `\u003cetj at cpan.org\u003e`\n\n# LICENSE\n\nCopyright (C) Ed J\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fcrypt-rfc8188","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohawk2%2Fcrypt-rfc8188","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fcrypt-rfc8188/lists"}