diff options
Diffstat (limited to 'crypto/userspace/ncr-dh.c')
-rw-r--r-- | crypto/userspace/ncr-dh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/userspace/ncr-dh.c b/crypto/userspace/ncr-dh.c index 3a00c0bbc38..e743c4b8994 100644 --- a/crypto/userspace/ncr-dh.c +++ b/crypto/userspace/ncr-dh.c @@ -280,3 +280,15 @@ fail: return ret; } + +int ncr_pk_get_dh_size( dh_key* key) +{ +int ret; + ret = mp_count_bits(&key->p); + if (ret <= 0) { + err(); + return -EINVAL; + } + + return ret; +} |