{"id":13409933,"url":"https://github.com/Componolit/libsparkcrypto","last_synced_at":"2025-03-14T15:31:32.997Z","repository":{"id":107366170,"uuid":"133577358","full_name":"Componolit/libsparkcrypto","owner":"Componolit","description":"A cryptographic library in SPARK 2014","archived":false,"fork":false,"pushed_at":"2021-01-26T09:43:16.000Z","size":12791,"stargazers_count":27,"open_issues_count":3,"forks_count":3,"subscribers_count":9,"default_branch":"componolit","last_synced_at":"2024-07-31T20:39:44.907Z","etag":null,"topics":["crypto-library","formal-verification"],"latest_commit_sha":null,"homepage":"","language":"Ada","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/Componolit.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2018-05-15T21:53:08.000Z","updated_at":"2023-12-19T04:07:49.000Z","dependencies_parsed_at":"2023-05-17T06:30:51.138Z","dependency_job_id":null,"html_url":"https://github.com/Componolit/libsparkcrypto","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/Componolit%2Flibsparkcrypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Componolit%2Flibsparkcrypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Componolit%2Flibsparkcrypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Componolit%2Flibsparkcrypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Componolit","download_url":"https://codeload.github.com/Componolit/libsparkcrypto/tar.gz/refs/heads/componolit","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243600627,"owners_count":20317309,"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":["crypto-library","formal-verification"],"created_at":"2024-07-30T20:01:04.120Z","updated_at":"2025-03-14T15:31:31.699Z","avatar_url":"https://github.com/Componolit.png","language":"Ada","funding_links":[],"categories":["Libraries"],"sub_categories":["Cryptography"],"readme":".. image:: https://travis-ci.org/Componolit/libsparkcrypto.svg?branch=componolit\n       :target: https://travis-ci.org/Componolit/libsparkcrypto\n\n===================================================================\nlibsparkcrypto - A cryptographic library implemented in SPARK 2014.\n===================================================================\n\nlibsparkcrypto is a formally verified implementation of several widely used\ncryptographic algorithms using the SPARK 2014 programming language and toolset\n[1]_.  For the complete library proofs of the absence of run-time errors like\ntype range violations, division by zero and numerical overflows are available.\nSome of its subprograms include proofs of partial correctness.\n\nThe distribution contains test cases for all implemented algorithms and a\nbenchmark to compare its performance with the OpenSSL library [2]_.\n\nCopyright, Warranty and Licensing\n=================================\n\n| Copyright (C) 2011-2017  Stefan Berghofer\n| Copyright (C) 2010-2011,2018  Alexander Senier\n| Copyright (C) 2010-2017  secunet Security Networks AG\n\n| All rights reserved.\n\nlibsparkcrypto is released under the simplified BSD license::\n\n   Redistribution  and  use  in  source  and  binary  forms,  with  or  without\n   modification, are permitted provided that the following conditions are met:\n\n      * Redistributions of source code must retain the above copyright notice,\n        this list of conditions and the following disclaimer.\n\n      * Redistributions in binary form must reproduce the above copyright\n        notice, this list of conditions and the following disclaimer in the\n        documentation and/or other materials provided with the distribution.\n\n      * Neither the name of the  nor the names of its contributors may be used\n        to endorse or promote products derived from this software without\n        specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE  COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n   AND ANY  EXPRESS OR IMPLIED WARRANTIES,  INCLUDING, BUT NOT LIMITED  TO, THE\n   IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR  A PARTICULAR PURPOSE\n   ARE  DISCLAIMED. IN  NO EVENT  SHALL  THE COPYRIGHT  HOLDER OR  CONTRIBUTORS\n   BE  LIABLE FOR  ANY  DIRECT, INDIRECT,  INCIDENTAL,  SPECIAL, EXEMPLARY,  OR\n   CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT  LIMITED  TO,  PROCUREMENT  OF\n   SUBSTITUTE GOODS  OR SERVICES; LOSS  OF USE,  DATA, OR PROFITS;  OR BUSINESS\n   INTERRUPTION)  HOWEVER CAUSED  AND ON  ANY THEORY  OF LIABILITY,  WHETHER IN\n   CONTRACT,  STRICT LIABILITY,  OR  TORT (INCLUDING  NEGLIGENCE OR  OTHERWISE)\n   ARISING IN ANY WAY  OUT OF THE USE OF THIS SOFTWARE, EVEN  IF ADVISED OF THE\n   POSSIBILITY OF SUCH DAMAGE.\n\nFeatures\n========\n\nThis version of libsparkcrypto implements the following cryptographic\nalgorithms and modes:\n\n- AES-128, AES-192, AES-256\n- AES-CBC (all supported AES modes)\n- SHA-1\n- HMAC-SHA1\n- SHA-256, SHA-384, SHA-512\n- HMAC-SHA-256, HMAC-SHA-384, HMAC-SHA-512\n- PRF-HMAC-SHA-256, PRF-HMAC-SHA-384, PRF-HMAC-SHA-512\n- RIPEMD-160\n- HMAC-RIPEMD-160\n- ECDSA, ECGDSA\n\nDevelopment version\n===================\n\nThe current development version of libsparkcrypto is available through its GIT\n[3]_ repository: ``https://github.com/Componolit/libsparkcrypto.git``\n\nA browsable version of the repository is also available here:\nhttps://github.com/Componolit/libsparkcrypto\n\nBuilding and installing\n=======================\n\nRequired tools\n--------------\n\nTo build and prove libsparkcrypto, the following tools are required:\n\n- GNAT (recent Pro or FSF)\n- SPARK 2014 (tested with Pro 19.0 and Community 2018)\n- GNU make\n- OpenSSL (for building the benchmark, tested with 1.1.1j)\n\nThe primary development environments of libsparkcrypto are Debian (x86_64) and\nUbuntu (x86_64). Though the source and project files should be system\nindependent, the Makefiles assume a UNIXish system (cygwin seems to work).\nTools like ``mkdir``, ``uname``, ``tail`` and ``install`` must be present in\nthe systems search path.\n\nBuild process\n-------------\n\nTo build libsparkcrypto, change to the source directory and type::\n\n$ make\n\nYou can install the library to \u003cdestination\u003e, by typing::\n\n$ make DESTDIR=\u003cdestination\u003e install\n\nSupported systems\n-----------------\n\nlibsparkcrypto was successfully built and tested on the following systems:\n\n+------------------+--------------+-----------------------------------------------+\n|operating system  | architecture |  toolchain                                    |\n+==================+==============+===============================================+\n|Debian 9          | x86_64       |  SPARK Pro 19.0, GNAT Pro 19.0                |\n+------------------+--------------+-----------------------------------------------+\n|Debian 9          | x86_64       |  GNAT Community 2018                          |\n+------------------+--------------+-----------------------------------------------+\n\nPlease send bug reports and comments to Alexander Senier \u003csenier@componolit.com\u003e.\n\nUsing libsparkcrypto\n====================\n\nExamples for using libsparkcrypto can be found in the ``tests`` subdirectory.\n\nA user of the library has to provide a shadow for the package ``Interfaces``\nproviding a type definition for at least ``Unsigned_8``, ``Unsigned_32`` and\n``Unsigned_64``.\n\nExtending libsparkcrypto\n========================\n\nYou are welcome to extend libsparkcrypto according to the terms of the\nsimplified BSD license referenced above. Please obey the following rules when\ncontributing changes back to the project:\n\n- Make sure no undischarged VCs remain.\n- Make sure the code compiles in both modes MODE=release and MODE=debug.\n- Provide reference to documents and test cases for the parts you implemented.\n- Make sure you successfully ran the test suite (``make test``).\n- Try to stay consistent with the current style of the source.\n- If feasible, implement a benchmark for your code.\n- Create a pull request on GitHub\n\nThe Directory structure of libsparkcrypto is as follows:\n\n+---------------+----------------------------------------------------+\n|directory      | content                                            |\n+===============+====================================================+\n|``src/shared`` | sources analyzed by SPARK and used by Ada compiler |\n+---------------+----------------------------------------------------+\n|``src/spark``  | sources only analyzed by SPARK                     |\n+---------------+----------------------------------------------------+\n|``src/ada``    | sources only used by Ada compiler                  |\n+---------------+----------------------------------------------------+\n\nThe directories ``src/ada`` and ``src/shared`` have a sub-directory ``generic``,\nwhich contains platform independent code. Furthermore, there are\nfeature-specific directories like ``little_endian`` and architecture-specific\ndirectories like ``x86_64`` which are included to proof and build steps as\nconfigured.\n\nConfiguration is performed automatically by the top-level ``Makefile`` and can be\naltered by passing the following variables to ``make``:\n\n+------------------+----------------------------------------------------------------------+\n|variable          | description                                                          |\n+==================+======================================================================+\n|``ARCH``          | CPU architecture as reported by ``uname -m``.                        |\n+------------------+----------------------------------------------------------------------+\n|``MODE``          | Build mode (``release`` or ``debug``).                               |\n+------------------+----------------------------------------------------------------------+\n|``OPT``           | Optimization level to use (``s``, ``0``, ``1``, ``2`` or ``3``).     |\n+------------------+----------------------------------------------------------------------+\n|``SHARED``        | Build a shared library (``0``, ``1``).                               |\n+------------------+----------------------------------------------------------------------+\n|``RUNTIME``       | Runtime to build for (``native`` or ``zfp``).                        |\n+------------------+----------------------------------------------------------------------+\n|``NO_TESTS``      | Disable tests step.                                                  |\n+------------------+----------------------------------------------------------------------+\n|``NO_SPARK``      | Disable SPARK proof step.                                            |\n+------------------+----------------------------------------------------------------------+\n|``NO_ISABELLE``   | Disable ISABELLE proof step.                                         |\n+------------------+----------------------------------------------------------------------+\n|``TARGET_CFG``    | Target system configuration.                                         |\n+------------------+----------------------------------------------------------------------+\n|``SPARK_DIR``     | Base directory of the SPARK installation.                            |\n+------------------+----------------------------------------------------------------------+\n|``DESTDIR``       | Installation base directory.                                         |\n+------------------+----------------------------------------------------------------------+\n\nCredits\n=======\n\n- Thanks to Adrian-Ken Rüegsegger and Reto Buerki for hosting the project's GIT\n  repository.\n\n- Thanks to Adacore and Altran Praxis for review, comments and support with\n  many tricky problems.\n\n\n.. [1] SPARK 2014 - https://www.adacore.com/about-spark\n.. [2] OpenSSL: The Open Source toolkit for SSL/TLS - http://www.openssl.org\n.. [3] GIT - the fast version control system, http://git-scm.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComponolit%2Flibsparkcrypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FComponolit%2Flibsparkcrypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComponolit%2Flibsparkcrypto/lists"}