diff options
Diffstat (limited to 'ncr-dh.c')
-rw-r--r-- | ncr-dh.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -27,7 +27,6 @@ #include <linux/slab.h> #include <linux/random.h> #include <linux/uaccess.h> -#include "cryptodev.h" #include <linux/scatterlist.h> #include <ncr.h> #include <ncr-int.h> @@ -281,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; +} |