1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-12-02 07:30:06 +00:00

Key exchange refactoring!

- LAIKAPKT_HANDSHAKE_REQ now only sends the bot's pub key
	a shared key is generated using the other peer's pub key,
	allowing for fully encrypted packet bodies, (packet ID is
	left in plain-text)
- laikaS_startOutPacket(), laikaS_endOutPacket(),
	laikaS_startInPacket() & laikaS_endInPacket() have been
	added.
- laikaS_setSecure() has been added to turn on/off encrypted packets.
- genKey now generates kx keypairs
- major refactoring for relevant packet handlers
- variadic packets have been temporarily disabled
This commit is contained in:
2022-02-03 16:25:49 -06:00
parent 310a751a07
commit dd173ee422
12 changed files with 162 additions and 97 deletions

View File

@@ -9,7 +9,7 @@
#include "lrsa.h"
struct sLaika_bot {
uint8_t priv[crypto_box_SECRETKEYBYTES], pub[crypto_box_PUBLICKEYBYTES], nonce[LAIKA_NONCESIZE];
uint8_t priv[crypto_kx_SECRETKEYBYTES], pub[crypto_kx_PUBLICKEYBYTES];
struct sLaika_pollList pList;
struct sLaika_peer *peer;
};