summaryrefslogtreecommitdiffstats
path: root/ncr-dh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncr-dh.c')
-rw-r--r--ncr-dh.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ncr-dh.c b/ncr-dh.c
index 235d021fae4..bc45723fe3e 100644
--- a/ncr-dh.c
+++ b/ncr-dh.c
@@ -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;
+}