From 3c686ed77190f9f41e721012e9285483f1019513 Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Fri, 10 Mar 2023 16:17:08 +0100 Subject: [PATCH] increased number, using 32bit now --- ASYD_Cryptograhpy/SW03-DHKE/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ASYD_Cryptograhpy/SW03-DHKE/main.c b/ASYD_Cryptograhpy/SW03-DHKE/main.c index 2bda032..2c357df 100644 --- a/ASYD_Cryptograhpy/SW03-DHKE/main.c +++ b/ASYD_Cryptograhpy/SW03-DHKE/main.c @@ -30,9 +30,10 @@ void main(void) { /* Initialize variables */ + // P has to be a prime number! t_encryptionArithmetic P; encryptionArithmetic_Init(&P, KEY_LENGTH); - if (encryptionArithmetic_stringToHex("19", P.number, KEY_LENGTH) == false) { + if (encryptionArithmetic_stringToHex("99497", P.number, KEY_LENGTH) == false) { printf("ERROR: Creating P."); return 1000000; } @@ -46,14 +47,14 @@ void main(void) { t_encryptionArithmetic pub; encryptionArithmetic_Init(&pub, KEY_LENGTH); - if (encryptionArithmetic_stringToHex("11", pub.number, KEY_LENGTH) == false) { + if (encryptionArithmetic_stringToHex("1100", pub.number, KEY_LENGTH) == false) { printf("ERROR: Creating pub."); return 1000002; } t_encryptionArithmetic priv; encryptionArithmetic_Init(&priv, KEY_LENGTH); - if (encryptionArithmetic_stringToHex("21", priv.number, KEY_LENGTH) == false) { + if (encryptionArithmetic_stringToHex("2100", priv.number, KEY_LENGTH) == false) { printf("ERROR: Creating priv."); return 1000003; }