Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Samuel Lee 977ec1e5f0 Merged PR 11273883: Implement ML-KEM
## Description:

+ Adds ML-KEM API surface
+ Implements the API with initial C implementation, with sprinkling of SSE/NEON for (I)NTT
+ Adds low level ML-KEM polynomial arithmetic testing which tests self-consistency and exercises internal assertion in debug builds
+ Adds multi-implementation functionality testing to enable comparative functionality and performance testing on E2E functionality
  + For now, comparison testing is just between SymCrypt static and dynamic, with 3rd party comparison with libcrux disabled until they publish a final ML-KEM implementation
+ Adds ML-KEM KATs from NIST

Related work items: #50913735
2024-08-31 02:53:41 +00:00
Josh Aas dac1fa2833 Initial macOS on Apple Silicon support.
Get rid of misleading comment.

First step towards turning the linux build path into a generic unix build path that supports Linux and macOS.

Make a build check that is already effectively for Linux only explicitly for Linux.

Remove unnecessary/breaking Apple includes.

test_lib.h: Generally use gnuc definitions on macOS but define GENRANDOM separately for macOS and Linux.

Define GET_PERF_CLOCK on macOS/ARM

Define body of getTimeInMs on macOS

We need C++17, and in order for CMake to set that properly on macOS we need to explicitly set the compilers to clang/clang++.

Use arc4random in unittest code on macOS.

build changes
2024-05-30 19:10:55 -07:00
Changyu Li 7fb52ec5bb Merged PR 10618973: Add OpenSSL implementation for ECDSA and ECDH
## Description:

Add AlgRsaSignPss implementation for OpenSSL. We ignore Twisted Edward Curves when testing with OpenSSL because OpenSSL does not support those curves. For Weierstrass Curves that OpenSSL does not support, we create them by parameters.

## Admin Checklist:
- [ ] You have updated documentation in symcrypt.h to reflect any changes in behavior
- [ ] You have updated CHANGELOG.md to reflect any changes in behavior
- [ ] You have updated symcryptunittest to exercise any new functionality
- [ ] If you have introduced any symbols in symcrypt.h you have updated production and test dynamic export symbols (exports.ver / exports.def / symcrypt.src) and tested the updated dynamic modules with symcryptunittest
- [ ] If you have introduced functionality that varies based on CPU features, you have manually tested with and without relevant features
- [ ] If you have made significant changes to a particular algorithm, you have checked that performance numbers reported by symcryptunittest are in line with expectations
- [ ] If you have added new algorithms/modes, you have updated the status indicator text for the associated modules if necessary
2024-04-22 20:59:16 +00:00
Shachar Levy 476b8382f0 Merged PR 10172292: Add symcrypt build for optee env
## Description:

## Admin Checklist:
- [ ] You have updated documentation in symcrypt.h to reflect any changes in behavior
- [ ] You have updated CHANGELOG.md to reflect any changes in behavior
- [ ] You have updated symcryptunittest to exercise any new functionality
- [ ] If you have introduced any symbols in symcrypt.h you have updated production and test dynamic export symbols (exports.ver / exports.def / symcrypt.src) and tested the updated dynamic modules with symcryptunittest
- [ ] If you have introduced functionality that varies based on CPU features, you have manually tested with and without relevant features
- [ ] If you have made significant changes to a particular algorithm, you have checked that performance numbers reported by symcryptunittest are in line with expectations
- [ ] If you have added new algorithms/modes, you have updated the status indicator text for the associated modules if necessary

Add symcrypt build for optee env

Signed-off-by: v-shlevy <v-shlevy@microsoft.com>

Related work items: #49419416
2024-03-28 00:00:31 +00:00
Changyu Li b893aa9d20 Merged PR 10406838: Add OpenSSL implementation for XtsAes test
## Description:

We add OpenSSL as submodule to 3rdparty and link symcryptunittest to it so we can compare the SymCrypt implementation. We add perf and functional test for XtsAes as well.

## Admin Checklist:
- [ ] You have updated documentation in symcrypt.h to reflect any changes in behavior
- [ ] You have updated CHANGELOG.md to reflect any changes in behavior
- [ ] You have updated symcryptunittest to exercise any new functionality
- [ ] If you have introduced any symbols in symcrypt.h you have updated production and test dynamic export symbols (exports.ver / exports.def / symcrypt.src) and tested the updated dynamic modules with symcryptunittest
- [ ] If you have introduced functionality that varies based on CPU features, you have manually tested with and without relevant features
- [ ] If you have made significant changes to a particular algorithm, you have checked that performance numbers reported by symcryptunittest are in line with expectations
- [ ] If you have added new algorithms/modes, you have updated the status indicator text for the associated modules if necessary

Related work items: #49347468
2024-03-16 00:10:00 +00:00
Changyu Li f4e10b6f1f Merged PR 9883477: Fix issues on arm32 linux
## Description:

This PR configures ARM32 memory accesses to access each byte individually for potentially unaligned accesses via the SYMCRYPT_LOAD_ and SYMCRYPT_STORE_ macros because some ARM32 CPUs require 64 bit accesses to be aligned on 32 bit boundaries (e.g. SONIC's ARM32 test environment).

When building for ARM32 we explicitly link with libc and libgcc because this fixes some load time symbol resolution issues. This also causes the emitted ELF segments to be ordered differently so we change the integrity verification to account for that.

## Admin Checklist:
- [ ] You have updated documentation in symcrypt.h to reflect any changes in behavior
- [ ] You have updated CHANGELOG.md to reflect any changes in behavior
- [ ] You have updated symcryptunittest to exercise any new functionality
- [ ] If you have introduced any symbols in symcrypt.h you have updated production and test dynamic export symbols (exports.ver / exports.def / symcrypt.src) and tested the updated dynamic modules with symcryptunittest
- [ ] If you have introduced functionality that varies based on CPU features, you have manually tested with and without relevant features
- [ ] If you have made significant changes to a particular algorithm, you have checked that performance numbers reported by symcryptunittest are in line with expectations
- [ ] If you have added new algorithms/modes, you have updated the status indicator text for the associated modules if necessary
2023-11-21 22:17:23 +00:00
Changyu Li b6a267815e Merged PR 9576163: Build SymCrypt with gcc-arm-linux-gnueabihf 2023-10-13 19:26:47 +00:00
Mitch Lindgren 🦎 b4f07a34bd Merged PR 9504829: Fix ARM64X build
This change fixes the ARM64 build to properly support ARM64X, which is required for linking to Windows components.

- Add `<BuildAsX>true</BuildAsX>` to MSBuild properties
- Add `-machine arm64ec` arg when assembling for ARM64EC
- Fix non-standard SEH keywords in cpuid.c (not supported by ARM64EC compiler)
- Remove ARM32 support since build tools no longer support it

Related work items: #42154581
2023-08-31 00:25:12 +00:00
Mitch Lindgren 🦎 d0083ecb8e Merged PR 9267882: Create official Windows build pipeline
- Update `package.py` to read configuration from JSON file, and support per-platform/arch/config binaries
- Fix local VS build by changing `RuntimeLibrary` depending on whether `UndockedOfficial` is set
- Create vcxproj for `SymCryptKernelTestModule_UM.dll`
- Add Official pipeline definition, with option to create VPack
- Remove unused properties from undocked build property files

Related work items: #42154632, #42880140
2023-07-15 01:35:49 +00:00
Mitch Lindgren 🦎 6fca352c3e Merged PR 8797661: Add MSBuild solution and project files for SymCrypt
This pull request adds MSBuild solution and project files so that SymCrypt can be built using the undocked OneBranch pipeline, including the kernel mode components. See the SymCrypt EO Compliance document for more information on why this is being done, and the high-level overview of how it will be accomplished.

In addition to adding the MSBuild files, I removed a bunch of files that were no longer being used, such as the iOS workspace and project files, old kernel test drivers that are not used in the RI-TP, etc.

Related work items: #42154697
2023-05-23 08:11:33 +00:00
Mitch Lindgren 🦎 3b20ccd561 Merged PR 8407803: PR build pipeline improvements + updated README
Disable time-consuming no-ASM tests in PR builds. Update README. Rename option to enable msbignum/RSA32 tests, and add it as an argument to the build script.
2023-02-07 03:13:42 +00:00
Mitch Lindgren 🦎 515bc99971 Merged PR 8235253: Enable OneBranch pipelines
This change rewrites our Azure DevOps pipelines to be compatible with OneBranch pipelines. It also adds new scripts to help with building, testing and packaging SymCrypt. These scripts replicate some of the functionality of `scbuild` but are also compatible with Linux builds. They can be used directly on the command line by developers, but the OneBranch pipeline also uses them to move as much as possible of the "business logic" of building SymCrypt out of the YAML templates and into Python scripts.

Also includes various reorganization and small fixes.
2023-01-12 00:52:49 +00:00