SM4-GCM Mode Support · Issue #13667 · openssl/openssl · GitHub
Skip to content

SM4-GCM Mode Support #13667

Closed
Closed

Description

@ssagittis

Please support sm4-gcm mode pls

Activity

  1. added
    triaged: featureThe issue/pr requests/adds a feature
    and removed on Dec 11, 2020
  2. added
    help wantedIssue to be resolved or being resolved by community.
    on Dec 12, 2020
  3. paulidale commented on Dec 12, 2020

    @paulidale
    Contributor

    This is slightly beyond a good first issue I suspect.

    The place I'd start would be the ARIA GCM code in providers/implementations/ciphers.
    Copy the three files, and change ARIA to SM4 throughout.
    Then add the appropriate lines to providers/defltprov.c.

    Assuming that the cipher suite numbers have been officially allocated, adding SM4-GCM cipher suites to TLS would again be following the ARIA example. Edit: the numbers are allocated but adding them will be quite different to ARIA since they are for TLS 1.3.

  4. mattcaswell commented on Dec 12, 2020

    @mattcaswell
    Member

    Assuming that the cipher suite numbers have been officially allocated, adding SM4-GCM cipher suites to TLS would again be following the ARIA example.

    SM4 with GCM ciphersuite numbers have been allocated for TLSv1.3 (https://datatracker.ietf.org/doc/draft-yang-tls-tls13-sm-suites/) but not for TLSv1.2. With ARIA its the other way around: there are no ARIA TLSv1.3 ciphersuites to copy from unfortunately (although there are some TLSv1.2 ones).

  5. paulidale commented on Dec 12, 2020

    @paulidale
    Contributor

    Thanks @mattcaswell, I knew about the TLS 1.3 draft but wasn't sure about 1.2. I'll edit my response's part about TLS.

  6. jim-rowan commented on Aug 10, 2021

    @jim-rowan

    Is there line of sight on implementing this feature? I am looking for Python Cryptography support for SM4 GCM and that relies on OpenSSL.

  7. added this to the Post 3.0.0 milestone on Aug 10, 2021
  8. t8m commented on Aug 10, 2021

    @t8m
    Member

    Is there line of sight on implementing this feature?

    There are no current plans to do this by the team members but if external contributor submitted a PR it would be welcome.

  9. paulidale commented on Feb 10, 2022

    @paulidale
    Contributor

    There never will be an evp_sm4_gcm() function. Instead you should call EVP_CIPHER_fetch(NULL, "sm4-gcm", NULL) to access the cipher. Or something similar if you've got a library context or want a property query included.

  10. paulidale commented on Feb 10, 2022

    @paulidale
    Contributor

    Closing this because SM4-GCM is present.

  11. braveryHuang commented on May 18, 2022

    @braveryHuang

    Hi, i using EVP_CIPHER_fetch(NULL, "sm4-gcm", NULL), but didn't work, i was using version 3.0.3.
    Did sm4-gcm really existed ?

  12. t8m commented on May 18, 2022

    @t8m
    Member

    sm4-gcm is implemented only in the master branch and will be in 3.1 release.

  13. braveryHuang commented on May 18, 2022

    @braveryHuang

    sm4-gcm is implemented only in the master branch and will be in 3.1 release.

    Thank you for your prompt reply.

  14. jackxiaoer commented on Jun 13, 2023

    @jackxiaoer

    @paulidale thank you, EVP_CIPHER_fetch(NULL, "sm4-gcm", NULL), it work.

  15. added a commit that references this issue on Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssue to be resolved or being resolved by community.triaged: featureThe issue/pr requests/adds a feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions