SRP_Calc_B.pod 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. =pod
  2. =head1 NAME
  3. SRP_Calc_server_key,
  4. SRP_Calc_A,
  5. SRP_Calc_B_ex,
  6. SRP_Calc_B,
  7. SRP_Calc_u_ex,
  8. SRP_Calc_u,
  9. SRP_Calc_x_ex,
  10. SRP_Calc_x,
  11. SRP_Calc_client_key_ex,
  12. SRP_Calc_client_key
  13. - SRP authentication primitives
  14. =head1 SYNOPSIS
  15. #include <openssl/srp.h>
  16. /* server side .... */
  17. BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
  18. const BIGNUM *b, const BIGNUM *N);
  19. BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
  20. const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
  21. BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
  22. const BIGNUM *v);
  23. BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
  24. OSSL_LIB_CTX *libctx, const char *propq);
  25. BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
  26. /* client side .... */
  27. BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
  28. const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
  29. OSSL_LIB_CTX *libctx, const char *propq);
  30. BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
  31. const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
  32. BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
  33. OSSL_LIB_CTX *libctx, const char *propq);
  34. BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
  35. BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
  36. =head1 DESCRIPTION
  37. The SRP functions described on this page are used to calculate various
  38. parameters and keys used by SRP as defined in RFC2945. The server key and I<B>
  39. and I<u> parameters are used on the server side and are calculated via
  40. SRP_Calc_server_key(), SRP_Calc_B_ex(), SRP_Calc_B(), SRP_Calc_u_ex() and
  41. SRP_Calc_u(). The client key and B<x> and B<A> parameters are used on the
  42. client side and are calculated via the functions SRP_Calc_client_key_ex(),
  43. SRP_Calc_client_key(), SRP_Calc_x_ex(), SRP_Calc_x() and SRP_Calc_A(). See
  44. RFC2945 for a detailed description of their usage and the meaning of the various
  45. BIGNUM parameters to these functions.
  46. Most of these functions come in two forms. Those that take a I<libctx> and
  47. I<propq> parameter, and those that don't. Any cryptogrpahic functions that
  48. are fetched and used during the calculation use the provided I<libctx> and
  49. I<propq>. See L<provider(7)/Fetching algorithms> for more details. The variants
  50. that do not take a I<libctx> and I<propq> parameter use the default library
  51. context and property query string. The SRP_Calc_server_key() and SRP_Calc_A()
  52. functions do not have a form that takes I<libctx> or I<propq> parameters because
  53. they do not need to fetch any cryptographic algorithms.
  54. =head1 RETURN VALUES
  55. All these functions return the calculated key or parameter, or NULL on error.
  56. =head1 SEE ALSO
  57. L<openssl-srp(1)>,
  58. L<SRP_VBASE_new(3)>,
  59. L<SRP_user_pwd_new(3)>
  60. =head1 HISTORY
  61. These functions were added in OpenSSL 1.0.1.
  62. =head1 COPYRIGHT
  63. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  64. Licensed under the Apache License 2.0 (the "License"). You may not use
  65. this file except in compliance with the License. You can obtain a copy
  66. in the file LICENSE in the source distribution or at
  67. L<https://www.openssl.org/source/license.html>.
  68. =cut