diff src/proto.nacltai.c @ 4:a989ecbd5f53

Fixed nacltai implementation
author ivo <ivo@UFO-Net.nl>
date Fri, 08 Oct 2010 18:18:05 +0200
parents 65c01f57bdce
children cf9b44b46be5
line wrap: on
line diff
--- a/src/proto.nacltai.c	Thu Oct 07 16:04:53 2010 +0200
+++ b/src/proto.nacltai.c	Fri Oct 08 18:18:05 2010 +0200
@@ -168,13 +168,14 @@
 	memset(d->cenonce, 0, crypto_box_NONCEBYTES);
 	memset(d->cdnonce, 0, crypto_box_NONCEBYTES);
 
-	crypto_scalarmult(cownpublickey, csecretkey);
+	const unsigned char base[32] = {9};
+	crypto_scalarmult(cownpublickey, csecretkey, base);
 
 	if (envval = getenv("TIME_WINDOW")) {
 		taia_now(&d->cdtaip);
 		d->cdtaip.sec.x -= atol(envval);
 	} else {
-		printf("Warning: TIME_WINDOW not set, risking an initial replay attack\n");
+		fprintf(stderr, "Warning: TIME_WINDOW not set, risking an initial replay attack\n");
 	}
 	if (envval = getenv("ROLE")) {
 		d->cenonce[nonceoffset-1] = atoi(envval) ? 1 : 0;