A simple library to support serving https.

Dependents:   oldheating gps motorhome heating

Revision:
10:e269fd7b9500
Parent:
4:6a1d887f1cad
Child:
12:2c342345b3db
--- a/pki/pri-key.c	Wed Sep 11 07:24:21 2019 +0000
+++ b/pki/pri-key.c	Tue Sep 24 18:11:02 2019 +0000
@@ -2,7 +2,7 @@
 
 #include "base64.h"
 #include "log.h"
-#include "bignum.h"
+#include "rsa.h"
 
 /*
 RSAPrivateKey ::= SEQUENCE {
@@ -125,17 +125,17 @@
     //Convert message to big number (little endian) format prior to decryption
     uint8_t leMessage[128];
     for (int i = 0; i < 128; i++) leMessage[127 - i] = message[i];
-    return BnExpModStart((uint32_t*)leMessage, (uint32_t*)d, (uint32_t*)n);
+    return RsaSlowStart((uint32_t*)leMessage, (uint32_t*)d, (uint32_t*)n);
 }
 bool PriKeyDecryptFinished(int slot)
 {
-    return BnExpModStatus[slot] == BIGNUM_CALC_FINISHED;
+    return RsaSlowFinished(slot);
 }
 uint8_t* PriKeyDecryptGetResult(int slot)
 {
-    return (uint8_t*) BnExpModGetResult(slot);
+    return (uint8_t*) RsaSlowResult(slot);
 }
 void PriKeyDecryptClear(int slot)
 {
-    BnExpModClear(slot);
+    RsaSlowClear(slot);
 }
\ No newline at end of file