rte_crypto_sm2_op_param(3)
π rte_crypto_sm2_op_param π
okay bestie, so this lil cutie lives in the DPDK Library Functions Manual, and she's the struct that holds all your SM2 operation params. let's get into it, no cap πΈ
β¨ NAME β¨
rte_crypto_sm2_op_param β literally the SM2 operation params struct, that's her, that's the whole vibe π¦
β¨ SYNOPSIS β¨
#include <rte_crypto_asym.h>
π Data Fields π
here's the whole squad that shows up in this struct:
enum rte_crypto_asym_op_type op_typeenum rte_crypto_auth_algorithm hashrte_crypto_param messagerte_crypto_uint idrte_crypto_uint krte_crypto_uint rrte_crypto_uint s
β¨ Detailed Description β¨
SM2 operation params. periodt π
π 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 main character moment β¨
π Definition at line 687 of file rte_crypto_asym.h.
π enum rte_crypto_auth_algorithm hash
Hash algorithm used in EC op. the hash girlies stay winning π
π Definition at line 690 of file rte_crypto_asym.h.
π rte_crypto_param message
Pointer to input data:
- 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:
- 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.lengthfield will be overwritten by the PMD with the decrypted length. no takebacks, the PMD is editing your length field fr fr π
π Definition at line 693 of file rte_crypto_asym.h.
π rte_crypto_param cipher
Pointer to input data:
- to be decrypted for SM2 private decrypt. π
Pointer to output data:
- for SM2 public encrypt. in this case the underlying array should have been allocated with enough memory to hold ciphertext output (at least
Xbytes for prime field curve ofNbytes and for messageMbytes, whereX = (C1 || C2 || C3)and computed based on SM2 RFC asC1(1 + N + N),C2 = M,C3 = N. thecipher.lengthfield will be overwritten by the PMD with the encrypted length. π the math said what it said!!
π 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. it's giving partial-support energy π
In the case of encryption, it is an output β point C1 = (x1,y1). In the case of decryption, if is an input β point C1 = (x1,y1). (yes bestie, that "if" is in the original, we do not touch the lore π)
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. same partial vibe, different field π«
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. both sides gotta agree, it's a whole relationship π
π 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). π and listen: if the random number is generated by the PMD, the 'rte_crypto_param.data' parameter should be set to NULL. don't come for me, that's just the rule β
π 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
Nbytes where prime field length isNbytes) - 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
Nbytes where prime field length isNbytes) - 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. π€ the robot wrote it, not me, i'm just the messenger π«Ά
<div align="center">πΈ π πΈ</div>
okay that's the whole page bestie, you ate that read π
β¨ β signed, sealed, and shipped straight outta DPDK, Version 25.11.3, on this fine rte_crypto_sm2_op_param(3) era. slay, and go encrypt something π¦π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms