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

Support SM2/SM3/SM4 in this library for pgp #236

Open
TommyLike opened this issue Apr 20, 2023 · 6 comments
Open

Support SM2/SM3/SM4 in this library for pgp #236

TommyLike opened this issue Apr 20, 2023 · 6 comments

Comments

@TommyLike
Copy link

Just cheking, if this will be supported in this pgp libaray

  1. SM2: https://www.openssl.org/docs/manmaster/man7/SM2.html
  2. SM3: https://www.openssl.org/docs/man1.1.1/man3/EVP_sm3.html
  3. SM4: https://www.openssl.org/docs/man3.0/man7/EVP_CIPHER-SM4.html
@TommyLike TommyLike changed the title Support of SM2/SM3/SM4 in this library Support SM2/SM3/SM4 in this library for pgp Apr 20, 2023
@sorairolake
Copy link
Contributor

Are they included in the OpenPGP specification? As far as I know, it doesn't seem to be in RFCs12.

Footnotes

  1. https://datatracker.ietf.org/doc/html/rfc4880

  2. https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh

@TommyLike
Copy link
Author

Are they included in the OpenPGP specification? As far as I know, it doesn't seem to be in RFCs12.

Footnotes

  1. https://datatracker.ietf.org/doc/html/rfc4880
  2. https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh

Correct, it's not in the SPEC, it's been supported in RNP and check here

@sorairolake
Copy link
Contributor

@TommyLike Thanks for information. These Rust implementations are available,123 so this might be easy to solve.

Footnotes

  1. https://crates.io/crates/sm2

  2. https://crates.io/crates/sm3

  3. https://crates.io/crates/sm4

@dignifiedquire
Copy link
Member

Given the availability of those crates, I'd be happy to accept a PR that adds support for these behind a feature flag.

@TommyLike
Copy link
Author

Looking forward to someone who can help on this. 😄

@hko-s
Copy link
Contributor

hko-s commented Mar 3, 2024

There are implementations of all three mechanisms in RustCrypto by now:

https://crates.io/crates/sm2/
https://crates.io/crates/sm3/
https://crates.io/crates/sm4/

However, it seems that the RustCrypto implementation of sm2 is still missing support for the SM2 Key Exchange Protocol and SM2 Public Key Encryption.

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

No branches or pull requests

4 participants