/home/abui...cdsa_ctx.h(3)

πŸ“¦ version 1.5.0, in opensuse-leap 16.0

πŸŽ€ /home/abui...cdsa_ctx.h(3) πŸŽ€

okay so bestie, welcome to the Library Functions Manual entry for this header. It’s giving cryptographic API realness, and we’re gonna walk through it together, no cap. πŸ’…


🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/ecdsa_ctx.h β€” ECDSA-CTX API.


✨ SYNOPSIS ✨

🫢 Functions 🫢

int zpc_ecdsa_ctx_alloc (struct zpc_ecdsa_ctx **ctx)
int zpc_ecdsa_ctx_set_key (struct zpc_ecdsa_ctx *ctx, struct zpc_ec_key *key)
int zpc_ecdsa_sign (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, unsigned char *signature, unsigned int *sig_len)
int zpc_ecdsa_verify (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, const unsigned char *signature, unsigned int sig_len)
void zpc_ecdsa_ctx_free (struct zpc_ecdsa_ctx **ctx)

πŸ’– Detailed Description πŸ’–

So this header is literally the ECDSA-CTX API. It’s the sign/verify API for elliptic curve cryptography (ECDSA) algorithms. [5] sign/verify β€” iconic reference behavior, iykyk. ✨

Definition in file ecdsa_ctx.h.


πŸ¦‹ Function Documentation πŸ¦‹

🌟 int zpc_ecdsa_ctx_alloc (struct zpc_ecdsa_ctx **ctx) 🌟

Allocate a new context for an ECDSA sign/verify operation. This is the β€œget your context ready” moment, bestie. 🫢

Parameters

  • ctx β€” ECDSA context

Returns

0 on success. Otherwise, a non-zero error code is returned.


🌟 int zpc_ecdsa_ctx_set_key (struct zpc_ecdsa_ctx *ctx, struct zpc_ec_key *key) 🌟

Set the key to be used in the context of an ECDSA sign/verify operation. Gotta give the context its key, obviously. πŸ”‘

Parameters

  • ctx β€” ECDSA context
  • key β€” EC key

Returns

0 on success. Otherwise, a non-zero error code is returned.


🌟 int zpc_ecdsa_sign (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, unsigned char *signature, unsigned int *sig_len) 🌟

Do an ECDSA sign operation. This is the main-character signing function, periodt. ✍️✨

Parameters

  • ctx β€” ECDSA context
  • hash β€” input message to sign
  • hash_len β€” input message length [bytes]
  • signature β€” signature
  • *sig_len β€” address of signature length field [bytes]. On input, the application must specify the buffer length to receive the signature [bytes]. If signature is NULL, only the length of the signature is returned.

Returns

0 on success. Otherwise, a non-zero error code is returned.


🌟 int zpc_ecdsa_verify (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, const unsigned char *signature, unsigned int sig_len) 🌟

Do an ECDSA verify operation. Time for the vibe check: does this signature actually match? πŸ‘€βœ…

Parameters

  • ctx β€” ECDSA context
  • hash β€” input message to verify
  • hash_len β€” input message length [bytes]
  • signature β€” signature to verify
  • sig_len β€” signature length

Returns

0 on success. Otherwise, a non-zero error code is returned.


🌟 void zpc_ecdsa_ctx_free (struct zpc_ecdsa_ctx **ctx) 🌟

Free an ECDSA context. Cleanup era, we love to see it. πŸ§ΉπŸ’–

Parameters

  • ctx β€” ECDSA context

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libzpc from the source code.


mwah πŸ’‹ okay that’s the whole page β€” source is libzpc, version 1.4, and the footer page is /home/abui...cdsa_ctx.h(3). Date? The footer didn’t give one, so bestie, that’s a mystery πŸ•΅οΈβ€β™€οΈβœ¨

πŸ“¦ where this page comes from