From ad342b7e0870185522c7dcb846e71029fcfda335 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Tue, 4 Feb 2020 21:15:59 +0100 Subject: add attestation API --- src/reclaim/reclaim.h | 58 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'src/reclaim/reclaim.h') diff --git a/src/reclaim/reclaim.h b/src/reclaim/reclaim.h index 3da49fe7a..7b5d7ab19 100644 --- a/src/reclaim/reclaim.h +++ b/src/reclaim/reclaim.h @@ -195,12 +195,12 @@ struct AttestationResultMessage /** - * Reference plus Attestation is returned from the idp. + * Start a attribute iteration for the given identity */ -struct ReferenceResultMessage +struct AttributeIterationStartMessage { /** - * Message header + * Message */ struct GNUNET_MessageHeader header; @@ -210,34 +210,33 @@ struct ReferenceResultMessage uint32_t id GNUNET_PACKED; /** - * Length of serialized attestation data + * Identity. */ - uint16_t attest_len GNUNET_PACKED; + struct GNUNET_CRYPTO_EcdsaPrivateKey identity; +}; - /** - * Length of serialized reference data - */ - uint16_t ref_len GNUNET_PACKED; +/** + * Ask for next result of attribute iteration for the given operation + */ +struct AttributeIterationNextMessage +{ /** - * always zero (for alignment) + * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT */ - uint16_t reserved GNUNET_PACKED; + struct GNUNET_MessageHeader header; /** - * The public key of the identity. - */ - struct GNUNET_CRYPTO_EcdsaPublicKey identity; - - /* followed by: - * serialized reference data + attestation data + * Unique identifier for this request (for key collisions). */ + uint32_t id GNUNET_PACKED; }; + /** - * Start a attribute iteration for the given identity + * Start a attestation iteration for the given identity */ -struct AttributeIterationStartMessage +struct AttestationIterationStartMessage { /** * Message @@ -257,9 +256,9 @@ struct AttributeIterationStartMessage /** - * Ask for next result of attribute iteration for the given operation + * Ask for next result of attestation iteration for the given operation */ -struct AttributeIterationNextMessage +struct AttestationIterationNextMessage { /** * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT @@ -273,6 +272,23 @@ struct AttributeIterationNextMessage }; +/** + * Stop attestation iteration for the given operation + */ +struct AttestationIterationStopMessage +{ + /** + * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP + */ + struct GNUNET_MessageHeader header; + + /** + * Unique identifier for this request (for key collisions). + */ + uint32_t id GNUNET_PACKED; +}; + + /** * Stop attribute iteration for the given operation */ -- cgit v1.2.3