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

Add package crypto, move files from tongsuogo to crypto #17

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Add package crypto, move files from tongsuogo to crypto #17

merged 1 commit into from
Dec 25, 2023

Conversation

dongbeiouba
Copy link
Member

Move protocol-independent files to crypto package.
Remove gmsm/sm3, test sm3 with real test data.

@dongbeiouba dongbeiouba requested review from InfoHunter, itomsawyer, wa5i, zzl360 and a team December 21, 2023 10:08
README.md Show resolved Hide resolved
crypto/md5/md5.go Outdated Show resolved Hide resolved
@InfoHunter
Copy link
Member

InfoHunter commented Dec 21, 2023

Move protocol-independent files to crypto package.

这个动机是啥?

@itomsawyer
Copy link
Collaborator

Move protocol-independent files to crypto package.

这个动机是啥?

Make tongsuogo be a drop-in replacement of golang standard crypto package.

@dongbeiouba
Copy link
Member Author

Move protocol-independent files to crypto package.

这个动机是啥?

动机是要把SM4算法挪到crypto文件夹下,成为一个单独的package,就像之前的SHA256、SM3等模块,独立成包,而不是都放在tongsuogo里面。

但是发现牵一发而动全身,受影响的模块非常多,那就只能把协议无关的文件都移动到crypto下。tongsuogo依赖crypto,类似于libssl依赖libcrypto一样。

@InfoHunter
Copy link
Member

有冲突

Move protocol-independent files to crypto package.
Remove gmsm/sm3, test sm3 with real test data.
@dongbeiouba
Copy link
Member Author

有冲突

Fixed

@InfoHunter InfoHunter merged commit 82a881b into Tongsuo-Project:main Dec 25, 2023
1 check passed

// SetDHParameters sets the DH group (DH parameters) used to
// negotiate an emphemeral DH key during handshaking.
func (c *Ctx) SetDHParameters(dh *DH) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么删除这个?

@@ -26,48 +34,48 @@ type SM4Encrypter interface {
}

type SM4Decrypter interface {
DecryptionCipherCtx
// crypto.DecryptionCipherCtx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是不需要的变量定义,请删除

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants