{"id":21625414,"url":"https://github.com/byut/des","last_synced_at":"2025-03-18T19:55:48.525Z","repository":{"id":207198255,"uuid":"708502558","full_name":"byut/des","owner":"byut","description":"An optimized implementation of the Data Encrpytion Standard (DES) in C","archived":false,"fork":false,"pushed_at":"2024-06-13T16:20:43.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T22:34:29.246Z","etag":null,"topics":["c","cryptography","des","encryption"],"latest_commit_sha":null,"homepage":"","language":"C","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/byut.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-10-22T18:42:01.000Z","updated_at":"2024-06-13T16:21:59.000Z","dependencies_parsed_at":"2024-06-13T19:11:51.581Z","dependency_job_id":"71286cd8-43fe-4bc7-a201-e090f9a51a14","html_url":"https://github.com/byut/des","commit_stats":null,"previous_names":["byut/des"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byut%2Fdes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byut%2Fdes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byut%2Fdes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byut%2Fdes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byut","download_url":"https://codeload.github.com/byut/des/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244297895,"owners_count":20430346,"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":["c","cryptography","des","encryption"],"created_at":"2024-11-25T01:09:10.285Z","updated_at":"2025-03-18T19:55:48.486Z","avatar_url":"https://github.com/byut.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Encryption Standard\n\nAn optimized implementation of the Data Encrpytion Standard (DES) in C.\n\n## Overview\n\nTo attain optimal efficiency, the algorithm incorporates several optimization\ntechniques proposed by Eli Biham in his paper titled \"A Fast New DES\nImplementation in Software.\"\n\nThe core concept is to parallelize encryption operations. The quantity of\nencryptions is limited by the hardware employed in the encryption process.\nNonetheless, leveraging widely available 64-bit processors enables the\nsimultaneous execution of 64 encryptions. To achieve this, we can represent 64\ndata blocks as a transposed matrix of bits. This approach facilitates encryption\nthrough straightforward bitwise operations, eliminating the need for iterative\nprocessing through each bit 64 times.\n\nFurthermore, we obviate the need for expensive permutations. Instead, we\ndirectly access individual bits as if they were permuted. This eliminates the\nneed for performing initial permutations or generating subkeys for each round,\nresulting in significant time and resource savings during the encryption\nprocess.\n\nAnother notable improvement in performance was achieved by employing logic gate\noperations within S-boxes as opposed to the traditional approach of using lookup\ntables. Moreover, each S-box already includes the P permutation and the E\nexpansion in its 64-bit result. The implementation of S-boxes within this\nalgorithm is indeed noteworthy, boasting an impressive average gate count of 56.\nThe code, credited to Matthew Kwan, was obtained from the following\n[website](https://darkside.com.au/bitslice/). You can gain further insights by\nconsulting his paper on the subject, titled \"Reducing the Gate Count of Bitslice\nDES.\" There is an even faster implementation, enhanced by impressive 17%,\nthat is utilized in the John the Ripper password cracker.\n\n## Building from source\n\nTo test this implementation, the project provides a simple demo (see\n[main.c](https://github.com/byut/des/blob/main/main.c)):\n\n```bash\nmkdir build \\\n    \u0026\u0026 gcc -O3 -Iinclude -o build/out main.c src/*.c \\\n    \u0026\u0026 build/out \\\n    \u0026\u0026 rm -rdf build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyut%2Fdes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyut%2Fdes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyut%2Fdes/lists"}