Skip to content

SM4 encryption for JWE v1 #5

Description

@jht5945

URL: https://ows.hatter.in/rfc5

JWE format sample:

BASE64URL(UTF8(JWE Protected Header)) || '.' ||
BASE64URL(JWE Encrypted Key) || '.' ||
BASE64URL(JWE Initialization Vector) || '.' ||
BASE64URL(JWE Ciphertext) || '.' ||
BASE64URL(JWE Authentication Tag)
Field Comment
enc SM4GCM
alg dir SM2PKE, SM4SKW

SM2PKE is an elliptic curve based encryption algorithm defined by OSCCA in GM/T 0003.4-2012.

SM4SKW - Simple Key Wrap for SM4

Nonce[12 bytes] || Ciphertext || Tag

In SM4SKW, Ciphertext and Tag's length are always 16 bytes


Reference:

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions