{"id":18406513,"url":"https://github.com/georgiifirsov/bc-lib","last_synced_at":"2025-04-12T20:29:12.345Z","repository":{"id":179540929,"uuid":"661389837","full_name":"GeorgiiFirsov/bc-lib","owner":"GeorgiiFirsov","description":"Tiny library with block ciphers implementation for my cryptography research","archived":false,"fork":false,"pushed_at":"2023-11-10T00:25:33.000Z","size":299,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T04:29:12.275Z","etag":null,"topics":["block-cipher","cryptography","secret-key-encryption","symmetric-cryptography","symmetric-key-cryptography"],"latest_commit_sha":null,"homepage":"https://georgyfirsov.github.io/bc-lib/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeorgiiFirsov.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":"2023-07-02T17:34:14.000Z","updated_at":"2023-07-18T09:34:28.000Z","dependencies_parsed_at":"2024-11-06T03:15:11.458Z","dependency_job_id":"21d01400-3d63-432e-b425-31997ad42a40","html_url":"https://github.com/GeorgiiFirsov/bc-lib","commit_stats":null,"previous_names":["georgyfirsov/bc-lib","georgiifirsov/bc-lib"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiiFirsov%2Fbc-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiiFirsov%2Fbc-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiiFirsov%2Fbc-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeorgiiFirsov%2Fbc-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeorgiiFirsov","download_url":"https://codeload.github.com/GeorgiiFirsov/bc-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248628516,"owners_count":21136096,"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":["block-cipher","cryptography","secret-key-encryption","symmetric-cryptography","symmetric-key-cryptography"],"created_at":"2024-11-06T03:09:23.806Z","updated_at":"2025-04-12T20:29:12.316Z","avatar_url":"https://github.com/GeorgiiFirsov.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bc-lib\n\n\u003e **Warning** \n\u003e This library is implemented for research purposes only! It *intentionally* doesn't verify some parameters \n\u003e for validity. In real world all parameters MUST be properly verified.\n\n[![Tests](https://github.com/GeorgyFirsov/bc-lib/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/GeorgyFirsov/bc-lib/actions/workflows/run-tests.yaml)\n[![codecov](https://codecov.io/github/GeorgyFirsov/bc-lib/branch/main/graph/badge.svg?token=XGoAIJdblk)](https://codecov.io/github/GeorgyFirsov/bc-lib)\n\n## Supported block ciphers\n\nThis library implements not so many cryptographic algorithms, because, as it was said above, it was\ndeveloped during my research about full disk encryption (FDE) and does't aim to seize all existing\nblock ciphers.\n\n### Kuznyechik (GOST 34.12-2018)\n\nFor algorithm specification you shuld refer to [GOST 34.12-2018][1]. Here is usage example:\n\n```c\n//\n// Initialize block cipher interface (this is the only way to use ciphers)\n//\n\nBLOCK_CIPHER cipher;\nkuznyechik_initialize_interface(\u0026cipher);\n\n//\n// Create encryption and decryption key schedules from a 256-bit binary key\n//\n\nKEY ekey;\nKEY dkey;\ncipher-\u003einitialize_encrypt_key(binary_key, \u0026ekey);\ncipher-\u003einitialize_decrypt_key(binary_key, \u0026dkey);\n\n//\n// And now encrypt plaintext block\n//\n\n__m128i plaintext_block  = ...;\n__m128i ciphertext_block = ...;\ncipher-\u003eencrypt_block(plaintext_block, \u0026ekey, \u0026ciphertext_block);\n\n//\n// Decryption is straightforward too\n//\n\n__m128i decrypted_block = ...;\ncipher-\u003edecrypt_block(ciphertext_block, \u0026dkey, \u0026decrypted_block);\n```\n\n[1]: https://tc26.ru/standarts/mezhgosudarstvennye-dokumenty-po-standartizatsii/gost-34-12-informatsionnaya-tekhnologiya-kriptograficheskaya-zashchita-informatsii-blochnye-shifry.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiifirsov%2Fbc-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgiifirsov%2Fbc-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiifirsov%2Fbc-lib/lists"}