Function nrfxlib_sys::ocrypto_ecdh_p224_common_secret
source · pub unsafe extern "C" fn ocrypto_ecdh_p224_common_secret(
r: *mut u8,
sk: *const u8,
pk: *const u8
) -> c_int
Expand description
ECDH P-224 common secret.
The common secret is computed from both the client’s public key * pk
-
and the server’s secret key * sk
- and put into * r
- .
r
- Generated common secret.sk
- Server private key.pk
- Client public key.
Returns 0 If * sk
- is a valid secret key and * pk
- is a valid public key.
Returns -1 Otherwise.
@remark * r
- may be same as * sk
- or * pk
- .