SRP_CALC_B(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… SRP_CALC_B β€” SRP authentication primitives (3ossl)

okay bestie, sit down, we're doing the OpenSSL manpage thing β€” this is SRP_CALC_B(3ossl), and it's all about the SRP authentication primitives. πŸŽ€


✨ NAME ✨

SRP_Calc_server_key, SRP_Calc_A, SRP_Calc_B_ex, SRP_Calc_B, SRP_Calc_u_ex, SRP_Calc_u, SRP_Calc_x_ex, SRP_Calc_x, SRP_Calc_client_key_ex, SRP_Calc_client_key β€” the SRP authentication primitives, all in one little family 🫢


🌸 SYNOPSIS 🌸

#include <openssl/srp.h>

so like, here's the thing β€” these functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7). no cap, they're on the way out πŸ™ˆ

/* server side .... */
BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
                            const BIGNUM *b, const BIGNUM *N);
BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
                      const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
                  const BIGNUM *v);

BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
                      OSSL_LIB_CTX *libctx, const char *propq);
BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);

/* client side .... */
BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
                            const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
                            OSSL_LIB_CTX *libctx, const char *propq);
BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
                            const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
                      OSSL_LIB_CTX *libctx, const char *propq);
BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first, and I need you to hear me on this one: all of the functions described on this page are deprecated. there are no available replacement functions at this time. that's the vibe check and it failed 😭

the SRP functions on this page are used to calculate various parameters and keys used by SRP as defined in RFC2945. here's how the cast breaks down, main-character style πŸ‘‘

the server side. the server key and the B and u parameters live here, and they get calculated via SRP_Calc_server_key(), SRP_Calc_B_ex(), SRP_Calc_B(), SRP_Calc_u_ex() and SRP_Calc_u().

the client side. the client key and the x and A parameters belong here, and they get calculated via SRP_Calc_client_key_ex(), SRP_Calc_client_key(), SRP_Calc_x_ex(), SRP_Calc_x() and SRP_Calc_A().

for a detailed description of their usage and the meaning of the various BIGNUM parameters to these functions, go read RFC2945 β€” it's giving required reading, iykyk πŸ“š

now, most of these functions come in two forms, and this is lowkey the important bit:

  • the ones that take a libctx and propq parameter
  • and the ones that don't

any cryptographic functions that are fetched and used during the calculation use the provided libctx and propq. see "ALGORITHM FETCHING" in crypto(7) for more details ✨

the variants that don't take a libctx and propq parameter use the default library context and property query string.

and here's a fun lil exception for you: SRP_Calc_server_key() and SRP_Calc_A() do not have a form that takes libctx or propq parameters β€” because they don't need to fetch any cryptographic algorithms at all. they're just built different πŸ’…


πŸ’– RETURN VALUES πŸ’–

all these functions return the calculated key or parameter. and if something goes wrong? NULL on error. that's it, that's the return value. 😭


πŸŽ€ SEE ALSO πŸŽ€


🌈 HISTORY 🌈

  • SRP_Calc_B_ex, SRP_Calc_u_ex, SRP_Calc_client_key_ex and SRP_Calc_x_ex were introduced in OpenSSL 3.0 ✨
  • all of the other functions were added in OpenSSL 1.0.1 πŸ‘΅
  • and then... all of these functions were deprecated in OpenSSL 3.0 πŸ’€

Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


okay that's the whole page, you ate that 🫢 this was SRP_CALC_B(3ossl) from OpenSSL 3.5.6, dated 2026-04-07 β€” go forth and, uh, probably not use these deprecated functions, but now you understand them and that's what matters πŸ’œπŸ§š

πŸ“¦ where this page comes from