summaryrefslogtreecommitdiff
path: root/networking/tls_rsa.h
diff options
context:
space:
mode:
Diffstat (limited to 'networking/tls_rsa.h')
-rw-r--r--networking/tls_rsa.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/networking/tls_rsa.h b/networking/tls_rsa.h
new file mode 100644
index 0000000..3281087
--- /dev/null
+++ b/networking/tls_rsa.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2017 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+typedef struct {
+ pstm_int e, d, N, qP, dP, dQ, p, q;
+ uint32 size; /* Size of the key in bytes */
+ int32 optimized; /* 1 for optimized */
+ psPool_t *pool;
+} psRsaKey_t;
+
+#define psRsaEncryptPub(pool, key, in, inlen, out, outlen, data) \
+ psRsaEncryptPub(pool, key, in, inlen, out, outlen)
+int32 psRsaEncryptPub(psPool_t *pool, psRsaKey_t *key,
+ unsigned char *in, uint32 inlen,
+ unsigned char *out, uint32 outlen, void *data);