aboutsummaryrefslogtreecommitdiff
path: root/e.c
diff options
context:
space:
mode:
Diffstat (limited to 'e.c')
-rw-r--r--e.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/e.c b/e.c
index f224f92..e65d884 100644
--- a/e.c
+++ b/e.c
@@ -1,8 +1,9 @@
#include "lib/monocypher.h"
#include <stdio.h>
#include <unistd.h>
+#include <fcntl.h>
-int main()
+int a()
{
// These keys are taken from https://datatracker.ietf.org/doc/html/rfc7748#section-6.1
uint8_t priv1[32] = { 0x77, 0x07, 0x6d, 0x0a, 0x73, 0x18, 0xa5, 0x7d, 0x3c, 0x16, 0xc1, 0x72, 0x51, 0xb2, 0x66, 0x45, 0xdf, 0x4c, 0x2f, 0x87, 0xeb, 0xc0, 0x99, 0x2a, 0xb1, 0x77, 0xfb, 0xa5, 0x1d, 0xb9, 0x2c, 0x2a };
@@ -19,3 +20,23 @@ int main()
write(1, shared2, 32);
return 0;
}
+
+int b()
+{
+ // These keys are taken from https://datatracker.ietf.org/doc/html/rfc7748#section-6.1
+ // Alright I admit to using a hexeditor to edit C code, aint that fun?
+ uint8_t haha[192] = "wm\ns¥}<ÁrQ²fEßL/‡ëÀ™*±wû¥¹,*]«~bJŠKyዃ€æo;±)&¶ý/‹'ÿˆàë";
+ crypto_x25519_public_key(haha + 64, haha);
+ crypto_x25519_public_key(haha + 96, haha + 32);
+ crypto_x25519(haha + 128, haha, haha+96);
+ crypto_x25519(haha + 160, haha+32, haha+64);
+ write(1, haha+128, 32);
+ write(1, haha+160, 32);
+ return 0;
+}
+
+int main()
+{
+ b();
+ return 0;
+}