nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ ocrypto_srp_premaster_secret()

int ocrypto_srp_premaster_secret ( uint8_t s[(384)],
const uint8_t pub_a[(384)],
const uint8_t priv_b[(32)],
const uint8_t u[(64)],
const uint8_t v[(384)] )

#include <crypto/nrf_oberon/include/ocrypto_srp.h>

SRP-6 premaster secret.

The premaster secret between the client and the server is computed using the client public key pub_a, the server private key priv_b, the scrambling parameter u and the password verifier v. If the client public key pub_a is valid, the premaster secret is then put into s. The premaster secret can be used to generate encryption keys.

Parameters
[out]sGenerated premaster secret.
pub_aClient public key.
priv_bServer private key.
uScrambling parameter; generated with ocrypto_srp_scrambling_parameter.
vPassword verifier.
Return values
0If pub_a is a valid public key.
1Otherwise.