|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .github/workflows/ | | 22-Oct-2025 | - | 264 | 155 |
| auth/privpass_token/ | | 22-Oct-2025 | - | 2,161 | 1,880 |
| bsl/ | | 22-Oct-2025 | - | 15,176 | 10,324 |
| codecs/ | | 22-Oct-2025 | - | 826 | 687 |
| config/ | | 22-Oct-2025 | - | 4,834 | 4,473 |
| crypto/ | | 22-Oct-2025 | - | 162,031 | 125,724 |
| docs/ | | 22-Oct-2025 | - | 5,208 | 4,274 |
| include/ | | 22-Oct-2025 | - | 18,393 | 5,159 |
| pki/ | | 22-Oct-2025 | - | 11,634 | 9,903 |
| platform/Secure_C/ | | 22-Oct-2025 | - | | |
| script/ | | 22-Oct-2025 | - | 938 | 763 |
| testcode/ | | 22-Oct-2025 | - | 180,773 | 120,673 |
| tls/ | | 22-Oct-2025 | - | 59,103 | 42,660 |
| .clang-format | D | 22-Oct-2025 | 2.7 KiB | 98 | 97 |
| .gitignore | D | 22-Oct-2025 | 134 | 9 | 9 |
| .gitmodules | D | 22-Oct-2025 | 112 | 4 | 3 |
| BUILD.gn | D | 22-Oct-2025 | 35.2 KiB | 1,154 | 1,022 |
| CMakeLists.txt | D | 22-Oct-2025 | 1.1 KiB | 33 | 25 |
| LICENSE | D | 22-Oct-2025 | 9.1 KiB | 126 | 74 |
| OAT.xml | D | 22-Oct-2025 | 2.2 KiB | 43 | 24 |
| README-zh.md | D | 22-Oct-2025 | 4.1 KiB | 110 | 80 |
| README.OpenSource | D | 22-Oct-2025 | 464 | 11 | 11 |
| README.md | D | 22-Oct-2025 | 5 KiB | 110 | 80 |
| README_OpenHarmony.md | D | 22-Oct-2025 | 2.4 KiB | 58 | 35 |
| Third_Party_Open_Source_Software_Notice | D | 22-Oct-2025 | 651 | 10 | 5 |
| bundle.json | D | 22-Oct-2025 | 1.6 KiB | 57 | 57 |
| configure.py | D | 22-Oct-2025 | 28.3 KiB | 587 | 463 |
README.OpenSource
README.md
1[简体中文](./README-zh.md) | English
2
3# openHiTLS
4Welcome to visit the openHiTLS Code Repository, which is under the openHiTLS community: <https://openhitls.net>. openHiTLS aims to provide highly efficient and agile open-source SDKs for Cryptography and Transport Layer Security in all scenarios. openHiTLS is developing and supports some common standard cryptographic algorithms, (D)TLS, (D)TLCP protocols currently. More features are to be planned.
5
6## Overview
7
8The architecture of openHiTLS is highly modular, and openHiTLS can be configured in modules and features. The RAM/ROM footprint depends on the features selected. It provides the optimal performance optimization for cryptographic algorithms. Currently, 5 components and cryptographic algorithms are configured, and the performance optimization of ShangMi cryptographic algorithms on ARM, x86 is ready. More architectures and features are to be planned.
9
10## Feature Introduction
11
12### Functional Features
13
14- Protocols:Support TLS1.3, TLS1.3-Hybrid-Key-Exchange, TLS-Provider, TLS-Multi-KeyShare, TLS-Custom-Extension, TLCP, DTLCP, TLS1.2, DTLS1.2, Auth;
15- Algorithms:Support ML-DSA,ML-KEM,SLH-DSA,AES,SM4,Chacha20,RSA,RSA-Bind,DSA,ECDSA,ECDH,DH,SM2,DRBG,DRBG-GM,HKDF,SCRYPT,PBKDF2,SHA2,SHA3,MD5,SM3,HMAC etc.;
16- PKI:Support Certificate, CRL parsing, Certificate, CRL validation, Certificate requests, generation etc.
17
18### DFX Features
19
20- Highly modular features, support trimming features as required.
21- Algorithm performance optimization based on ARMv8 and x8664 CPU.
22- Support for maintainability and testability based on logging and error stack functionality.
23
24## Component Introduction
25
26openHiTLS include 5 components currently. The BSL component will be used with other components.
27- The bsl is short for Base Support Layer, which provides the base C standand enhanced functions and OS adapter. It will be used with other modules
28- The crypto is short for cryptographic algorithms, which provides the full cryptographic functions with high performance. It will be used by tls, and can also be used with bsl
29- The tls is short for Transport Layer Security, which provides all tls protocol versions up to tls1.3. It will be used with crypto and bsl or other third-party crypto and pki libraries
30- The PKI component provides functions such as certificate and CRL parsing, certificate and CRL validation, as well as certificate request and generation.
31- The Auth component provides the authentication function. Currently, it provides the publicly token authentication based on RFC9578
32
33## Development
34
35### Dependency Preparation
36
37openHiTLS depends on Secure C which should be downloaded to ${openHiTLS_dir}/platform/Secure_C. One of the official git repositories of Secure C is located at <https://gitee.com/openeuler/libboundscheck>.
38
39* Download the security library
40
41```bash
42# Method 1: Pull it with the openHiTLS code repository
43git clone --recurse-submodules https://gitcode.com/openhitls/openhitls.git
44
45# Method 2: Pull the security library separately
46git clone https://gitcode.com/openhitls/openhitls.git
47cd ${openHiTLS_dir}
48git clone https://gitee.com/openeuler/libboundscheck platform/Secure_C
49```
50
51* Build security library
52```bash
53cd ${openHiTLS_dir}/platform/Secure_C
54make -j
55```
56
57### For Application Developers
58
59Source code mirroring of the official releases is pending for planning.
60
61
62The official source code repository is located at <https://gitcode.com/openhitls>. A local copy of the git repository can be obtained by cloning it using:
63```
64git clone https://gitcode.com/openhitls/openhitls.git
65```
66If you are going to contribute, you need to fork the openhitls repository on gitee and clone your public fork instead:
67```
68git clone https://gitcode.com/"your gitcode name"/openhitls.git
69```
70
71## Document
72This document is designed to improve the learning efficiency of developers and contributors on openHiTLS. Refer to the [docs](docs/index/index.md).
73
74## Build and Installation
75The major steps in Linux are as follows. Refer to [build & install](docs/en/4_User%20Guide/1_Build%20and%20Installation%20Guide.md)
76The major steps in Linux:
77
78Step 1 (Prepare the build directory):
79```
80cd openHiTLS && mkdir -p ./build && cd ./build
81```
82Step 2 (Generate configurations):
83```
84python3 ../configure.py ["option"]
85```
86
87* C Full build:
88```
89python3 ../configure.py --enable hitls_bsl hitls_crypto hitls_tls hitls_pki hitls_auth --lib_type static --bits=64 --system=linux
90```
91
92* x8664 Optimize the full build:
93```
94python3 ../configure.py --enable hitls_bsl hitls_crypto hitls_tls hitls_pki hitls_auth --lib_type static --bits=64 --system=linux --asm_type x8664
95```
96The options are described in [Build Installation Guide](docs/en/4_User%20Guide/1_Build%20and%20Installation%20Guide.md)
97
98Step 3 (Generate the build script):
99```
100cmake ..
101```
102Step 4 (Build and install):
103```
104make && make install
105```
106
107## Contribution
108
109If you plan to contribute to the openHiTLS community, please visit the link [CLA Signing](https://cla.openhitls.net) to complete CLA signing.
110
README_OpenHarmony.md
1# openHiTLS
2本仓库包含开源软件openHiTLS,为OpenHarmony提供高效、敏捷的全场景开源密码学开发套件。
3
4## 概述
5
6openHiTLS架构高度模块化,可通过模块和特性配置。RAM/ROM尺寸取决于所选的特性。openHiTLS为密码算法提供性能优化。当前已支持5个组件和算法特性可按需配置,支持ARM、x86架构CPU上的算法性能优化,更多架构和特性待规划。
7
8## 特性简介
9
10功能特性主要包含如下:
11
12- 协议:支持TLS1.3, TLS1.3-Hybrid-Key-Exchange, TLS-Provider, TLS-Multi-KeyShare, TLS-Custom-Extension, TLCP, DTLCP, TLS1.2, DTLS1.2, Auth;
13- 算法:支持ML-DSA,ML-KEM,SLH-DSA,AES,SM4,Chacha20,RSA,RSA-Bind,DSA,ECDSA,ECDH,DH,SM2,DRBG,DRBG-GM,HKDF,SCRYPT,PBKDF2,SHA2,SHA3,MD5,SM3,HMAC等;
14- 证书:支持证书、CRL解析,证书、CRL验证,证书请求、生成等;
15
16
17## 组件简介
18
19目前,openHiTLS有5个组件,其中BSL组件需和其他组件一起使用。
20- BSL是Base Support Layer的缩写,提供基础C类标准的增强功能和OS适配器,需与其他模块一起使用
21- 密码算法组件(Crypto)提供了完整的密码功能,且性能较优。该组件既可以被TLS使用,也可与BSL一起使用
22- TLS是Transport Layer Security的缩写,涵盖了TLS1.3及之前的TLS版本,会与Crypto、BSL以及其他三方密码组件或PKI库一起使用
23- PKI组件提供证书、CRL解析,证书、CRL验证以及证书请求、生成等功能
24- Auth认证组件提供了认证功能,当前提供了基于RFC9578的publicly token认证功能
25
26## 构建指导
27
28适配OpenHarmony平台的编译脚本请见[gn构建脚本](BUILD.gn)。
29
30
31以rk3568平台为例,编译命令为:
32```bash
33./build.sh --product-name rk3568 --ccache --build-target openhitls
34```
35编译完成后会在out/rk3568/thirdparty/openhitls目录下生成所有的动态库。
36
37## OpenHarmony如何使用openHiTLS
38
39OpenHarmony中系统部件需要在BUILD.gn中引用openhitls部件以使用openHiTLS。
40
41以Crypto模块为例,需要引用openhitls_crypto部件,具体模块信息可参考[bundle.json](bundle.json)。
42
43```
44// BUILD.gn
45external_deps += [ "liburing:liburing" ]
46```
47
48## 详细介绍文档
49
50本文档旨在帮助开发者和贡献者更快地上手openHiTLS,详情参考[文档列表](docs/index/index.md) 。
51
52
53## License
54
55Mulan PSL v2
56
57见[LICENSE](LICENSE).
58