Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tsapp v1 #8

Merged
merged 51 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6490b53
first commit:首页+随机数生成
VAzureV Aug 8, 2023
fc360c7
随机数生成功能修改
VAzureV Aug 11, 2023
1819557
补充释放new申请的空间
VAzureV Aug 11, 2023
aae0f44
CI测试
VAzureV Aug 20, 2023
34fcad4
Create win-mingw.yml
VAzureV Aug 20, 2023
3ce5700
Merge branch 'main' of https://github.com/VAzureV/tsapp into tsapp_v1
VAzureV Aug 20, 2023
c8fd4d0
CI测试
VAzureV Aug 20, 2023
323e1f4
CI测试2
VAzureV Aug 20, 2023
8b4d076
CI测试
VAzureV Aug 22, 2023
eb5d5ac
CI测试1
VAzureV Aug 22, 2023
bbf95d6
CI测试2
VAzureV Aug 22, 2023
52eedbd
CI测试3
VAzureV Aug 22, 2023
8097562
CI测试4
VAzureV Aug 22, 2023
d86d0bd
CI测试4
VAzureV Aug 22, 2023
7adb793
CI测试4
VAzureV Aug 22, 2023
99c8d40
功能2生成sm2密钥对&功能3sm2加解密
VAzureV Sep 2, 2023
179f746
功能2sm2密钥对生成&功能3sm2加解密
VAzureV Sep 3, 2023
6f673d7
代码格式修改
VAzureV Sep 3, 2023
a601dd7
代码格式修改
VAzureV Sep 3, 2023
29f1e3d
代码格式修改
VAzureV Sep 3, 2023
fcea4eb
代码格式修改
VAzureV Sep 3, 2023
1ce2d7c
代码风格修改
VAzureV Sep 4, 2023
50533c1
代码风格修改
VAzureV Sep 4, 2023
d28dd08
错误处理及使用智能指针重构
VAzureV Sep 11, 2023
f697da3
sm3哈希功能实现
VAzureV Sep 12, 2023
60e22ce
Merge branch 'main' into tsapp_v1
VAzureV Sep 12, 2023
d7619a2
sm2签名和验签
VAzureV Sep 18, 2023
0af8f69
Merge branch 'tsapp_v1' of https://github.com/VAzureV/tsapp into tsap…
VAzureV Sep 18, 2023
de74e43
Merge branch 'main' into tsapp_v1
VAzureV Sep 18, 2023
f1c7783
Merge branch 'tsapp_v1' of https://github.com/VAzureV/tsapp into tsap…
VAzureV Sep 18, 2023
bdf5439
Merge branch 'tsapp_v1' of https://github.com/VAzureV/tsapp into tsap…
VAzureV Sep 18, 2023
b732d1a
判断返回值
VAzureV Sep 19, 2023
6fe63d0
SM4加解密
VAzureV Sep 19, 2023
5e07b26
Merge branch 'main' into tsapp_v1
VAzureV Sep 19, 2023
3dac61e
sm2证书签发
VAzureV Sep 26, 2023
0a12bcc
Merge branch 'tsapp_v1' of https://github.com/VAzureV/tsapp into tsap…
VAzureV Sep 26, 2023
8d9721b
sm2证书签发
VAzureV Sep 26, 2023
16f938f
Merge branch 'main' into tsapp_v1
VAzureV Sep 26, 2023
c015482
sm2证书签发
VAzureV Sep 26, 2023
15813c3
Merge branch 'tsapp_v1' of https://github.com/VAzureV/tsapp into tsap…
VAzureV Sep 26, 2023
1a55e74
SM2签发证书
VAzureV Sep 29, 2023
b48974e
证书签发修改
VAzureV Oct 24, 2023
946fc34
证书签发修改
VAzureV Oct 24, 2023
fe8e5df
证书签发修改
VAzureV Oct 25, 2023
8f5dd16
证书生成函数优化
VAzureV Oct 25, 2023
ba396f0
tlcp客户端
VAzureV Oct 30, 2023
c0795af
Merge branch 'main' into tsapp_v1
VAzureV Oct 30, 2023
31402bb
tlcp客户端
VAzureV Oct 30, 2023
7c744f9
TLCP修改
VAzureV Nov 4, 2023
e11fd3d
TLCP修改
VAzureV Nov 4, 2023
e4307ab
tlcp修改
VAzureV Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# tsapp
基于铜锁密码库开发的商用密码工具箱桌面应用程序

# 功能与特性

> 多数功能都支持用户自输入密钥

- 随机数生成
- SM2密钥对生成
- SM2加解密
- SM2签名与验签
- SM3摘要
- SM4加解密
- 签发SM2证书
- TLCP客户端

# 配置与安装

可以直接安装使用该应用程序,或使用源码在本地使用QT启动。



13 changes: 12 additions & 1 deletion TongsuoToolbox_v01.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
QT += core gui

QT += network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17
Expand All @@ -19,6 +21,7 @@ SOURCES += \
sm2signverify.cpp \
sm3hash.cpp \
sm4encrypt.cpp \
tlcpclient.cpp \
tserror.cpp

HEADERS += \
Expand All @@ -31,6 +34,7 @@ HEADERS += \
sm2signverify.h \
sm3hash.h \
sm4encrypt.h \
tlcpclient.h \
tserror.h

# Default rules for deployment.
Expand All @@ -40,6 +44,9 @@ target.path = $$(PREFIX)
win32: LIBS += -ladvapi32 -lcrypt32 -lgdi32 -luser32 -lws2_32 -L$$(TONGSUO_HOME)/lib -llibcrypto
else:unix: LIBS += -L$$(TONGSUO_HOME)/lib64 -lcrypto

win32: LIBS += -ladvapi32 -lcrypt32 -lgdi32 -luser32 -lws2_32 -L$$(TONGSUO_HOME)/lib -llibssl
else:unix: LIBS += -L$$(TONGSUO_HOME)/lib64 -lssl

INCLUDEPATH += $$(TONGSUO_HOME)/include
DEPENDPATH += $$(TONGSUO_HOME)/include

Expand All @@ -55,7 +62,11 @@ FORMS += \
sm2key.ui \
sm2signverify.ui \
sm3hash.ui \
sm4encrypt.ui
sm4encrypt.ui \
tlcpclient.ui

RESOURCES += \
certs.qrc \
images.qrc

DISTFILES +=
8 changes: 6 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ MainWindow::MainWindow(QWidget *parent)
sm4Encry = new Sm4encrypt();
/* SM2签发证书实例化 */
sm2Cer = new Sm2Cert();
/* TLCP客户端实例化 */
tlcpClient = new TLCPclient();
/* 左侧功能导航 */
QList<QString> strListWidgetList;
strListWidgetList << "首页"
Expand All @@ -42,8 +44,9 @@ MainWindow::MainWindow(QWidget *parent)
<< "SM3哈希"
<< "SM2签名验签"
<< "SM4加解密"
<< "SM2签发证书";
for (int i = 0; i < 8; i++) {
<< "SM2签发证书"
<< "TLCP客户端";
for (int i = 0; i < 9; i++) {
/* listWidget 插入项 */
listWidget->insertItem(i, strListWidgetList[i]);
}
Expand All @@ -56,6 +59,7 @@ MainWindow::MainWindow(QWidget *parent)
stackedWidget->addWidget(sm2SignVerify);
stackedWidget->addWidget(sm4Encry);
stackedWidget->addWidget(sm2Cer);
stackedWidget->addWidget(tlcpClient);
/* 设置列表的最大宽度 */
listWidget->setMaximumWidth(200);
/* 添加到水平布局 */
Expand Down
3 changes: 3 additions & 0 deletions mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "sm2signverify.h"
#include "sm3hash.h"
#include "sm4encrypt.h"
#include "tlcpclient.h"
#include <QHBoxLayout>
#include <QListWidget>
#include <QMainWindow>
Expand Down Expand Up @@ -47,5 +48,7 @@ class MainWindow : public QMainWindow
Sm4encrypt *sm4Encry;
/* sm2签发证书 */
Sm2Cert *sm2Cer;
/* TLCP客户端界面 */
TLCPclient *tlcpClient;
};
#endif // MAINWINDOW_H
15 changes: 15 additions & 0 deletions randnum.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="0" column="3">
Expand Down Expand Up @@ -81,13 +86,23 @@
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonGen">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>生成</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditInput">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>1</string>
</property>
Expand Down
82 changes: 78 additions & 4 deletions sm2cert.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,23 @@
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>签名证书&amp;密钥:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="lineEditDays">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>365</string>
</property>
Expand All @@ -46,6 +56,11 @@
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="lineEditCN">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="inputMask">
<string/>
</property>
Expand All @@ -58,17 +73,33 @@
</widget>
</item>
<item row="4" column="2">
<widget class="QTextBrowser" name="textBrowserSignOutput"/>
<widget class="QTextBrowser" name="textBrowserSignOutput">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="pushButtonGen">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>生成证书</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>通用名称:</string>
</property>
Expand All @@ -89,13 +120,23 @@
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>私钥/请求:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>有效天数:</string>
</property>
Expand All @@ -108,13 +149,23 @@
</property>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>自动生成</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>手动生成</string>
</property>
Expand All @@ -136,20 +187,43 @@
</layout>
</item>
<item row="5" column="2">
<widget class="QTextBrowser" name="textBrowserEncryptOutput"/>
<widget class="QTextBrowser" name="textBrowserEncryptOutput">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>加密证书&amp;密钥:</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QTextBrowser" name="textBrowserSignKey"/>
<widget class="QTextBrowser" name="textBrowserSignKey">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QTextBrowser" name="textBrowserEncryKey"/>
<widget class="QTextBrowser" name="textBrowserEncryKey">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
Expand Down
20 changes: 20 additions & 0 deletions sm2encrypt.ui
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditPub">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>04C370A09551DCC0321F0927A44B1A4D6ED5C39C06B336AA8FDE3389AAE830CC518C54BE3D1EAAAF45E8A34F41BCEA429EAD6B3271189B967CD248FF566F9F5161</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditPri">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>54519B9E1FD670D429B4D8EDE7A9A0322C5A6D3C3E9446903EFA5FE2C6B49EC2</string>
</property>
Expand Down Expand Up @@ -110,13 +120,23 @@
</item>
<item row="0" column="2" rowspan="2">
<widget class="QPlainTextEdit" name="plainTextEditOutput">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::WidgetWidth</enum>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QPlainTextEdit" name="plainTextEditInput">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="plainText">
<string>hello Tongsuo</string>
</property>
Expand Down
4 changes: 2 additions & 2 deletions sm2key.ui
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>12</pointsize>
</font>
</property>
</widget>
Expand Down Expand Up @@ -179,7 +179,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>12</pointsize>
</font>
</property>
</widget>
Expand Down
Loading
Loading