{"id":20705824,"url":"https://github.com/deniskore/nand_nor","last_synced_at":"2025-04-23T01:36:22.686Z","repository":{"id":46886596,"uuid":"231043422","full_name":"Deniskore/nand_nor","owner":"Deniskore","description":"C++ Compile time NAND/NOR obfuscation","archived":false,"fork":false,"pushed_at":"2020-01-27T19:39:46.000Z","size":76,"stargazers_count":51,"open_issues_count":0,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T20:51:12.003Z","etag":null,"topics":["compile-time","emulation","nand","nor","obfuscation","security"],"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/Deniskore.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}},"created_at":"2019-12-31T07:01:20.000Z","updated_at":"2024-08-19T03:13:55.000Z","dependencies_parsed_at":"2022-09-23T07:52:08.124Z","dependency_job_id":null,"html_url":"https://github.com/Deniskore/nand_nor","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/Deniskore%2Fnand_nor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deniskore%2Fnand_nor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deniskore%2Fnand_nor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deniskore%2Fnand_nor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Deniskore","download_url":"https://codeload.github.com/Deniskore/nand_nor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354128,"owners_count":21416747,"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":["compile-time","emulation","nand","nor","obfuscation","security"],"created_at":"2024-11-17T01:19:53.920Z","updated_at":"2025-04-23T01:36:22.655Z","avatar_url":"https://github.com/Deniskore.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prerequisites\n- ~~MSVC 2019+~~ It's better to use [clang-cl](http://llvm.org/builds/) because of [this bug](https://developercommunity.visualstudio.com/content/problem/873112/extremely-long-compilation-time-when-using-compile.html)\n- Clang 7.0+\n- GCC 8.3+\n- Gtest\n- CMake\n- Ninja build  (optional)\n\nFor Windows:\n\nUse [vcpkg](https://github.com/microsoft/vcpkg/) or [conan](https://github.com/conan-io/conan) package managers to install Gtest library\n\nFor Linux (depends on your distro):\n\nUbuntu\n```\nsudo apt-get install libgtest-dev\n```\nFedora\n```\nsudo dnf install gtest-devel\n```\n\n# Building\n\nDon't forget to specify toolchain file if you use package managers (-DCMAKE_TOOLCHAIN_FILE=...)\n```\ncmake -G \"Ninja\" ..\nninja\n```\n\n### Diff\nFor each compilation you will get different assembly code\n```c++\nuint64_t diff_me(uint64_t x) {\n  using u64 = uint64_t;\n  CNNInt\u003cu64\u003e r(std::chrono::system_clock::now().time_since_epoch().count());\n  CNNInt\u003cu64\u003e test(x);\n  test++;\n  test--;\n  test|=r;\n  test^=r;\n  test\u0026=r;\n  test^=r;\n  test = ~test;\n  return test.value();\n}\n```\nFor example:\n![first](img/1.png)\n![second](img/2.png)\n\n```\nDifference (relyze.com tool)\n81.13%  diff_me  -  diff_me\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeniskore%2Fnand_nor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeniskore%2Fnand_nor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeniskore%2Fnand_nor/lists"}