Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 233e7505 authored by Roman Smirnov's avatar Roman Smirnov Committed by Herbert Xu
Browse files

crypto: ecc - remove checks in crypto_ecdh_shared_secret() and ecc_make_pub_key()


With the current state of the code, ecc_get_curve() cannot return
NULL in crypto_ecdh_shared_secret() and ecc_make_pub_key(). This is
conditioned by the fact that they are only called from ecdh_compute_value(),
which implements the kpp_alg::{generate_public_key,compute_shared_secret}()
methods. Also ecdh implements the kpp_alg::init() method, which is called
before the other methods and sets ecdh_ctx::curve_id to a valid value.

Signed-off-by: default avatarRoman Smirnov <r.smirnov@omp.ru>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4ad27a8b
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment