{"id":19065420,"url":"https://github.com/newaetech/cwlint-demo-aes-arm","last_synced_at":"2026-03-01T17:32:51.607Z","repository":{"id":84256192,"uuid":"95474186","full_name":"newaetech/cwlint-demo-aes-arm","owner":"newaetech","description":"CW-Lint running against ARM Implementation of AES with various builds possible.","archived":false,"fork":false,"pushed_at":"2018-08-08T16:06:55.000Z","size":1983,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-19T19:41:17.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/newaetech.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,"zenodo":null}},"created_at":"2017-06-26T17:58:17.000Z","updated_at":"2021-09-14T14:05:51.000Z","dependencies_parsed_at":"2023-03-12T22:13:07.675Z","dependency_job_id":null,"html_url":"https://github.com/newaetech/cwlint-demo-aes-arm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/newaetech/cwlint-demo-aes-arm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fcwlint-demo-aes-arm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fcwlint-demo-aes-arm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fcwlint-demo-aes-arm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fcwlint-demo-aes-arm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newaetech","download_url":"https://codeload.github.com/newaetech/cwlint-demo-aes-arm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fcwlint-demo-aes-arm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29976279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T00:49:51.493Z","updated_at":"2026-03-01T17:32:49.347Z","avatar_url":"https://github.com/newaetech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChipWhisperer-Lint Multi-Build Demo #\n\nThe following codebase shows a demo of the CW-Lint tool (see http://github.com/newaetech/ChipWhisperer-Lint). This tool is designed to make it easier for finding cryptographic leakage on embedded systems, be it a hardware or software solution. We have currently targeted implementations of AES - these demos all use AES-128 ECB, but other lengths and modes can be selected (or added if not supported yet).\n\nThis tool has many use-cases, but the most powerful is to work as a \"lint\" style tool to catch leakage accidentally introduced in software or hardware implementations of cryptography. This can be setup to automatically run a given library across a wide variety of hardware targets for example, as leakage can vary widely between different devices. The setup is roughly like this:\n\n![ChipWhisperer-Lint Super-Cool Demo Figure](/doc/cwlint_arch.png)\n\n### Test Vector Leakage Assessment (TVLA) ###\n\nCW-Lint builds primarily on work done to develop TVLA. The TVLA setup provides a method to find statistical differences in power traces between two \"known\" conditions. For example this could be used to prove that the power traces look different (with a defined level of statistical significance) when a byte of a secret key is 0x00 compared to 0x1F. This comparison is done using the Welch's t-test (note this can also be converted into a SNR number).\n\nThis is a very powerful test as it doesn't rely on us to know how to break the encryption, but instead provides proof that it *might* be breakable.\n\n###### References ######\n\n[A testing methodology for side-channel resistance validation: Paper](http://csrc.nist.gov/news_events/non-invasive-attack-testing-workshop/papers/08_Goodwill.pdf)\n\n[Is your design leaking keys? Efficient testing for sidechannel leakage: Presentation](https://www.rsaconference.com/writable/presentations/file_upload/asec-r35b.pdf)\n\n[Welch's T-Test](https://en.wikipedia.org/wiki/Welch%27s_t-test)\n\n### ISO/IEC ###\n\nThe ISO/IEC 17825:2016 standard (Testing methods for the mitigation of non-invasive attack classes against cryptographic modules) defines a number of tests performed with TVLA in order to quantify if a given device is breakable or not.\n\nThe CW-Lint provides a \"ISO/IEC 17825:2016 Mode\" that performs a specific subset of tests given in that document. Note a number of additional tests that will help you track down where and why cryptographic leakage is occurring are available too, but these use modified versions of the T-Test. \n\n\n## ChipWhisperer Lint Detection on mbed TLS Library ##\n\nThis demo is designed to run AES using the mbed TLS library against a number of ARM targets. This demonstrates the power of automated analysis in determining where leakage exists, and why testing against ALL possible variants is useful for detecting leakage that might go unnoticed on specific builds/variants.\n\nThe setup involves (a) building possible variants of the library with different compilers, library options, and compiler flags, (b) running the target code on different physical architectures, and (c) performing automated side-channel analysis of the resulting power traces.\n\nThese are provided by:\n\n (a) A special build script (would be specific to your build environment).\n (b) The ChipWhisperer-Capture software connected to a ChipWhisperer-Lite + UFO Board, run in a basic script.\n (c) The ChipWhisperer-Lint software.\n\n### (a) Build Process ###\n\nThe target is the mbed TLS library. The automated test script performs the following actions:\n\n1. Perform \"git pull\" to get latest code from public repository.\n2. For each variant:\n   * Autogenerate makefile to build binary (based on settings below).   \n   * Build binary for target device.   \n   * Program target device.   \n   * Record power traces while performing AES operation.\n\nA total of 24 variants are possible, with the following combinations:\n\n* Compiler: IAR, GCC\n* Compiler settings: Optimization -Os / -O0\n   * For IAR: -O0 = None, -0s = High / Balanced\n* AES Configuration: MBEDTLS_AES_ROM_TABLES defined/not defined (changes if ROM tables or SRAM tables used)\n* Targets: STM32F100, ST32F205, STM32F071\n\nNote 4 variants will fail to build: the STM32F1 device does not have enough SRAM for SRAM tables. Thus any variants with the STM32F100 without MBEDTLS_AES_ROM_TABLES are not possible.\n\nThe system will generate 20 HEX-files as a result of the build process, which have names similar to the following:\n\n\tHEX Size  Filename\n\t43,306    GCC_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=0_.hex\n\t65,536    GCC_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t28,321    GCC_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=s_.hex\n\t52,674    GCC_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\t69,128    GCC_AES_CW308_STM32F1_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t51,329    GCC_AES_CW308_STM32F1_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\t37,506    GCC_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=0_.hex\n\t62,145    GCC_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t24,120    GCC_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=s_.hex\n\t49,995    GCC_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\t27,432    IAR_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=0_.hex\n\t49,903    IAR_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t21,095    IAR_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=s_.hex\n\t44,008    IAR_AES_CW308_STM32F0_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\t51,957    IAR_AES_CW308_STM32F1_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t42,126    IAR_AES_CW308_STM32F1_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\t26,757    IAR_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=0_.hex\n\t49,633    IAR_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=0_MBEDTLS_AES_ROM_TABLES=1.hex\n\t18,477    IAR_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=s_.hex\n\t41,607    IAR_AES_CW308_STM32F2_CRYPTO_TARGET=MBEDTLS_OPT=s_MBEDTLS_AES_ROM_TABLES=1.hex\n\n\n### (b) Physical Setup ###\n\nThis requires a ChipWhisperer for performing power analysis, and a suitable target board. This is designed to run on a CW308 UFO board with the STM32Fx targets. Switching between STM32F devices does require physically switching the target boards (or having multiple ChipWhisperer-Capture + target setups).\n\n### (c) ChipWhisperer-Lin ###\n\nRunning the output requires copying the project files to the ChipWhisperer-Lint server. They should then be run with the appropriate configuration file.\n\nA summary download will get information across all the projects, providing the summary of all project tests.\n\n## Example Output ##\nSee [doc/all-boards-output-example.html](https://htmlpreview.github.io/?https://github.com/newaetech/cwlint-demo-aes-arm/blob/master/doc/all-boards-output-example.html) for the result of running the tool. Here's a little sneak peak:\n![ChipWhisperer-Lint Output Example](/doc/snipper_image.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fcwlint-demo-aes-arm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewaetech%2Fcwlint-demo-aes-arm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fcwlint-demo-aes-arm/lists"}