Commit Graph

13 Commits

Author SHA1 Message Date
xuzhengyi 278a755f38 fix:Fixing some issues,See details for the list.
List of issues:
1: The certificate time check is not considered an error if there is no callback return value of 0 at the lower level.
2: Some comment issues.
3: The provider initialization is not protected by a lock.
4: Some functions lack parameter checks.

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/1471

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-05-20 22:26:41 +08:00
m0_69551548 050f740ed2 feat: support Mceliece and Frodokem algorithms
Co-authored-by: Tom<yanxu52@huawei.com>

# message auto-generated for no-merge-commit merge:
!886 merge feature/support-frodoKEM into main

feat: support Mceliece and Frodokem algorithms

Created-by: m0_69551548
Commit-by: Tom
Merged-by: liwei3013
Description: feat: support Mceliece and Frodokem PQC algorithms

See merge request: openHiTLS/openhitls!886

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:34 +08:00
tlhc 3ba30169c2 feat: Add cross-platform support for Darwin/macOS
**Core Platform Support:**
- Add Darwin/macOS platform detection and conditional compilation
- Implement platform-specific library extensions (.dylib for macOS, .so for Linux)
- Enhanced dynamic library loading with cross-platform error handling
- Platform-optimized time functions (clock_gettime_nsec_np for macOS)
- Add App module support for Darwin/macOS

**Threading & Synchronization:**
- BSL: Migrate from simple integer flags to proper pthread_once_t implementation
- Add BSL_SAL_OnceControl type with platform-specific implementations
- Implement thread-safe one-time initialization across platforms
- Fix memory initialization patterns for thread-once controls

**Build System Improvements:**
- Remove GNU ld-specific flags for test-framework use c function pointer replace or `stub_utils.h` to hook target function
- Boundcheck components will linked as static library for tests, reduce tests dynamic library deps
- Update CMake configurations for Darwin support

**Test Framework Enhancements:**
- Replace jmp_buf with sigjmp_buf for better signal handling
- Update time handling to avoid platform-specific gmtime issues
- Improve entropy test stability across platforms
- Add proper RAND initialization/deinitialization

**Entropy & Cryptographic Updates:**
- Temporarily disable CPU jitter entropy on macOS (pending validation)
- Add cross-platform entropy source management
- Update DRBG configuration for improved compatibility
- Enhance hardware entropy detection and handling

**Network & I/O:**
- Extend POSIX network functions to support both Linux and Darwin
- Add file accessibility checks before dynamic loading
- Improve error handling for symbol resolution across platforms
- Update socket and I/O operations for cross-platform compatibility

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/677

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:28 +08:00
dumb d4231e59e4 add sha256-mb interfaces
Co-authored-by: dumb<liuermeng2@huawei.com>

# message auto-generated for no-merge-commit merge:
!1020 merge openhitls-0.2 into openhitls-0.2

add sha256-mb interfaces

Created-by: dumb
Commit-by: dumb
Merged-by: liwei3013
Description: add sha256-mb interfaces

See merge request: openHiTLS/openhitls!1020

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-02-02 10:47:49 +08:00
Dongjianwei001 b7319b6ab7 feat: Add context copy capability for cipher,kdf and MAC algorithms.
Co-authored-by: Dongjianwei001<dongjianwei1@huawei.com>

# message auto-generated for no-merge-commit merge:
!981 merge openhitls-0.2 into openhitls-0.2

feat: Add context copy capability for cipher,kdf and MAC algorithms.

Created-by: Dongjianwei001
Commit-by: Dongjianwei001
Merged-by: liwei3013
Description: <!--  感谢您提交 Pull Request!以下是一些提示:

1) 如果您是第一次提交,请阅读我们的贡献者指南:https://gitcode.com/openHiTLS/openhitls/wiki/FAQ-社区需求贡献流程.md

-->

**此 PR 的作用 / 为什么需要它**:

**自检清单**:

- [x] **测试**:代码是否已有UT/ST测试用例覆盖,新增测试用例是否随本PR一并上库
- [x] **接口**:是否涉及对外接口变更,变更已通过接口评审
- [ ] **文档**:是否涉及文档修改

<!-- **给审查者的特别说明**: -->
<!-- + - [ ] 是否导致无法前向兼容 -->
<!-- + - [ ] 是否涉及依赖的三方库变更 -->

See merge request: openHiTLS/openhitls!981

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-01-15 15:48:46 +08:00
dumb d33e28a6cf change the 'system' option of 'configure.py'
do not have 'linux' to be default.
add 'TEST_NO_SUBPROC' for test convenience.

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/359

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2025-07-08 14:19:13 +08:00
Liu-Ermeng 37c7b87748 remove some time-consuming KAT of slh_dsa; change time unit to ms
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/255
2025-04-29 19:24:32 -07:00
Ooohui e6d83c9f8a Add miniaturization functions and tests
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/197
2025-04-19 18:31:57 +08:00
qq_62927415 2fc1598df4 feat: add three modes and some related testcases for HPKE
# message auto-generated for no-merge-commit merge:
merge main into main

feat: add three modes and some related testcases for HPKE

Created-by: qq_62927415
Commit-by: qq_62927415
Merged-by: fly2x
Description: In addition to the BASE mode, HPKE also includes three other modes, which have been implemented in the code, and some test cases have been added to the data.

Since additional parameters needed to be included in the test cases, a value in helper.h was modified.
...

See merge request: openHiTLS/openhitls!201
2025-04-18 08:37:16 +08:00
Liu-Ermeng aa4660cc50 Add SLH-DSA(SPHINCS+) implementation
ref: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.205.pdf

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/180
2025-03-25 20:54:52 -07:00
Ooohui a74d93c274 Standardize the goto and return statement.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/109
2024-12-21 09:31:57 +08:00
Ooohui cd576ff867 Rename/Refactor some code
# message auto-generated for no-merge-commit merge:
merge main into main

Rename/Refactor some code

Created-by: Ooohui
Author-id: 1430981
MR-id: 4930196
Commit-by: Ooohui
Merged-by: liwei3013
E2E-issues: 
Description: Rename/Refactor some code

See merge request: openHiTLS/openhitls!91
2024-12-04 19:01:36 +08:00
fly2x be2fc52601 openhitls repo init 2024-10-16 20:50:29 +08:00