Function nrfxlib_sys::ocrypto_srp_premaster_secret_ctx
source · pub unsafe extern "C" fn ocrypto_srp_premaster_secret_ctx(
ctx: *mut ocrypto_srp_ctx,
s: *mut u8,
pub_a: *const u8,
priv_b: *const u8,
u: *const u8,
v: *const u8
) -> c_int
Expand description
SRP-6 premaster secret with context.
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. -
ctx
- Context. -
s
- Generated premaster secret, must be 32-bit aligned. -
pub_a
- Client public key. -
priv_b
- Server private key. -
u
- Scrambling parameter; generated with *ocrypto_srp_scrambling_parameter
- . -
v
- Password verifier.
Returns 0 If * pub_a
- is a valid public key.
Returns 1 Otherwise.