Skip to content

Commit c7f328e

Browse files
committed
first commit
0 parents  commit c7f328e

File tree

161 files changed

+33673
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+33673
-0
lines changed

.github/workflows/deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
jobs:
11+
build:
12+
name: Build Docusaurus
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
cache: yarn
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
- name: Build website
26+
run: yarn build
27+
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: build
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/test-deploy.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test deployment
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
jobs:
11+
test-deploy:
12+
name: Test deployment
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
cache: yarn
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
- name: Test build website
26+
run: yarn build

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2022-10-12-C-code-style/index.md

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
title: 铜锁的 C 代码风格
3+
authors: [InfoHunter]
4+
tags: [code style, c]
5+
---
6+
# 总述
7+
8+
铜锁采用类似于OpenSSL的代码风格(Coding Style)。因铜锁项目中存在多种编程语言,而C语言作为其中占比最大的一种,所以本文对铜锁的C语言代码风格进行定义。
9+
10+
# 一、缩进
11+
缩进采用4个空格,禁止使用Tab。预处理指令,按照嵌套层次,使用1个空格作为缩进,例如:
12+
```c
13+
#if
14+
# define
15+
# if
16+
# define
17+
# else
18+
# define
19+
# endif
20+
#else
21+
# define
22+
#endif
23+
24+
#define
25+
```
26+
27+
# 二、换行
28+
29+
禁止一行中写多个语句,例如下例是禁止的:
30+
```c
31+
if (condition) do_this();
32+
do_something_everytime();
33+
```
34+
原则上每行的长度为80个字符,即超过80个字符的行需要进行换行;除非换行后严重影响可读性,可不受80字符的行长度限制。对于用户可见的字符串,例如输出到命令行对用户起提示作用的字符串,则禁止换行,以防止无法使用grep等工具在代码中查找。
35+
36+
# 三、大括号配对和空格
37+
38+
对于非函数类语句,铜锁采用如下的大括号对齐风格:
39+
```c
40+
if (x is true) {
41+
we do y
42+
} else if (conidtion) {
43+
we do z
44+
} else {
45+
do something...
46+
}
47+
48+
do {
49+
...
50+
} while (1);
51+
52+
switch (suffix) {
53+
case 'G':
54+
case 'g':
55+
mem <<= 30;
56+
break;
57+
case 'M':
58+
case 'm':
59+
mem <<= 20;
60+
break;
61+
case 'K':
62+
case 'k':
63+
mem <<= 10;
64+
/* fall through */
65+
default:
66+
break;
67+
}
68+
```
69+
需要注意的是,对于switch语句,其中的case需要和switch对齐,而非进一步进行缩进。
70+
对于函数,则大括号的起始位置有变化:
71+
```c
72+
int function(int x)
73+
{
74+
body of function
75+
}
76+
```
77+
此外,关于空格也有相关约定。在绝大部分的关键字后面,都需要加1个空格,例如:
78+
```c
79+
if, switch, case, for, do, while, return
80+
```
81+
对于函数,以及行为类似函数的关键字,如sizeof, typeof, alignof和__attribute__等,其后则不需要添加空格,例如:
82+
```c
83+
SOMETYPE *p = OPENSSL_malloc(sizeof(*p) * num_of_elements);
84+
```
85+
双元和三元运算符的两侧也需要添加1个空格,而一元运算符则无需添加空格:
86+
```c
87+
= + - < > * / % | & ^ <= >= == != ? : +=
88+
89+
以下无需添加空格:
90+
91+
& * + - ~ ! defined
92+
93+
foo++
94+
--bar
95+
96+
foo.bar
97+
foo->bar
98+
```
99+
定义指针的时候,型号需要靠近变量一侧,而不是类型一侧:
100+
```c
101+
char *p = "something";
102+
int *a = NULL;
103+
```
104+
105+
# 四、命名规则
106+
107+
变量和函数的命名禁止使用匈牙利命名法或者任何的驼峰式命名法,例如下列变量和函数名称都是禁止的:
108+
```c
109+
int iVar;
110+
int myVar;
111+
char *pChar;
112+
int AFunctionThatHandlesSomething()
113+
```
114+
相反,使用小写字母加下划线为主的命名方式:
115+
```c
116+
int temp;
117+
int ctx;
118+
char *p;
119+
int do_signature();
120+
```
121+
铜锁继承自OpenSSL,因此部分导出的API也延续了OpenSSL的命名规律,也就是大写字母开头,后加下划线和小写字母表明函数用途的方式。此部分风格暂时继续沿用,后续根据铜锁重构的进展再进行调整。
122+
123+
# 五、注释
124+
125+
禁止使用//风格的注释。对于单行注释,使用:
126+
```c
127+
/* .... */
128+
```
129+
对于多行注释,使用:
130+
```c
131+
/*-
132+
* This is the preferred style for multi-line
133+
* comments in the OpenSSL source code.
134+
* Please use it consistently.
135+
*
136+
* Description: A column of asterisks on the left side,
137+
* with beginning and ending almost-blank lines.
138+
*/
139+
```
140+
Loading

blog/2023-01-28-certificates/index.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: 铜锁的商用密码产品认证证书
3+
authors: [InfoHunter]
4+
tags: [荣誉]
5+
---
6+
7+
本页面提供铜锁全部的商用密码产品认证证书(即俗称的国密资质)高清版本下载,铜锁的用户可以自由取用。
8+
9+
## Android:BabaSSL移动端软件密码模块
10+
11+
证书编号:GM003312220220743
12+
13+
PDF格式:
14+
[BabaSSL移动端软件密码模块.pdf](https://www.yuque.com/attachments/yuque/0/2022/pdf/29531143/1670553015579-50fb989e-44cb-40d7-afd8-8a6b5fd5b9c1.pdf)
15+
16+
PNG格式
17+
![BabaSSL移动端软件密码模块.png](./BabaSSL移动端软件密码模块.png)
18+
19+
## iOS:BabaSSL IOS端软件密码模块
20+
21+
证书编号:GM003312220230052
22+
23+
PDF格式:
24+
[BabaSSL IOS端软件密码模块.pdf](https://www.yuque.com/attachments/yuque/0/2023/pdf/21453368/1674895586995-c344f657-68a7-4145-a986-7cf4f9495985.pdf)
25+
26+
PNG格式:
27+
![Page 0001.png](./ios.png)
28+
29+
## Linux:应用安全软件密码模块(Linux版)
30+
31+
证书编号:GM003312220230044
32+
33+
PDF格式:
34+
[应用安全软件密码模块(Linux版).pdf](https://www.yuque.com/attachments/yuque/0/2023/pdf/21453368/1674895607850-cc070f6b-e2b9-4fde-bd38-d4d7bca903e8.pdf)
35+
36+
PNG格式:
37+
![Page 0001.png](./linux.png)

blog/2023-01-28-certificates/ios.png

11.6 MB
Loading
10.8 MB
Loading
182 KB
Loading

blog/2024-01-05-2023-Award/index.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: 铜锁获2023开源创新榜“优秀开源项目
3+
authors: [InfoHunter]
4+
tags: [荣誉]
5+
---
6+
7+
![tongsuo_cert.jpg](./tongsuo_cert.jpg)
8+
2023年12月15日,由**中国科协科学技术传播中心****中国计算机学会****中国通信学会****中国科学院软件研究所**共同主办,CSDN 承办的 2023 开源创新榜专家评审会在国家科技传播中心成功举办。评委会主任、中国计算机学会开源发展委员会主任王怀民院士,评委会副主任、中国科协科学技术传播中心副主任陈锐,评委会副主任、中国通信学会副理事长兼秘书长张延川,评委会副主任、中国科学院软件研究所所长赵琛与来自全国学会、大学、科研院所、企业、开源基金会、行业联盟等二十多位开源专家共同参与了本届榜单评审工作,会议由陈锐主持。
9+
10+
2023 年开源创新榜相较往年有以下几个变化:
11+
12+
**一是进一步提升权威性**,主办单位新加入中国计算机学会、中国通信学会、中国科学院软件研究所,四家主办单位优势互补,共同推动榜单策划、征集申报、专家评审等工作重点。
13+
14+
**二是进一步提升公信力**,由王怀民院士担任评委会主任,指导组建了结构更加科学、领域更加全面的评审专家库,从中提名形成最终评审专家。
15+
16+
**三是进一步提升专业度**,围绕项目、社区、人物三大类别,四家主办单位打磨了更加客观、严谨、贴合实际的评审标准和更加开放、公平、科学的评审办法,在征集过程中公开标准细节,接受社会的意见反馈,形成良性循环。
17+
18+
评审委员会主任王怀民院士指出,人类文明和科技文明发展中,一项成果得以记录、传播、共享才对推动社会进步有价值,开源是群体智慧的现代表征,在当下推动高质量发展、高水平安全具有重要现实意义。通过开源创新榜征集评选工作,可以挖掘和推广我国在开源技术领域的优秀成果和先进经验,为一线科技工作者及其创新成果创造更多展示、交流、推广的机会,希望大家共同努力,将开源创新榜打造成为业界最最权威、最典型和最具影响力的标杆。
19+
20+
评委会最终评选出优秀开源项目 20 个,开放原子开源基金会旗下“孵化期”开源项目“铜锁开源密码学算法库”入选其中:
21+
22+
![Screen Shot](./award-list.png)
23+
24+
铜锁(Tongsuo)是一个提供现代密码学算法和安全通信协议的开源基础密码库,为存储、网络、密钥管理、隐私计算等诸多业务场景提供底层的密码学基础能力,实现数据在传输、使用、存储等过程中的私密性、完整性和可认证性,为数据生命周期中的隐私和安全提供保护能力。
25+
26+
铜锁于2020年10月开源,已获得国家密码管理局商用密码检测中心颁发的商用密码产品认证证书,符合GM/T 0028《密码模块安全技术要求》的安全一级要求,助力用户在密改、密评、等保检查等过程中,更加严谨地满足商用密码技术合规的要求。
27+
当前,铜锁开源项目已经由蚂蚁集团完成了向开放原子开源基金会的捐赠,成为基金会的“孵化期”项目,也是基金会唯一的密码学方向开源项目。在基金会孵化过程中,铜锁开源社区先后启动了“铜锁嵌入式版”和“RustyVault密钥管理系统”两个新项目的开发,已从单一开源项目发展为项目群。蚂蚁集团在铜锁完成捐赠后持续对项目进行投入,成立了铜锁项目管理委员会,引入多家领军企业参与铜锁开源项目的管理,推动铜锁进入到了独立发展的新阶段。
151 KB
Loading

0 commit comments

Comments
 (0)