Skip to main content

Keys, Certificates & Tokens

SM2 Encryption

Process key or token data with SM2 Encrypt and explicit format settings. Enter the key material, choose the required format, then review the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

You can run the tool again after any change.

Options

Your result appears here

Process key or token data with SM2 Encrypt and explicit format settings. Enter the key material, choose the required format, then review the result.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

SM2 Encryption performs SM2 encryption for the supplied key or certificate data. The operation returns encrypted bytes or recovered plaintext in the selected format.

The operation returns encrypted bytes or recovered plaintext in the selected format. This result runs in the browser for this catalog category. Processing runs in the browser.

Encryption protects supplied bytes for a compatible key; it does not provide identity, key exchange policy, or application authorization.

Instructions

  1. Provide text or data for this tool.
  2. Use public fixtures only while testing. This applies to SM2 Encryption.
  3. Keep the scheme and key roles consistent in both directions. This applies to SM2 Encryption.
  4. Inspect binary output as Hex or Base64 when it is not readable text. This applies to SM2 Encryption.

Example

Input: Short public message "Test message" with a disposable public/private key fixture.

Settings: SM2 Encryption: Use the operation's required public or private key format. Select the documented scheme, curve, digest, input format, and output format. Keep the message short enough for the selected public-key scheme.

Result: The operation returns encrypted bytes or recovered plaintext in the selected format.

Limits

  • SM2 Encryption: Public-key encryption has input-size limits and cannot replace a complete protocol.
  • SM2 Encryption: Successful decryption does not authenticate the sender.
  • SM2 Encryption: Key format, padding, curve, and encoding must match the receiving implementation.