{"id":17384441,"url":"https://github.com/jakubriegel/geffe-generator","last_synced_at":"2025-03-27T21:18:20.500Z","repository":{"id":117761944,"uuid":"221033467","full_name":"jakubriegel/geffe-generator","owner":"jakubriegel","description":"Functional style implemented Geffe cryptographic stream generator ","archived":false,"fork":false,"pushed_at":"2019-12-02T09:42:08.000Z","size":833,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T23:41:55.416Z","etag":null,"topics":["cryptographic-keys","cryptography","functional-programming","geffe-generator","scala","tailrecursion","university"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/jakubriegel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-11-11T17:24:51.000Z","updated_at":"2019-12-02T09:42:10.000Z","dependencies_parsed_at":"2023-10-05T01:23:40.409Z","dependency_job_id":null,"html_url":"https://github.com/jakubriegel/geffe-generator","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/jakubriegel%2Fgeffe-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakubriegel%2Fgeffe-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakubriegel%2Fgeffe-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakubriegel%2Fgeffe-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakubriegel","download_url":"https://codeload.github.com/jakubriegel/geffe-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924500,"owners_count":20694731,"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":["cryptographic-keys","cryptography","functional-programming","geffe-generator","scala","tailrecursion","university"],"created_at":"2024-10-16T07:45:29.386Z","updated_at":"2025-03-27T21:18:20.463Z","avatar_url":"https://github.com/jakubriegel.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geffe Generator\n\n## about\nImplementation of Geffe Generator using functional style Scala and lazy collections. \nApplication provides command line and graphical interfaces.\n\nFeatures:\n* generation of geffe stream\n* implementation of statistical tests: long series, poker and monobit\n* two types of LFSR: xor and custom Fibonacci\n* random registers generation\n\n## build\n```\nsbt\nsbt:geffe\u003e assembly\n```\nGenerated jar will be available at `target/scala-2.13/geffe.jar`\n\n## cli\n\u003e CLI was developed only for development purposes and has very limited features\n\n### generate stream\nType: `java -jar geffe.jar stream \u003cNUMBER_BITS_TO_GENERATE\u003e \u003cFIRST_LFSR_TYPE\u003e \u003cFIRST_LFSR_SIZE\u003e \u003cSECOND_LFSR_TYPE\u003e \u003cSECOND_LFSR_SIZE\u003e \u003cTHIRD_LFSR_TYPE\u003e \u003cTHIRD_LFSR_SIZE\u003e`\nCLI uses random registers of given size and type\n\nExample: `java -jar geffe.jar stream 100 xor 25 xor 25 fib 25`\n\n### run FIPS tests\nType: `java -jar geffe.jar test \u003cFILE_WITH_STREAM_TO_TEST\u003e`\nStream file should consist of `1`s and `0`s. The application will run 4 FIPS tests.\n\nExample: `java -jar geffe.jar test stream.txt`\n\n## algorithm\n### how it works?\nGeffe Generator uses three LFSRs connected non-linearly by multiplexer. General equation for this stream is:\n```\nk = (a3 AND a1) OR ((NOT a1) AND a2)\n```   \n\n### example\nUsing three 4-bit XOR registers:\n* first with coefficients 0110 and initial state 1010\n* second with coefficients 1101 and initial state 1111\n* third with coefficients 1111 and initial state 0101\n\nGenerating 3-bit stream:\n```\nFirst bit:\n    LFSR1:\n        output: 1\n        next state: 0101\n    LFSR2:\n        output: 1\n        next state: 1111\n    LFSR3:\n        output: 0\n        next state: 1010\n    \n    Bit: 0\n\nSecond bit:\n    LFSR1:\n        output: 1\n        next state: 1011\n    LFSR2:\n        output: 1\n        next state: 1111\n    LFSR3:\n        output: 1\n        next state: 0101\n    \n    Bit: 1\n\nThird bit:\n    LFSR1:\n        output: 1\n        next state: 0111\n    LFSR2:\n        output: 1\n        next state: 1111\n    LFSR3:\n        output: 0\n        next state: 1010\n    \n    Bit: 0\n\n\nResult: 010\n```\n\n## credits\nThis is a project for Data Protection Basics course at Poznan University of Technology.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakubriegel%2Fgeffe-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakubriegel%2Fgeffe-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakubriegel%2Fgeffe-generator/lists"}