{"id":25420550,"url":"https://github.com/danielost/fips-140-3","last_synced_at":"2025-05-13T16:13:54.803Z","repository":{"id":203956038,"uuid":"710022246","full_name":"danielost/fips-140-3","owner":"danielost","description":"FIPS (Federal Information Processing Standard) 140-3 benchmark for validating the effectiveness of RNGs.","archived":false,"fork":false,"pushed_at":"2023-11-01T16:51:22.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T19:48:53.548Z","etag":null,"topics":["cryptography","fips-140-3"],"latest_commit_sha":null,"homepage":"","language":"Go","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/danielost.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":"2023-10-25T21:10:57.000Z","updated_at":"2023-11-01T20:57:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1ee2e91-2531-4ce6-842d-57be97524287","html_url":"https://github.com/danielost/fips-140-3","commit_stats":null,"previous_names":["danielost/fips-140-3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielost%2Ffips-140-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielost%2Ffips-140-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielost%2Ffips-140-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielost%2Ffips-140-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielost","download_url":"https://codeload.github.com/danielost/fips-140-3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253980063,"owners_count":21994043,"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":["cryptography","fips-140-3"],"created_at":"2025-02-16T19:48:07.649Z","updated_at":"2025-05-13T16:13:54.781Z","avatar_url":"https://github.com/danielost.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIPS 140-3 implementation in Go\nCovers the following tests:\n- Monobit\n- Maximum series length\n- Poker\n- Series length\n\n\u003e Each test takes 20000 bits as an input.\n\n## Work done\n- `keytest/monobit.go` - Monobit test implementation.\n- `keytest/longestsequence.go` - Maximum Series test implementation.\n- `keytest/poker.go` - Poker test implementation.\n- `keytest/series.go` - Series test implementation.\n- `keytest/keytest.go` - contains a function to run all the tests.\n- `keytest/util.go` - contains utility methods.\n- `example.go` - a simple example of how to use the tests.\n\n## How to use\nThe following block of code can be found in `example.go`:\n```golang\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\n\t\"github.com/danielost/fips-140-3/keytest\" // This import is needed to run the tests.\n)\n\nfunc foo() {\n\t// Most likely, you will have a real sequence of bits,\n\t// but fot the demostration we just generate a random binary value.\n\tlength := 20000\n\truneArray := make([]rune, length)\n\tfor i := 0; i \u003c length; i++ {\n\t\truneArray[i] = rune('0' + rand.Intn(2))\n\t}\n\tbinary := string(runeArray)\n\n\t// Run all the tests.\n\tresult, err := keytest.RunAll(binary)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t} else {\n\t\tfmt.Println(result)\n\t}\n}\n```\n\nIf the sequence is considered random, the following output will be produced:\n\n```bash\nStarting FIPS 140-3 tests\n===================\nFIPS 140-3 success:\n===================\nFIPS 140-3 Monobit: true\nFIPS 140-3 Longest Sequence: true\nFIPS 140-3 Poker: true\nFIPS 140-3 Series Count: true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielost%2Ffips-140-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielost%2Ffips-140-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielost%2Ffips-140-3/lists"}