rte_crypto_sm2_op_param(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

✨ NAME ✨

okay bestie, welcome to the rte_crypto_sm2_op_param(3) manual page β€” it's from the Library Functions Manual, and it's all about rte_crypto_sm2_op_param, aka SM2 operation params. It's giving β€œstruct field documentation but make it cute,” and every field, line number, warning, and flag is staying right here. No cap. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rte_crypto_asym.h>

🌈 Data Fields 🌈

  • enum rte_crypto_asym_op_type op_type
  • enum rte_crypto_auth_algorithm hash
  • rte_crypto_param message
  • rte_crypto_uint id
  • rte_crypto_uint k
  • rte_crypto_uint r
  • rte_crypto_uint s

πŸŽ€ DETAILED DESCRIPTION πŸŽ€

SM2 operation params. That's the whole vibe.

Definition at line 686 of file rte_crypto_asym.h.

πŸ’… FIELD DOCUMENTATION πŸ’…

πŸ’œ enum rte_crypto_asym_op_type op_type

Signature generation or verification. Pick your op era. ✨

Definition at line 687 of file rte_crypto_asym.h.

🌸 enum rte_crypto_auth_algorithm hash

Hash algorithm used in EC op.

Definition at line 690 of file rte_crypto_asym.h.

πŸ¦‹ rte_crypto_param message

  • Pointer to input data β€” here's the input tea:
    • to be encrypted for SM2 public encrypt.
    • to be signed for SM2 sign generation.
    • to be authenticated for SM2 sign verification.
  • Pointer to output data β€” and here's the output tea:
    • for SM2 private decrypt. In this case the underlying array should have been allocated with enough memory to hold plaintext output (at least encrypted text length). The message.length field will be overwritten by the PMD with the decrypted length.

Definition at line 693 of file rte_crypto_asym.h.

πŸŽ€ rte_crypto_param cipher

  • Pointer to input data β€” for the input side:
    • to be decrypted for SM2 private decrypt.
  • Pointer to output data β€” for the output side:
    • for SM2 public encrypt. In this case the underlying array should have been allocated with enough memory to hold ciphertext output (at least X bytes for prime field curve of N bytes and for message M bytes, where X = (C1 || C2 || C3) and computed based on SM2 RFC as C1 (1 + N + N), C2 = M, C3 = N. The cipher.length field will be overwritten by the PMD with the encrypted length.

Definition at line 709 of file rte_crypto_asym.h.

🧚 struct rte_crypto_ec_point c1

This field is used only when PMD does not support the full process of the SM2 encryption/decryption, but the elliptic curve part only.

In the case of encryption, it is an output β€” point C1 = (x1,y1). In the case of decryption, it is an input β€” point C1 = (x1,y1).

Must be used along with the RTE_CRYPTO_SM2_PARTIAL flag.

Definition at line 724 of file rte_crypto_asym.h.

πŸ“ struct rte_crypto_ec_point kp

This field is used only when PMD does not support the full process of the SM2 encryption/decryption, but the elliptic curve part only.

It is an output in the encryption case, it is a point [k]P = (x2,y2).

Must be used along with the RTE_CRYPTO_SM2_PARTIAL flag.

Definition at line 735 of file rte_crypto_asym.h.

πŸ’– rte_crypto_uint id

The SM2 id used by signer and verifier.

Definition at line 749 of file rte_crypto_asym.h.

πŸ”₯ rte_crypto_uint k

The SM2 per-message secret number, which is an integer in the interval (1, n-1). If the random number is generated by the PMD, the 'rte_crypto_param.data' parameter should be set to NULL.

Definition at line 752 of file rte_crypto_asym.h.

⭐ rte_crypto_uint r

r component of elliptic curve signature β€” output: for signature generation (of at least N bytes where prime field length is N bytes); input: for signature verification.

Definition at line 759 of file rte_crypto_asym.h.

🌈 rte_crypto_uint s

s component of elliptic curve signature β€” output: for signature generation (of at least N bytes where prime field length is N bytes); input: for signature verification.

Definition at line 765 of file rte_crypto_asym.h.

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for DPDK from the source code.


okay bestie, cute little sign-off time: this footer says DPDK, Version 26.03.0, and rte_crypto_sm2_op_param(3). The original footer doesn't print a date, so I'm not inventing one β€” that's the whole footer, periodt. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from