X25519 function
X25519 writes a shared key to |out_shared_key| that is calculated from the given private key and the peer's public value. It returns one on success and zero on error.
Don't use the shared key directly, rather use a KDF and also include the two public values as inputs.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
)
>(symbol: 'bssl_dart_X25519')
external int X25519(
ffi.Pointer<ffi.Uint8> out_shared_key,
ffi.Pointer<ffi.Uint8> private_key,
ffi.Pointer<ffi.Uint8> peer_public_value,
);