{"id":13420291,"url":"https://github.com/libtom/libtomcrypt","last_synced_at":"2025-10-24T05:52:48.363Z","repository":{"id":38824909,"uuid":"777011","full_name":"libtom/libtomcrypt","owner":"libtom","description":"LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.","archived":false,"fork":false,"pushed_at":"2025-05-06T06:33:49.000Z","size":23833,"stargazers_count":1653,"open_issues_count":54,"forks_count":477,"subscribers_count":107,"default_branch":"develop","last_synced_at":"2025-05-12T05:06:57.902Z","etag":null,"topics":["c","cryptography","encryption","libtomcrypt"],"latest_commit_sha":null,"homepage":"https://www.libtom.net","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libtom.png","metadata":{"files":{"readme":"README.md","changelog":"changes","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,"zenodo":null}},"created_at":"2010-07-15T16:22:58.000Z","updated_at":"2025-05-09T06:38:46.000Z","dependencies_parsed_at":"2024-05-01T23:11:31.586Z","dependency_job_id":"2da263c8-5f82-4830-903a-e9d83f3b7293","html_url":"https://github.com/libtom/libtomcrypt","commit_stats":{"total_commits":1978,"total_committers":66,"mean_commits":29.96969696969697,"dds":"0.36097067745197164","last_synced_commit":"c900951dab1bb94bab803fc57688dac18e3b71f9"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libtom%2Flibtomcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libtom%2Flibtomcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libtom%2Flibtomcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libtom%2Flibtomcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libtom","download_url":"https://codeload.github.com/libtom/libtomcrypt/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076848,"owners_count":22010611,"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","encryption","libtomcrypt"],"created_at":"2024-07-30T22:01:30.558Z","updated_at":"2025-10-24T05:52:48.269Z","avatar_url":"https://github.com/libtom.png","language":"C","readme":"# libtomcrypt\n\nPreviously the git repository contained `doc/crypt.pdf` for detailed documentation.\nThis was changed and the file is now only available from the tarball of the appropriate version\nor from the page https://github.com/libtom/libtomcrypt/releases .\n\n## Project Status\n\n### Travis CI\n\nmaster: [![Build Status](https://github.com/libtom/libtomcrypt/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/libtom/libtomcrypt/actions/workflows/main.yml?query=branch%3Amaster+++) [![Coverage Status](https://coveralls.io/repos/libtom/libtomcrypt/badge.png?branch=master)](https://coveralls.io/r/libtom/libtomcrypt)\n\ndevelop: [![Build Status](https://github.com/libtom/libtomcrypt/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/libtom/libtomcrypt/actions/workflows/main.yml?query=branch%3Adevelop+++) [![Coverage Status](https://coveralls.io/repos/libtom/libtomcrypt/badge.png?branch=develop)](https://coveralls.io/r/libtom/libtomcrypt)\n\n### AppVeyor\n\nmaster: [![Build status](https://ci.appveyor.com/api/projects/status/xyl2nbdsyp1tj9ye/branch/master?svg=true)](https://ci.appveyor.com/project/libtom/libtomcrypt/branch/master)\n\ndevelop: [![Build status](https://ci.appveyor.com/api/projects/status/xyl2nbdsyp1tj9ye/branch/develop?svg=true)](https://ci.appveyor.com/project/libtom/libtomcrypt/branch/develop)\n\n### Coverity\n\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/487/badge.svg)](https://scan.coverity.com/projects/487)\n\n### ABI Laboratory\n\nAPI/ABI changes: [check here](https://abi-laboratory.pro/tracker/timeline/libtomcrypt/)\n\n## Submitting patches\n\nPlease branch off from develop if you want to submit a patch.\n\nPatch integration will be faster if tests and documentation are included.\n\nPlease update the makefiles in a separate commit. To update them simply run the `updatemakes.sh` script.\n\nIf you have something bigger to submit, feel free to contact us beforehand.\nThen we can give you write access to this repo, so you can open your PR based on this repo\nand we can easier follow the rebase-before-merge approach we're using (or even do the rebase ourself).\n\n### Reviews\n\nWe're using Pull Request reviews to make sure that the code is in line with the existing code base.\n\nPlease have a look [here](https://help.github.com/articles/approving-a-pull-request-with-required-reviews/) to get an idea of the approach.\n\n## Branches\n\nPlease be aware, that all branches besides _master_ and _develop_ __can__ and __will be__ force-pushed, rebased and/or removed!\n\nIf you want to rely on such an _unstable_ branch, create your own fork of this repository to make sure nothing breaks for you.\n\n## Configuration options\n\nBy default the library builds its entire feature set (besides `katja`) in a (depending on your needs more or less) optimal way.\n\nThere are numerous configuration options available if you want to trim down the functionality of the library.\n\nPlease have a look at `src/headers/tomcrypt_custom.h` for all available configuration options.\n\nThe following list is a small part of the available, but the most often required, configuration switches.\n\n| Flag | Behavior |\n| ---- | -------- |\n| `LTC_NO_TEST` | Remove all algorithm self-tests from the library |\n| `LTC_NO_FILE` | Remove all API functions requiring a pre-defined `FILE` data-type (mostly useful for embedded targets) |\n| `GMP_DESC` | enable [gmp](https://gmplib.org/) as MPI provider *\\*1* |\n| `LTM_DESC` | enable [libtommath](http://www.libtom.net/) as MPI provider *\\*1* |\n| `TFM_DESC` | enable [tomsfastmath](http://www.libtom.net/) as MPI provider *\\*1* *\\*2* |\n| `USE_GMP` | use `gmp` as MPI provider when building the binaries *\\*3* |\n| `USE_LTM` | use `libtommath` as MPI provider when building the binaries *\\*3* |\n| `USE_TFM` | use `tomsfastmath` as MPI provider when building the binaries *\\*3* |\n\n*\\*1* It is possible to build the library against all MPI providers in parallel and choose at startup-time which math library should be used.\n\n*\\*2* Please be aware that `tomsfastmath` has the limitation of a fixed max size of MPI's.\n\n*\\*3* Only one is supported at the time \u0026 this is only required when building the binaries, not when building the library itself.\n\n## Building the library\n\nThere are several `makefile`s provided. Please choose the one that fits best for you.\n\n| makefile | use-case |\n| -------- | -------- |\n| `makefile` | builds a static library (GNU Make required) |\n| `makefile.shared` | builds a shared (and static) library (GNU Make required) |\n| `makefile.unix` | for unusual UNIX platforms, or if you do not have GNU Make |\n| `makefile.mingw` | for usage with the mingw compiler on MS Windows |\n| `makefile.msvc` | for usage with the MSVC compiler on MS Windows |\n| `libtomcrypt_VS2008.sln` | A VisualStudio 2008 project for MS Windows |\n\n### Make targets\n\nThe `makefile`s provide several targets to build (VS project excluded).\nThe following list does not claim to be complete resp. to be available across all `makefile` variants.\n\n| target | application |\n| ------ | ----------- |\n| *empty target*/none given | c.f. `library`\n| `library` | builds only the library |\n| `hashsum` | builds the `hashsum` binary, similar to [`shasum`](https://linux.die.net/man/1/shasum), but with support for all hash-algorithms included in the library *\\*4* |\n| `crypt` | builds the `crypt` binary, implementing something similar to [`crypt`](https://linux.die.net/man/3/crypt) *\\*4* |\n| `sizes` | builds the `sizes` binary, printing all internal data sizes on invocation *\\*4* |\n| `constants` | builds the `constants` binary, printing all internal constants on invocation *\\*4* |\n| `openssl-enc` | builds the `openssl-enc` binary, which is more or less compatible to [`openssl enc`](https://linux.die.net/man/1/enc) *\\*4* *\\*5* |\n| `test` | builds the `test` binary, which runs all algorithm self-tests + some extended tests *\\*4* |\n| `timing` | builds the `timing` binary, which can be used to measure timings for algorithms and modes *\\*4* |\n| `bins` | builds `hashsum` *\\*4* |\n| `all_test` | builds `test`, `hashsum`, `crypt`, `small`, `tv_gen`, `sizes` \u0026 `constants` *\\*4* |\n| `docs` | builds the developer documentation `doc/crypt.pdf` |\n| `install` | installs the `library` and header files *\\*7* *\\*8* |\n| `install_bins` | installs the binaries created by the `bins` target *\\*7* *\\*8* |\n| `install_docs` | installs the documentation created by the `docs` target *\\*7* *\\*8* |\n| `install_test` | installs the test-app created by the `test` target *\\*7* *\\*8* |\n| `install_all` | installs everything (i.e. `library`, `bins`, `docs` and `test`) *\\*8* |\n| `uninstall` | uninstalls the `library` and header files |\n\n*\\*4* also builds `library`\n\n*\\*5* broken build in some configurations, therefore not built by default\n\n*\\*7* also builds the necessary artifact(s) before installing it\n\n*\\*8* also have a look at the 'Installation' section of this file\n\n### Examples\n\nYou want to build the library as static library\n\n    make\n\nYou want to build the library as shared library\n\n    make -f makefile.shared\n\nYou have `libtommath` installed on your system and want to build a static library and the `test` binary to run the self-tests.\n\n    make CFLAGS=\"-DUSE_LTM -DLTM_DESC\" EXTRALIBS=\"-ltommath\" test\n\nYou have `tomsfastmath` installed on your system and want to build a shared library and all binaries\n\n    make -f makefile.shared CFLAGS=\"-DUSE_TFM -DTFM_DESC\" EXTRALIBS=\"-ltfm\" all demos\n\nYou have `gmp`, `libtommath` and `tomsfastmath` installed on your system and want to build a static library and the `timing` binary to measure timings against `gmp`.\n\n    make CFLAGS=\"-DUSE_GMP -DGMP_DESC -DLTM_DESC -DTFM_DESC\" EXTRALIBS=\"-lgmp\" timing\n\nIf you have `libtommath` in a non-standard location:\n\n    make CFLAGS=\"-DUSE_LTM -DLTM_DESC -I/opt/devel/ltm\" EXTRALIBS=\"/opt/devel/ltm/libtommath.a\" all\n\nYou want to enable AES-NI support:\n\n    make CFLAGS=-DLTC_AES_NI\n\n## Installation\n\nThere exist several _install_ make-targets which are described in the table above.\n\nThese targets support the standard ways (c.f. [[GNU]], [[FreeBSD]])\nto modify the installation path via the following set of variables:\n\n    DESTDIR\n    PREFIX\n    LIBPATH\n    INCPATH\n    DATAPATH\n    BINPATH\n\nThe entire set of the variables is only supported in `makefile`, `makefile.shared` and `makefile.unix`.\n\nIn case you have to use one of the other makefiles, check in the file which variables are supported.\n\n### Examples\n\nYou want to install the static library to the default paths\n\n    make install\n\nYou want to install the shared library to a special path and use it from this path\n\n    make -f makefile.shared PREFIX=/opt/special/path\n\nHave a look at the developer documentation, [[GNU]] or [[FreeBSD]] to get a detailed explanation of all the variables.\n\n## CMake support\n\nThe project provides support for the CMake build system.\n\n```\ngit clone https://github.com/libtom/libtomcrypt.git\nmkdir -p libtomcrypt/build\ncd libtomcrypt/build\ncmake ..\nmake -j$(nproc)\n```\n\nMore details around building with CMake can be found in the developer documentation.\n\n\n[GNU]: https://www.gnu.org/prep/standards/html_node/DESTDIR.html\n\n[FreeBSD]: https://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html\n","funding_links":[],"categories":["TODO scan for Android support in followings","Cryptography","目录","C","密码学","Frameworks and Libs"],"sub_categories":["General","C"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibtom%2Flibtomcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibtom%2Flibtomcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibtom%2Flibtomcrypt/lists"}