Skip to content

Conversation

@douzzer
Copy link
Owner

@douzzer douzzer commented Oct 26, 2020

No description provided.

Copy link

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly formatting issues otherwise looks good. Please double check the negative poly at 159.

if ((ret = wc_Poly1305_EncodeSizes(&aead->poly, ad_len, src_len)) < 0)
goto out;

if (sl <= -POLY1305_DIGEST_SIZE) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the negative on -POLY1305_DIGEST_SIZE intentional? If so can you add comment explaining?

}

#define curve25519(...) curve25519_wolfshim(__VA_ARGS__)
static inline bool curve25519(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE], const uint8_t basepoint[static CURVE25519_KEY_SIZE]) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read-ability... 80 chars?

const u8 *ad, const size_t ad_len,
const u64 nonce,
const u8 key[CHACHA20POLY1305_KEY_SIZE]) {
word64 inIV[2] = { 0, cpu_to_le64(nonce) };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent

douzzer and others added 18 commits November 2, 2020 12:47
…): for kernel >= 6.2, use get_random_u32_below() rather than prandom_u32_max().
…c.c at >=d9f7629296 can be compiled in the wireguard module.
…vmalloc_node prototype on earlier kernels (e.g. 5.14).
@douzzer douzzer force-pushed the wolfcryptified branch 3 times, most recently from ffebc79 to 34baab6 Compare April 4, 2025 00:48
…r if wc_ChaCha20Poly1305_Final() returns nonzero. fixes new -Wunused-result.
…e[_sync] on kernel >= 6.15, per linux 326534e837 and 8fa7292fee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants