libd0_blind_id_la_SOURCES += d0_bignum-gmp.c
endif
endif
-libd0_blind_id_la_LDFLAGS = -versioninfo 6:0:6
+libd0_blind_id_la_LDFLAGS = -versioninfo 7:0:7
libd0_blind_id_la_CFLAGS = -fvisibility=hidden -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
library_includedir = $(includedir)/d0_blind_id
library_include_HEADERS = d0_blind_id.h d0.h
-AC_INIT([d0_blind_id],[0.4],[divVerent@xonotic.org])
+AC_INIT([d0_blind_id],[0.5],[divVerent@xonotic.org])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall foreign])
AC_PROG_CC
return 0;
}
+D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_verify_private_id(const d0_blind_id_t *ctx)
+{
+ USINGTEMPS(); // temps: temp0 = order, temp1 = g^s
+ USING(schnorr_G); USING(schnorr_s); USING(schnorr_g_to_s);
+
+ LOCKTEMPS();
+ CHECK(d0_dl_get_order(temp0, ctx->schnorr_G));
+ CHECK(d0_bignum_mod_pow(temp1, four, ctx->schnorr_s, ctx->schnorr_G));
+ CHECK(!d0_bignum_cmp(temp1, ctx->schnorr_g_to_s));
+ UNLOCKTEMPS();
+ return 1;
+
+fail:
+ UNLOCKTEMPS();
+ return 0;
+}
+
d0_blind_id_t *d0_blind_id_new(void)
{
d0_blind_id_t *b = d0_malloc(sizeof(d0_blind_id_t));
D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_sign_with_private_id_verify_detached(d0_blind_id_t *ctx, D0_BOOL is_first, D0_BOOL recv_modulus, const char *inbuf, size_t inbuflen, const char *msg, size_t msglen, D0_BOOL *status);
D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_fingerprint64_public_id(const d0_blind_id_t *ctx, char *outbuf, size_t *outbuflen);
D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_verify_public_id(const d0_blind_id_t *ctx, D0_BOOL *status);
+D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_verify_private_id(const d0_blind_id_t *ctx);
D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_sessionkey_public_id(const d0_blind_id_t *ctx, char *outbuf, size_t *outbuflen); // can only be done after successful key exchange, this performs a modpow; key length is limited by SHA_DIGESTSIZE for now; also ONLY valid after successful d0_blind_id_authenticate_with_private_id_verify/d0_blind_id_fingerprint64_public_id
D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_INITIALIZE(void);