{"id":15370383,"url":"https://github.com/jedisct1/aes-stream","last_synced_at":"2025-04-15T13:54:04.655Z","repository":{"id":66081550,"uuid":"108691707","full_name":"jedisct1/aes-stream","owner":"jedisct1","description":"A fast AES-PRF based secure random-number generator","archived":false,"fork":false,"pushed_at":"2023-07-15T18:57:54.000Z","size":19,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T20:46:44.886Z","etag":null,"topics":["aes","aes-128","aes-256","csprng","drbg","prg","random"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedisct1.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":"2017-10-28T23:34:17.000Z","updated_at":"2025-02-12T00:16:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9b9d27e-1bb1-4929-8e3a-7fd67d3d578a","html_url":"https://github.com/jedisct1/aes-stream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Faes-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Faes-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Faes-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Faes-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/aes-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085475,"owners_count":21210267,"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":["aes","aes-128","aes-256","csprng","drbg","prg","random"],"created_at":"2024-10-01T13:41:29.138Z","updated_at":"2025-04-15T13:54:04.633Z","avatar_url":"https://github.com/jedisct1.png","language":"C","readme":"AES-STREAM\n==========\n\nA simple, but fast AES-PRF-based random number generator.\n\nFast, designed to fill large buffers with random data.\nDoes fast key erasure.\n\nRequires a modern Intel or AMD CPU with AES-NI support.\n\nAPI\n===\n\nPretty straightforward:\n\n```c\n#include \"aes-stream.h\"\n\n#define AES_STREAM_SEEDBYTES 32\n\nvoid aes_stream_init(aes_stream_state *st, const unsigned char seed[AES_STREAM_SEEDBYTES]);\n\nvoid aes_stream(aes_stream_state *st, unsigned char *buf, size_t buf_len);\n```\n\nCall `aes_stream_init()` with a seed, then `aes_stream()` to fill\n`buf` with `buf_len` random bytes.\n\n`aes_stream()` can be called indefinitely without having to reseed the\ngenerator.\n\nCompilation\n===========\n\nDo not forget to tell your compiler to enable support for AES opcodes\nwith the `-maes` flag.\n\nRecommended: `-Ofast -maes -march=native`\n\nClang 7 appears to produce faster code than gcc 8.\n\nKey erasure is performed after every call to `stream()`. If you are\ndealing with many short keys, implement a pool on top of this.\n\nUses AES-128 by default. Define `AES_STREAM_ROUNDS=14` in order to use\nAES-256 instead.\n\nReferences\n==========\n\n* [Cryptanalysis of AES-PRF and its Dual](https://tosc.iacr.org/index.php/ToSC/article/view/892/843)\n(Patrick Derbez, Tetsu Iwata, Ling Sun, Siwei Sun, Yosuke Todo, Haoyang Wang and Meiqin Wang)\n* [Optimal PRFs from blockcipher designs](https://eprint.iacr.org/2017/812.pdf)\n(Bart Mennink and Samuel Neves)\n* [Fast-key-erasure random-number generators](https://blog.cr.yp.to/20170723-random.html)\n(Daniel J. Bernstein)\n","funding_links":[],"categories":["Cryptography"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Faes-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Faes-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Faes-stream/lists"}