[riot-notifications] [RIOT-OS/RIOT] chacha20poly1305: Initial implementation of AEAD cipher. (#10220)

MrKevinWeiss notifications at github.com
Mon Jan 14 10:22:18 CET 2019

MrKevinWeiss requested changes on this pull request.

> +#define CRYPTO_CHACHA20POLY1305_H
+#include "crypto/poly1305.h"
+#ifdef __cplusplus
+extern "C" {
+#define CHACHA20POLY1305_KEY_BYTES      (32U) /**< Key length in bytes */
+#define CHACHA20POLY1305_NONCE_BYTES    (12U) /**< Nonce length in bytes */
+#define CHACHA20POLY1305_TAG_BYTES      (16U) /**< Tag length in bytes */
+ * @brief Chacha20poly1305 state struct
+ */
+typedef struct

hmm I forgot about this...
Maybe change it to:
typedef union
    /* We need both the state matrix and the poly1305 state, but nearly not at
     * the same time. This works as long as the first 8 members of state
     * overlap fully or completely not with the first and second key parts
     * from the @ref poly1305_ctx_t struct */

    uint32_t state[16];  /**< The current state of the key stream. */
    poly1305_ctx_t poly; /**< Poly1305 state for the MAC */

} chacha20poly1305_ctx_t;
To make it c99 compliant.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190114/631ddbe3/attachment.html>

More information about the notifications mailing list